[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-glide: Changes to 'debian-unstable'



 .gitignore         |    3 
 ChangeLog          |  109 +++
 configure.ac       |    2 
 debian/changelog   |   10 
 debian/rules       |    4 
 src/glide_driver.c | 1475 ++++++++++++++++++++++++++---------------------------
 6 files changed, 847 insertions(+), 756 deletions(-)

New commits:
commit 18e5ec8e092682633dd08aa5026f0f23948bf7da
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Sep 19 22:29:10 2013 +0200

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index ad25c65..3ba1073 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-glide (1.2.2-1) UNRELEASED; urgency=low
+xserver-xorg-video-glide (1.2.2-1) unstable; urgency=low
 
   * New upstream release.
 
@@ -11,7 +11,7 @@ xserver-xorg-video-glide (1.2.2-1) UNRELEASED; urgency=low
   [ Julien Cristau ]
   * Disable silent build rules.
 
- -- Julien Cristau <jcristau@debian.org>  Thu, 19 Sep 2013 22:22:04 +0200
+ -- Julien Cristau <jcristau@debian.org>  Thu, 19 Sep 2013 22:25:31 +0200
 
 xserver-xorg-video-glide (1.2.0-1) unstable; urgency=low
 

commit 5ade046998707172835c00e723f5287bc325270c
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Sep 19 22:29:06 2013 +0200

    Disable silent build rules.

diff --git a/debian/changelog b/debian/changelog
index 63e2979..ad25c65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ xserver-xorg-video-glide (1.2.2-1) UNRELEASED; urgency=low
   [ Michele Cane ]
   * Bump Standards-Version to 3.9.4, no changes needed.
 
+  [ Julien Cristau ]
+  * Disable silent build rules.
+
  -- Julien Cristau <jcristau@debian.org>  Thu, 19 Sep 2013 22:22:04 +0200
 
 xserver-xorg-video-glide (1.2.0-1) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index 1d8183b..6947889 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,9 @@
 
 # Use glide3 explicitly:
 override_dh_auto_configure:
-	dh_auto_configure -- --with-glide-include-dir=/usr/include/glide3
+	dh_auto_configure -- \
+		--with-glide-include-dir=/usr/include/glide3 \
+		--disable-silent-rules
 
 # Install in debian/tmp to retain control through dh_install:
 override_dh_auto_install:

commit f1815c2e0d22bc41e587873090df7aaf9ec49108
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Sep 19 22:22:34 2013 +0200

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index 3fa5086..1f538b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,112 @@
+commit 44047d72706c1a9ac80cff7714241c1934437c6f
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Thu Sep 19 06:46:23 2013 +0200
+
+    Bump to 1.2.2
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 6af93046dabc8ef63bbabd266841cb34d5eb174a
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:50:54 2013 +0200
+
+    Add compile, *.tar.bz2 and *.tar.gz to .gitignore
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 00bd4faaf963806f7b322e90fd33b57834a6dbe1
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:43:19 2013 +0200
+
+    Move miSetVisualTypes() call outside an if conditional
+    
+    The function call is a bit long, take it out of the conditional and use
+    a ret variable instead.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 9ff6c53d427c785898ccf34f7e322be0c8d0c2c3
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:36:00 2013 +0200
+
+    Do not assign to variables inside if conditionals
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 6250d5c052768b706dd897e5db399fa9ee4c2c1e
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:30:48 2013 +0200
+
+    Unify return value variable name to ret
+    
+    Use that instead of r or i, which is way more clear.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 45a85c82c66b2435606bf0cb712f5b18f5094404
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:49:31 2013 +0200
+
+    Remove unused bool typedef
+    
+    We are already using the X Bool type.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit fa72126d3736f557becea8f5707e639be1d6f6f4
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:38:30 2013 +0200
+
+    Remove dead loader code
+    
+    The function LoaderCheckUnresolved() was removed from the X server in
+    2009, and had been a stub since 2006.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 601d6af9fcefa69d7a76c6f968a153bac6f33c61
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 19:22:48 2013 +0200
+
+    Remove unreachable error check code branch
+    
+    There's no framebuffer locking funcion being called, and the last value
+    assigned to r is from grSstWinOpen(), so there has already been an error
+    check, and doing it later on will never trigger again. Just remove the
+    error check and error call.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit da1797b6cc582f1fe31697aa744731f0f9fb6f74
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Wed Sep 18 05:10:33 2013 +0200
+
+    Fix coding style
+    
+    Run x-indent.sh from the modules repository over the driver code base,
+    and manually fix the fall out.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 22cd3a1d5d5cf789093b26e5daea525dd1d1a212
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Sun Jan 13 02:26:46 2013 +0100
+
+    Remove trailing spaces and empty lines
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
+commit 4d93dfb770223b7d6a42370034435fb6a830681d
+Author: Guillem Jover <guillem@hadrons.org>
+Date:   Sun Jan 13 02:19:05 2013 +0100
+
+    Remove call to obsolete miInitializeBackingStore()
+    
+    Definition was deleted from Xorg during 1.14 merge window, but was a
+    no-op for many release cycles before that.
+    
+    Signed-off-by: Guillem Jover <guillem@hadrons.org>
+
 commit 02d1981149c4feb27f2a662f14b94185bada0e33
 Author: Guillem Jover <guillem@hadrons.org>
 Date:   Tue Jul 17 15:17:01 2012 +0200
diff --git a/debian/changelog b/debian/changelog
index 7f6260f..63e2979 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,14 @@
-xserver-xorg-video-glide (1.2.1-1) UNRELEASED; urgency=low
+xserver-xorg-video-glide (1.2.2-1) UNRELEASED; urgency=low
 
-  [ Maarten Lankhorst ]
   * New upstream release.
+
+  [ Maarten Lankhorst ]
   * Bump Standards-Version to 3.9.3
 
   [ Michele Cane ]
   * Bump Standards-Version to 3.9.4, no changes needed.
 
- -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Wed, 18 Jul 2012 15:59:52 +0200
+ -- Julien Cristau <jcristau@debian.org>  Thu, 19 Sep 2013 22:22:04 +0200
 
 xserver-xorg-video-glide (1.2.0-1) unstable; urgency=low
 

commit 44047d72706c1a9ac80cff7714241c1934437c6f
Author: Guillem Jover <guillem@hadrons.org>
Date:   Thu Sep 19 06:46:23 2013 +0200

    Bump to 1.2.2
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/configure.ac b/configure.ac
index cf5f896..a1b35ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-glide],
-        [1.2.1],
+        [1.2.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-glide])
 

