]> granicus.if.org Git - nethack/commitdiff
date.h/patchlevel.h dependencies (trunk only)
authornethack.rankin <nethack.rankin>
Fri, 20 Jan 2012 03:41:33 +0000 (03:41 +0000)
committernethack.rankin <nethack.rankin>
Fri, 20 Jan 2012 03:41:33 +0000 (03:41 +0000)
     Remove date.h and patchlevel.h from win/tty/wintty.c, win/X11/winX.c,
and sys/share/pcmain.c (caveat: the latter two are untested) so that they
don't get recompiled every time any other source file changes and triggers
creation of a new date.h.  Only version.c needs to be recompiled in that
situation.  Also, Makefile.src was missing a reference to botl.h.

sys/share/pcmain.c
sys/unix/Makefile.src
win/X11/winX.c
win/tty/wintty.c

index 67ea332db9323d32dc86d157a14933e4cb097b93..6e9fc68accae015f774795092a9ee0f8b8b76bb2 100644 (file)
@@ -6,12 +6,6 @@
 
 #include "hack.h"
 #include "dlb.h"
-#include "date.h"
-#ifdef SHORT_FILENAMES
-#include "patchlev.h"
-#else
-#include "patchlevel.h"
-#endif
 
 #ifndef NO_SIGNAL
 #include <signal.h>
@@ -279,13 +273,14 @@ char *argv[];
                error("Your clock is incorrectly set!");
 #endif
        if (!dlb_init()) {
-           pline("%s\n%s\n%s\n%s\n\nNetHack was unable to open the required file \"%s\".%s",
-               COPYRIGHT_BANNER_A, COPYRIGHT_BANNER_B,
-               COPYRIGHT_BANNER_C, COPYRIGHT_BANNER_D, DLBFILE,
+           pline(
+    "%s\n%s\n%s\n%s\n\nNetHack was unable to open the required file \"%s\".%s",
+                 copyright_banner_line(1), copyright_banner_line(2),
+                 copyright_banner_line(3), copyright_banner_line(4), DLBFILE,
 #ifdef WIN32
-                       "\nAre you perhaps trying to run NetHack within a zip utility?");
+             "\nAre you perhaps trying to run NetHack within a zip utility?");
 #else
-                       "");
+                 "");
 #endif
                error("dlb_init failure.");
        }
index b94365bb5f9726830c1fb69330a9c955038e8a71..11d9f86f0eacfe312dd7feec65e8705f04de4c3c 100644 (file)
@@ -365,10 +365,10 @@ CSOURCES = $(HACKCSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC)
 # cause dependency loops if run through "make depend"
 # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files.
 #
-HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \
-       config.h config1.h context.h coord.h decl.h def_os2.h display.h dlb.h \
-       dungeon.h engrave.h extern.h flag.h func_tab.h global.h hack.h lev.h \
-       macconf.h mextra.h mfndpos.h micro.h mkroom.h \
+HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \
+       color.h config.h config1.h context.h coord.h decl.h def_os2.h \
+       display.h dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h \
+       global.h hack.h lev.h macconf.h mextra.h mfndpos.h micro.h mkroom.h \
        monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \
        os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h region.h rm.h \
        sp_lev.h spell.h sys.h system.h tcap.h timeout.h tosconf.h tradstdc.h \
@@ -589,8 +589,8 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/align.h \
 #
 tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h
        $(CC) $(CFLAGS) -c ../sys/atari/tos.c
-pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h ../include/date.h \
-               ../include/patchlevel.h #../include/win32api.h
+pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \
+               #../include/win32api.h
        $(CC) $(CFLAGS) -c ../sys/share/pcmain.c
 pcsys.o: ../sys/share/pcsys.c $(HACK_H)
        $(CC) $(CFLAGS) -c ../sys/share/pcsys.c
@@ -618,8 +618,7 @@ termcap.o: ../win/tty/termcap.c $(HACK_H) ../include/tcap.h
        $(CC) $(CFLAGS) -c ../win/tty/termcap.c
 topl.o: ../win/tty/topl.c $(HACK_H) ../include/tcap.h
        $(CC) $(CFLAGS) -c ../win/tty/topl.c
-wintty.o: ../win/tty/wintty.c $(HACK_H) ../include/dlb.h ../include/date.h \
-               ../include/patchlevel.h ../include/tcap.h
+wintty.o: ../win/tty/wintty.c $(HACK_H) ../include/dlb.h ../include/tcap.h
        $(CC) $(CFLAGS) -c ../win/tty/wintty.c
 Window.o: ../win/X11/Window.c ../include/xwindowp.h ../include/xwindow.h \
                $(CONFIG_H)
