$NetBSD: patch-ab,v 1.2 1998/09/06 16:37:44 hubertf Exp $ *** 1.1.1.1 1998/07/03 16:32:29 --- linuxdoom-1.10/d_net.h 1998/07/03 16:33:37 *************** *** 80,84 **** { // Supposed to be DOOMCOM_ID? ! long id; // DOOM executes an int to execute commands. --- 80,84 ---- { // Supposed to be DOOMCOM_ID? ! int id; // DOOM executes an int to execute commands. Index: linuxdoom-1.10/doomtype.h =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/doomtype.h,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 doomtype.h *** 1.1.1.1 1998/07/03 16:32:16 --- linuxdoom-1.10/doomtype.h 1998/07/15 21:12:05 *************** *** 47,51 **** // Max pos 32-bit int. #define MAXINT ((int)0x7fffffff) - #define MAXLONG ((long)0x7fffffff) #define MINCHAR ((char)0x80) #define MINSHORT ((short)0x8000) --- 47,50 ---- *************** *** 53,57 **** // Max negative 32-bit integer. #define MININT ((int)0x80000000) - #define MINLONG ((long)0x80000000) #endif --- 52,55 ---- Index: linuxdoom-1.10/info.h =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/info.h,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 info.h *** 1.1.1.1 1998/07/03 16:32:20 --- linuxdoom-1.10/info.h 1998/07/03 16:33:41 *************** *** 1148,1157 **** { spritenum_t sprite; ! long frame; ! long tics; // void (*action) (); actionf_t action; statenum_t nextstate; ! long misc1, misc2; } state_t; --- 1148,1157 ---- { spritenum_t sprite; ! int frame; ! int tics; // void (*action) (); actionf_t action; statenum_t nextstate; ! int misc1, misc2; } state_t; Index: linuxdoom-1.10/m_bbox.h =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/m_bbox.h,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 m_bbox.h *** 1.1.1.1 1998/07/03 16:32:20 --- linuxdoom-1.10/m_bbox.h 1998/07/03 16:33:42 *************** *** 24,28 **** #define __M_BBOX__ ! #include #include "m_fixed.h" --- 24,28 ---- #define __M_BBOX__ ! #include "doomtype.h" #include "m_fixed.h" Index: linuxdoom-1.10/m_swap.h =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/m_swap.h,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 m_swap.h *** 1.1.1.1 1998/07/03 16:32:29 --- linuxdoom-1.10/m_swap.h 1998/07/15 21:08:17 *************** *** 34,40 **** #ifdef __BIG_ENDIAN__ short SwapSHORT(short); ! long SwapLONG(long); #define SHORT(x) ((short)SwapSHORT((unsigned short) (x))) ! #define LONG(x) ((long)SwapLONG((unsigned long) (x))) #else #define SHORT(x) (x) --- 34,40 ---- #ifdef __BIG_ENDIAN__ short SwapSHORT(short); ! int SwapLONG(int); #define SHORT(x) ((short)SwapSHORT((unsigned short) (x))) ! #define LONG(x) ((int)SwapLONG((unsigned int) (x))) #else #define SHORT(x) (x) Index: linuxdoom-1.10/i_net.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/i_net.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 i_net.c *** 1.1.1.1 1998/07/03 16:32:18 --- linuxdoom-1.10/i_net.c 1998/07/15 21:11:38 *************** *** 51,69 **** - - // For some odd reason... - #define ntohl(x) \ - ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ - (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ - (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ - (((unsigned long int)(x) & 0xff000000U) >> 24))) - - #define ntohs(x) \ - ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ - (((unsigned short int)(x) & 0xff00) >> 8))) \ - - #define htonl(x) ntohl(x) - #define htons(x) ntohs(x) - void NetSend (void); boolean NetListen (void); --- 51,54 ---- *************** *** 74,78 **** // ! int DOOMPORT = (IPPORT_USERRESERVED +0x1d ); int sendsocket; --- 59,63 ---- // ! int DOOMPORT = (IPPORT_RESERVED +0x1d ); int sendsocket; Index: linuxdoom-1.10/i_sound.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/i_sound.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 i_sound.c *** 1.1.1.1 1998/07/03 16:32:18 --- linuxdoom-1.10/i_sound.c 1998/07/15 20:05:49 *************** *** 42,47 **** --- 42,49 ---- #include + #ifdef LINUX // Linux voxware output. #include + #endif // Timer stuff. Experimental. Index: linuxdoom-1.10/i_video.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/i_video.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 i_video.c *** 1.1.1.1 1998/07/03 16:32:18 --- linuxdoom-1.10/i_video.c 1998/07/15 20:40:59 *************** *** 37,41 **** // Had to dig up XShm.c for this one. // It is in the libXext, but not in the XFree86 headers. ! #ifdef LINUX int XShmGetEventBase( Display* dpy ); // problems with g++? #endif --- 37,41 ---- // Had to dig up XShm.c for this one. // It is in the libXext, but not in the XFree86 headers. ! #if defined(LINUX) || defined (__NetBSD__) int XShmGetEventBase( Display* dpy ); // problems with g++? #endif *************** *** 47,51 **** #include ! #include #include --- 47,51 ---- #include ! #include #include Index: linuxdoom-1.10/m_menu.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/m_menu.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 m_menu.c *** 1.1.1.1 1998/07/03 16:32:21 --- linuxdoom-1.10/m_menu.c 1998/07/03 16:33:58 *************** *** 530,534 **** continue; } ! count = read (handle, &savegamestrings[i], SAVESTRINGSIZE); close (handle); LoadMenu[i].status = 1; --- 530,534 ---- continue; } ! count = read (handle, savegamestrings[i], SAVESTRINGSIZE); close (handle); LoadMenu[i].status = 1; Index: linuxdoom-1.10/m_misc.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/m_misc.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 m_misc.c *** 1.1.1.1 1998/07/03 16:32:21 --- linuxdoom-1.10/m_misc.c 1998/07/03 16:33:58 *************** *** 227,231 **** char* name; int* location; ! int defaultvalue; int scantranslate; // PC scan code hack int untranslated; // lousy hack --- 227,231 ---- char* name; int* location; ! long defaultvalue; int scantranslate; // PC scan code hack int untranslated; // lousy hack *************** *** 255,260 **** // UNIX hack, to be removed. #ifdef SNDSERV ! {"sndserver", (int *) &sndserver_filename, (int) "sndserver"}, ! {"mb_used", &mb_used, 2}, #endif --- 255,260 ---- // UNIX hack, to be removed. #ifdef SNDSERV ! {"sndserver", (int *) &sndserver_filename, (long) "sndserver"}, ! {"mb_used", &mb_used, 12}, #endif *************** *** 286,299 **** {"usegamma",&usegamma, 0}, ! {"chatmacro0", (int *) &chat_macros[0], (int) HUSTR_CHATMACRO0 }, ! {"chatmacro1", (int *) &chat_macros[1], (int) HUSTR_CHATMACRO1 }, ! {"chatmacro2", (int *) &chat_macros[2], (int) HUSTR_CHATMACRO2 }, ! {"chatmacro3", (int *) &chat_macros[3], (int) HUSTR_CHATMACRO3 }, ! {"chatmacro4", (int *) &chat_macros[4], (int) HUSTR_CHATMACRO4 }, ! {"chatmacro5", (int *) &chat_macros[5], (int) HUSTR_CHATMACRO5 }, ! {"chatmacro6", (int *) &chat_macros[6], (int) HUSTR_CHATMACRO6 }, ! {"chatmacro7", (int *) &chat_macros[7], (int) HUSTR_CHATMACRO7 }, ! {"chatmacro8", (int *) &chat_macros[8], (int) HUSTR_CHATMACRO8 }, ! {"chatmacro9", (int *) &chat_macros[9], (int) HUSTR_CHATMACRO9 } }; --- 286,299 ---- {"usegamma",&usegamma, 0}, ! {"chatmacro0", (int *) &chat_macros[0], (long) HUSTR_CHATMACRO0 }, ! {"chatmacro1", (int *) &chat_macros[1], (long) HUSTR_CHATMACRO1 }, ! {"chatmacro2", (int *) &chat_macros[2], (long) HUSTR_CHATMACRO2 }, ! {"chatmacro3", (int *) &chat_macros[3], (long) HUSTR_CHATMACRO3 }, ! {"chatmacro4", (int *) &chat_macros[4], (long) HUSTR_CHATMACRO4 }, ! {"chatmacro5", (int *) &chat_macros[5], (long) HUSTR_CHATMACRO5 }, ! {"chatmacro6", (int *) &chat_macros[6], (long) HUSTR_CHATMACRO6 }, ! {"chatmacro7", (int *) &chat_macros[7], (long) HUSTR_CHATMACRO7 }, ! {"chatmacro8", (int *) &chat_macros[8], (long) HUSTR_CHATMACRO8 }, ! {"chatmacro9", (int *) &chat_macros[9], (long) HUSTR_CHATMACRO9 } }; Index: linuxdoom-1.10/m_swap.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/m_swap.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 m_swap.c *** 1.1.1.1 1998/07/03 16:32:31 --- linuxdoom-1.10/m_swap.c 1998/07/15 20:56:48 *************** *** 43,47 **** // Swapping 32bit. ! unsigned long SwapLONG( unsigned long x) { return --- 43,47 ---- // Swapping 32bit. ! unsigned int SwapLONG( unsigned int x) { return Index: linuxdoom-1.10/p_setup.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/p_setup.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 p_setup.c *** 1.1.1.1 1998/07/03 16:32:23 --- linuxdoom-1.10/p_setup.c 1998/07/03 16:34:02 *************** *** 534,538 **** // build line tables for each sector ! linebuffer = Z_Malloc (total*4, PU_LEVEL, 0); sector = sectors; for (i=0 ; i #endif --- 42,49 ---- #include "r_sky.h" ! #if 0 #include + #else + #include #endif *************** *** 479,490 **** } numtextures = numtextures1 + numtextures2; ! ! textures = Z_Malloc (numtextures*4, PU_STATIC, 0); ! texturecolumnlump = Z_Malloc (numtextures*4, PU_STATIC, 0); ! texturecolumnofs = Z_Malloc (numtextures*4, PU_STATIC, 0); ! texturecomposite = Z_Malloc (numtextures*4, PU_STATIC, 0); ! texturecompositesize = Z_Malloc (numtextures*4, PU_STATIC, 0); ! texturewidthmask = Z_Malloc (numtextures*4, PU_STATIC, 0); ! textureheight = Z_Malloc (numtextures*4, PU_STATIC, 0); totalwidth = 0; --- 481,492 ---- } numtextures = numtextures1 + numtextures2; ! textures = Z_Malloc (numtextures*sizeof(texture_t*), PU_STATIC, 0); ! texturecolumnlump = Z_Malloc (numtextures*sizeof(short*), PU_STATIC, 0); ! texturecolumnofs = Z_Malloc (numtextures*sizeof(unsigned short*), ! PU_STATIC, 0); ! texturecomposite = Z_Malloc (numtextures*sizeof(byte*), PU_STATIC, 0); ! texturecompositesize = Z_Malloc (numtextures*sizeof(int), PU_STATIC, 0); ! texturewidthmask = Z_Malloc (numtextures*sizeof(int), PU_STATIC, 0); ! textureheight = Z_Malloc (numtextures*sizeof(fixed_t), PU_STATIC, 0); totalwidth = 0; *************** *** 640,644 **** length = W_LumpLength (lump) + 255; colormaps = Z_Malloc (length, PU_STATIC, 0); ! colormaps = (byte *)( ((int)colormaps + 255)&~0xff); W_ReadLump (lump,colormaps); } --- 642,646 ---- length = W_LumpLength (lump) + 255; colormaps = Z_Malloc (length, PU_STATIC, 0); ! colormaps = (byte *)( ((long)colormaps + 255)&~0xffL); W_ReadLump (lump,colormaps); } Index: linuxdoom-1.10/r_draw.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/r_draw.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 r_draw.c *** 1.1.1.1 1998/07/03 16:32:24 --- linuxdoom-1.10/r_draw.c 1998/07/03 16:34:04 *************** *** 462,466 **** translationtables = Z_Malloc (256*3+255, PU_STATIC, 0); ! translationtables = (byte *)(( (int)translationtables + 255 )& ~255); // translate just the 16 green colors --- 462,466 ---- translationtables = Z_Malloc (256*3+255, PU_STATIC, 0); ! translationtables = (byte *)(( (long)translationtables + 255 )& ~255L); // translate just the 16 green colors Index: linuxdoom-1.10/w_wad.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/w_wad.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 w_wad.c *** 1.1.1.1 1998/07/03 16:32:27 --- linuxdoom-1.10/w_wad.c 1998/07/15 20:22:25 *************** *** 35,39 **** --- 35,43 ---- #include #include + #if 0 #include + #else + #include + #endif #define O_BINARY 0 #endif Index: linuxdoom-1.10/z_zone.c =================================================================== RCS file: /ca1/div/cvsroot/extern/doom/z_zone.c,v retrieving revision 1.1.1.1 diff -c -2 -r1.1.1.1 z_zone.c *** 1.1.1.1 1998/07/03 16:32:29 --- linuxdoom-1.10/z_zone.c 1998/07/15 20:44:56 *************** *** 193,198 **** memblock_t* base; size = (size + 3) & ~3; ! // scan through the block list, // looking for the first free block --- 193,202 ---- memblock_t* base; + #ifdef __alpha + size = (size + 7) & ~7; + #else size = (size + 3) & ~3; ! #endif ! // scan through the block list, // looking for the first free block