commit 6af93046dabc8ef63bbabd266841cb34d5eb174a
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:50:54 2013 +0200

    Add compile, *.tar.bz2 and *.tar.gz to .gitignore
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/.gitignore b/.gitignore
index d90176e..5ffeddb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ Makefile.in
 *.lo
 aclocal.m4
 autom4te.cache
+compile
 config.guess
 config.h
 config.h.in
@@ -19,3 +20,5 @@ ltmain.sh
 missing
 stamp-h1
 *~
+*.tar.bz2
+*.tar.gz

commit 00bd4faaf963806f7b322e90fd33b57834a6dbe1
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:43:19 2013 +0200

    Move miSetVisualTypes() call outside an if conditional
    
    The function call is a bit long, take it out of the conditional and use
    a ret variable instead.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index 897bebf..a37589f 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -606,9 +606,10 @@ GLIDEScreenInit(SCREEN_INIT_ARGS_DECL)
     miClearVisualTypes();
 
     /* Setup the visuals we support. Only TrueColor. */
-    if (!miSetVisualTypes(pScrn->depth,
-                          miGetDefaultVisualMask(pScrn->depth),
-                          pScrn->rgbBits, pScrn->defaultVisual))
+    ret = miSetVisualTypes(pScrn->depth,
+                           miGetDefaultVisualMask(pScrn->depth),
+                           pScrn->rgbBits, pScrn->defaultVisual);
+    if (!ret)
         return FALSE;
 
     miSetPixmapDepths();

