[rogueclone-cvs] rogue/src curses.c, 1.11.2.4, 1.11.2.5 init.c, 1.9.2.1, 1.9.2.2 invent.c, 1.8.2.2,
Brought to you by:
mlehotay
From: Michael L. <mle...@us...> - 2008-12-07 01:52:05
|
Update of /cvsroot/rogueclone/rogue/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11732/src Modified Files: Tag: curses curses.c init.c invent.c machdep.c main.c message.c rogue.h Log Message: compiles with cygwin gcc 3.3.1, links with ncurses 5.3 Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.4 diff -C2 -d -r1.7.2.3 -r1.7.2.4 *** message.c 17 Aug 2008 23:19:05 -0000 1.7.2.3 --- message.c 7 Dec 2008 01:51:26 -0000 1.7.2.4 *************** *** 96,100 **** if (did_int) { did_int = 0; ! #ifdef _MSC_VER onintr(0); #else --- 96,100 ---- if (did_int) { did_int = 0; ! #if defined(_MSC_VER) || defined(unix) onintr(0); #else Index: init.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/init.c,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -C2 -d -r1.9.2.1 -r1.9.2.2 *** init.c 18 Jun 2008 03:16:13 -0000 1.9.2.1 --- init.c 7 Dec 2008 01:51:26 -0000 1.9.2.2 *************** *** 46,49 **** --- 46,50 ---- #include <stdio.h> + #include <string.h> #include "rogue.h" #include "version.h" *************** *** 161,165 **** (rest_file ? "back " : "")); ! return (rest_file!=NULL); } --- 162,166 ---- (rest_file ? "back " : "")); ! return (rest_file!=NULL); } *************** *** 270,274 **** ! #ifdef _MSC_VER void byebye(int foo) #else --- 271,275 ---- ! #if defined(_MSC_VER) || defined(unix) void byebye(int foo) #else *************** *** 285,290 **** } ! ! #ifdef _MSC_VER void onintr(int foo) #else --- 286,290 ---- } ! #if defined(_MSC_VER) || defined(unix) void onintr(int foo) #else Index: invent.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/invent.c,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** invent.c 17 Aug 2008 23:19:05 -0000 1.8.2.2 --- invent.c 7 Dec 2008 01:51:26 -0000 1.8.2.3 *************** *** 45,49 **** */ ! #include <stddef.h> /* for NULL */ #include "rogue.h" #include "paths.h" --- 45,50 ---- */ ! #include <stdio.h> ! #include <string.h> #include "rogue.h" #include "paths.h" Index: rogue.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/rogue.h,v retrieving revision 1.9.2.4 retrieving revision 1.9.2.5 diff -C2 -d -r1.9.2.4 -r1.9.2.5 *** rogue.h 17 Aug 2008 23:19:05 -0000 1.9.2.4 --- rogue.h 7 Dec 2008 01:51:26 -0000 1.9.2.5 *************** *** 49,53 **** *****************************************************************************/ ! /* #define ROGUECURSES */ /* instead of linking with pdcurses, ncurses, etc */ /* #define DISCOVERY */ /* D command to list discovered items -NS */ #define KNOWN_ITEMS /* \ command to list known items -steve_ued */ --- 49,53 ---- *****************************************************************************/ ! /* #define ROGUECURSES */ /* instead of linking with pdcurses, ncurses, etc */ /* #define DISCOVERY */ /* D command to list discovered items -NS */ #define KNOWN_ITEMS /* \ command to list known items -steve_ued */ *************** *** 301,307 **** #else /* link with pdcurses. maybe other curses would work too? */ ! #ifdef __MSDOS__ ! #define DOS /* kludge for pdcurses */ ! #endif #include "curses.h" --- 301,308 ---- #else /* link with pdcurses. maybe other curses would work too? */ ! #ifdef __MSDOS__ ! #define DOS /* for pdcurses */ ! #endif ! #include "curses.h" *************** *** 623,627 **** #ifdef ROGUECURSES int has_colors(void); ! int start_color(void); int init_pair(short pair, short f, short b); int mvaddchnstr(int y, int x, const chtype *chstr, int n); --- 624,628 ---- #ifdef ROGUECURSES int has_colors(void); ! int start_color(void); int init_pair(short pair, short f, short b); int mvaddchnstr(int y, int x, const chtype *chstr, int n); *************** *** 675,679 **** void error_save(void); void strip(char *s, const boolean add_blank); ! #ifdef _MSC_VER void onintr(int foo); void byebye(int foo); --- 676,680 ---- void error_save(void); void strip(char *s, const boolean add_blank); ! #if defined(_MSC_VER) || defined(unix) void onintr(int foo); void byebye(int foo); Index: curses.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/curses.c,v retrieving revision 1.11.2.4 retrieving revision 1.11.2.5 diff -C2 -d -r1.11.2.4 -r1.11.2.5 *** curses.c 17 Aug 2008 23:19:05 -0000 1.11.2.4 --- curses.c 7 Dec 2008 01:51:26 -0000 1.11.2.5 *************** *** 149,153 **** } ! int start_color(void) { return 0; } --- 149,153 ---- } ! int start_color(void) { return 0; } Index: machdep.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/machdep.c,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -C2 -d -r1.7.2.2 -r1.7.2.3 *** machdep.c 17 Aug 2008 23:19:05 -0000 1.7.2.2 --- machdep.c 7 Dec 2008 01:51:26 -0000 1.7.2.3 *************** *** 84,91 **** /* #include <conio.h> */ #include <time.h> - #include <io.h> #include <fcntl.h> #include <signal.h> #include <process.h> #include "paths.h" #include "version.h" --- 84,93 ---- /* #include <conio.h> */ #include <time.h> #include <fcntl.h> #include <signal.h> #include <process.h> + #ifndef unix + #include <io.h> + #endif #include "paths.h" #include "version.h" *************** *** 114,117 **** --- 116,122 ---- #ifdef _MSC_VER FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + #elif defined(unix) + /* while(getc(stdin) != EOF); */ + return; #else while(kbhit()) *************** *** 163,168 **** void md_heed_signals(void) { ! signal(SIGINT, onintr); ! signal(SIGTERM, byebye); } --- 168,173 ---- void md_heed_signals(void) { ! signal(SIGINT, onintr); ! signal(SIGTERM, byebye); } *************** *** 375,379 **** /*char *getenv(); already defined in stdlib.h */ ! value = getenv(name); return(value); --- 380,384 ---- /*char *getenv(); already defined in stdlib.h */ ! value = (char *) getenv(name); return(value); *************** *** 394,398 **** char *t; ! t = malloc(n); return(t); } --- 399,403 ---- char *t; ! t = (char *) malloc(n); return(t); } *************** *** 495,502 **** void md_shell(const char *shell) { ! #ifndef _MSC_VER ! spawnl(P_WAIT, shell, shell, NULL); ! #else (void) _spawnl(_P_WAIT, shell, shell, NULL); #endif } --- 500,509 ---- void md_shell(const char *shell) { ! #ifdef _MSC_VER (void) _spawnl(_P_WAIT, shell, shell, NULL); + #elif defined (unix) + spawnl(_P_WAIT, shell, shell, NULL); + #else + spawnl(P_WAIT, shell, shell, NULL); #endif } Index: main.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/main.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** main.c 11 Jun 2008 06:16:35 -0000 1.3 --- main.c 7 Dec 2008 01:51:26 -0000 1.3.2.1 *************** *** 51,55 **** ! void main(int argc, char *argv[]) { boolean welcomed = 0; --- 51,55 ---- ! int main(int argc, char *argv[]) { boolean welcomed = 0; *************** *** 78,80 **** --- 78,82 ---- free_stuff(&level_monsters); } + + return 0; } |