@@ -627,8 +626,7 @@ Window.o: ../win/X11/Window.c ../include/xwindowp.h ../include/xwindow.h \
 dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
        $(CC) $(CFLAGS) -c ../win/X11/dialogs.c
 winX.o: ../win/X11/winX.c $(HACK_H) ../include/winX.h ../include/dlb.h \
-               ../include/patchlevel.h ../include/date.h ../win/X11/nh72icon \
-               ../win/X11/nh56icon ../win/X11/nh32icon
+               ../win/X11/nh72icon ../win/X11/nh56icon ../win/X11/nh32icon
        $(CC) $(CFLAGS) -c ../win/X11/winX.c
 winmap.o: ../win/X11/winmap.c ../include/xwindow.h $(HACK_H) ../include/dlb.h \
                ../include/winX.h ../include/tile2x11.h
index 1ade1cdebd0653be275a0686a9fa813a797045ec..7bc0a47842d34ed5b1b348887c8c30d134c13eba 100644 (file)
 #include "hack.h"
 #include "winX.h"
 #include "dlb.h"
-#ifdef SHORT_FILENAMES
-#include "patchlev.h"
-#else
-#include "patchlevel.h"
-#endif
-#include "date.h"
 
 #ifndef NO_SIGNAL
 #include <signal.h>
@@ -991,16 +985,6 @@ X11_init_nhwindows(argcp,argv)
 int* argcp;
 char** argv;
 {
-    static const char *banner_text[] = {
-       COPYRIGHT_BANNER_A,
-       COPYRIGHT_BANNER_B,
-       COPYRIGHT_BANNER_C,
-       COPYRIGHT_BANNER_D,
-       "",
-       "",
-       0
-    };
-    register const char **pp;
     int i;
     Cardinal num_args;
     Arg args[4];
@@ -1086,8 +1070,10 @@ char** argv;
     x_inited = TRUE;   /* X is now initialized */
 
     /* Display the startup banner in the message window. */
-    for (pp = banner_text; *pp; pp++)
-       X11_putstr(WIN_MESSAGE, 0, *pp);
+    for (i = 1; i <= 4; ++i)
+       X11_putstr(WIN_MESSAGE, 0, copyright_banner_line(1));
+    X11_putstr(WIN_MESSAGE, 0, "");
+    X11_putstr(WIN_MESSAGE, 0, "");
 }
 
 /*
index bc98cb58fc08daa2a3c453ba142cbbec04884ff0..4e01f0af1cb931593cb6c14da4e5dfbd1ac08186 100644 (file)
 
 #include "hack.h"
 
-#include "dlb.h"
-#include "date.h"
-#ifdef SHORT_FILENAMES
-#include "patchlev.h"
-#else
-#include "patchlevel.h"
-#endif
-
 #ifdef TTY_GRAPHICS
+#include "dlb.h"
 
 #ifdef MAC
 # define MICRO /* The Mac is a MICRO only for this file, not in general! */
@@ -319,10 +312,10 @@ if(wc_tracelogf)
 /*ARGSUSED*/
 void
 tty_init_nhwindows(argcp,argv)
-int* argcp;
-char** argv;
+int *argcp UNUSED;
+char **argv UNUSED;
 {
-    int wid, hgt;
+  int wid, hgt, i;
 
     /*
      *  Remember tty modes, to be restored on exit.
@@ -370,10 +363,8 @@ char** argv;
     tty_clear_nhwindow(BASE_WINDOW);
 
     tty_putstr(BASE_WINDOW, 0, "");
-    tty_putstr(BASE_WINDOW, 0, COPYRIGHT_BANNER_A);
-    tty_putstr(BASE_WINDOW, 0, COPYRIGHT_BANNER_B);
-    tty_putstr(BASE_WINDOW, 0, COPYRIGHT_BANNER_C);
-    tty_putstr(BASE_WINDOW, 0, COPYRIGHT_BANNER_D);
+    for (i = 1; i <= 4; ++i)
+        tty_putstr(BASE_WINDOW, 0, copyright_banner_line(i));
     tty_putstr(BASE_WINDOW, 0, "");
     tty_display_nhwindow(BASE_WINDOW, FALSE);
 }
@@ -2435,7 +2426,7 @@ tty_start_menu(window)
 void
 tty_add_menu(window, glyph, identifier, ch, gch, attr, str, preselected)
     winid window;      /* window to use, must be of type NHW_MENU */
-    int glyph;         /* glyph to display with item (unused) */
+    int glyph UNUSED;  /* glyph to display with item (not used) */
     const anything *identifier;        /* what to return if selected */
     char ch;           /* keyboard accelerator (0 = pick our own) */
     char gch;          /* group accelerator (0 = no group) */