commit 9ff6c53d427c785898ccf34f7e322be0c8d0c2c3
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:36:00 2013 +0200

    Do not assign to variables inside if conditionals
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index be1f079..897bebf 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -297,7 +297,8 @@ GLIDEProbe(DriverPtr drv, int flags)
     ScrnInfoPtr pScrn;
     int GlideDevice;
 
-    if ((numdevList = xf86MatchDevice(GLIDE_DRIVER_NAME, &devList)) <= 0)
+    numdevList = xf86MatchDevice(GLIDE_DRIVER_NAME, &devList);
+    if (numdevList <= 0)
         return FALSE;
 
     num_sst = glide_get_num_boards();
@@ -322,7 +323,8 @@ GLIDEProbe(DriverPtr drv, int flags)
                 pScrn = NULL;
 
                 /* Allocate a ScrnInfoRec and claim the slot */
-                if ((pScrn = xf86AllocateScreen(drv, 0))) {
+                pScrn = xf86AllocateScreen(drv, 0);
+                if (pScrn) {
                     GLIDEPtr pGlide;
 
                     xf86AddEntityToScreen(pScrn, entityIndex);

commit 6250d5c052768b706dd897e5db399fa9ee4c2c1e
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:30:48 2013 +0200

    Unify return value variable name to ret
    
    Use that instead of r or i, which is way more clear.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index 2e340a6..be1f079 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -257,10 +257,10 @@ static int
 glide_get_num_boards(void)
 {
     FxI32 num_sst;
-    int r;
+    int ret;
 
-    r = grGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
-    if (!r) {
+    ret = grGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
+    if (!ret) {
         xf86Msg(X_ERROR,
                 "GLIDEProbe(): Error calling grGet(GR_NUM_BOARDS)!\n");
         return -1;
@@ -273,10 +273,10 @@ static int
 glide_get_num_boards(void)
 {
     GrHwConfiguration hw;
-    int r;
+    int ret;
 
-    r = grSstQueryBoards(&hw);
-    if (!r) {
+    ret = grSstQueryBoards(&hw);
+    if (!ret) {
         xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grSstQueryBoards!\n");
         return -1;
     }
@@ -372,7 +372,7 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
 {
     GLIDEPtr pGlide;
     MessageType from;
-    int i;
+    int ret;
     ClockRangePtr clockRanges;
 
     if (flags & PROBE_DETECT)
@@ -495,16 +495,14 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
     clockRanges->doubleScanAllowed = TRUE;
 
     /* Select valid modes from those available */
-    i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
-                          pScrn->display->modes, clockRanges,
-                          NULL, 256, 2048,
-                          pScrn->bitsPerPixel, 128, 2048,
-                          pScrn->display->virtualX,
-                          pScrn->display->virtualY,
-                          pScrn->videoRam * 1024,
-                          LOOKUP_BEST_REFRESH);
-
-    if (i == -1) {
+    ret = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
+                            pScrn->display->modes, clockRanges,
+                            NULL, 256, 2048,
+                            pScrn->bitsPerPixel, 128, 2048,
+                            pScrn->display->virtualX,
+                            pScrn->display->virtualY,
+                            pScrn->videoRam * 1024, LOOKUP_BEST_REFRESH);
+    if (ret == -1) {
         GLIDEFreeRec(pScrn);
         return FALSE;
     }
@@ -513,7 +511,7 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
     xf86PruneDriverModes(pScrn);
 
     /* If no valid modes, return */
-    if (i == 0 || pScrn->modes == NULL) {
+    if (ret == 0 || pScrn->modes == NULL) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes found\n");
         GLIDEFreeRec(pScrn);
         return FALSE;
@@ -774,7 +772,7 @@ static Bool
 GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 {
     GLIDEPtr pGlide;
-    int r;
+    int ret;
     int width, height;
     double refresh;
     Bool match = FALSE;
@@ -850,16 +848,12 @@ GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
     grGlideInit();
     grSstSelect(pGlide->SST_Index);
 
-    r = grSstWinOpen(0,
-                     pGlide->grResolution,
-                     pGlide->grRefreshRate,
-                     GR_COLORFORMAT_ARGB,
-                     GR_ORIGIN_UPPER_LEFT,
-                     2, 0);
-    if (!r) {
+    ret = grSstWinOpen(0, pGlide->grResolution, pGlide->grRefreshRate,
+                       GR_COLORFORMAT_ARGB, GR_ORIGIN_UPPER_LEFT, 2, 0);
+    if (!ret) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "grSstWinOpen returned %d. "
                    "You are probably trying to use a resolution that is not "
-                   "supported by your hardware.", r);
+                   "supported by your hardware.", ret);
         return FALSE;
     }
 

commit 45a85c82c66b2435606bf0cb712f5b18f5094404
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:49:31 2013 +0200

    Remove unused bool typedef
    
    We are already using the X Bool type.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index b304d00..2e340a6 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -82,7 +82,6 @@ typedef signed short int s16;
 typedef unsigned short int u16;
 typedef signed long int s32;
 typedef unsigned long int u32;
-typedef u8 bool;
 
 /* Card-specific driver information */
 

commit fa72126d3736f557becea8f5707e639be1d6f6f4
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:38:30 2013 +0200

    Remove dead loader code
    
    The function LoaderCheckUnresolved() was removed from the X server in
    2009, and had been a stub since 2006.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index faba80c..b304d00 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -671,11 +671,6 @@ GLIDEScreenInit(SCREEN_INIT_ARGS_DECL)
     if (serverGeneration == 1)
         xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
 
-#if 0
-    LoaderCheckUnresolved(LD_RESOLV_NOW);
-    return FALSE;
-#endif
-
     /* Done */
     return TRUE;
 }

commit 601d6af9fcefa69d7a76c6f968a153bac6f33c61
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 19:22:48 2013 +0200

    Remove unreachable error check code branch
    
    There's no framebuffer locking funcion being called, and the last value
    assigned to r is from grSstWinOpen(), so there has already been an error
    check, and doing it later on will never trigger again. Just remove the
    error check and error call.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index 909f91e..faba80c 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -873,12 +873,6 @@ GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
     grClipWindow(0, 0, 1024, 768);
     grBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
 
-    if (!r) {
-        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                   "Could not lock glide frame buffer\n");
-        return FALSE;
-    }
-
     pGlide->Blanked = FALSE;
     pGlide->GlideInitiated = TRUE;
 

commit da1797b6cc582f1fe31697aa744731f0f9fb6f74
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Sep 18 05:10:33 2013 +0200

    Fix coding style
    
    Run x-indent.sh from the modules repository over the driver code base,
    and manually fix the fall out.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index 5ac5b11..909f91e 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -1,48 +1,47 @@
 /*
-   XFree86 driver for Glide(tm). (Mainly for Voodoo 1 and 2 cards)
-
-   Since Voodoo 1 and Voodoo 2 cards are very, very NOT made for
-   running a 2D windowing system, this driver is a little
-   special. Basically, we have a virtual framebuffer in RAM (the
-   Shadow Framebuffer) and we copy selected regions of this to the
-   voodoo card at appropriate times. We get no hardware acceleration
-   help (there isn't any for 2D on these cards), but since the
-   framebuffer is in cached RAM, we get a useable display
-   anyway. Also, we don't have any interaction with any hardware since
-   Glide is the layer beneath the driver.
-
-   Author:
-     Henrik Harmsen (hch@cd.chalmers.se or Henrik.Harmsen@erv.ericsson.se)
-
-   HISTORY
-   1999-04-05
-   - First release for 3.9Pi
-
-   1999-04-17
-   - Soft link to libglide2x.so instead of addition to ModulePath
-   - Changed "EXTERN_MODULE" to EXTERN_MODULE
-   - Uses the "GlideDevice" option instead of the "BusID" line to select
-     which voodoo board to use.
-   - Manpage updates
-
-   1999-06-25
-   - Modify glideSetup to not register the driver when libglide2x.so cannot
-     be loaded, and to return appropriate error codes when it fails.
-   - Prevent GLIDEFreeScreen() from crashing if called early.
-
-   1999-08-22
-   - Minor fixes.
-
-   1999-11-22
-   - Minor change in GLIDE_FIND_FUNC by Loïc Grenié, grenie@math.jussieu.fr.
-
-   TODO
-   * Support for adjusting gamma correction.
-   * Support for setting gamma individually for R,G,B when Glide 3 arrives
-     for Linux.  This will allow me to get rid of that sick green tint my
-     voodoo2 board produces...
-   * Support static loading.
-*/
+ * XFree86 driver for Glide(tm). (Mainly for Voodoo 1 and 2 cards)
+ *
+ * Since Voodoo 1 and Voodoo 2 cards are very, very NOT made for running a
+ * 2D windowing system, this driver is a little special. Basically, we have
+ * a virtual framebuffer in RAM (the Shadow Framebuffer) and we copy selected
+ * regions of this to the voodoo card at appropriate times. We get no hardware
+ * acceleration help (there isn't any for 2D on these cards), but since the
+ * framebuffer is in cached RAM, we get a useable display anyway. Also, we
+ * don't have any interaction with any hardware since Glide is the layer
+ * beneath the driver.
+ *
+ * Author:
+ *   Henrik Harmsen (hch@cd.chalmers.se or Henrik.Harmsen@erv.ericsson.se)
+ *
+ * HISTORY
+ * 1999-04-05
+ * - First release for 3.9Pi
+ *
+ * 1999-04-17
+ * - Soft link to libglide2x.so instead of addition to ModulePath
+ * - Changed "EXTERN_MODULE" to EXTERN_MODULE
+ * - Uses the "GlideDevice" option instead of the "BusID" line to select
+ *   which voodoo board to use.
+ * - Manpage updates
+ *
+ * 1999-06-25
+ * - Modify glideSetup to not register the driver when libglide2x.so
+ *   cannot be loaded, and to return appropriate error codes when it fails.
+ * - Prevent GLIDEFreeScreen() from crashing if called early.
+ *
+ * 1999-08-22
+ * - Minor fixes.
+ *
+ * 1999-11-22
+ * - Minor change in GLIDE_FIND_FUNC by Loïc Grenié, grenie@math.jussieu.fr.
+ *
+ * TODO
+ * - Support for adjusting gamma correction.
+ * - Support for setting gamma individually for R,G,B when Glide 3 arrives
+ *   for Linux.  This will allow me to get rid of that sick green tint my
+ *   voodoo2 board produces...
+ * - Support static loading.
+ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -77,51 +76,50 @@
 #define TRUE 1
 #define FALSE 0
 
-typedef signed char        s8;
-typedef unsigned char      u8;
-typedef signed short int   s16;
+typedef signed char s8;
+typedef unsigned char u8;
+typedef signed short int s16;
 typedef unsigned short int u16;
-typedef signed long int    s32;
-typedef unsigned long int  u32;
-typedef u8                 bool;
+typedef signed long int s32;
+typedef unsigned long int u32;
+typedef u8 bool;
 
 /* Card-specific driver information */
 
 #define GLIDEPTR(p) ((GLIDEPtr)((p)->driverPrivate))
 
 typedef struct {
-  u8*                 ShadowPtr;
-  u32                 ShadowPitch;
-  u32                 SST_Index;
-  CloseScreenProcPtr  CloseScreen;
-  Bool                Blanked;
-  u32                 grRefreshRate;
-  u32                 grResolution;
-  Bool                OnAtExit;
-  Bool                GlideInitiated;
-  EntityInfoPtr       pEnt;
-  OptionInfoPtr       Options;
+    u8 *ShadowPtr;
+    u32 ShadowPitch;
+    u32 SST_Index;
+    CloseScreenProcPtr CloseScreen;
+    Bool Blanked;
+    u32 grRefreshRate;
+    u32 grResolution;
+    Bool OnAtExit;
+    Bool GlideInitiated;
+    EntityInfoPtr pEnt;
+    OptionInfoPtr Options;
 } GLIDERec, *GLIDEPtr;
 
-static const OptionInfoRec * GLIDEAvailableOptions(int chipid, int busid);
-static void	GLIDEIdentify(int flags);
-static Bool	GLIDEProbe(DriverPtr drv, int flags);
-static Bool	GLIDEPreInit(ScrnInfoPtr pScrn, int flags);
-static Bool	GLIDEScreenInit(SCREEN_INIT_ARGS_DECL);
-static Bool	GLIDEEnterVT(VT_FUNC_ARGS_DECL);
-static void	GLIDELeaveVT(VT_FUNC_ARGS_DECL);
-static Bool	GLIDECloseScreen(CLOSE_SCREEN_ARGS_DECL);
-static Bool	GLIDESaveScreen(ScreenPtr pScreen, int mode);
-static void     GLIDEFreeScreen(FREE_SCREEN_ARGS_DECL);
-static void     GLIDERefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
-static Bool     GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
-static void     GLIDERestore(ScrnInfoPtr pScrn, Bool Closing);
-static void     GLIDERefreshAll(ScrnInfoPtr pScrn);
-
-static void	GLIDEDisplayPowerManagementSet(ScrnInfoPtr pScrn,
-                                               int PowerManagementMode,
-                                               int flags);
-
+static const OptionInfoRec *GLIDEAvailableOptions(int chipid, int busid);
+static void GLIDEIdentify(int flags);
+static Bool GLIDEProbe(DriverPtr drv, int flags);
+static Bool GLIDEPreInit(ScrnInfoPtr pScrn, int flags);
+static Bool GLIDEScreenInit(SCREEN_INIT_ARGS_DECL);
+static Bool GLIDEEnterVT(VT_FUNC_ARGS_DECL);
+static void GLIDELeaveVT(VT_FUNC_ARGS_DECL);
+static Bool GLIDECloseScreen(CLOSE_SCREEN_ARGS_DECL);
+static Bool GLIDESaveScreen(ScreenPtr pScreen, int mode);
+static void GLIDEFreeScreen(FREE_SCREEN_ARGS_DECL);
+static void GLIDERefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
+static Bool GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
+static void GLIDERestore(ScrnInfoPtr pScrn, Bool Closing);
+static void GLIDERefreshAll(ScrnInfoPtr pScrn);
+
+static void GLIDEDisplayPowerManagementSet(ScrnInfoPtr pScrn,
+                                           int PowerManagementMode,
+                                           int flags);
 
 #define GLIDE_VERSION 4000
 #define GLIDE_NAME "GLIDE"
@@ -137,154 +135,154 @@ static void	GLIDEDisplayPowerManagementSet(ScrnInfoPtr pScrn,
  * reference to this is compiled in, and this requires that the name of
  * this DriverRec be an upper-case version of the driver name.
  */
-
 _X_EXPORT DriverRec GLIDE = {
-  GLIDE_VERSION,
-  GLIDE_DRIVER_NAME,
-  GLIDEIdentify,
-  GLIDEProbe,
-  GLIDEAvailableOptions,
-  NULL,
-  0
+    GLIDE_VERSION,
+    GLIDE_DRIVER_NAME,
+    GLIDEIdentify,
+    GLIDEProbe,
+    GLIDEAvailableOptions,
+    NULL,
+    0
 };
 
 typedef enum {
-  OPTION_ON_AT_EXIT,
-  OPTION_GLIDEDEVICE
+    OPTION_ON_AT_EXIT,
+    OPTION_GLIDEDEVICE
 } GLIDEOpts;
 
 static const OptionInfoRec GLIDEOptions[] = {
-  { OPTION_ON_AT_EXIT, "OnAtExit",       OPTV_BOOLEAN, {0}, FALSE },
-  { OPTION_GLIDEDEVICE, "GlideDevice",   OPTV_INTEGER, {0}, FALSE },
-  { -1,	               NULL,             OPTV_NONE,    {0}, FALSE }
+    { OPTION_ON_AT_EXIT, "OnAtExit", OPTV_BOOLEAN, { 0 }, FALSE },
+    { OPTION_GLIDEDEVICE, "GlideDevice", OPTV_INTEGER, { 0 }, FALSE },
+    { -1, NULL, OPTV_NONE, { 0 }, FALSE }
 };
 
 /* Supported chipsets */
 static SymTabRec GLIDEChipsets[] = {
-  { 0, "Voodoo" },
-  {-1, NULL }
+    { 0, "Voodoo" },
+    { -1, NULL }
 };
 
-
 #ifdef XFree86LOADER
 
 static MODULESETUPPROTO(glideSetup);
 
-static XF86ModuleVersionInfo glideVersRec =
-{
-  "glide",
-  MODULEVENDORSTRING,
-  MODINFOSTRING1,
-  MODINFOSTRING2,
-  XORG_VERSION_CURRENT,
-  GLIDE_MAJOR_VERSION, GLIDE_MINOR_VERSION, GLIDE_PATCHLEVEL,
-  ABI_CLASS_VIDEODRV,			/* This is a video driver */
-  ABI_VIDEODRV_VERSION,
-  MOD_CLASS_VIDEODRV,
-  {0,0,0,0}
+static XF86ModuleVersionInfo glideVersRec = {
+    "glide",
+    MODULEVENDORSTRING,
+    MODINFOSTRING1,
+    MODINFOSTRING2,
+    XORG_VERSION_CURRENT,
+    GLIDE_MAJOR_VERSION, GLIDE_MINOR_VERSION, GLIDE_PATCHLEVEL,
+    ABI_CLASS_VIDEODRV,         /* This is a video driver */
+    ABI_VIDEODRV_VERSION,
+    MOD_CLASS_VIDEODRV,
+    { 0, 0, 0, 0 }
 };
 
-_X_EXPORT XF86ModuleData glideModuleData = { &glideVersRec, glideSetup, NULL };
+_X_EXPORT XF86ModuleData glideModuleData = {
+    &glideVersRec,
+    glideSetup,
+    NULL
+};
 
 static pointer
 glideSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
-  static Bool setupDone = FALSE;
-  int errmaj2 = 0, errmin2 = 0;
-
-  if (!setupDone)
-  {
-    setupDone = TRUE;
-    /* This module should be loaded only once */
-    *errmaj = LDR_ONCEONLY;
-    xf86AddDriver(&GLIDE, module, 0);
-
-    /*
-     * The return value must be non-NULL on success even though there
-     * is no TearDownProc.
-     */
-    return (pointer)1;
-  }
-  else
-  {
-    if (errmaj)
-      *errmaj = LDR_ONCEONLY;
-    return NULL;
-  }
+    static Bool setupDone = FALSE;
+    int errmaj2 = 0, errmin2 = 0;
+
+    if (!setupDone) {
+        setupDone = TRUE;
+        /* This module should be loaded only once */
+        *errmaj = LDR_ONCEONLY;
+        xf86AddDriver(&GLIDE, module, 0);
+
+        /*
+         * The return value must be non-NULL on success even though there
+         * is no TearDownProc.
+         */
+        return (pointer)1;
+    }
+    else {
+        if (errmaj)
+            *errmaj = LDR_ONCEONLY;
+        return NULL;
+    }
 }
-#endif /* XFree86LOADER */
+#endif                          /* XFree86LOADER */
 
 static Bool
 GLIDEGetRec(ScrnInfoPtr pScrn)
 {
-  /*
-   * Allocate an GLIDERec, and hook it into pScrn->driverPrivate.
-   * pScrn->driverPrivate is initialised to NULL, so we can check if
-   * the allocation has already been done.
+    /*
+     * Allocate an GLIDERec, and hook it into pScrn->driverPrivate.
+     * pScrn->driverPrivate is initialised to NULL, so we can check if
+     * the allocation has already been done.
      */
-  if (pScrn->driverPrivate != NULL)
-    return TRUE;
+    if (pScrn->driverPrivate != NULL)
+        return TRUE;
 
-  pScrn->driverPrivate = xnfcalloc(sizeof(GLIDERec), 1);
+    pScrn->driverPrivate = xnfcalloc(sizeof(GLIDERec), 1);
 
-  /* Initialize it */
-  /* No init here yet */
-  return TRUE;
+    /* Initialize it */
+    /* No init here yet */
+
+    return TRUE;
 }
 
 static void
 GLIDEFreeRec(ScrnInfoPtr pScrn)
 {
-  if (pScrn->driverPrivate == NULL)
-    return;
-  free(pScrn->driverPrivate);
-  pScrn->driverPrivate = NULL;
+    if (pScrn->driverPrivate == NULL)
+        return;
+    free(pScrn->driverPrivate);
+    pScrn->driverPrivate = NULL;
 }
 
 static const OptionInfoRec *
 GLIDEAvailableOptions(int chipid, int busid)
 {
-   return GLIDEOptions;
+    return GLIDEOptions;
 }
 
 /* Mandatory */
 static void
 GLIDEIdentify(int flags)
 {
-  xf86PrintChipsets(GLIDE_NAME, "driver for Glide devices (Voodoo cards)", GLIDEChipsets);
+    xf86PrintChipsets(GLIDE_NAME, "driver for Glide devices (Voodoo cards)",
+                      GLIDEChipsets);
 }
 
 #if defined(GLIDE3)
 static int
 glide_get_num_boards(void)
 {
-  FxI32 num_sst;
-  int r;
-
-  r = grGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
-  if (!r)
-  {
-    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grGet(GR_NUM_BOARDS)!\n");
-    return -1;
-  }
+    FxI32 num_sst;
+    int r;
+
+    r = grGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
+    if (!r) {
+        xf86Msg(X_ERROR,
+                "GLIDEProbe(): Error calling grGet(GR_NUM_BOARDS)!\n");
+        return -1;
+    }
 
-  return num_sst;
+    return num_sst;
 }
 #else
 static int
 glide_get_num_boards(void)
 {
-  GrHwConfiguration hw;
-  int r;
+    GrHwConfiguration hw;
+    int r;
 
-  r = grSstQueryBoards(&hw);
-  if (!r)
-  {
-    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grSstQueryBoards!\n");
-    return -1;
-  }
+    r = grSstQueryBoards(&hw);
+    if (!r) {
+        xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grSstQueryBoards!\n");
+        return -1;
+    }
 
-  return hw.num_sst;
+    return hw.num_sst;
 }
 #endif
 
@@ -292,387 +290,394 @@ glide_get_num_boards(void)
 static Bool
 GLIDEProbe(DriverPtr drv, int flags)
 {
-  int i, num_sst, sst;
-  GDevPtr *devList;
-  GDevPtr dev = NULL;
-  int numdevList;
-  Bool foundScreen = FALSE;
-  ScrnInfoPtr pScrn;
-  int GlideDevice;
-
-  if ((numdevList = xf86MatchDevice(GLIDE_DRIVER_NAME, &devList)) <= 0)
-    return FALSE;
-
-  num_sst = glide_get_num_boards();
-  if (num_sst < 0)
-    goto cleanup;
-
-  /* num_sst: number of Glide boards available */
-  if (num_sst > 0 && (flags & PROBE_DETECT)) {
-    /* XXX Need to call xf886AddDeviceToConfigure() here */
-    return TRUE;
-  }
+    int i, num_sst, sst;
+    GDevPtr *devList;
+    GDevPtr dev = NULL;
+    int numdevList;
+    Bool foundScreen = FALSE;
+    ScrnInfoPtr pScrn;
+    int GlideDevice;
+
+    if ((numdevList = xf86MatchDevice(GLIDE_DRIVER_NAME, &devList)) <= 0)
+        return FALSE;
+
+    num_sst = glide_get_num_boards();
+    if (num_sst < 0)


Reply to: