make indent
authorSam Lantinga <slouken@libsdl.org>
Thu, 14 Jun 2007 13:21:29 +0000
changeset 21202c835d58faad
parent 2119 9341a884a4d9
child 2121 85ed90a755fa
make indent
include/SDL_video.h
src/joystick/darwin/10.3.9-FIX/IOHIDLib.h
src/joystick/darwin/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick.c
src/loadso/beos/SDL_sysloadso.c
src/stdlib/SDL_string.c
src/timer/mint/SDL_systimer.c
src/video/SDL_blit_A.c
src/video/SDL_pixels.c
src/video/bwindow/SDL_sysvideo.cc
src/video/directfb/SDL_DirectFB_yuv.c
src/video/fbcon/SDL_fbvideo.c
src/video/gem/SDL_gemvideo.c
src/video/x11/SDL_x11dyn.c
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios.h
src/video/xbios/SDL_xbiosmodes.c
test/testloadso.c
     1.1 --- a/include/SDL_video.h	Thu Jun 14 06:32:36 2007 +0000
     1.2 +++ b/include/SDL_video.h	Thu Jun 14 13:21:29 2007 +0000
     1.3 @@ -1300,9 +1300,9 @@
     1.4  /*
     1.5   * Maps an RGB triple to an opaque pixel value for a given pixel format
     1.6   */
     1.7 -extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * const format,
     1.8 -                                          const Uint8 r, const Uint8 g,
     1.9 -                                          const Uint8 b);
    1.10 +extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat *
    1.11 +                                          const format, const Uint8 r,
    1.12 +                                          const Uint8 g, const Uint8 b);
    1.13  
    1.14  /*
    1.15   * Maps an RGBA quadruple to a pixel value for a given pixel format
     2.1 --- a/src/joystick/darwin/10.3.9-FIX/IOHIDLib.h	Thu Jun 14 06:32:36 2007 +0000
     2.2 +++ b/src/joystick/darwin/10.3.9-FIX/IOHIDLib.h	Thu Jun 14 13:21:29 2007 +0000
     2.3 @@ -1,3 +1,4 @@
     2.4 +/* *INDENT-OFF* */
     2.5  /*
     2.6   *
     2.7   * @APPLE_LICENSE_HEADER_START@
     3.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Thu Jun 14 06:32:36 2007 +0000
     3.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Thu Jun 14 13:21:29 2007 +0000
     3.3 @@ -693,10 +693,10 @@
     3.4  */
     3.5  
     3.6          /* Filter device list to non-keyboard/mouse stuff */
     3.7 -        if ( (device->usagePage != kHIDPage_GenericDesktop) ||
     3.8 -             ((device->usage != kHIDUsage_GD_Joystick &&
     3.9 -               device->usage != kHIDUsage_GD_GamePad &&
    3.10 -               device->usage != kHIDUsage_GD_MultiAxisController)) ) {
    3.11 +        if ((device->usagePage != kHIDPage_GenericDesktop) ||
    3.12 +            ((device->usage != kHIDUsage_GD_Joystick &&
    3.13 +              device->usage != kHIDUsage_GD_GamePad &&
    3.14 +              device->usage != kHIDUsage_GD_MultiAxisController))) {
    3.15  
    3.16              /* release memory for the device */
    3.17              HIDDisposeDevice(&device);
     4.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Thu Jun 14 06:32:36 2007 +0000
     4.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Thu Jun 14 13:21:29 2007 +0000
     4.3 @@ -53,7 +53,7 @@
     4.4      "SideWinder Precision Pro", 4, 1, 0}, {
     4.5      "SideWinder 3D Pro", 4, 1, 0}, {
     4.6      "Microsoft SideWinder 3D Pro", 4, 1, 0}, {
     4.7 -    "Microsoft SideWinder Precision Pro", 4, 1, 0 }, {
     4.8 +    "Microsoft SideWinder Precision Pro", 4, 1, 0}, {
     4.9      "Microsoft SideWinder Dual Strike USB version 1.0", 2, 1, 0}, {
    4.10      "WingMan Interceptor", 3, 3, 0}, {
    4.11      "WingMan Extreme Digital 3D", 4, 1, 0}, {
     5.1 --- a/src/loadso/beos/SDL_sysloadso.c	Thu Jun 14 06:32:36 2007 +0000
     5.2 +++ b/src/loadso/beos/SDL_sysloadso.c	Thu Jun 14 13:21:29 2007 +0000
     5.3 @@ -49,7 +49,8 @@
     5.4  {
     5.5      void *sym = NULL;
     5.6      image_id library_id = (image_id) handle;
     5.7 -    status_t rc = get_image_symbol(library_id, name, B_SYMBOL_TYPE_TEXT, &sym);
     5.8 +    status_t rc =
     5.9 +        get_image_symbol(library_id, name, B_SYMBOL_TYPE_TEXT, &sym);
    5.10      if (rc != B_NO_ERROR) {
    5.11          SDL_SetError(strerror(rc));
    5.12      }
    5.13 @@ -69,4 +70,3 @@
    5.14  #endif /* SDL_LOADSO_BEOS */
    5.15  
    5.16  /* vi: set ts=4 sw=4 expandtab: */
    5.17 -
     6.1 --- a/src/stdlib/SDL_string.c	Thu Jun 14 06:32:36 2007 +0000
     6.2 +++ b/src/stdlib/SDL_string.c	Thu Jun 14 13:21:29 2007 +0000
     6.3 @@ -298,8 +298,8 @@
     6.4  {
     6.5      char *srcp = (char *) src;
     6.6      char *dstp = (char *) dst;
     6.7 -    srcp += len-1;
     6.8 -    dstp += len-1;
     6.9 +    srcp += len - 1;
    6.10 +    dstp += len - 1;
    6.11      while (len--) {
    6.12          *dstp-- = *srcp--;
    6.13      }
    6.14 @@ -872,7 +872,8 @@
    6.15                              ++index;
    6.16                          }
    6.17                          if (text[index] == '0') {
    6.18 -                            if (SDL_tolower((unsigned char) text[index + 1]) == 'x') {
    6.19 +                            if (SDL_tolower((unsigned char) text[index + 1])
    6.20 +                                == 'x') {
    6.21                                  radix = 16;
    6.22                              } else {
    6.23                                  radix = 8;
     7.1 --- a/src/timer/mint/SDL_systimer.c	Thu Jun 14 06:32:36 2007 +0000
     7.2 +++ b/src/timer/mint/SDL_systimer.c	Thu Jun 14 13:21:29 2007 +0000
     7.3 @@ -80,8 +80,8 @@
     7.4      if (read_hz200_from_vbl) {
     7.5          now = SDL_Atari_hz200;
     7.6      } else {
     7.7 -        void *old_stack = (void *)Super(0);
     7.8 -        now = *((volatile long *)_hz_200);
     7.9 +        void *old_stack = (void *) Super(0);
    7.10 +        now = *((volatile long *) _hz_200);
    7.11          Super(old_stack);
    7.12      }
    7.13  
     8.1 --- a/src/video/SDL_blit_A.c	Thu Jun 14 06:32:36 2007 +0000
     8.2 +++ b/src/video/SDL_blit_A.c	Thu Jun 14 13:21:29 2007 +0000
     8.3 @@ -387,9 +387,11 @@
     8.4      packsswb_r2r(mm6, mm3);     /* 0000FFFF -> mm3 */
     8.5      pxor_r2r(mm0, mm3);         /* 0000F000 -> mm3 (~channel mask) */
     8.6      /* get alpha channel shift */
     8.7 +    /* *INDENT-OFF* */
     8.8      __asm__ __volatile__ (
     8.9          "movd %0, %%mm5"
    8.10          : : "rm" ((Uint32) sf->Ashift) ); /* Ashift -> mm5 */
    8.11 +    /* *INDENT-ON* */
    8.12  
    8.13      while (height--) {
    8.14  	    /* *INDENT-OFF* */
     9.1 --- a/src/video/SDL_pixels.c	Thu Jun 14 06:32:36 2007 +0000
     9.2 +++ b/src/video/SDL_pixels.c	Thu Jun 14 13:21:29 2007 +0000
     9.3 @@ -551,8 +551,8 @@
     9.4  
     9.5  /* Find the pixel value corresponding to an RGBA quadruple */
     9.6  Uint32
     9.7 -SDL_MapRGBA(const SDL_PixelFormat * const format, const Uint8 r, const Uint8 g,
     9.8 -            const Uint8 b, const Uint8 a)
     9.9 +SDL_MapRGBA(const SDL_PixelFormat * const format, const Uint8 r,
    9.10 +            const Uint8 g, const Uint8 b, const Uint8 a)
    9.11  {
    9.12      if (format->palette == NULL) {
    9.13          return (r >> format->Rloss) << format->Rshift
    10.1 --- a/src/video/bwindow/SDL_sysvideo.cc	Thu Jun 14 06:32:36 2007 +0000
    10.2 +++ b/src/video/bwindow/SDL_sysvideo.cc	Thu Jun 14 13:21:29 2007 +0000
    10.3 @@ -372,7 +372,7 @@
    10.4          modes = SDL_modelist[((bpp + 7) / 8) - 1];
    10.5  
    10.6          bool exactmatch = false;
    10.7 -        for ( uint32 x = 0; modes[x]; x++ ) {
    10.8 +        for (uint32 x = 0; modes[x]; x++) {
    10.9              if (modes[x]->w == width && modes[x]->h == height) {
   10.10                  exactmatch = true;
   10.11                  i = x;
   10.12 @@ -385,7 +385,8 @@
   10.13                  /* still looking */
   10.14              }
   10.15              if (!modes[i] || (modes[i]->w < width) || (modes[i]->h < height)) {
   10.16 -                --i;                /* We went too far */
   10.17 +                /* We went too far */
   10.18 +                --i;
   10.19              }
   10.20          }
   10.21          width = modes[i]->w;
    11.1 --- a/src/video/directfb/SDL_DirectFB_yuv.c	Thu Jun 14 06:32:36 2007 +0000
    11.2 +++ b/src/video/directfb/SDL_DirectFB_yuv.c	Thu Jun 14 13:21:29 2007 +0000
    11.3 @@ -119,7 +119,8 @@
    11.4      /* Need to set coop level or newer DirectFB versions will fail here. */
    11.5      ret = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
    11.6      if (ret) {
    11.7 -        SetDirectFBError("IDirectFBDisplayLayer::SetCooperativeLevel() failed", ret);
    11.8 +        SetDirectFBError
    11.9 +            ("IDirectFBDisplayLayer::SetCooperativeLevel() failed", ret);
   11.10          layer->Release(layer);
   11.11          return ret;
   11.12      }
    12.1 --- a/src/video/fbcon/SDL_fbvideo.c	Thu Jun 14 06:32:36 2007 +0000
    12.2 +++ b/src/video/fbcon/SDL_fbvideo.c	Thu Jun 14 13:21:29 2007 +0000
    12.3 @@ -181,7 +181,8 @@
    12.4                             struct fb_var_screeninfo *vinfo);
    12.5  static void FB_RestorePalette(_THIS);
    12.6  
    12.7 -static int SDL_getpagesize(void)
    12.8 +static int
    12.9 +SDL_getpagesize(void)
   12.10  {
   12.11  #ifdef HAVE_GETPAGESIZE
   12.12      return getpagesize();
   12.13 @@ -189,7 +190,8 @@
   12.14      return PAGE_SIZE;
   12.15  #else
   12.16  #error Can not determine system page size.
   12.17 -    return 4096;  /* this is what it USED to be in Linux... */
   12.18 +    /* this is what it USED to be in Linux... */
   12.19 +    return 4096;
   12.20  #endif
   12.21  }
   12.22  
    13.1 --- a/src/video/gem/SDL_gemvideo.c	Thu Jun 14 06:32:36 2007 +0000
    13.2 +++ b/src/video/gem/SDL_gemvideo.c	Thu Jun 14 13:21:29 2007 +0000
    13.3 @@ -650,7 +650,7 @@
    13.4          /*--- Verify if asked mode can be used ---*/
    13.5      if (VDI_bpp != bpp) {
    13.6          SDL_SetError("%d bpp mode not supported", bpp);
    13.7 -        return(NULL);
    13.8 +        return (NULL);
    13.9      }
   13.10  
   13.11      if (flags & SDL_FULLSCREEN) {
   13.12 @@ -774,10 +774,10 @@
   13.13              /* Center window */
   13.14              x2 = (GEM_desk_w - w2) >> 1;
   13.15              y2 = (GEM_desk_h - h2) >> 1;
   13.16 -            if (x2<0) {
   13.17 +            if (x2 < 0) {
   13.18                  x2 = 0;
   13.19              }
   13.20 -            if (y2<0) {
   13.21 +            if (y2 < 0) {
   13.22                  y2 = 0;
   13.23              }
   13.24              x2 += GEM_desk_x;
   13.25 @@ -811,9 +811,11 @@
   13.26              wind_open(GEM_handle, x2, y2, w2, h2);
   13.27          } else {
   13.28              /* Resize window to fit asked video mode */
   13.29 -            wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
   13.30 -            if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
   13.31 -                wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
   13.32 +            wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2);
   13.33 +            if (wind_calc
   13.34 +                (WC_BORDER, GEM_win_type, x2, y2, width, height, &x2, &y2,
   13.35 +                 &w2, &h2)) {
   13.36 +                wind_set(GEM_handle, WF_CURRXYWH, x2, y2, w2, h2);
   13.37              }
   13.38          }
   13.39  
    14.1 --- a/src/video/x11/SDL_x11dyn.c	Thu Jun 14 06:32:36 2007 +0000
    14.2 +++ b/src/video/x11/SDL_x11dyn.c	Thu Jun 14 13:21:29 2007 +0000
    14.3 @@ -167,10 +167,12 @@
    14.4          X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8, (void **) &pXCreateIC);
    14.5  #endif
    14.6  
    14.7 -        if (SDL_X11_HAVE_BASEXLIB) {  /* all required symbols loaded. */
    14.8 +        if (SDL_X11_HAVE_BASEXLIB) {
    14.9 +            /* all required symbols loaded. */
   14.10              SDL_ClearError();
   14.11          } else {
   14.12 -            SDL_X11_UnloadSymbols();  /* in case something got loaded... */
   14.13 +            /* in case something got loaded... */
   14.14 +            SDL_X11_UnloadSymbols();
   14.15              rc = 0;
   14.16          }
   14.17      }
    15.1 --- a/src/video/xbios/SDL_xbios.c	Thu Jun 14 06:32:36 2007 +0000
    15.2 +++ b/src/video/xbios/SDL_xbios.c	Thu Jun 14 13:21:29 2007 +0000
    15.3 @@ -97,10 +97,10 @@
    15.4          if (VgetMonitor() == MONITOR_MONO)
    15.5              return 0;
    15.6          /*if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) {
    15.7 -            if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *) cookie_scpn)) {
    15.8 -                return 0;
    15.9 -            }
   15.10 -        }*/
   15.11 +           if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *) cookie_scpn)) {
   15.12 +           return 0;
   15.13 +           }
   15.14 +           } */
   15.15          break;
   15.16      default:
   15.17          return 0;
    16.1 --- a/src/video/xbios/SDL_xbios.h	Thu Jun 14 06:32:36 2007 +0000
    16.2 +++ b/src/video/xbios/SDL_xbios.h	Thu Jun 14 13:21:29 2007 +0000
    16.3 @@ -29,12 +29,12 @@
    16.4  
    16.5  typedef struct SDL_VideoData
    16.6  {
    16.7 -    long cookie_vdo;		/* _VDO cookie */
    16.8 +    long cookie_vdo;            /* _VDO cookie */
    16.9  
   16.10 -    Uint16 old_modecode;	/* Current video mode */
   16.11 -    void *old_vbase;		/* Current pointer to video RAM */
   16.12 -    int old_numcol;		/* Number of colors in saved palette */
   16.13 -    Uint32 old_palette[256];	/* Buffer to save current palette */
   16.14 +    Uint16 old_modecode;        /* Current video mode */
   16.15 +    void *old_vbase;            /* Current pointer to video RAM */
   16.16 +    int old_numcol;             /* Number of colors in saved palette */
   16.17 +    Uint32 old_palette[256];    /* Buffer to save current palette */
   16.18  
   16.19  #if 0
   16.20      int old_video_mode;         /* Old video mode before entering SDL */
    17.1 --- a/src/video/xbios/SDL_xbiosmodes.c	Thu Jun 14 06:32:36 2007 +0000
    17.2 +++ b/src/video/xbios/SDL_xbiosmodes.c	Thu Jun 14 13:21:29 2007 +0000
    17.3 @@ -28,13 +28,14 @@
    17.4  #include "SDL_xbiosmodes.h"
    17.5  
    17.6  
    17.7 -typedef struct {
    17.8 -    int width,height,bpp;
    17.9 +typedef struct
   17.10 +{
   17.11 +    int width, height, bpp;
   17.12      int modecode;
   17.13      int doubleline;
   17.14  } xbios_mode_t;
   17.15  
   17.16 -static xbios_mode_t falcon_rgb_modes[]={
   17.17 +static xbios_mode_t falcon_rgb_modes[] = {
   17.18      {768, 480, 16, BPS16 | COL80 | OVERSCAN | VERTFLAG},
   17.19      {768, 240, 16, BPS16 | COL80 | OVERSCAN},
   17.20      {640, 400, 16, BPS16 | COL80 | VERTFLAG},
   17.21 @@ -52,19 +53,19 @@
   17.22      {320, 400, 8, BPS8 | VERTFLAG},
   17.23      {320, 200, 8, BPS8}
   17.24  };
   17.25 - 
   17.26 -static xbios_mode_t falcon_vga_modes[]={
   17.27 -    {320, 480, 16, BPS16 },
   17.28 +
   17.29 +static xbios_mode_t falcon_vga_modes[] = {
   17.30 +    {320, 480, 16, BPS16},
   17.31      {320, 240, 16, BPS16 | VERTFLAG},
   17.32      {640, 480, 8, BPS8 | COL80},
   17.33      {640, 240, 8, BPS8 | COL80 | VERTFLAG},
   17.34 -    {320, 480, 8, BPS8 },
   17.35 +    {320, 480, 8, BPS8},
   17.36      {320, 240, 8, BPS8 | VERTFLAG}
   17.37  };
   17.38  
   17.39  static void
   17.40  SDL_XBIOS_AddMode(_THIS, int width, int height, int bpp, Uint16 modecode,
   17.41 -    SDL_bool doubleline)
   17.42 +                  SDL_bool doubleline)
   17.43  {
   17.44      SDL_VideoDisplay display;
   17.45      SDL_DisplayData *displaydata;
   17.46 @@ -74,9 +75,9 @@
   17.47  
   17.48      Rmask = Gmask = Bmask = Amask = 0;
   17.49      if (bpp == 16) {
   17.50 -        Rmask = 31<<11;
   17.51 -	Gmask = 63<<5;
   17.52 -	Bmask = 31;
   17.53 +        Rmask = 31 << 11;
   17.54 +        Gmask = 63 << 5;
   17.55 +        Bmask = 31;
   17.56      }
   17.57      /* Memorize for c2p4 operation */
   17.58      orig_bpp = bpp;
   17.59 @@ -92,7 +93,7 @@
   17.60  
   17.61      displaydata = (SDL_DisplayData *) SDL_malloc(sizeof(*displaydata));
   17.62      if (!displaydata) {
   17.63 -       return;
   17.64 +        return;
   17.65      }
   17.66      displaydata->modecode = modecode;
   17.67      displaydata->doubleline = doubleline;
   17.68 @@ -140,7 +141,7 @@
   17.69          break;
   17.70      case VDO_TT:
   17.71          Setscreen(-1, data->old_vbase, -1);
   17.72 -	EsetShift(data->old_modecode);
   17.73 +        EsetShift(data->old_modecode);
   17.74          break;
   17.75      case VDO_F30:
   17.76          Setscreen(-1, data->old_vbase, -1);
   17.77 @@ -204,8 +205,8 @@
   17.78      case VDO_F30:
   17.79          data->old_numcol = 1 << (1 << (data->old_modecode & NUMCOLS));
   17.80          if (data->old_numcol > 256) {
   17.81 -	    data->old_numcol = 0;
   17.82 -	} else {
   17.83 +            data->old_numcol = 0;
   17.84 +        } else {
   17.85              VgetRGB(0, data->old_numcol, data->old_palette);
   17.86          }
   17.87          break;
   17.88 @@ -261,7 +262,7 @@
   17.89          break;
   17.90      case VDO_F30:
   17.91          {
   17.92 -	    Uint16 modecodemask = data->old_modecode & (VGA | PAL);
   17.93 +            Uint16 modecodemask = data->old_modecode & (VGA | PAL);
   17.94              int i;
   17.95  
   17.96              switch (VgetMonitor()) {
   17.97 @@ -270,19 +271,27 @@
   17.98                  break;
   17.99              case MONITOR_RGB:
  17.100              case MONITOR_TV:
  17.101 -               for (i=0; i<sizeof(falcon_rgb_modes)/sizeof(xbios_mode_t); i++) {
  17.102 -                   SDL_XBIOS_AddMode(_this, falcon_rgb_modes[i].width,
  17.103 -		       falcon_rgb_modes[i].height, falcon_rgb_modes[i].bpp,
  17.104 -		       falcon_rgb_modes[i].modecode & modecodemask, SDL_FALSE);
  17.105 -	       }
  17.106 -               break;
  17.107 +                for (i = 0;
  17.108 +                     i < sizeof(falcon_rgb_modes) / sizeof(xbios_mode_t);
  17.109 +                     i++) {
  17.110 +                    SDL_XBIOS_AddMode(_this, falcon_rgb_modes[i].width,
  17.111 +                                      falcon_rgb_modes[i].height,
  17.112 +                                      falcon_rgb_modes[i].bpp,
  17.113 +                                      falcon_rgb_modes[i].
  17.114 +                                      modecode & modecodemask, SDL_FALSE);
  17.115 +                }
  17.116 +                break;
  17.117              case MONITOR_VGA:
  17.118 -               for (i=0; i<sizeof(falcon_vga_modes)/sizeof(xbios_mode_t); i++) {
  17.119 -                   SDL_XBIOS_AddMode(_this, falcon_vga_modes[i].width,
  17.120 -		       falcon_vga_modes[i].height, falcon_vga_modes[i].bpp,
  17.121 -		       falcon_vga_modes[i].modecode & modecodemask, SDL_FALSE);
  17.122 -	       }
  17.123 -               break;
  17.124 +                for (i = 0;
  17.125 +                     i < sizeof(falcon_vga_modes) / sizeof(xbios_mode_t);
  17.126 +                     i++) {
  17.127 +                    SDL_XBIOS_AddMode(_this, falcon_vga_modes[i].width,
  17.128 +                                      falcon_vga_modes[i].height,
  17.129 +                                      falcon_vga_modes[i].bpp,
  17.130 +                                      falcon_vga_modes[i].
  17.131 +                                      modecode & modecodemask, SDL_FALSE);
  17.132 +                }
  17.133 +                break;
  17.134              }
  17.135          }
  17.136          break;
    18.1 --- a/test/testloadso.c	Thu Jun 14 06:32:36 2007 +0000
    18.2 +++ b/test/testloadso.c	Thu Jun 14 13:21:29 2007 +0000
    18.3 @@ -7,65 +7,64 @@
    18.4  
    18.5  #include "SDL.h"
    18.6  
    18.7 -typedef int (*fntype)(const char *);
    18.8 +typedef int (*fntype) (const char *);
    18.9  
   18.10 -int main(int argc, char *argv[])
   18.11 +int
   18.12 +main(int argc, char *argv[])
   18.13  {
   18.14 -	int retval = 0;
   18.15 -	int hello = 0;
   18.16 -	const char *libname = NULL;
   18.17 -	const char *symname = NULL;
   18.18 -	void *lib = NULL;
   18.19 -	fntype fn = NULL;
   18.20 +    int retval = 0;
   18.21 +    int hello = 0;
   18.22 +    const char *libname = NULL;
   18.23 +    const char *symname = NULL;
   18.24 +    void *lib = NULL;
   18.25 +    fntype fn = NULL;
   18.26  
   18.27 -	if (argc != 3) {
   18.28 -		const char *app = argv[0];
   18.29 -		fprintf(stderr, "USAGE: %s <library> <functionname>\n", app);
   18.30 -		fprintf(stderr, "       %s --hello <lib with puts()>\n", app);
   18.31 -		return 1;
   18.32 -	}
   18.33 +    if (argc != 3) {
   18.34 +        const char *app = argv[0];
   18.35 +        fprintf(stderr, "USAGE: %s <library> <functionname>\n", app);
   18.36 +        fprintf(stderr, "       %s --hello <lib with puts()>\n", app);
   18.37 +        return 1;
   18.38 +    }
   18.39  
   18.40 -	/* Initialize SDL */
   18.41 -	if ( SDL_Init(0) < 0 ) {
   18.42 -		fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
   18.43 -		return 2;
   18.44 -	}
   18.45 +    /* Initialize SDL */
   18.46 +    if (SDL_Init(0) < 0) {
   18.47 +        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
   18.48 +        return 2;
   18.49 +    }
   18.50  
   18.51 -	if (strcmp(argv[1], "--hello") == 0) {
   18.52 -		hello = 1;
   18.53 -		libname = argv[2];
   18.54 -		symname = "puts";
   18.55 -	} else {
   18.56 -		libname = argv[1];
   18.57 -		symname = argv[2];
   18.58 -	}
   18.59 +    if (strcmp(argv[1], "--hello") == 0) {
   18.60 +        hello = 1;
   18.61 +        libname = argv[2];
   18.62 +        symname = "puts";
   18.63 +    } else {
   18.64 +        libname = argv[1];
   18.65 +        symname = argv[2];
   18.66 +    }
   18.67  
   18.68 -	lib = SDL_LoadObject(libname);
   18.69 -        if (lib == NULL) {
   18.70 -		fprintf(stderr, "SDL_LoadObject('%s') failed: %s\n",
   18.71 -		        libname, SDL_GetError());
   18.72 -		retval = 3;
   18.73 -	} else {
   18.74 -		fn = (fntype) SDL_LoadFunction(lib, symname);
   18.75 -		if (fn == NULL) {
   18.76 -			fprintf(stderr, "SDL_LoadFunction('%s') failed: %s\n",
   18.77 -			        symname, SDL_GetError());
   18.78 -			retval = 4;
   18.79 -		} else {
   18.80 -			printf("Found %s in %s at %p\n", symname, libname, fn);
   18.81 -			if (hello) {
   18.82 -				printf("Calling function...\n");
   18.83 -				fflush(stdout);
   18.84 -				fn("     HELLO, WORLD!\n");
   18.85 -				printf("...apparently, we survived.  :)\n");
   18.86 -				printf("Unloading library...\n");
   18.87 -				fflush(stdout);
   18.88 -			}
   18.89 -		}
   18.90 -		SDL_UnloadObject(lib);
   18.91 -	}
   18.92 -	SDL_Quit();
   18.93 -	return(0);
   18.94 +    lib = SDL_LoadObject(libname);
   18.95 +    if (lib == NULL) {
   18.96 +        fprintf(stderr, "SDL_LoadObject('%s') failed: %s\n",
   18.97 +                libname, SDL_GetError());
   18.98 +        retval = 3;
   18.99 +    } else {
  18.100 +        fn = (fntype) SDL_LoadFunction(lib, symname);
  18.101 +        if (fn == NULL) {
  18.102 +            fprintf(stderr, "SDL_LoadFunction('%s') failed: %s\n",
  18.103 +                    symname, SDL_GetError());
  18.104 +            retval = 4;
  18.105 +        } else {
  18.106 +            printf("Found %s in %s at %p\n", symname, libname, fn);
  18.107 +            if (hello) {
  18.108 +                printf("Calling function...\n");
  18.109 +                fflush(stdout);
  18.110 +                fn("     HELLO, WORLD!\n");
  18.111 +                printf("...apparently, we survived.  :)\n");
  18.112 +                printf("Unloading library...\n");
  18.113 +                fflush(stdout);
  18.114 +            }
  18.115 +        }
  18.116 +        SDL_UnloadObject(lib);
  18.117 +    }
  18.118 +    SDL_Quit();
  18.119 +    return (0);
  18.120  }
  18.121 -
  18.122 -