src/video/maccommon/SDL_macevents.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/maccommon/SDL_macevents.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/maccommon/SDL_macevents.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -54,59 +54,59 @@
     1.4  #define iAbout	1               /* About menu item */
     1.5  
     1.6  /* Functions to handle the About menu */
     1.7 -static void Mac_DoAppleMenu (_THIS, long item);
     1.8 +static void Mac_DoAppleMenu(_THIS, long item);
     1.9  
    1.10  /* The translation table from a macintosh key scancode to a SDL keysym */
    1.11  static SDLKey MAC_keymap[256];
    1.12 -static SDL_keysym *TranslateKey (int scancode, int modifiers,
    1.13 -                                 SDL_keysym * keysym, int pressed);
    1.14 +static SDL_keysym *TranslateKey(int scancode, int modifiers,
    1.15 +                                SDL_keysym * keysym, int pressed);
    1.16  
    1.17  /* Handle activation and deactivation  -- returns whether an event was posted */
    1.18  static int
    1.19 -Mac_HandleActivate (int activate)
    1.20 +Mac_HandleActivate(int activate)
    1.21  {
    1.22      if (activate) {
    1.23          /* Show the current SDL application cursor */
    1.24 -        SDL_SetCursor (NULL);
    1.25 +        SDL_SetCursor(NULL);
    1.26  
    1.27          /* put our mask back case it changed during context switch */
    1.28 -        SetEventMask (everyEvent & ~autoKeyMask);
    1.29 +        SetEventMask(everyEvent & ~autoKeyMask);
    1.30      } else {
    1.31  #if TARGET_API_MAC_CARBON
    1.32          {
    1.33              Cursor cursor;
    1.34 -            SetCursor (GetQDGlobalsArrow (&cursor));
    1.35 +            SetCursor(GetQDGlobalsArrow(&cursor));
    1.36          }
    1.37  #else
    1.38 -        SetCursor (&theQD->arrow);
    1.39 +        SetCursor(&theQD->arrow);
    1.40  #endif
    1.41          if (!Mac_cursor_showing) {
    1.42 -            ShowCursor ();
    1.43 +            ShowCursor();
    1.44              Mac_cursor_showing = 1;
    1.45          }
    1.46      }
    1.47 -    return (SDL_PrivateAppActive (activate, SDL_APPINPUTFOCUS));
    1.48 +    return (SDL_PrivateAppActive(activate, SDL_APPINPUTFOCUS));
    1.49  }
    1.50  
    1.51  static void
    1.52 -myGlobalToLocal (_THIS, Point * pt)
    1.53 +myGlobalToLocal(_THIS, Point * pt)
    1.54  {
    1.55      if (SDL_VideoSurface && !(SDL_VideoSurface->flags & SDL_FULLSCREEN)) {
    1.56          GrafPtr saveport;
    1.57 -        GetPort (&saveport);
    1.58 +        GetPort(&saveport);
    1.59  #if TARGET_API_MAC_CARBON
    1.60 -        SetPort (GetWindowPort (SDL_Window));
    1.61 +        SetPort(GetWindowPort(SDL_Window));
    1.62  #else
    1.63 -        SetPort (SDL_Window);
    1.64 +        SetPort(SDL_Window);
    1.65  #endif
    1.66 -        GlobalToLocal (pt);
    1.67 -        SetPort (saveport);
    1.68 +        GlobalToLocal(pt);
    1.69 +        SetPort(saveport);
    1.70      }
    1.71  }
    1.72  
    1.73  /* The main MacOS event handler */
    1.74  static int
    1.75 -Mac_HandleEvents (_THIS, int wait4it)
    1.76 +Mac_HandleEvents(_THIS, int wait4it)
    1.77  {
    1.78      static int mouse_button = 1;
    1.79      int i;
    1.80 @@ -139,28 +139,28 @@
    1.81          } else {
    1.82              wait_time = 0;
    1.83          }
    1.84 -        WaitNextEvent (everyEvent, &event, wait_time, nil);
    1.85 +        WaitNextEvent(everyEvent, &event, wait_time, nil);
    1.86      } else {
    1.87  #if ! TARGET_API_MAC_CARBON
    1.88 -        GetOSEvent (everyEvent, &event);
    1.89 +        GetOSEvent(everyEvent, &event);
    1.90  #endif
    1.91      }
    1.92  
    1.93  #if TARGET_API_MAC_CARBON
    1.94      /* for some reason, event.where isn't set ? */
    1.95 -    GetGlobalMouse (&event.where);
    1.96 +    GetGlobalMouse(&event.where);
    1.97  #endif
    1.98  
    1.99      /* Check for mouse motion */
   1.100      if ((event.where.h != last_where.h) || (event.where.v != last_where.v)) {
   1.101          Point pt;
   1.102          pt = last_where = event.where;
   1.103 -        myGlobalToLocal (this, &pt);
   1.104 -        SDL_PrivateMouseMotion (0, 0, pt.h, pt.v);
   1.105 +        myGlobalToLocal(this, &pt);
   1.106 +        SDL_PrivateMouseMotion(0, 0, pt.h, pt.v);
   1.107      }
   1.108  
   1.109      /* Check the current state of the keyboard */
   1.110 -    if (SDL_GetAppState () & SDL_APPINPUTFOCUS) {
   1.111 +    if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
   1.112          KeyMap keys;
   1.113  
   1.114          /* Check for special non-event keys */
   1.115 @@ -207,7 +207,7 @@
   1.116                      } else {
   1.117                          mode = SDL_RELEASED;
   1.118                      }
   1.119 -                    SDL_PrivateKeyboard (mode, &keysym);
   1.120 +                    SDL_PrivateKeyboard(mode, &keysym);
   1.121                  }
   1.122              }
   1.123  
   1.124 @@ -219,15 +219,15 @@
   1.125             actual keyboard state because on Mac OS X a keydown event
   1.126             is immediately followed by a keyup event.
   1.127           */
   1.128 -        GetKeys (keys);
   1.129 +        GetKeys(keys);
   1.130          if ((keys[0] != last_keys[0]) || (keys[1] != last_keys[1]) ||
   1.131              (keys[2] != last_keys[2]) || (keys[3] != last_keys[3])) {
   1.132              SDL_keysym keysym;
   1.133              int old_bit, new_bit;
   1.134  
   1.135  #ifdef DEBUG_KEYBOARD
   1.136 -            fprintf (sterr, "New keys: 0x%x 0x%x 0x%x 0x%x\n",
   1.137 -                     new_keys[0], new_keys[1], new_keys[2], new_keys[3]);
   1.138 +            fprintf(sterr, "New keys: 0x%x 0x%x 0x%x 0x%x\n",
   1.139 +                    new_keys[0], new_keys[1], new_keys[2], new_keys[3]);
   1.140  #endif
   1.141              for (i = 0; i < 128; ++i) {
   1.142                  old_bit = (((Uint8 *) last_keys)[i / 8] >> (i % 8)) & 0x01;
   1.143 @@ -235,13 +235,13 @@
   1.144                  if (old_bit != new_bit) {
   1.145                      /* Post the keyboard event */
   1.146  #ifdef DEBUG_KEYBOARD
   1.147 -                    fprintf (stderr, "Scancode: 0x%2.2X\n", i);
   1.148 +                    fprintf(stderr, "Scancode: 0x%2.2X\n", i);
   1.149  #endif
   1.150 -                    SDL_PrivateKeyboard (new_bit,
   1.151 -                                         TranslateKey (i,
   1.152 -                                                       event.
   1.153 -                                                       modifiers,
   1.154 -                                                       &keysym, new_bit));
   1.155 +                    SDL_PrivateKeyboard(new_bit,
   1.156 +                                        TranslateKey(i,
   1.157 +                                                     event.
   1.158 +                                                     modifiers,
   1.159 +                                                     &keysym, new_bit));
   1.160                  }
   1.161              }
   1.162  
   1.163 @@ -260,32 +260,32 @@
   1.164              WindowRef win;
   1.165              short area;
   1.166  
   1.167 -            area = FindWindow (event.where, &win);
   1.168 +            area = FindWindow(event.where, &win);
   1.169              /* Support switching between the SIOUX console
   1.170                 and SDL_Window by clicking in the window.
   1.171               */
   1.172 -            if (win && (win != FrontWindow ())) {
   1.173 -                SelectWindow (win);
   1.174 +            if (win && (win != FrontWindow())) {
   1.175 +                SelectWindow(win);
   1.176              }
   1.177              switch (area) {
   1.178              case inMenuBar:    /* Only the apple menu exists */
   1.179 -                Mac_DoAppleMenu (this, MenuSelect (event.where));
   1.180 -                HiliteMenu (0);
   1.181 +                Mac_DoAppleMenu(this, MenuSelect(event.where));
   1.182 +                HiliteMenu(0);
   1.183                  break;
   1.184              case inDrag:
   1.185  #if TARGET_API_MAC_CARBON
   1.186 -                DragWindow (win, event.where, NULL);
   1.187 +                DragWindow(win, event.where, NULL);
   1.188  #else
   1.189 -                DragWindow (win, event.where, &theQD->screenBits.bounds);
   1.190 +                DragWindow(win, event.where, &theQD->screenBits.bounds);
   1.191  #endif
   1.192                  break;
   1.193              case inGoAway:
   1.194 -                if (TrackGoAway (win, event.where)) {
   1.195 -                    SDL_PrivateQuit ();
   1.196 +                if (TrackGoAway(win, event.where)) {
   1.197 +                    SDL_PrivateQuit();
   1.198                  }
   1.199                  break;
   1.200              case inContent:
   1.201 -                myGlobalToLocal (this, &event.where);
   1.202 +                myGlobalToLocal(this, &event.where);
   1.203                  /* Treat command-click as right mouse button */
   1.204                  if (event.modifiers & optionKey) {
   1.205                      mouse_button = 2;
   1.206 @@ -294,9 +294,9 @@
   1.207                  } else {
   1.208                      mouse_button = 1;
   1.209                  }
   1.210 -                SDL_PrivateMouseButton (SDL_PRESSED,
   1.211 -                                        mouse_button, event.where.h,
   1.212 -                                        event.where.v);
   1.213 +                SDL_PrivateMouseButton(SDL_PRESSED,
   1.214 +                                       mouse_button, event.where.h,
   1.215 +                                       event.where.v);
   1.216                  break;
   1.217              case inGrow:
   1.218                  {
   1.219 @@ -308,45 +308,43 @@
   1.220                          break;
   1.221                      }
   1.222  #if TARGET_API_MAC_CARBON
   1.223 -                    newSize = GrowWindow (win, event.where, NULL);
   1.224 +                    newSize = GrowWindow(win, event.where, NULL);
   1.225  #else
   1.226                      newSize =
   1.227 -                        GrowWindow (win, event.where,
   1.228 -                                    &theQD->screenBits.bounds);
   1.229 +                        GrowWindow(win, event.where,
   1.230 +                                   &theQD->screenBits.bounds);
   1.231  #endif
   1.232                      if (newSize) {
   1.233  #if !TARGET_API_MAC_CARBON
   1.234 -                        EraseRect (&theQD->screenBits.bounds);
   1.235 +                        EraseRect(&theQD->screenBits.bounds);
   1.236  #endif
   1.237 -                        SizeWindow (win, LoWord (newSize),
   1.238 -                                    HiWord (newSize), 1);
   1.239 -                        SDL_PrivateResize (LoWord (newSize),
   1.240 -                                           HiWord (newSize));
   1.241 +                        SizeWindow(win, LoWord(newSize), HiWord(newSize), 1);
   1.242 +                        SDL_PrivateResize(LoWord(newSize), HiWord(newSize));
   1.243                      }
   1.244                  }
   1.245                  break;
   1.246              case inZoomIn:
   1.247              case inZoomOut:
   1.248 -                if (TrackBox (win, event.where, area)) {
   1.249 +                if (TrackBox(win, event.where, area)) {
   1.250                      Rect rect;
   1.251  #if !TARGET_API_MAC_CARBON
   1.252 -                    EraseRect (&theQD->screenBits.bounds);
   1.253 +                    EraseRect(&theQD->screenBits.bounds);
   1.254  #endif
   1.255 -                    ZoomWindow (win, area, 0);
   1.256 +                    ZoomWindow(win, area, 0);
   1.257                      if (area == inZoomIn) {
   1.258 -                        GetWindowUserState (SDL_Window, &rect);
   1.259 +                        GetWindowUserState(SDL_Window, &rect);
   1.260                      } else {
   1.261 -                        GetWindowStandardState (SDL_Window, &rect);
   1.262 +                        GetWindowStandardState(SDL_Window, &rect);
   1.263                      }
   1.264 -                    SDL_PrivateResize (rect.right - rect.left,
   1.265 -                                       rect.bottom - rect.top);
   1.266 +                    SDL_PrivateResize(rect.right - rect.left,
   1.267 +                                      rect.bottom - rect.top);
   1.268                  }
   1.269                  break;
   1.270  #if TARGET_API_MAC_CARBON
   1.271              case inCollapseBox:
   1.272 -                if (TrackBox (win, event.where, area)) {
   1.273 -                    if (IsWindowCollapsable (win)) {
   1.274 -                        CollapseWindow (win, !IsWindowCollapsed (win));
   1.275 +                if (TrackBox(win, event.where, area)) {
   1.276 +                    if (IsWindowCollapsable(win)) {
   1.277 +                        CollapseWindow(win, !IsWindowCollapsed(win));
   1.278                          /* There should be something done like in inGrow case, but... */
   1.279                      }
   1.280                  }
   1.281 @@ -356,7 +354,7 @@
   1.282  #if TARGET_API_MAC_CARBON
   1.283                  /* Never happens in Carbon? */
   1.284  #else
   1.285 -                SystemClick (&event, win);
   1.286 +                SystemClick(&event, win);
   1.287  #endif
   1.288                  break;
   1.289              default:
   1.290 @@ -366,16 +364,16 @@
   1.291          break;
   1.292      case mouseUp:
   1.293          {
   1.294 -            myGlobalToLocal (this, &event.where);
   1.295 +            myGlobalToLocal(this, &event.where);
   1.296              /* Release the mouse button we simulated in the last press.
   1.297                 The drawback of this methos is we cannot press more than
   1.298                 one button. However, this doesn't matter, since there is
   1.299                 only a single logical mouse button, even if you have a
   1.300                 multi-button mouse, this doesn't matter at all.
   1.301               */
   1.302 -            SDL_PrivateMouseButton (SDL_RELEASED,
   1.303 -                                    mouse_button, event.where.h,
   1.304 -                                    event.where.v);
   1.305 +            SDL_PrivateMouseButton(SDL_RELEASED,
   1.306 +                                   mouse_button, event.where.h,
   1.307 +                                   event.where.v);
   1.308          }
   1.309          break;
   1.310  #if 0                           /* Handled above the switch statement */
   1.311 @@ -383,35 +381,35 @@
   1.312          {
   1.313              SDL_keysym keysym;
   1.314  
   1.315 -            SDL_PrivateKeyboard (SDL_PRESSED,
   1.316 -                                 TranslateKey ((event.
   1.317 -                                                message & keyCodeMask) >> 8
   1.318 -                                               event.modifiers, &keysym, 1));
   1.319 +            SDL_PrivateKeyboard(SDL_PRESSED,
   1.320 +                                TranslateKey((event.
   1.321 +                                              message & keyCodeMask) >> 8
   1.322 +                                             event.modifiers, &keysym, 1));
   1.323          }
   1.324          break;
   1.325      case keyUp:
   1.326          {
   1.327              SDL_keysym keysym;
   1.328  
   1.329 -            SDL_PrivateKeyboard (SDL_RELEASED,
   1.330 -                                 TranslateKey ((event.
   1.331 -                                                message & keyCodeMask) >> 8
   1.332 -                                               event.modifiers, &keysym, 0));
   1.333 +            SDL_PrivateKeyboard(SDL_RELEASED,
   1.334 +                                TranslateKey((event.
   1.335 +                                              message & keyCodeMask) >> 8
   1.336 +                                             event.modifiers, &keysym, 0));
   1.337          }
   1.338          break;
   1.339  #endif
   1.340      case updateEvt:
   1.341          {
   1.342 -            BeginUpdate (SDL_Window);
   1.343 +            BeginUpdate(SDL_Window);
   1.344  #if SDL_VIDEO_OPENGL
   1.345              if (SDL_VideoSurface->flags & SDL_INTERNALOPENGL)
   1.346 -                SDL_GL_SwapBuffers ();
   1.347 +                SDL_GL_SwapBuffers();
   1.348              else
   1.349  #endif
   1.350              if ((SDL_VideoSurface->flags & SDL_HWSURFACE) == SDL_SWSURFACE) {
   1.351 -                SDL_UpdateRect (SDL_VideoSurface, 0, 0, 0, 0);
   1.352 +                SDL_UpdateRect(SDL_VideoSurface, 0, 0, 0, 0);
   1.353              }
   1.354 -            EndUpdate (SDL_Window);
   1.355 +            EndUpdate(SDL_Window);
   1.356          }
   1.357          /* If this was an update event for the SIOUX console, we return 0
   1.358             in order to stop an endless series of updates being triggered.
   1.359 @@ -422,7 +420,7 @@
   1.360          break;
   1.361      case activateEvt:
   1.362          {
   1.363 -            Mac_HandleActivate (!!(event.modifiers & activeFlag));
   1.364 +            Mac_HandleActivate(!!(event.modifiers & activeFlag));
   1.365          }
   1.366          break;
   1.367      case diskEvt:
   1.368 @@ -432,8 +430,8 @@
   1.369  #else
   1.370              if (((event.message >> 16) & 0xFFFF) != noErr) {
   1.371                  Point spot;
   1.372 -                SetPt (&spot, 0x0070, 0x0050);
   1.373 -                DIBadMount (spot, event.message);
   1.374 +                SetPt(&spot, 0x0070, 0x0050);
   1.375 +                DIBadMount(spot, event.message);
   1.376              }
   1.377  #endif
   1.378          }
   1.379 @@ -444,15 +442,15 @@
   1.380  #if 0                           /* Handled above the switch statement */
   1.381              case mouseMovedMessage:
   1.382                  {
   1.383 -                    myGlobalToLocal (this, &event.where);
   1.384 -                    SDL_PrivateMouseMotion (0, 0,
   1.385 -                                            event.where.h, event.where.v);
   1.386 +                    myGlobalToLocal(this, &event.where);
   1.387 +                    SDL_PrivateMouseMotion(0, 0,
   1.388 +                                           event.where.h, event.where.v);
   1.389                  }
   1.390                  break;
   1.391  #endif /* 0 */
   1.392              case suspendResumeMessage:
   1.393                  {
   1.394 -                    Mac_HandleActivate (!!(event.message & resumeFlag));
   1.395 +                    Mac_HandleActivate(!!(event.message & resumeFlag));
   1.396                  }
   1.397                  break;
   1.398              }
   1.399 @@ -469,16 +467,16 @@
   1.400  
   1.401  
   1.402  void
   1.403 -Mac_PumpEvents (_THIS)
   1.404 +Mac_PumpEvents(_THIS)
   1.405  {
   1.406      /* Process pending MacOS events */
   1.407 -    while (Mac_HandleEvents (this, 0)) {
   1.408 +    while (Mac_HandleEvents(this, 0)) {
   1.409          /* Loop and check again */ ;
   1.410      }
   1.411  }
   1.412  
   1.413  void
   1.414 -Mac_InitOSKeymap (_THIS)
   1.415 +Mac_InitOSKeymap(_THIS)
   1.416  {
   1.417      const void *KCHRPtr;
   1.418      UInt32 state;
   1.419 @@ -487,7 +485,7 @@
   1.420      int world = SDLK_WORLD_0;
   1.421  
   1.422      /* Map the MAC keysyms */
   1.423 -    for (i = 0; i < SDL_arraysize (MAC_keymap); ++i)
   1.424 +    for (i = 0; i < SDL_arraysize(MAC_keymap); ++i)
   1.425          MAC_keymap[i] = SDLK_UNKNOWN;
   1.426  
   1.427      /* Defined MAC_* constants */
   1.428 @@ -620,7 +618,7 @@
   1.429       */
   1.430  
   1.431      /* Get a pointer to the systems cached KCHR */
   1.432 -    KCHRPtr = (void *) GetScriptManagerVariable (smKCHRCache);
   1.433 +    KCHRPtr = (void *) GetScriptManagerVariable(smKCHRCache);
   1.434      if (KCHRPtr) {
   1.435          /* Loop over all 127 possible scan codes */
   1.436          for (i = 0; i < 0x7F; i++) {
   1.437 @@ -628,12 +626,12 @@
   1.438              state = 0;
   1.439  
   1.440              /* Now translate the key code to a key value */
   1.441 -            value = KeyTranslate (KCHRPtr, i, &state) & 0xff;
   1.442 +            value = KeyTranslate(KCHRPtr, i, &state) & 0xff;
   1.443  
   1.444              /* If the state become 0, it was a dead key. We need to translate again,
   1.445                 passing in the new state, to get the actual key value */
   1.446              if (state != 0)
   1.447 -                value = KeyTranslate (KCHRPtr, i, &state) & 0xff;
   1.448 +                value = KeyTranslate(KCHRPtr, i, &state) & 0xff;
   1.449  
   1.450              /* Now we should have an ascii value, or 0. Try to figure out to which SDL symbol it maps */
   1.451              if (value >= 128)   /* Some non-ASCII char, map it to SDLK_WORLD_* */
   1.452 @@ -670,7 +668,7 @@
   1.453  }
   1.454  
   1.455  static SDL_keysym *
   1.456 -TranslateKey (int scancode, int modifiers, SDL_keysym * keysym, int pressed)
   1.457 +TranslateKey(int scancode, int modifiers, SDL_keysym * keysym, int pressed)
   1.458  {
   1.459      /* Set the keysym information */
   1.460      keysym->scancode = scancode;
   1.461 @@ -683,50 +681,50 @@
   1.462          Ptr new_keymap;
   1.463  
   1.464          /* Get the current keyboard map resource */
   1.465 -        new_keymap = (Ptr) GetScriptManagerVariable (smKCHRCache);
   1.466 +        new_keymap = (Ptr) GetScriptManagerVariable(smKCHRCache);
   1.467          if (new_keymap != keymap) {
   1.468              keymap = new_keymap;
   1.469              state = 0;
   1.470          }
   1.471 -        keysym->unicode = KeyTranslate (keymap,
   1.472 -                                        keysym->scancode | modifiers,
   1.473 -                                        &state) & 0xFFFF;
   1.474 +        keysym->unicode = KeyTranslate(keymap,
   1.475 +                                       keysym->scancode | modifiers,
   1.476 +                                       &state) & 0xFFFF;
   1.477      }
   1.478      return (keysym);
   1.479  }
   1.480  
   1.481  void
   1.482 -Mac_InitEvents (_THIS)
   1.483 +Mac_InitEvents(_THIS)
   1.484  {
   1.485      /* Create apple menu bar */
   1.486 -    apple_menu = GetMenu (mApple);
   1.487 +    apple_menu = GetMenu(mApple);
   1.488      if (apple_menu != nil) {
   1.489 -        AppendResMenu (apple_menu, 'DRVR');
   1.490 -        InsertMenu (apple_menu, 0);
   1.491 +        AppendResMenu(apple_menu, 'DRVR');
   1.492 +        InsertMenu(apple_menu, 0);
   1.493      }
   1.494 -    DrawMenuBar ();
   1.495 +    DrawMenuBar();
   1.496  
   1.497      /* Get rid of spurious events at startup */
   1.498 -    FlushEvents (everyEvent, 0);
   1.499 +    FlushEvents(everyEvent, 0);
   1.500  
   1.501      /* Allow every event but keyrepeat */
   1.502 -    SetEventMask (everyEvent & ~autoKeyMask);
   1.503 +    SetEventMask(everyEvent & ~autoKeyMask);
   1.504  }
   1.505  
   1.506  void
   1.507 -Mac_QuitEvents (_THIS)
   1.508 +Mac_QuitEvents(_THIS)
   1.509  {
   1.510 -    ClearMenuBar ();
   1.511 +    ClearMenuBar();
   1.512      if (apple_menu != nil) {
   1.513 -        ReleaseResource ((char **) apple_menu);
   1.514 +        ReleaseResource((char **) apple_menu);
   1.515      }
   1.516  
   1.517      /* Clean up pending events */
   1.518 -    FlushEvents (everyEvent, 0);
   1.519 +    FlushEvents(everyEvent, 0);
   1.520  }
   1.521  
   1.522  static void
   1.523 -Mac_DoAppleMenu (_THIS, long choice)
   1.524 +Mac_DoAppleMenu(_THIS, long choice)
   1.525  {
   1.526  #if !TARGET_API_MAC_CARBON      /* No Apple menu in OS X */
   1.527      short menu, item;
   1.528 @@ -748,8 +746,8 @@
   1.529                  {
   1.530                      Str255 name;
   1.531  
   1.532 -                    GetMenuItemText (apple_menu, item, name);
   1.533 -                    OpenDeskAcc (name);
   1.534 +                    GetMenuItemText(apple_menu, item, name);
   1.535 +                    OpenDeskAcc(name);
   1.536                  }
   1.537                  break;
   1.538              }
   1.539 @@ -770,7 +768,7 @@
   1.540  
   1.541  /* Exported to the macmain code */
   1.542  void
   1.543 -SDL_InitQuickDraw (struct QDGlobals *the_qd)
   1.544 +SDL_InitQuickDraw(struct QDGlobals *the_qd)
   1.545  {
   1.546  #if !TARGET_API_MAC_CARBON
   1.547      theQD = the_qd;