Update of /cvsroot/netrek/client/netrekxp/src In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4193/src Modified Files: cowmain.c data.c input.c interface.c playback.c redraw.c Log Message: Remove BRMH define. Removed alternate input loop that is never used. Index: redraw.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- redraw.c 19 Apr 2008 16:23:00 -0000 1.16 +++ redraw.c 9 Jun 2009 02:23:00 -0000 1.17 @@ -33,13 +33,9 @@ static int needredraw = 0; static unsigned long lastredraw = 0; -#ifdef BRMH void intrupt (fd_set * readfds) -#else -void -intrupt (void) -#endif + { time_t time (time_t *); unsigned long t; @@ -53,11 +49,7 @@ #endif needredraw |= -#ifdef BRMH readFromServer (readfds); -#else - readFromServer (); -#endif t = msetime (); if (needredraw && (t >= lastredraw + redrawDelay * 100)) Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- input.c 9 Jun 2009 02:09:45 -0000 1.56 +++ input.c 9 Jun 2009 02:23:00 -0000 1.57 @@ -758,7 +758,6 @@ detallow = 1; } -#ifdef BRMH #ifdef THREADED /******************************************************************************/ /*** input() ***/ @@ -1024,255 +1023,6 @@ return loop; } -#else -/******************************************************************************/ -/*** input() - non BRMH version? ***/ -/******************************************************************************/ -input () -{ - W_Event data; - W_Callback handler; - fd_set readfds; - struct timeval timeout; - -#ifdef AUTOKEY - timeout.tv_sec = 0; - timeout.tv_usec = 100000; -#endif /* AUTOKEY */ - - while (1) - { - while (!W_EventsPending ()) - { - if (keepInfo > 0 && opened_info != -2 && /* 6/1/93 LAB */ - opened_info < 0 && infomapped) - destroyInfo (); - if (keepInfo > 0 && opened_info != -2) - opened_info--; - - FD_ZERO (&readfds); - FD_SET (W_Socket (), &readfds); - FD_SET (sock, &readfds); - if (udpSock >= 0) - FD_SET (udpSock, &readfds); - -#ifdef AUTOKEY - if (autoKey) - { - doAutoKey (); - if (select (32, &readfds, 0, 0, &timeout) == 0) /* timeout */ - continue; - } - else - select (32, &readfds, 0, 0, 0); -#else - select (32, &readfds, 0, 0, 0); -#endif - - if (FD_ISSET (sock, &readfds) || - (udpSock >= 0 && FD_ISSET (udpSock, &readfds))) - { - intrupt (); - if (isServerDead ()) - { - LineToConsole ("Shit, We've been ghostbusted\n"); - LineToConsole ("hope you're not in a base\n"); - /* UDP fail-safe */ - commMode = commModeReq = COMM_TCP; - commSwitchTimeout = 0; - if (udpSock >= 0) - closeUdpConn (); - if (udpWin) - { - udprefresh (UDP_CURRENT); - udprefresh (UDP_STATUS); - } - connectToServer (nextSocket); - LineToConsole ("We've been resurrected!\n"); - map (); - } - } - if (FD_ISSET (W_Socket (), &readfds)) - continue; /* we're forced to call - * W_EventsPending at the - * top */ - } - W_NextEvent (&data); - switch ((int) data.type) - { - -#ifdef MOUSE_AS_SHIFT - case W_EV_MKEY: - if ((handler = W_GetWindowKeyDownHandler (data.Window)) != NULL) - (*handler) (&data); - else if (messageon) - smessage (data.key); - else if (mouseAsShift) - mkeyaction (&data); - else - keyaction (&data); - break; -#endif - - case W_EV_KEY: - -#ifdef DEBUG - LineToConsole ("W_EV_KEY\n"); -#endif - - if ((handler = W_GetWindowKeyDownHandler (data.Window)) != NULL) - (*handler) (&data); - -#ifdef DOC_WIN - else if (data.Window == docwin) - switch (data.key) - { - case 'f': - docline += 28; - - if (docline >= maxdoclines) - docline = maxdoclines - 28; - - showdocs (docline); - break; - case 'b': - docline -= 28; - - if (docline < 0) - docline = 0; - - showdocs (docline); - break; - case 'F': - docline += 4; - - if (docline >= maxdoclines) - docline = maxdoclines - 28; - - showdocs (docline); - break; - case 'B': - docline -= 4; - - if (docline < 0) - docline = 0; - - showdocs (docline); - break; - default: - data.Window = w; - keyaction (&data); - break; - } - else if (data.Window == xtrekrcwin) - switch (data.key) - { - case 'f': - xtrekrcline += 28; - - if (xtrekrcline >= maxxtrekrclines) - xtrekrcline = maxxtrekrclines - 28; - - showxtrekrc (xtrekrcline); - break; - case 'b': - xtrekrcline -= 28; - - if (xtrekrcline < 0) - xtrekrcline = 0; - - showxtrekrc (xtrekrcline); - break; - case 'F': - xtrekrcline += 4; - - if (xtrekrcline >= maxxtrekrclines) - xtrekrcline = maxxtrekrclines - 28; - - showxtrekrc (xtrekrcline); - break; - case 'B': - xtrekrcline -= 4; - - if (xtrekrcline < 0) - xtrekrcline = 0; - - showxtrekrc (xtrekrcline); - break; - default: - data.Window = w; - keyaction (&data); - break; - } -#endif - - else if (messageon) - smessage (data.key); - else - keyaction (&data); - break; - -#ifdef AUTOKEY - case W_EV_KEY_OFF: - -#ifdef DEBUG - LineToConsole ("W_EV_KEY_OFF\n"); -#endif - - if ((handler = W_GetWindowKeyUpHandler (data.Window)) != NULL) - (*handler) (&data); - if (autoKey) - autoKeyOff (&data); - break; -#endif /* AUTOKEY */ - - case W_EV_BUTTON: - -#ifdef DEBUG - LineToConsole ("W_EV_BUTTON\n"); -#endif - - if ((handler = W_GetWindowButtonHandler (data.Window)) != NULL) - (*handler) (&data); - else - buttonaction (&data); - break; - - case W_EV_EXPOSE: - -#ifdef DEBUG - LineToConsole ("W_EV_EXPOSE\n"); -#endif - - if ((handler = W_GetWindowExposeHandler (data.Window)) != NULL) - (*handler) (&data); - else if (data.Window == mapw) - redrawall = 1; - else if (data.Window == warnw) - W_ClearWindow (warnw); - else if (data.Window == messagew) - W_ClearWindow (messagew); - -#ifdef XTREKRC_HELP - else if (defWin && (data.Window == defWin)) - showdef (); -#endif - -#ifdef DOC_WIN - else if (docwin && (data.Window == docwin)) - showdocs (docline); - else if (xtrekrcwin && (data.Window == xtrekrcwin)) - showxtrekrc (xtrekrcline); -#endif - - break; - default: - break; - } - } -} - -#endif /******************************************************************************/ /*** keyaction() ***/ Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- playback.c 6 Mar 2009 04:09:27 -0000 1.29 +++ playback.c 9 Jun 2009 02:23:00 -0000 1.30 @@ -321,11 +321,7 @@ /* End entrywindow() */ //#endif -#ifdef BRMH redrawall = 2; -#else - redrawall = 1; -#endif myship = getship (myship->s_type); enter (); @@ -362,13 +358,12 @@ while (1) { -#ifdef BRMH fd_set readfds; struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 0; -#endif + if (keepInfo > 0 && opened_info != -2 && /* 6/1/93 LAB */ opened_info < 0 && infomapped) destroyInfo (); @@ -379,11 +374,8 @@ process_event (); } -#ifdef BRMH intrupt (&readfds); -#else - intrupt (); -#endif + Sleep (pbdelay); } } Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- data.c 9 Jun 2009 01:33:49 -0000 1.132 +++ data.c 9 Jun 2009 02:23:00 -0000 1.133 @@ -667,11 +667,8 @@ #endif -#ifdef BRMH int max_fd = 3; -#endif - #ifdef TOOLS W_Window toolsWin = NULL; int shellTools = 1; Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- cowmain.c 8 Jun 2009 22:55:03 -0000 1.42 +++ cowmain.c 9 Jun 2009 02:23:00 -0000 1.43 @@ -1002,11 +1002,7 @@ myship = getship(myship->s_type); currentship = myship->s_type; -#ifdef BRMH redrawall = 2; -#else - redrawall = 1; -#endif enter (); calibrate_stats (); Index: interface.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/interface.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- interface.c 15 Mar 2007 20:49:34 -0000 1.3 +++ interface.c 9 Jun 2009 02:23:00 -0000 1.4 @@ -229,8 +229,6 @@ { char timebuf[9]; struct tm *tm; - -#ifdef BRMH static time_t tt; if ((curtime - tt) < 1) @@ -245,9 +243,6 @@ timebuf[5] = ':'; timebuf[6] = (char) (tm->tm_sec / 10 + '0'); timebuf[7] = (char) ((tm->tm_sec % 10) + '0'); -#else - sprintf (timebuf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); -#endif tm = NULL;