Re: [AD] Small problem with driver removals

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
Go ahead and take care of this :-)

Okay. The attached patch takes care of all the drivers defined in include/allegro/platform/alunix.h.

- Kitty Cat
Index: include/allegro/platform/alunix.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro/platform/alunix.h,v
retrieving revision 1.15
diff -u -r1.15 alunix.h
--- include/allegro/platform/alunix.h	31 Aug 2004 07:29:28 -0000	1.15
+++ include/allegro/platform/alunix.h	8 Sep 2004 18:39:35 -0000
@@ -45,16 +45,14 @@
 /************ General Unix ************/
 /**************************************/
 
-#ifdef HAVE_LIBPTHREAD
-
 #define TIMERDRV_UNIX_PTHREADS	AL_ID('P','T','H','R')
-AL_VAR(TIMER_DRIVER, timerdrv_unix_pthreads);
+#define TIMERDRV_UNIX_SIGALRM    AL_ID('A','L','R','M')
 
-#else
 
-#define TIMERDRV_UNIX_SIGALRM    AL_ID('A','L','R','M')
+#ifdef HAVE_LIBPTHREAD
+AL_VAR(TIMER_DRIVER, timerdrv_unix_pthreads);
+#else
 AL_VAR(TIMER_DRIVER, timerdrv_unix_sigalrm);
-
 #endif
 
 
@@ -63,149 +61,97 @@
 /*********** Sound drivers **********/
 /************************************/
 
-#ifdef ALLEGRO_WITH_OSSDIGI
-
 #define DIGI_OSS              AL_ID('O','S','S','D')
+#define MIDI_OSS              AL_ID('O','S','S','M')
+#define DIGI_ESD              AL_ID('E','S','D','D')
+#define DIGI_ARTS             AL_ID('A','R','T','S')
+#define DIGI_SGIAL            AL_ID('S','G','I','A')
+#define DIGI_ALSA             AL_ID('A','L','S','A')
+#define MIDI_ALSA             AL_ID('A','M','I','D')
+#define DIGI_JACK             AL_ID('J','A','C','K')
 
-AL_VAR(DIGI_DRIVER, digi_oss);
 
+#ifdef ALLEGRO_WITH_OSSDIGI
+AL_VAR(DIGI_DRIVER, digi_oss);
 #define DIGI_DRIVER_OSS                                          \
       {  DIGI_OSS,        &digi_oss,            TRUE  },
-
 #endif /* ALLEGRO_WITH_OSSDIGI */
 
 #ifdef ALLEGRO_WITH_OSSMIDI
-
-#define MIDI_OSS              AL_ID('O','S','S','M')
-
 AL_VAR(MIDI_DRIVER, midi_oss);
-
 #define MIDI_DRIVER_OSS                                          \
       {  MIDI_OSS,        &midi_oss,            TRUE  },
-
 #endif /* ALLEGRO_WITH_OSSMIDI */
 
-#ifdef ALLEGRO_WITH_ESDDIGI
-
-#define DIGI_ESD              AL_ID('E','S','D','D')
-
 #ifndef ALLEGRO_WITH_MODULES
 
+#ifdef ALLEGRO_WITH_ESDDIGI
 AL_VAR(DIGI_DRIVER, digi_esd);
-
 #define DIGI_DRIVER_ESD                                          \
       {  DIGI_ESD,        &digi_esd,            TRUE  },
-
-#endif
-
 #endif /* ALLEGRO_WITH_ESDDIGI */
 
 #ifdef ALLEGRO_WITH_ARTSDIGI
-
-#define DIGI_ARTS             AL_ID('A','R','T','S')
-
-#ifndef ALLEGRO_WITH_MODULES
-
 AL_VAR(DIGI_DRIVER, digi_arts);
-
 #define DIGI_DRIVER_ARTS                                         \
       {  DIGI_ARTS,       &digi_arts,            TRUE  },
-
-#endif
-
 #endif /* ALLEGRO_WITH_ARTSDIGI */
 
 #ifdef ALLEGRO_WITH_SGIALDIGI
-
-#define DIGI_SGIAL          AL_ID('S','G','I','A')
-
-#ifndef ALLEGRO_WITH_MODULES
-
 AL_VAR(DIGI_DRIVER, digi_sgial);
-
 #define DIGI_DRIVER_SGIAL                                        \
       {  DIGI_SGIAL,      &digi_sgial,          TRUE  },
-
-#endif
-
 #endif /* ALLEGRO_WITH_SGIALDIGI */
 
 #ifdef ALLEGRO_WITH_ALSADIGI
