Changeset 128
- Timestamp:
- 05/12/07 08:36:30 (2 years ago)
- Files:
-
- trunk/src/Makefile.dos (deleted)
- trunk/src/Makefile.src (modified) (2 diffs)
- trunk/src/Makefile.std (modified) (4 diffs)
- trunk/src/config.h (modified) (1 diff)
- trunk/src/h-basic.h (modified) (1 diff)
- trunk/src/h-config.h (deleted)
- trunk/src/main-dos.c (deleted)
- trunk/src/main-gcu.c (modified) (1 diff)
- trunk/src/main-ibm.c (deleted)
- trunk/src/main-lfb.c (deleted)
- trunk/src/main-vcs.c (deleted)
- trunk/src/main.c (modified) (7 diffs)
- trunk/src/z-file.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/Makefile.src
r127 r128 6 6 # 7 7 8 HDRS = h-basic.h h-config.h8 HDRS = h-basic.h 9 9 INCS = angband.h config.h defines.h externs.h types.h \ 10 10 z-term.h z-rand.h z-type.h z-util.h z-virt.h z-form.h … … 14 14 ZFILES = z-file z-form z-rand z-term z-type z-util z-virt 15 15 MAINFILES = main maid-x11 \ 16 $(addprefix main-,crb dos gcu gtk ibm ros sdl vcswin x11 xaw)16 $(addprefix main-,crb gcu gtk ros sdl win x11 xaw) 17 17 18 18 ANGFILES = \ trunk/src/Makefile.std
r127 r128 4 4 # This makefile probably requires GNU make. 5 5 # 6 # This makefile is intended for use with Unix machines running X11, gtk, 7 # (n)curses, termcap, or VT100, Slang, Linux VCS or SVGA library. You can 8 # choose what systems below. 6 # This makefile is intended for use with Unix machines running X11, gtk or 7 # (n)curses. You can choose which you want to compile for below. 9 8 # 10 9 # You can also place your alterations to a file in the src/ directory called 11 10 # "config", in which case that file will override what is specified here. 12 #13 # If you used to use Makefile.gtk or Makefile.lsl, uncomment the appropriate14 # lines below.15 11 # 16 12 … … 44 40 SYS_gtk = -DUSE_GTK $(shell pkg-config gtk+-2.0 --libs --cflags) 45 41 46 # Support raw console access (main-lfb.c) -- Linux only47 SYS_lfb = -DUSE_LFB48 49 42 # Support SDL frontend 50 43 #SYS_sdl = -DUSE_SDL $(shell sdl-config --cflags) $(shell sdl-config --libs) -lSDL_ttf 51 44 52 53 54 55 # Old raw tty protocols that may not work56 # With curses support, all are effectively superceded by USE_GCU57 58 # Support direct termio on 8bit color-depth screen (main-vcs.c)59 #SYS_vcs = -DUSE_VCS60 45 61 46 … … 98 83 # Enable linux-specific modules, if requested. 99 84 ifeq ($(uname),Linux) 100 MODULES += $(SYS_lfb) $(SYS_vcs)101 LINUXOBJS = main-vcs.o main-lfb.o102 85 CFLAGS += -DHAVE_MKSTEMP 103 86 endif … … 106 89 # Object definitions 107 90 X11OBJS = maid-x11.o main-x11.o main-xaw.o main-gtk.o 108 MAINOBJS = main.o main-gcu.o main-sdl.o $(X11OBJS) $(LINUXOBJS)91 MAINOBJS = main.o main-gcu.o main-sdl.o $(X11OBJS) 109 92 OBJS = $(BASEOBJS) $(MAINOBJS) 110 93 trunk/src/config.h
r103 r128 377 377 #endif 378 378 379 /*380 * Hack -- Special "ancient machine" versions381 */382 #if defined(USE_286) || defined(ANGBAND_LITE_MAC)383 # ifndef ANGBAND_LITE384 # define ANGBAND_LITE385 # endif386 #endif387 379 388 380 /* trunk/src/h-basic.h
r87 r128 13 13 14 14 15 /* 16 * h-config sets various system-specific defines, relied on later in this file 17 * and throughout the game. 18 */ 19 #include "h-config.h" 15 /*** Autodetect platform ***/ 16 17 /* 18 * Extract the "RISCOS" flag from the compiler 19 */ 20 #ifdef __riscos 21 # ifndef RISCOS 22 # define RISCOS 23 # endif 24 #endif 25 26 27 /* 28 * Extract the "WINDOWS" flag from the compiler 29 */ 30 #if defined(_Windows) || defined(__WINDOWS__) || \ 31 defined(__WIN32__) || defined(WIN32) || \ 32 defined(__WINNT__) || defined(__NT__) 33 # ifndef WINDOWS 34 # define WINDOWS 35 # endif 36 #endif 37 38 39 /* 40 * OPTION: set "SET_UID" if the machine is a "multi-user" machine. 41 * 42 * This option is used to verify the use of "uids" and "gids" for 43 * various "Unix" calls, and of "pids" for getting a random seed, 44 * and of the "umask()" call for various reasons, and to guess if 45 * the "kill()" function is available, and for permission to use 46 * functions to extract user names and expand "tildes" in filenames. 47 * It is also used for "locking" and "unlocking" the score file. 48 * Basically, SET_UID should *only* be set for "Unix" machines. 49 */ 50 #if !defined(MACH_O_CARBON) && !defined(WINDOWS) && \ 51 !defined(RISCOS) && !defined(GAMEBOY) 52 # define SET_UID 53 #endif 54 55 56 /* 57 * Every system seems to use its own symbol as a path separator. 58 * 59 * Default to the standard Unix slash, but attempt to change this 60 * for various other systems. Note that any system that uses the 61 * "period" as a separator (i.e. RISCOS) will have to pretend that 62 * it uses the slash, and do its own mapping of period <-> slash. 63 * 64 * It is most definitely wrong to have such things here. Platform-specific 65 * code should handle shifting Angband filenames to platform ones. XXX 66 */ 67 #undef PATH_SEP 68 #define PATH_SEP "/" 69 70 #ifdef WINDOWS 71 # undef PATH_SEP 72 # define PATH_SEP "\\" 73 #endif 74 75 76 /* 77 * Mac support 78 */ 79 #ifdef MACH_O_CARBON 80 81 /* OS X uses filetypes when creating files. */ 82 # define FILE_TYPE_TEXT 'TEXT' 83 # define FILE_TYPE_DATA 'DATA' 84 # define FILE_TYPE_SAVE 'SAVE' 85 # define FILE_TYPE(X) (_ftype = (X)) 86 87 #else 88 89 # define FILE_TYPE(X) ((void)0) 90 91 #endif 20 92 21 93 trunk/src/main-gcu.c
r87 r128 85 85 #define USE_TPOSIX 86 86 87 /*88 * Hack -- Amiga uses "fake curses" and cannot do any of this stuff89 */90 #if defined(AMIGA)91 # undef USE_TPOSIX92 #endif93 87 94 88 /* trunk/src/main.c
r115 r128 46 46 #endif /* USE_X11 */ 47 47 48 #ifdef USE_XPJ49 { "xpj", help_xpj, init_xpj },50 #endif /* USE_XPJ */51 52 48 #ifdef USE_GCU 53 49 { "gcu", help_gcu, init_gcu }, 54 50 #endif /* USE_GCU */ 55 56 #ifdef USE_CAP57 { "cap", help_cap, init_cap },58 #endif /* USE_CAP */59 60 #ifdef USE_DOS61 { "dos", help_dos, init_dos },62 #endif /* USE_DOS */63 64 #ifdef USE_IBM65 { "ibm", help_ibm, init_ibm },66 #endif /* USE_IBM */67 68 #ifdef USE_EMX69 { "emx", help_emx, init_emx },70 #endif /* USE_EMX */71 72 #ifdef USE_SLA73 { "sla", help_sla, init_sla },74 #endif /* USE_SLA */75 76 #ifdef USE_LSL77 { "lsl", help_lsl, init_lsl },78 #endif /* USE_LSL */79 80 #ifdef USE_AMI81 { "ami", help_ami, init_ami },82 #endif /* USE_AMI */83 84 #ifdef USE_VCS85 { "vcs", help_vcs, init_vcs },86 #endif /* USE_VCS */87 88 #ifdef USE_LFB89 { "lfb", help_lfb, init_lfb },90 #endif /* USE_LFB */91 51 }; 92 52 … … 116 76 117 77 118 119 /*120 * Set the stack size (for the Amiga)121 */122 #ifdef AMIGA123 # include <dos.h>124 __near long __stack = 32768L;125 #endif /* AMIGA */126 127 128 /*129 * Set the stack size and overlay buffer (see main-286.c")130 */131 #ifdef USE_286132 # include <dos.h>133 extern unsigned _stklen = 32768U;134 extern unsigned _ovrbuffer = 0x1500;135 #endif /* USE_286 */136 78 137 79 /* … … 158 100 * relevant "sub-directory names" to the given path. 159 101 * 160 * Note that the "path" must be "Angband:" for the Amiga, and it161 * is ignored for "VM/ESA", so I just combined the two.162 *163 102 * Make sure that the path doesn't overflow the buffer. We have 164 103 * to leave enough space for the path separator, directory, and … … 169 108 char path[1024]; 170 109 171 #if defined(AMIGA)172 173 /* Hack -- prepare "path" */174 strcpy(path, "Angband:");175 176 #else /* AMIGA */177 178 110 cptr tail = NULL; 179 111 … … 193 125 /* Hack -- Add a path separator (only if needed) */ 194 126 if (!suffix(path, PATH_SEP)) my_strcat(path, PATH_SEP, sizeof(path)); 195 196 #endif /* AMIGA */197 127 198 128 /* Initialize */ … … 330 260 331 261 332 #ifdef USE_286333 /* Attempt to use XMS (or EMS) memory for swap space */334 if (_OvrInitExt(0L, 0L))335 {336 _OvrInitEms(0, 0, 64);337 }338 #endif /* USE_286 */339 340 341 262 #ifdef SET_UID 342 263 … … 355 276 /* Get the user id (?) */ 356 277 player_uid = getuid(); 357 358 #ifdef VMS359 /* Mega-Hack -- Factor group id */360 player_uid += (getgid() * 1000);361 #endif /* VMS */362 278 363 279 # ifdef SAFE_SETUID trunk/src/z-file.c
r127 r128 798 798 799 799 800 /* 801 * Assume UNIX-style directory handling. 802 */ 803 #if !defined(HAVE_CONFIG_H) && !defined(WINDOWS) && !defined(RISCOS) 804 #define HAVE_DIRENT_H 805 #endif 806 807 800 808 #ifdef WINDOWS 801 809
