From 2ba5fbba92786a8e740cd428b4df908798415501 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Fri, 19 Oct 2001 00:00:54 +0000 Subject: [PATCH] Changed __ENV_LINUX__ to __linux__ --- 2d/linear.h | 2 +- acconfig.h | 5 +---- arch/include/joy.h | 11 +++++++---- include/loadgl.h | 2 +- include/strutil.h | 2 +- include/vecmat.h | 9 ++++++--- main/console.c | 2 +- main/kconfig.c | 10 +++++----- misc/d_glob.c | 4 ++-- texmap/tmap_inc.asm | 9 ++++++--- texmap/tmap_per.asm | 9 ++++++--- texmap/tmappent.S | 4 ++-- texmap/tmapppro.S | 4 ++-- video/ogl_gr.c | 9 ++++++--- 14 files changed, 47 insertions(+), 35 deletions(-) diff --git a/2d/linear.h b/2d/linear.h index 8f0e9734..06503914 100644 --- a/2d/linear.h +++ b/2d/linear.h @@ -222,7 +222,7 @@ static inline void gr_linear_rep_movsdm_faded(void * src, void * dest, unsigned " incl %%esi;" " cmpb $255, %%al;" " je 1f;" -#ifdef __ENV_LINUX__ +#ifdef __linux__ " movb gr_fade_table(%%eax), %%al;" #else " movb _gr_fade_table(%%eax), %%al;" diff --git a/acconfig.h b/acconfig.h index 8385b2db..1a9d3863 100644 --- a/acconfig.h +++ b/acconfig.h @@ -13,9 +13,6 @@ /* Define if you want a GGI build */ #undef GGI -/* Define if building under linux */ -#undef __ENV_LINUX__ - /* Define to disable asserts, int3, etc. */ #undef NDEBUG @@ -26,7 +23,7 @@ #define PIGGY_USE_PAGING 1 #define NEWDEMO 1 -#ifdef __ENV_LINUX__ +#ifdef __linux__ # define __SDL__ 1 # define SDL_AUDIO 1 diff --git a/arch/include/joy.h b/arch/include/joy.h index 69b4054b..52ff12a9 100644 --- a/arch/include/joy.h +++ b/arch/include/joy.h @@ -13,13 +13,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. /* * $Source: /cvs/cvsroot/d2x/arch/include/joy.h,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * $Author: bradleyb $ - * $Date: 2001-10-12 00:18:37 $ + * $Date: 2001-10-18 23:59:22 $ * * Header for joystick functions * * $Log: not supported by cvs2svn $ + * Revision 1.3 2001/10/12 00:18:37 bradleyb + * Switched from Cygwin to mingw32 on MS boxes. Vastly improved compilability. + * * Revision 1.2 2001/01/29 13:36:14 bradleyb * Removed duplicate files * @@ -49,7 +52,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #if defined WINDOWS #define JOY_NUM_AXES 7 -#elif defined __ENV_LINUX__ +#elif defined __linux__ #define JOY_NUM_AXES 5 #else #define JOY_NUM_AXES 4 @@ -71,7 +74,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. /* not present in d2src, maybe we don't really need it? */ #define JOY_FRIENDLY_READINGS 8 -#ifdef __ENV_LINUX__ +#ifdef __linux__ #define MAX_BUTTONS 64 #else #define MAX_BUTTONS 20 diff --git a/include/loadgl.h b/include/loadgl.h index 1146f959..a308de2e 100644 --- a/include/loadgl.h +++ b/include/loadgl.h @@ -1144,7 +1144,7 @@ void *dll_GetSymbol(void *dllhandle,const char *symname) return (void *)GetProcAddress((HINSTANCE)dllhandle,symname); } #endif -#ifdef __ENV_LINUX__ +#ifdef __linux__ #include void *dll_LoadModule(const char *name) { diff --git a/include/strutil.h b/include/strutil.h index ca0e50af..6047dfc1 100644 --- a/include/strutil.h +++ b/include/strutil.h @@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. char *d_strdup(char *str); -#if defined(__ENV_LINUX__) +#ifdef __linux__ #define stricmp(a,b) strcasecmp(a,b) #define strnicmp(a,b,c) strncasecmp(a,b,c) #elif 0 diff --git a/include/vecmat.h b/include/vecmat.h index 81a2c049..09b30f82 100644 --- a/include/vecmat.h +++ b/include/vecmat.h @@ -13,13 +13,16 @@ */ /* * $Source: /cvs/cvsroot/d2x/include/vecmat.h,v $ - * $Revision: 1.2 $ + * $Revision: 1.3 $ * $Author: bradleyb $ - * $Date: 2001-10-12 06:40:49 $ + * $Date: 2001-10-18 23:59:22 $ * * Header file for vector/matrix library * * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/10/12 06:40:49 bradleyb + * fix some gcc 3.0 warnings, courtesy of paoloulivi@tin.it + * * Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb * Import of d2x-0.0.8 * @@ -230,7 +233,7 @@ __pack__ vms_matrix; // DPH (18/9/98): Begin mod to fix linefeed problem under linux. Uses an // inline function instead of a multi-line macro to fix CR/LF problems. -#ifdef __LINUX__ +#ifdef __linux__ static inline void vm_set_identity(vms_matrix *m) { m->rvec.x = m->uvec.y = m->fvec.z = f1_0; diff --git a/main/console.c b/main/console.c index 6a941a69..9f3705f0 100644 --- a/main/console.c +++ b/main/console.c @@ -13,7 +13,7 @@ #include "console.h" #include "cmd.h" -#if defined(__ENV_LINUX__) || defined(__MINGW32__) +#if defined(__linux__) || defined(__MINGW32__) int text_console_enabled = 1; #else int isvga(); diff --git a/main/kconfig.c b/main/kconfig.c index b1e213fc..f1f4dd1b 100644 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: kconfig.c,v 1.8 2001-10-12 00:18:39 bradleyb Exp $"; +static char rcsid[] = "$Id: kconfig.c,v 1.9 2001-10-18 23:59:22 bradleyb Exp $"; #endif #ifdef WINDOWS @@ -71,7 +71,7 @@ static char rcsid[] = "$Id: kconfig.c,v 1.8 2001-10-12 00:18:39 bradleyb Exp $"; #include "d_delay.h" #include "collide.h" -#ifdef __ENV_LINUX__ +#ifdef __linux__ #include "linux_joystick.h" #endif @@ -2680,7 +2680,7 @@ void controls_read_all() int idx, idy; fix ctime; fix mouse_axis[2]; -#ifdef __ENV_LINUX__ +#ifdef __linux__ int raw_joy_axis[MAX_AXES]; #else int raw_joy_axis[JOY_NUM_AXES]; @@ -2721,7 +2721,7 @@ void controls_read_all() channel_masks = joystick_read_raw_axis( JOY_ALL_AXIS, raw_joy_axis ); for (i=0; i<6; i++ ) { -#ifndef __ENV_LINUX__ +#ifndef __linux__ if (channel_masks&(1< int d_glob(const char *pattern, d_glob_t *g) @@ -31,7 +31,7 @@ int d_glob(const char *pattern, d_glob_t *g) void d_globfree(d_glob_t *g) { -#ifndef __ENV_LINUX__ // Linux doesn't believe in freeing glob structures... :-) +#ifndef __linux__ // Linux doesn't believe in freeing glob structures... :-) glob_t a; Assert (g!=NULL); diff --git a/texmap/tmap_inc.asm b/texmap/tmap_inc.asm index 1bbf5cfc..c1ffaf27 100644 --- a/texmap/tmap_inc.asm +++ b/texmap/tmap_inc.asm @@ -10,13 +10,16 @@ ;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. ; ; $Source: /cvs/cvsroot/d2x/texmap/tmap_inc.asm,v $ -; $Revision: 1.1.1.1 $ +; $Revision: 1.2 $ ; $Author: bradleyb $ -; $Date: 2001-01-19 03:30:16 $ +; $Date: 2001-10-18 23:59:23 $ ; ; Mike's include file for the texture mapper library. ; ; $Log: not supported by cvs2svn $ +; Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb +; Import of d2x-0.0.8 +; ; Revision 1.1.1.1 1999/06/14 22:13:53 donut ; Import of d1x 1.37 source. ; @@ -88,7 +91,7 @@ SCREEN_HEIGHT = 480 BYTES_PER_PIXEL = 2 %endif -%ifdef __ENV_LINUX__ +%ifdef __linux__ ; It appears that ELF C compilers do not prefix symbols with '_', so here we ; cater for them... %define _gr_fade_table gr_fade_table diff --git a/texmap/tmap_per.asm b/texmap/tmap_per.asm index 8dd49c6e..16d127f0 100644 --- a/texmap/tmap_per.asm +++ b/texmap/tmap_per.asm @@ -10,13 +10,16 @@ ;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. ; ; $Source: /cvs/cvsroot/d2x/texmap/tmap_per.asm,v $ -; $Revision: 1.1.1.1 $ +; $Revision: 1.2 $ ; $Author: bradleyb $ -; $Date: 2001-01-19 03:30:16 $ +; $Date: 2001-10-18 23:59:23 $ ; ; Perspective texture mapper inner loop. ; ; $Log: not supported by cvs2svn $ +; Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb +; Import of d2x-0.0.8 +; ; Revision 1.1.1.1 1999/06/14 22:14:01 donut ; Import of d1x 1.37 source. ; @@ -125,7 +128,7 @@ global asm_tmap_scanline_per [SECTION .data] align 4 ;extern _per2_flag;:dword -%ifdef __ENV_LINUX__ +%ifdef __linux__ ; Cater for linux ELF compilers... global x %define _loop_count loop_count diff --git a/texmap/tmappent.S b/texmap/tmappent.S index 919a98be..26fb144a 100644 --- a/texmap/tmappent.S +++ b/texmap/tmappent.S @@ -152,7 +152,7 @@ // (ready to start the next division) .endm -#ifdef __ENV_LINUX__ +#ifdef __linux__ .equ _pixptr, pixptr .equ _gr_fade_table, gr_fade_table .equ _write_buffer, write_buffer @@ -216,7 +216,7 @@ ctlwd: .word 0 // the pre-tweaked FPU control word // void c_tmap_scanline_per(void) // -#ifdef __ENV_LINUX__ +#ifdef __linux__ asm_tmap_scanline_per: #else _asm_tmap_scanline_per: diff --git a/texmap/tmapppro.S b/texmap/tmapppro.S index f7bdbce1..b65891a2 100644 --- a/texmap/tmapppro.S +++ b/texmap/tmapppro.S @@ -142,7 +142,7 @@ .endm -#ifdef __ENV_LINUX__ +#ifdef __linux__ .equ _pixptr, pixptr .equ _gr_fade_table, gr_fade_table .equ _write_buffer, write_buffer @@ -202,7 +202,7 @@ ctlwd: .long 0 // the pre-tweaked FPU control word // void c_tmap_scanline_per(void) // -#ifdef __ENV_LINUX__ +#ifdef __linux__ asm_tmap_scanline_per: #else _asm_tmap_scanline_per: diff --git a/video/ogl_gr.c b/video/ogl_gr.c index b8352f2b..950b975f 100644 --- a/video/ogl_gr.c +++ b/video/ogl_gr.c @@ -1,12 +1,15 @@ /* * $Source: /cvs/cvsroot/d2x/video/ogl_gr.c,v $ - * $Revision: 1.5 $ + * $Revision: 1.6 $ * $Author: bradleyb $ - * $Date: 2001-10-12 00:18:40 $ + * $Date: 2001-10-18 23:59:23 $ * * // OGL video functions. - Added 9/15/99 Matthew Mueller * * $Log: not supported by cvs2svn $ + * Revision 1.5 2001/10/12 00:18:40 bradleyb + * Switched from Cygwin to mingw32 on MS boxes. Vastly improved compilability. + * * Revision 1.4 2001/01/29 13:47:52 bradleyb * Fixed build, some minor cleanups. * @@ -241,7 +244,7 @@ int ogl_testneedmipmaps(int i){ #ifdef OGL_RUNTIME_LOAD #if defined(__WINDOWS__) || defined(__MINGW32__) char *OglLibPath="opengl32.dll"; -#elif defined(__ENV_LINUX__) +#else char *OglLibPath="libGL.so"; #endif -- 2.39.2