-
-#define DIGI_ALSA             AL_ID('A','L','S','A')
-
-#ifndef ALLEGRO_WITH_MODULES
-
 AL_VAR(DIGI_DRIVER, digi_alsa);
-
 #define DIGI_DRIVER_ALSA                                         \
       {  DIGI_ALSA,       &digi_alsa,           TRUE  },
-
-#endif
-      
 #endif /* ALLEGRO_WITH_ALSADIGI */
 
 
 #ifdef ALLEGRO_WITH_ALSAMIDI
-
-#define MIDI_ALSA              AL_ID('A','M','I','D')
-
-#ifndef ALLEGRO_WITH_MODULES
-
 AL_VAR(MIDI_DRIVER, midi_alsa);
-
 #define MIDI_DRIVER_ALSA                                          \
       {  MIDI_ALSA,        &midi_alsa,            TRUE  },
-
-#endif
-
 #endif /* ALLEGRO_WITH_ALSAMIDI */
 
 	  
 #ifdef ALLEGRO_WITH_JACKDIGI
-
-#define DIGI_JACK             AL_ID('J','A','C','K')
-
-#ifndef ALLEGRO_WITH_MODULES
-
 AL_VAR(DIGI_DRIVER, digi_jack);
-
 #define DIGI_DRIVER_JACK                                         \
       {  DIGI_JACK,       &digi_jack,           TRUE  },
+#endif /* ALLEGRO_WITH_JACKDIGI */
 
 #endif
-      
-#endif /* ALLEGRO_WITH_JACKDIGI */
+
 
 
 /************************************/
 /************ X-specific ************/
 /************************************/
 
-#ifdef ALLEGRO_WITH_XWINDOWS
-
-
 #define SYSTEM_XWINDOWS          AL_ID('X','W','I','N')
-AL_VAR(SYSTEM_DRIVER, system_xwin);
 
-#define GFX_XWINDOWS             AL_ID('X','W','I','N')
-#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE
-#define GFX_XWINDOWS_FULLSCREEN  AL_ID('X','W','F','S')
-#endif
 #define KEYBOARD_XWINDOWS        AL_ID('X','W','I','N')
 #define MOUSE_XWINDOWS           AL_ID('X','W','I','N')
 
-#ifdef ALLEGRO_XWINDOWS_WITH_XF86DGA2
+#define GFX_XWINDOWS             AL_ID('X','W','I','N')
+#define GFX_XWINDOWS_FULLSCREEN  AL_ID('X','W','F','S')
 #define GFX_XDGA2                AL_ID('D','G','A','2')
 #define GFX_XDGA2_SOFT           AL_ID('D','G','A','S')
 
+
+#ifdef ALLEGRO_WITH_XWINDOWS
+AL_VAR(SYSTEM_DRIVER, system_xwin);
+
+#ifdef ALLEGRO_XWINDOWS_WITH_XF86DGA2
 #ifndef ALLEGRO_WITH_MODULES
 AL_VAR(GFX_DRIVER, gfx_xdga2);
 AL_VAR(GFX_DRIVER, gfx_xdga2_soft);
 #endif
 #endif
 
-
 #endif /* ALLEGRO_WITH_XWINDOWS */
 
 
@@ -214,63 +160,61 @@
 /************ Linux-specific ************/
 /****************************************/
 
-#ifdef ALLEGRO_LINUX
+#define SYSTEM_LINUX             AL_ID('L','N','X','C')
 
+#define GFX_VGA                  AL_ID('V','G','A',' ')
+#define GFX_MODEX                AL_ID('M','O','D','X')
+#define GFX_FBCON                AL_ID('F','B',' ',' ')
+#define GFX_VBEAF                AL_ID('V','B','A','F')
+#define GFX_SVGALIB              AL_ID('S','V','G','A')
+
+#define KEYDRV_LINUX             AL_ID('L','N','X','C')
+
+#define MOUSEDRV_LINUX_PS2       AL_ID('L','P','S','2')
+#define MOUSEDRV_LINUX_IPS2      AL_ID('L','I','P','S')
+#define MOUSEDRV_LINUX_GPMDATA   AL_ID('G','P','M','D')
+#define MOUSEDRV_LINUX_MS        AL_ID('M','S',' ',' ')
+#define MOUSEDRV_LINUX_IMS       AL_ID('I','M','S',' ')
+#define MOUSEDRV_LINUX_EVDEV     AL_ID('E','V',' ',' ')
+
+#define JOY_TYPE_LINUX_ANALOGUE  AL_ID('L','N','X','A')
+
+
+#ifdef ALLEGRO_LINUX
 
-#define SYSTEM_LINUX             AL_ID('L','N','X','C')
 AL_VAR(SYSTEM_DRIVER, system_linux);
 
 #ifdef ALLEGRO_LINUX_VGA
