src/video/Xext/Xxf86dga/XF86DGA2.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/Xext/Xxf86dga/XF86DGA2.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/Xext/Xxf86dga/XF86DGA2.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -32,16 +32,16 @@
     1.4  /* If you change this, change the Bases[] array below as well */
     1.5  #define MAX_HEADS 16
     1.6  
     1.7 -char *SDL_NAME (xdga_extension_name) = XF86DGANAME;
     1.8 +char *SDL_NAME(xdga_extension_name) = XF86DGANAME;
     1.9  
    1.10  static XExtensionInfo _xdga_info_data;
    1.11  static XExtensionInfo *xdga_info = &_xdga_info_data;
    1.12  
    1.13  
    1.14 -Bool SDL_NAME (XDGAMapFramebuffer) (int, char *, unsigned char *, CARD32,
    1.15 -                                    CARD32, CARD32);
    1.16 -void SDL_NAME (XDGAUnmapFramebuffer) (int);
    1.17 -unsigned char *SDL_NAME (XDGAGetMappedMemory) (int);
    1.18 +Bool SDL_NAME(XDGAMapFramebuffer) (int, char *, unsigned char *, CARD32,
    1.19 +                                   CARD32, CARD32);
    1.20 +void SDL_NAME(XDGAUnmapFramebuffer) (int);
    1.21 +unsigned char *SDL_NAME(XDGAGetMappedMemory) (int);
    1.22  
    1.23  #define XDGACheckExtension(dpy,i,val) \
    1.24    XextCheckExtension (dpy, i, SDL_NAME(xdga_extension_name), val)
    1.25 @@ -52,11 +52,11 @@
    1.26   *                                                                           *
    1.27   *****************************************************************************/
    1.28  
    1.29 -static int xdga_close_display (Display * dpy, XExtCodes * codes);
    1.30 -static Bool xdga_wire_to_event (Display * dpy, XEvent * event,
    1.31 -                                xEvent * wire_ev);
    1.32 -static Status xdga_event_to_wire (Display * dpy, XEvent * event,
    1.33 -                                  xEvent * wire_ev);
    1.34 +static int xdga_close_display(Display * dpy, XExtCodes * codes);
    1.35 +static Bool xdga_wire_to_event(Display * dpy, XEvent * event,
    1.36 +                               xEvent * wire_ev);
    1.37 +static Status xdga_event_to_wire(Display * dpy, XEvent * event,
    1.38 +                                 xEvent * wire_ev);
    1.39  
    1.40  static XExtensionHooks xdga_extension_hooks = {
    1.41      NULL,                       /* create_gc */
    1.42 @@ -73,31 +73,31 @@
    1.43  };
    1.44  
    1.45  static
    1.46 -XEXT_GENERATE_CLOSE_DISPLAY (xdga_close_display, xdga_info)
    1.47 -XEXT_GENERATE_FIND_DISPLAY (SDL_NAME (xdga_find_display), xdga_info,
    1.48 -                            "XFree86-DGA", &xdga_extension_hooks, 0, NULL)
    1.49 +XEXT_GENERATE_CLOSE_DISPLAY(xdga_close_display, xdga_info)
    1.50 +XEXT_GENERATE_FIND_DISPLAY(SDL_NAME(xdga_find_display), xdga_info,
    1.51 +                           "XFree86-DGA", &xdga_extension_hooks, 0, NULL)
    1.52       static Status
    1.53 -         xdga_event_to_wire (Display * dpy, XEvent * event, xEvent * wire_ev)
    1.54 +         xdga_event_to_wire(Display * dpy, XEvent * event, xEvent * wire_ev)
    1.55  {
    1.56      return True;
    1.57  }
    1.58  
    1.59  static Bool
    1.60 -xdga_wire_to_event (Display * dpy, XEvent * event, xEvent * wire_ev)
    1.61 +xdga_wire_to_event(Display * dpy, XEvent * event, xEvent * wire_ev)
    1.62  {
    1.63      dgaEvent *wire = (dgaEvent *) wire_ev;
    1.64 -    SDL_NAME (XDGAButtonEvent) * bevent;
    1.65 -    SDL_NAME (XDGAKeyEvent) * kevent;
    1.66 -    SDL_NAME (XDGAMotionEvent) * mevent;
    1.67 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
    1.68 +    SDL_NAME(XDGAButtonEvent) * bevent;
    1.69 +    SDL_NAME(XDGAKeyEvent) * kevent;
    1.70 +    SDL_NAME(XDGAMotionEvent) * mevent;
    1.71 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
    1.72  
    1.73 -    XDGACheckExtension (dpy, info, False);
    1.74 +    XDGACheckExtension(dpy, info, False);
    1.75  
    1.76      switch ((wire->u.u.type & 0x7f) - info->codes->first_event) {
    1.77      case MotionNotify:
    1.78 -        mevent = (SDL_NAME (XDGAMotionEvent) *) event;
    1.79 +        mevent = (SDL_NAME(XDGAMotionEvent) *) event;
    1.80          mevent->type = wire->u.u.type & 0x7F;
    1.81 -        mevent->serial = _XSetLastRequestRead (dpy, (xGenericReply *) wire);
    1.82 +        mevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
    1.83          mevent->display = dpy;
    1.84          mevent->screen = wire->u.event.screen;
    1.85          mevent->time = wire->u.event.time;
    1.86 @@ -107,9 +107,9 @@
    1.87          return True;
    1.88      case ButtonPress:
    1.89      case ButtonRelease:
    1.90 -        bevent = (SDL_NAME (XDGAButtonEvent) *) event;
    1.91 +        bevent = (SDL_NAME(XDGAButtonEvent) *) event;
    1.92          bevent->type = wire->u.u.type & 0x7F;
    1.93 -        bevent->serial = _XSetLastRequestRead (dpy, (xGenericReply *) wire);
    1.94 +        bevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
    1.95          bevent->display = dpy;
    1.96          bevent->screen = wire->u.event.screen;
    1.97          bevent->time = wire->u.event.time;
    1.98 @@ -118,9 +118,9 @@
    1.99          return True;
   1.100      case KeyPress:
   1.101      case KeyRelease:
   1.102 -        kevent = (SDL_NAME (XDGAKeyEvent) *) event;
   1.103 +        kevent = (SDL_NAME(XDGAKeyEvent) *) event;
   1.104          kevent->type = wire->u.u.type & 0x7F;
   1.105 -        kevent->serial = _XSetLastRequestRead (dpy, (xGenericReply *) wire);
   1.106 +        kevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
   1.107          kevent->display = dpy;
   1.108          kevent->screen = wire->u.event.screen;
   1.109          kevent->time = wire->u.event.time;
   1.110 @@ -133,12 +133,12 @@
   1.111  }
   1.112  
   1.113  
   1.114 -Bool SDL_NAME (XDGAQueryExtension) (Display * dpy,
   1.115 -                                    int *event_basep, int *error_basep)
   1.116 +Bool SDL_NAME(XDGAQueryExtension) (Display * dpy,
   1.117 +                                   int *event_basep, int *error_basep)
   1.118  {
   1.119 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.120 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.121  
   1.122 -    if (XextHasExtension (info)) {
   1.123 +    if (XextHasExtension(info)) {
   1.124          *event_basep = info->codes->first_event;
   1.125          *error_basep = info->codes->first_error;
   1.126          return True;
   1.127 @@ -148,136 +148,136 @@
   1.128  }
   1.129  
   1.130  
   1.131 -Bool SDL_NAME (XDGAQueryVersion) (Display * dpy,
   1.132 -                                  int *majorVersion, int *minorVersion)
   1.133 +Bool SDL_NAME(XDGAQueryVersion) (Display * dpy,
   1.134 +                                 int *majorVersion, int *minorVersion)
   1.135  {
   1.136 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.137 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.138      xXDGAQueryVersionReply rep;
   1.139      xXDGAQueryVersionReq *req;
   1.140  
   1.141 -    XDGACheckExtension (dpy, info, False);
   1.142 +    XDGACheckExtension(dpy, info, False);
   1.143  
   1.144 -    LockDisplay (dpy);
   1.145 -    GetReq (XDGAQueryVersion, req);
   1.146 +    LockDisplay(dpy);
   1.147 +    GetReq(XDGAQueryVersion, req);
   1.148      req->reqType = info->codes->major_opcode;
   1.149      req->dgaReqType = X_XDGAQueryVersion;
   1.150 -    if (!_XReply (dpy, (xReply *) & rep, 0, xFalse)) {
   1.151 -        UnlockDisplay (dpy);
   1.152 -        SyncHandle ();
   1.153 +    if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
   1.154 +        UnlockDisplay(dpy);
   1.155 +        SyncHandle();
   1.156          return False;
   1.157      }
   1.158      *majorVersion = rep.majorVersion;
   1.159      *minorVersion = rep.minorVersion;
   1.160 -    UnlockDisplay (dpy);
   1.161 -    SyncHandle ();
   1.162 +    UnlockDisplay(dpy);
   1.163 +    SyncHandle();
   1.164      if (*majorVersion >= 2) {
   1.165          int i, j;
   1.166  
   1.167          for (i = 0, j = info->codes->first_event;
   1.168               i < XF86DGANumberEvents; i++, j++) {
   1.169 -            XESetWireToEvent (dpy, j, xdga_wire_to_event);
   1.170 -            XESetEventToWire (dpy, j, xdga_event_to_wire);
   1.171 +            XESetWireToEvent(dpy, j, xdga_wire_to_event);
   1.172 +            XESetEventToWire(dpy, j, xdga_event_to_wire);
   1.173          }
   1.174 -        SDL_NAME (XDGASetClientVersion) (dpy);
   1.175 +        SDL_NAME(XDGASetClientVersion) (dpy);
   1.176      }
   1.177      return True;
   1.178  }
   1.179  
   1.180 -Bool SDL_NAME (XDGASetClientVersion) (Display * dpy)
   1.181 +Bool SDL_NAME(XDGASetClientVersion) (Display * dpy)
   1.182  {
   1.183 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.184 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.185      xXDGASetClientVersionReq *req;
   1.186  
   1.187 -    XDGACheckExtension (dpy, info, False);
   1.188 +    XDGACheckExtension(dpy, info, False);
   1.189  
   1.190 -    LockDisplay (dpy);
   1.191 -    GetReq (XDGASetClientVersion, req);
   1.192 +    LockDisplay(dpy);
   1.193 +    GetReq(XDGASetClientVersion, req);
   1.194      req->reqType = info->codes->major_opcode;
   1.195      req->dgaReqType = X_XDGASetClientVersion;
   1.196      req->major = XDGA_MAJOR_VERSION;
   1.197      req->minor = XDGA_MINOR_VERSION;
   1.198 -    UnlockDisplay (dpy);
   1.199 -    SyncHandle ();
   1.200 +    UnlockDisplay(dpy);
   1.201 +    SyncHandle();
   1.202      return True;
   1.203  }
   1.204  
   1.205 -Bool SDL_NAME (XDGAOpenFramebuffer) (Display * dpy, int screen)
   1.206 +Bool SDL_NAME(XDGAOpenFramebuffer) (Display * dpy, int screen)
   1.207  {
   1.208 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.209 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.210      xXDGAOpenFramebufferReply rep;
   1.211      xXDGAOpenFramebufferReq *req;
   1.212      char *deviceName = NULL;
   1.213      Bool ret;
   1.214  
   1.215 -    XDGACheckExtension (dpy, info, False);
   1.216 +    XDGACheckExtension(dpy, info, False);
   1.217  
   1.218 -    LockDisplay (dpy);
   1.219 -    GetReq (XDGAOpenFramebuffer, req);
   1.220 +    LockDisplay(dpy);
   1.221 +    GetReq(XDGAOpenFramebuffer, req);
   1.222      req->reqType = info->codes->major_opcode;
   1.223      req->dgaReqType = X_XDGAOpenFramebuffer;
   1.224      req->screen = screen;
   1.225 -    if (!_XReply (dpy, (xReply *) & rep, 0, xFalse)) {
   1.226 -        UnlockDisplay (dpy);
   1.227 -        SyncHandle ();
   1.228 +    if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
   1.229 +        UnlockDisplay(dpy);
   1.230 +        SyncHandle();
   1.231          return False;
   1.232      }
   1.233  
   1.234      if (rep.length) {
   1.235 -        deviceName = Xmalloc (rep.length << 2);
   1.236 -        _XRead (dpy, deviceName, rep.length << 2);
   1.237 +        deviceName = Xmalloc(rep.length << 2);
   1.238 +        _XRead(dpy, deviceName, rep.length << 2);
   1.239      }
   1.240  
   1.241 -    ret = SDL_NAME (XDGAMapFramebuffer) (screen, deviceName,
   1.242 -                                         (unsigned char *) (long) rep.mem1,
   1.243 -                                         rep.size, rep.offset, rep.extra);
   1.244 +    ret = SDL_NAME(XDGAMapFramebuffer) (screen, deviceName,
   1.245 +                                        (unsigned char *) (long) rep.mem1,
   1.246 +                                        rep.size, rep.offset, rep.extra);
   1.247  
   1.248      if (deviceName)
   1.249 -        Xfree (deviceName);
   1.250 +        Xfree(deviceName);
   1.251  
   1.252 -    UnlockDisplay (dpy);
   1.253 -    SyncHandle ();
   1.254 +    UnlockDisplay(dpy);
   1.255 +    SyncHandle();
   1.256      return ret;
   1.257  }
   1.258  
   1.259 -void SDL_NAME (XDGACloseFramebuffer) (Display * dpy, int screen)
   1.260 +void SDL_NAME(XDGACloseFramebuffer) (Display * dpy, int screen)
   1.261  {
   1.262 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.263 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.264      xXDGACloseFramebufferReq *req;
   1.265  
   1.266 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.267 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.268  
   1.269 -    SDL_NAME (XDGAUnmapFramebuffer) (screen);
   1.270 +    SDL_NAME(XDGAUnmapFramebuffer) (screen);
   1.271  
   1.272 -    LockDisplay (dpy);
   1.273 -    GetReq (XDGACloseFramebuffer, req);
   1.274 +    LockDisplay(dpy);
   1.275 +    GetReq(XDGACloseFramebuffer, req);
   1.276      req->reqType = info->codes->major_opcode;
   1.277      req->dgaReqType = X_XDGACloseFramebuffer;
   1.278      req->screen = screen;
   1.279 -    UnlockDisplay (dpy);
   1.280 -    SyncHandle ();
   1.281 +    UnlockDisplay(dpy);
   1.282 +    SyncHandle();
   1.283  }
   1.284  
   1.285  
   1.286  
   1.287 -SDL_NAME (XDGAMode) * SDL_NAME (XDGAQueryModes) (Display * dpy,
   1.288 -                                                 int screen, int *num)
   1.289 +SDL_NAME(XDGAMode) * SDL_NAME(XDGAQueryModes) (Display * dpy,
   1.290 +                                               int screen, int *num)
   1.291  {
   1.292 -    XExtDisplayInfo *dinfo = SDL_NAME (xdga_find_display) (dpy);
   1.293 +    XExtDisplayInfo *dinfo = SDL_NAME(xdga_find_display) (dpy);
   1.294      xXDGAQueryModesReply rep;
   1.295      xXDGAQueryModesReq *req;
   1.296 -    SDL_NAME (XDGAMode) * modes = NULL;
   1.297 +    SDL_NAME(XDGAMode) * modes = NULL;
   1.298  
   1.299      *num = 0;
   1.300  
   1.301 -    XDGACheckExtension (dpy, dinfo, NULL);
   1.302 +    XDGACheckExtension(dpy, dinfo, NULL);
   1.303  
   1.304 -    LockDisplay (dpy);
   1.305 -    GetReq (XDGAQueryModes, req);
   1.306 +    LockDisplay(dpy);
   1.307 +    GetReq(XDGAQueryModes, req);
   1.308      req->reqType = dinfo->codes->major_opcode;
   1.309      req->dgaReqType = X_XDGAQueryModes;
   1.310      req->screen = screen;
   1.311  
   1.312 -    if (_XReply (dpy, (xReply *) & rep, 0, xFalse)) {
   1.313 +    if (_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
   1.314          if (rep.length) {
   1.315              xXDGAModeInfo info;
   1.316              int i, size;
   1.317 @@ -285,14 +285,14 @@
   1.318  
   1.319              size = rep.length << 2;
   1.320              size -= rep.number * sz_xXDGAModeInfo;      /* find text size */
   1.321 -            modes = (SDL_NAME (XDGAMode) *)
   1.322 -                Xmalloc ((rep.number * sizeof (SDL_NAME (XDGAMode))) + size);
   1.323 +            modes = (SDL_NAME(XDGAMode) *)
   1.324 +                Xmalloc((rep.number * sizeof(SDL_NAME(XDGAMode))) + size);
   1.325              offset = (char *) (&modes[rep.number]);     /* start of text */
   1.326  
   1.327  
   1.328              if (modes) {
   1.329                  for (i = 0; i < rep.number; i++) {
   1.330 -                    _XRead (dpy, (char *) (&info), sz_xXDGAModeInfo);
   1.331 +                    _XRead(dpy, (char *) (&info), sz_xXDGAModeInfo);
   1.332  
   1.333                      modes[i].num = info.num;
   1.334                      modes[i].verticalRefresh =
   1.335 @@ -320,43 +320,43 @@
   1.336                      modes[i].reserved1 = info.reserved1;
   1.337                      modes[i].reserved2 = info.reserved2;
   1.338  
   1.339 -                    _XRead (dpy, offset, info.name_size);
   1.340 +                    _XRead(dpy, offset, info.name_size);
   1.341                      modes[i].name = offset;
   1.342                      offset += info.name_size;
   1.343                  }
   1.344                  *num = rep.number;
   1.345              } else
   1.346 -                _XEatData (dpy, rep.length << 2);
   1.347 +                _XEatData(dpy, rep.length << 2);
   1.348          }
   1.349      }
   1.350  
   1.351 -    UnlockDisplay (dpy);
   1.352 -    SyncHandle ();
   1.353 +    UnlockDisplay(dpy);
   1.354 +    SyncHandle();
   1.355  
   1.356      return modes;
   1.357  }
   1.358  
   1.359  
   1.360 -SDL_NAME (XDGADevice) *
   1.361 -SDL_NAME (XDGASetMode) (Display * dpy, int screen, int mode)
   1.362 +SDL_NAME(XDGADevice) *
   1.363 +SDL_NAME(XDGASetMode) (Display * dpy, int screen, int mode)
   1.364  {
   1.365 -    XExtDisplayInfo *dinfo = SDL_NAME (xdga_find_display) (dpy);
   1.366 +    XExtDisplayInfo *dinfo = SDL_NAME(xdga_find_display) (dpy);
   1.367      xXDGASetModeReply rep;
   1.368      xXDGASetModeReq *req;
   1.369 -    SDL_NAME (XDGADevice) * dev = NULL;
   1.370 +    SDL_NAME(XDGADevice) * dev = NULL;
   1.371      Pixmap pid;
   1.372  
   1.373 -    XDGACheckExtension (dpy, dinfo, NULL);
   1.374 +    XDGACheckExtension(dpy, dinfo, NULL);
   1.375  
   1.376 -    LockDisplay (dpy);
   1.377 -    GetReq (XDGASetMode, req);
   1.378 +    LockDisplay(dpy);
   1.379 +    GetReq(XDGASetMode, req);
   1.380      req->reqType = dinfo->codes->major_opcode;
   1.381      req->dgaReqType = X_XDGASetMode;
   1.382      req->screen = screen;
   1.383      req->mode = mode;
   1.384 -    req->pid = pid = XAllocID (dpy);
   1.385 +    req->pid = pid = XAllocID(dpy);
   1.386  
   1.387 -    if (_XReply (dpy, (xReply *) & rep, 0, xFalse)) {
   1.388 +    if (_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
   1.389          if (rep.length) {
   1.390              xXDGAModeInfo info;
   1.391              int size;
   1.392 @@ -364,11 +364,11 @@
   1.393              size = rep.length << 2;
   1.394              size -= sz_xXDGAModeInfo;   /* get text size */
   1.395  
   1.396 -            dev = (SDL_NAME (XDGADevice) *)
   1.397 -                Xmalloc (sizeof (SDL_NAME (XDGADevice)) + size);
   1.398 +            dev = (SDL_NAME(XDGADevice) *)
   1.399 +                Xmalloc(sizeof(SDL_NAME(XDGADevice)) + size);
   1.400  
   1.401              if (dev) {
   1.402 -                _XRead (dpy, (char *) (&info), sz_xXDGAModeInfo);
   1.403 +                _XRead(dpy, (char *) (&info), sz_xXDGAModeInfo);
   1.404  
   1.405                  dev->mode.num = info.num;
   1.406                  dev->mode.verticalRefresh =
   1.407 @@ -397,10 +397,10 @@
   1.408                  dev->mode.reserved2 = info.reserved2;
   1.409  
   1.410                  dev->mode.name = (char *) (&dev[1]);
   1.411 -                _XRead (dpy, dev->mode.name, info.name_size);
   1.412 +                _XRead(dpy, dev->mode.name, info.name_size);
   1.413  
   1.414                  dev->pixmap = (rep.flags & XDGAPixmap) ? pid : 0;
   1.415 -                dev->data = SDL_NAME (XDGAGetMappedMemory) (screen);
   1.416 +                dev->data = SDL_NAME(XDGAGetMappedMemory) (screen);
   1.417  
   1.418                  if (dev->data)
   1.419                      dev->data += rep.offset;
   1.420 @@ -409,82 +409,82 @@
   1.421          }
   1.422      }
   1.423  
   1.424 -    UnlockDisplay (dpy);
   1.425 -    SyncHandle ();
   1.426 +    UnlockDisplay(dpy);
   1.427 +    SyncHandle();
   1.428  
   1.429      return dev;
   1.430  }
   1.431  
   1.432  
   1.433 -void SDL_NAME (XDGASetViewport) (Display * dpy,
   1.434 -                                 int screen, int x, int y, int flags)
   1.435 +void SDL_NAME(XDGASetViewport) (Display * dpy,
   1.436 +                                int screen, int x, int y, int flags)
   1.437  {
   1.438 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.439 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.440      xXDGASetViewportReq *req;
   1.441  
   1.442 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.443 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.444  
   1.445 -    LockDisplay (dpy);
   1.446 -    GetReq (XDGASetViewport, req);
   1.447 +    LockDisplay(dpy);
   1.448 +    GetReq(XDGASetViewport, req);
   1.449      req->reqType = info->codes->major_opcode;
   1.450      req->dgaReqType = X_XDGASetViewport;
   1.451      req->screen = screen;
   1.452      req->x = x;
   1.453      req->y = y;
   1.454      req->flags = flags;
   1.455 -    UnlockDisplay (dpy);
   1.456 -    SyncHandle ();
   1.457 +    UnlockDisplay(dpy);
   1.458 +    SyncHandle();
   1.459  }
   1.460  
   1.461  
   1.462 -void SDL_NAME (XDGAInstallColormap) (Display * dpy, int screen, Colormap cmap)
   1.463 +void SDL_NAME(XDGAInstallColormap) (Display * dpy, int screen, Colormap cmap)
   1.464  {
   1.465 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.466 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.467      xXDGAInstallColormapReq *req;
   1.468  
   1.469 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.470 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.471  
   1.472 -    LockDisplay (dpy);
   1.473 -    GetReq (XDGAInstallColormap, req);
   1.474 +    LockDisplay(dpy);
   1.475 +    GetReq(XDGAInstallColormap, req);
   1.476      req->reqType = info->codes->major_opcode;
   1.477      req->dgaReqType = X_XDGAInstallColormap;
   1.478      req->screen = screen;
   1.479      req->cmap = cmap;
   1.480 -    UnlockDisplay (dpy);
   1.481 -    SyncHandle ();
   1.482 +    UnlockDisplay(dpy);
   1.483 +    SyncHandle();
   1.484  }
   1.485  
   1.486 -void SDL_NAME (XDGASelectInput) (Display * dpy, int screen, long mask)
   1.487 +void SDL_NAME(XDGASelectInput) (Display * dpy, int screen, long mask)
   1.488  {
   1.489 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.490 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.491      xXDGASelectInputReq *req;
   1.492  
   1.493 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.494 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.495  
   1.496 -    LockDisplay (dpy);
   1.497 -    GetReq (XDGASelectInput, req);
   1.498 +    LockDisplay(dpy);
   1.499 +    GetReq(XDGASelectInput, req);
   1.500      req->reqType = info->codes->major_opcode;
   1.501      req->dgaReqType = X_XDGASelectInput;
   1.502      req->screen = screen;
   1.503      req->mask = mask;
   1.504 -    UnlockDisplay (dpy);
   1.505 -    SyncHandle ();
   1.506 +    UnlockDisplay(dpy);
   1.507 +    SyncHandle();
   1.508  }
   1.509  
   1.510 -void SDL_NAME (XDGAFillRectangle) (Display * dpy,
   1.511 -                                   int screen,
   1.512 -                                   int x,
   1.513 -                                   int y,
   1.514 -                                   unsigned int width,
   1.515 -                                   unsigned int height, unsigned long color)
   1.516 +void SDL_NAME(XDGAFillRectangle) (Display * dpy,
   1.517 +                                  int screen,
   1.518 +                                  int x,
   1.519 +                                  int y,
   1.520 +                                  unsigned int width,
   1.521 +                                  unsigned int height, unsigned long color)
   1.522  {
   1.523 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.524 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.525      xXDGAFillRectangleReq *req;
   1.526  
   1.527 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.528 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.529  
   1.530 -    LockDisplay (dpy);
   1.531 -    GetReq (XDGAFillRectangle, req);
   1.532 +    LockDisplay(dpy);
   1.533 +    GetReq(XDGAFillRectangle, req);
   1.534      req->reqType = info->codes->major_opcode;
   1.535      req->dgaReqType = X_XDGAFillRectangle;
   1.536      req->screen = screen;
   1.537 @@ -493,24 +493,24 @@
   1.538      req->width = width;
   1.539      req->height = height;
   1.540      req->color = color;
   1.541 -    UnlockDisplay (dpy);
   1.542 -    SyncHandle ();
   1.543 +    UnlockDisplay(dpy);
   1.544 +    SyncHandle();
   1.545  }
   1.546  
   1.547 -void SDL_NAME (XDGACopyArea) (Display * dpy,
   1.548 -                              int screen,
   1.549 -                              int srcx,
   1.550 -                              int srcy,
   1.551 -                              unsigned int width,
   1.552 -                              unsigned int height, int dstx, int dsty)
   1.553 +void SDL_NAME(XDGACopyArea) (Display * dpy,
   1.554 +                             int screen,
   1.555 +                             int srcx,
   1.556 +                             int srcy,
   1.557 +                             unsigned int width,
   1.558 +                             unsigned int height, int dstx, int dsty)
   1.559  {
   1.560 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.561 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.562      xXDGACopyAreaReq *req;
   1.563  
   1.564 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.565 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.566  
   1.567 -    LockDisplay (dpy);
   1.568 -    GetReq (XDGACopyArea, req);
   1.569 +    LockDisplay(dpy);
   1.570 +    GetReq(XDGACopyArea, req);
   1.571      req->reqType = info->codes->major_opcode;
   1.572      req->dgaReqType = X_XDGACopyArea;
   1.573      req->screen = screen;
   1.574 @@ -520,26 +520,25 @@
   1.575      req->height = height;
   1.576      req->dstx = dstx;
   1.577      req->dsty = dsty;
   1.578 -    UnlockDisplay (dpy);
   1.579 -    SyncHandle ();
   1.580 +    UnlockDisplay(dpy);
   1.581 +    SyncHandle();
   1.582  }
   1.583  
   1.584 -void SDL_NAME (XDGACopyTransparentArea) (Display * dpy,
   1.585 -                                         int screen,
   1.586 -                                         int srcx,
   1.587 -                                         int srcy,
   1.588 -                                         unsigned int width,
   1.589 -                                         unsigned int height,
   1.590 -                                         int dstx,
   1.591 -                                         int dsty, unsigned long key)
   1.592 +void SDL_NAME(XDGACopyTransparentArea) (Display * dpy,
   1.593 +                                        int screen,
   1.594 +                                        int srcx,
   1.595 +                                        int srcy,
   1.596 +                                        unsigned int width,
   1.597 +                                        unsigned int height,
   1.598 +                                        int dstx, int dsty, unsigned long key)
   1.599  {
   1.600 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.601 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.602      xXDGACopyTransparentAreaReq *req;
   1.603  
   1.604 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.605 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.606  
   1.607 -    LockDisplay (dpy);
   1.608 -    GetReq (XDGACopyTransparentArea, req);
   1.609 +    LockDisplay(dpy);
   1.610 +    GetReq(XDGACopyTransparentArea, req);
   1.611      req->reqType = info->codes->major_opcode;
   1.612      req->dgaReqType = X_XDGACopyTransparentArea;
   1.613      req->screen = screen;
   1.614 @@ -550,109 +549,108 @@
   1.615      req->dstx = dstx;
   1.616      req->dsty = dsty;
   1.617      req->key = key;
   1.618 -    UnlockDisplay (dpy);
   1.619 -    SyncHandle ();
   1.620 +    UnlockDisplay(dpy);
   1.621 +    SyncHandle();
   1.622  }
   1.623  
   1.624  
   1.625 -int SDL_NAME (XDGAGetViewportStatus) (Display * dpy, int screen)
   1.626 +int SDL_NAME(XDGAGetViewportStatus) (Display * dpy, int screen)
   1.627  {
   1.628 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.629 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.630      xXDGAGetViewportStatusReply rep;
   1.631      xXDGAGetViewportStatusReq *req;
   1.632      int status = 0;
   1.633  
   1.634 -    XDGACheckExtension (dpy, info, 0);
   1.635 +    XDGACheckExtension(dpy, info, 0);
   1.636  
   1.637 -    LockDisplay (dpy);
   1.638 -    GetReq (XDGAGetViewportStatus, req);
   1.639 +    LockDisplay(dpy);
   1.640 +    GetReq(XDGAGetViewportStatus, req);
   1.641      req->reqType = info->codes->major_opcode;
   1.642      req->dgaReqType = X_XDGAGetViewportStatus;
   1.643      req->screen = screen;
   1.644 -    if (!_XReply (dpy, (xReply *) & rep, 0, xFalse))
   1.645 +    if (!_XReply(dpy, (xReply *) & rep, 0, xFalse))
   1.646          status = rep.status;
   1.647 -    UnlockDisplay (dpy);
   1.648 -    SyncHandle ();
   1.649 +    UnlockDisplay(dpy);
   1.650 +    SyncHandle();
   1.651      return status;
   1.652  }
   1.653  
   1.654 -void SDL_NAME (XDGASync) (Display * dpy, int screen)
   1.655 +void SDL_NAME(XDGASync) (Display * dpy, int screen)
   1.656  {
   1.657 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.658 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.659      xXDGASyncReply rep;
   1.660      xXDGASyncReq *req;
   1.661  
   1.662 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.663 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.664  
   1.665 -    LockDisplay (dpy);
   1.666 -    GetReq (XDGASync, req);
   1.667 +    LockDisplay(dpy);
   1.668 +    GetReq(XDGASync, req);
   1.669      req->reqType = info->codes->major_opcode;
   1.670      req->dgaReqType = X_XDGASync;
   1.671      req->screen = screen;
   1.672 -    _XReply (dpy, (xReply *) & rep, 0, xFalse);
   1.673 -    UnlockDisplay (dpy);
   1.674 -    SyncHandle ();
   1.675 +    _XReply(dpy, (xReply *) & rep, 0, xFalse);
   1.676 +    UnlockDisplay(dpy);
   1.677 +    SyncHandle();
   1.678  }
   1.679  
   1.680  
   1.681 -void SDL_NAME (XDGAChangePixmapMode) (Display * dpy,
   1.682 -                                      int screen, int *x, int *y, int mode)
   1.683 +void SDL_NAME(XDGAChangePixmapMode) (Display * dpy,
   1.684 +                                     int screen, int *x, int *y, int mode)
   1.685  {
   1.686 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.687 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.688      xXDGAChangePixmapModeReq *req;
   1.689      xXDGAChangePixmapModeReply rep;
   1.690  
   1.691 -    XextSimpleCheckExtension (dpy, info, SDL_NAME (xdga_extension_name));
   1.692 +    XextSimpleCheckExtension(dpy, info, SDL_NAME(xdga_extension_name));
   1.693  
   1.694 -    LockDisplay (dpy);
   1.695 -    GetReq (XDGAChangePixmapMode, req);
   1.696 +    LockDisplay(dpy);
   1.697 +    GetReq(XDGAChangePixmapMode, req);
   1.698      req->reqType = info->codes->major_opcode;
   1.699      req->dgaReqType = X_XDGAChangePixmapMode;
   1.700      req->screen = screen;
   1.701      req->x = *x;
   1.702      req->y = *y;
   1.703      req->flags = mode;
   1.704 -    _XReply (dpy, (xReply *) & rep, 0, xFalse);
   1.705 +    _XReply(dpy, (xReply *) & rep, 0, xFalse);
   1.706      *x = rep.x;
   1.707      *y = rep.y;
   1.708 -    UnlockDisplay (dpy);
   1.709 -    SyncHandle ();
   1.710 +    UnlockDisplay(dpy);
   1.711 +    SyncHandle();
   1.712  }
   1.713  
   1.714 -Colormap SDL_NAME (XDGACreateColormap) (Display * dpy,
   1.715 -                                        int screen,
   1.716 -                                        SDL_NAME (XDGADevice) * dev,
   1.717 -                                        int alloc)
   1.718 +Colormap SDL_NAME(XDGACreateColormap) (Display * dpy,
   1.719 +                                       int screen,
   1.720 +                                       SDL_NAME(XDGADevice) * dev, int alloc)
   1.721  {
   1.722 -    XExtDisplayInfo *info = SDL_NAME (xdga_find_display) (dpy);
   1.723 +    XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy);
   1.724      xXDGACreateColormapReq *req;
   1.725      Colormap cid;
   1.726  
   1.727 -    XDGACheckExtension (dpy, info, -1);
   1.728 +    XDGACheckExtension(dpy, info, -1);
   1.729  
   1.730 -    LockDisplay (dpy);
   1.731 -    GetReq (XDGACreateColormap, req);
   1.732 +    LockDisplay(dpy);
   1.733 +    GetReq(XDGACreateColormap, req);
   1.734      req->reqType = info->codes->major_opcode;
   1.735      req->dgaReqType = X_XDGACreateColormap;
   1.736      req->screen = screen;
   1.737      req->mode = dev->mode.num;
   1.738      req->alloc = alloc;
   1.739 -    cid = req->id = XAllocID (dpy);
   1.740 -    UnlockDisplay (dpy);
   1.741 -    SyncHandle ();
   1.742 +    cid = req->id = XAllocID(dpy);
   1.743 +    UnlockDisplay(dpy);
   1.744 +    SyncHandle();
   1.745  
   1.746      return cid;
   1.747  }
   1.748  
   1.749  
   1.750 -void SDL_NAME (XDGAKeyEventToXKeyEvent) (SDL_NAME (XDGAKeyEvent) * dk,
   1.751 -                                         XKeyEvent * xk)
   1.752 +void SDL_NAME(XDGAKeyEventToXKeyEvent) (SDL_NAME(XDGAKeyEvent) * dk,
   1.753 +                                        XKeyEvent * xk)
   1.754  {
   1.755      xk->type = dk->type;
   1.756      xk->serial = dk->serial;
   1.757      xk->send_event = False;
   1.758      xk->display = dk->display;
   1.759 -    xk->window = RootWindow (dk->display, dk->screen);
   1.760 +    xk->window = RootWindow(dk->display, dk->screen);
   1.761      xk->root = xk->window;
   1.762      xk->subwindow = None;
   1.763      xk->time = dk->time;
   1.764 @@ -715,14 +713,14 @@
   1.765  } DGAMapRec, *DGAMapPtr;
   1.766  
   1.767  static Bool
   1.768 -DGAMapPhysical (int, char *, unsigned char *, CARD32, CARD32, CARD32,
   1.769 -                DGAMapPtr);
   1.770 -static void DGAUnmapPhysical (DGAMapPtr);
   1.771 +DGAMapPhysical(int, char *, unsigned char *, CARD32, CARD32, CARD32,
   1.772 +               DGAMapPtr);
   1.773 +static void DGAUnmapPhysical(DGAMapPtr);
   1.774  
   1.775  static DGAMapPtr _Maps = NULL;
   1.776  
   1.777  
   1.778 -unsigned char *SDL_NAME (XDGAGetMappedMemory) (int screen)
   1.779 +unsigned char *SDL_NAME(XDGAGetMappedMemory) (int screen)
   1.780  {
   1.781      DGAMapPtr pMap = _Maps;
   1.782      unsigned char *pntr = NULL;
   1.783 @@ -738,11 +736,11 @@
   1.784      return pntr;
   1.785  }
   1.786  
   1.787 -Bool SDL_NAME (XDGAMapFramebuffer) (int screen, char *name,     /* optional device name */
   1.788 -                                    unsigned char *base,        /* physical memory */
   1.789 -                                    CARD32 size,        /* size */
   1.790 -                                    CARD32 offset,      /* optional offset */
   1.791 -                                    CARD32 extra        /* optional extra data */
   1.792 +Bool SDL_NAME(XDGAMapFramebuffer) (int screen, char *name,      /* optional device name */
   1.793 +                                   unsigned char *base, /* physical memory */
   1.794 +                                   CARD32 size, /* size */
   1.795 +                                   CARD32 offset,       /* optional offset */
   1.796 +                                   CARD32 extra /* optional extra data */
   1.797      )
   1.798  {
   1.799      DGAMapPtr pMap = _Maps;
   1.800 @@ -761,20 +759,20 @@
   1.801  
   1.802      }
   1.803  
   1.804 -    pMap = (DGAMapPtr) Xmalloc (sizeof (DGAMapRec));
   1.805 +    pMap = (DGAMapPtr) Xmalloc(sizeof(DGAMapRec));
   1.806  
   1.807 -    result = DGAMapPhysical (screen, name, base, size, offset, extra, pMap);
   1.808 +    result = DGAMapPhysical(screen, name, base, size, offset, extra, pMap);
   1.809  
   1.810      if (result) {
   1.811          pMap->next = _Maps;
   1.812          _Maps = pMap;
   1.813      } else
   1.814 -        Xfree (pMap);
   1.815 +        Xfree(pMap);
   1.816  
   1.817      return result;
   1.818  }
   1.819  
   1.820 -void SDL_NAME (XDGAUnmapFramebuffer) (int screen)
   1.821 +void SDL_NAME(XDGAUnmapFramebuffer) (int screen)
   1.822  {
   1.823      DGAMapPtr pMap = _Maps;
   1.824      DGAMapPtr pPrev = NULL;
   1.825 @@ -790,24 +788,24 @@
   1.826      if (!pMap)
   1.827          return;
   1.828  
   1.829 -    DGAUnmapPhysical (pMap);
   1.830 +    DGAUnmapPhysical(pMap);
   1.831  
   1.832      if (!pPrev)
   1.833          _Maps = pMap->next;
   1.834      else
   1.835          pPrev->next = pMap->next;
   1.836  
   1.837 -    Xfree (pMap);
   1.838 +    Xfree(pMap);
   1.839  }
   1.840  
   1.841  
   1.842  static Bool
   1.843 -DGAMapPhysical (int screen, char *name, /* optional device name */
   1.844 -                unsigned char *base,    /* physical memory */
   1.845 -                CARD32 size,    /* size */
   1.846 -                CARD32 offset,  /* optional offset */
   1.847 -                CARD32 extra,   /* optional extra data */
   1.848 -                DGAMapPtr pMap)
   1.849 +DGAMapPhysical(int screen, char *name,  /* optional device name */
   1.850 +               unsigned char *base,     /* physical memory */
   1.851 +               CARD32 size,     /* size */
   1.852 +               CARD32 offset,   /* optional offset */
   1.853 +               CARD32 extra,    /* optional extra data */
   1.854 +               DGAMapPtr pMap)
   1.855  {
   1.856  #if defined(ISC) && defined(HAS_SVR3_MMAP)
   1.857      struct kd_memloc mloc;
   1.858 @@ -824,15 +822,14 @@
   1.859      pMap->size = size;
   1.860  
   1.861  #if defined(ISC) && defined(HAS_SVR3_MMAP)
   1.862 -    if ((pMap->fd = open ("/dev/mmap", O_RDWR)) < 0)
   1.863 +    if ((pMap->fd = open("/dev/mmap", O_RDWR)) < 0)
   1.864          return False;
   1.865      mloc.vaddr = (char *) 0;
   1.866      mloc.physaddr = (char *) base;
   1.867      mloc.length = size;
   1.868      mloc.ioflg = 1;
   1.869  
   1.870 -    if ((pMap->virtual =
   1.871 -         (void *) ioctl (pMap->fd, MAP, &mloc)) == (void *) -1)
   1.872 +    if ((pMap->virtual = (void *) ioctl(pMap->fd, MAP, &mloc)) == (void *) -1)
   1.873          return False;
   1.874  #elif defined (__EMX__)
   1.875      /*
   1.876 @@ -841,8 +838,8 @@
   1.877       * of memory handles. Some umap/close mechanism should be provided
   1.878       */
   1.879  
   1.880 -    rc = DosOpen ("/dev/pmap$", &hfd, &action, 0, FILE_NORMAL, FILE_OPEN,
   1.881 -                  OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, (PEAOP2) NULL);
   1.882 +    rc = DosOpen("/dev/pmap$", &hfd, &action, 0, FILE_NORMAL, FILE_OPEN,
   1.883 +                 OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, (PEAOP2) NULL);
   1.884      if (rc != 0)
   1.885          return False;
   1.886      {
   1.887 @@ -861,9 +858,9 @@
   1.888  
   1.889          pmap.a.phys = base;
   1.890          pmap.size = size;
   1.891 -        rc = DosDevIOCtl (hfd, XFREE86_PMAP, PMAP_MAP,
   1.892 -                          (PULONG) & pmap, sizeof (pmap), &plen,
   1.893 -                          (PULONG) & dmap, sizeof (dmap), &dlen);
   1.894 +        rc = DosDevIOCtl(hfd, XFREE86_PMAP, PMAP_MAP,
   1.895 +                         (PULONG) & pmap, sizeof(pmap), &plen,
   1.896 +                         (PULONG) & dmap, sizeof(dmap), &dlen);
   1.897          if (rc == 0) {
   1.898              pMap->virtual = dmap.a.user;
   1.899          }
   1.900 @@ -872,27 +869,27 @@
   1.901          return False;
   1.902  #elif defined (Lynx)
   1.903      pMap->virtual =
   1.904 -        smem_create ("XF86DGA", (char *) base, size, SM_READ | SM_WRITE);
   1.905 +        smem_create("XF86DGA", (char *) base, size, SM_READ | SM_WRITE);
   1.906  #else
   1.907  #ifndef MAP_FILE
   1.908  #define MAP_FILE 0
   1.909  #endif
   1.910      if (!name)
   1.911          name = DEV_MEM;
   1.912 -    if ((pMap->fd = open (name, O_RDWR)) < 0)
   1.913 +    if ((pMap->fd = open(name, O_RDWR)) < 0)
   1.914  #if defined(ENABLE_FBCON)
   1.915      {                           /* /dev/fb0 fallback added by Sam Lantinga <hercules@lokigames.com> */
   1.916          /* Try to fall back to /dev/fb on Linux - FIXME: verify the device */
   1.917          struct fb_fix_screeninfo finfo;
   1.918  
   1.919 -        if ((pMap->fd = open ("/dev/fb0", O_RDWR)) < 0) {
   1.920 +        if ((pMap->fd = open("/dev/fb0", O_RDWR)) < 0) {
   1.921              return False;
   1.922          }
   1.923          /* The useable framebuffer console memory may not be the whole
   1.924             framebuffer that X has access to. :-(
   1.925           */
   1.926 -        if (ioctl (pMap->fd, FBIOGET_FSCREENINFO, &finfo) < 0) {
   1.927 -            close (pMap->fd);
   1.928 +        if (ioctl(pMap->fd, FBIOGET_FSCREENINFO, &finfo) < 0) {
   1.929 +            close(pMap->fd);
   1.930              return False;
   1.931          }
   1.932          /* Warning: On PPC, the size and virtual need to be offset by:
   1.933 @@ -905,15 +902,15 @@
   1.934  #else
   1.935          return False;
   1.936  #endif
   1.937 -    pMap->virtual = mmap (NULL, size, PROT_READ | PROT_WRITE,
   1.938 -                          MAP_FILE | MAP_SHARED, pMap->fd, (off_t) base);
   1.939 +    pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE,
   1.940 +                         MAP_FILE | MAP_SHARED, pMap->fd, (off_t) base);
   1.941      if (pMap->virtual == (void *) -1)
   1.942          return False;
   1.943  #endif
   1.944  
   1.945  #if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \
   1.946  	&& !defined(__EMX__)
   1.947 -    mprotect (pMap->virtual, size, PROT_READ | PROT_WRITE);
   1.948 +    mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE);
   1.949  #endif
   1.950  
   1.951      return True;
   1.952 @@ -922,15 +919,15 @@
   1.953  
   1.954  
   1.955  static void
   1.956 -DGAUnmapPhysical (DGAMapPtr pMap)
   1.957 +DGAUnmapPhysical(DGAMapPtr pMap)
   1.958  {
   1.959  #if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \
   1.960  	&& !defined(__EMX__)
   1.961 -    mprotect (pMap->virtual, pMap->size, PROT_READ);
   1.962 +    mprotect(pMap->virtual, pMap->size, PROT_READ);
   1.963  #elif defined(Lynx)
   1.964      /* XXX this doesn't allow enable after disable */
   1.965 -    smem_create (NULL, pMap->virtual, pMap->size, SM_DETACH);
   1.966 -    smem_remove ("XF86DGA");
   1.967 +    smem_create(NULL, pMap->virtual, pMap->size, SM_DETACH);
   1.968 +    smem_remove("XF86DGA");
   1.969  #endif
   1.970  
   1.971