-   #define GFX_VGA                  AL_ID('V','G','A',' ')
-   #define GFX_MODEX                AL_ID('M','O','D','X')
    AL_VAR(GFX_DRIVER, gfx_vga);
    AL_VAR(GFX_DRIVER, gfx_modex);
 #endif
 
-#ifdef ALLEGRO_LINUX_FBCON
-   #define GFX_FBCON                AL_ID('F','B',' ',' ')
 #ifndef ALLEGRO_WITH_MODULES
+
+#ifdef ALLEGRO_LINUX_FBCON
    AL_VAR(GFX_DRIVER, gfx_fbcon);
 #endif
+#ifdef ALLEGRO_LINUX_SVGALIB
+   AL_VAR(GFX_DRIVER, gfx_svgalib);
 #endif
 
-#ifdef ALLEGRO_LINUX_VBEAF
-   #define GFX_VBEAF                AL_ID('V','B','A','F')
-   AL_VAR(GFX_DRIVER, gfx_vbeaf);
 #endif
 
-#ifdef ALLEGRO_LINUX_SVGALIB
-   #define GFX_SVGALIB              AL_ID('S','V','G','A')
-#ifndef ALLEGRO_WITH_MODULES
-   AL_VAR(GFX_DRIVER, gfx_svgalib);
-#endif
+#ifdef ALLEGRO_LINUX_VBEAF
+   AL_VAR(GFX_DRIVER, gfx_vbeaf);
 #endif
 
-#define KEYDRV_LINUX             AL_ID('L','N','X','C')
 AL_VAR(KEYBOARD_DRIVER, keydrv_linux_console);
 
-#define MOUSEDRV_LINUX_PS2       AL_ID('L','P','S','2')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_ps2);
-
-#define MOUSEDRV_LINUX_IPS2      AL_ID('L','I','P','S')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_ips2);
-
-#define MOUSEDRV_LINUX_GPMDATA   AL_ID('G','P','M','D')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_gpmdata);
-
-#define MOUSEDRV_LINUX_MS        AL_ID('M','S',' ',' ')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_ms);
-
-#define MOUSEDRV_LINUX_IMS       AL_ID('I','M','S',' ')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_ims);
-
-#define MOUSEDRV_LINUX_EVDEV     AL_ID('E','V',' ',' ')
 AL_VAR(MOUSE_DRIVER, mousedrv_linux_evdev);
 
-#define JOY_TYPE_LINUX_ANALOGUE  AL_ID('L','N','X','A')
 AL_VAR(JOYSTICK_DRIVER, joystick_linux_analogue);
 
-
 AL_FUNC(void, split_modex_screen, (int line));
 
 
Index: src/x/xtimer.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/x/xtimer.c,v
retrieving revision 1.4
diff -u -r1.4 xtimer.c
--- src/x/xtimer.c	6 Nov 2001 17:16:41 -0000	1.4
+++ src/x/xtimer.c	8 Sep 2004 18:39:35 -0000
@@ -23,10 +23,9 @@
 /* list the available drivers */
 _DRIVER_INFO _xwin_timer_driver_list[] =
 {
-#ifdef TIMERDRV_UNIX_PTHREADS
+#ifdef HAVE_LIBPTHREAD
    {  TIMERDRV_UNIX_PTHREADS,  &timerdrv_unix_pthreads, TRUE  },
-#endif
-#ifdef TIMERDRV_UNIX_SIGALRM
+#else
    {  TIMERDRV_UNIX_SIGALRM,   &timerdrv_unix_sigalrm,  TRUE  },
 #endif
    {  0,                       NULL,                    0     }
Index: src/linux/ltimer.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/linux/ltimer.c,v
retrieving revision 1.4
diff -u -r1.4 ltimer.c
--- src/linux/ltimer.c	6 Nov 2001 17:16:40 -0000	1.4
+++ src/linux/ltimer.c	8 Sep 2004 18:39:35 -0000
@@ -23,10 +23,9 @@
 /* list the available drivers */
 _DRIVER_INFO _linux_timer_driver_list[] =
 {
-#ifdef TIMERDRV_UNIX_PTHREADS
+#ifdef HAVE_LIBPTHREAD
    {  TIMERDRV_UNIX_PTHREADS,  &timerdrv_unix_pthreads, TRUE  },
-#endif
-#ifdef TIMERDRV_UNIX_SIGALRM
+#else
    {  TIMERDRV_UNIX_SIGALRM,   &timerdrv_unix_sigalrm,  TRUE  },
 #endif
    {  0,                       NULL,                    0     }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/