date.h/patchlevel.h dependencies (trunk only)

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.
This commit is contained in:
nethack.rankin
2012-01-20 03:41:33 +00:00
parent cbe862e162
commit 7db7b8de73
4 changed files with 25 additions and 55 deletions

View File

@@ -49,12 +49,6 @@
#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, "");
}
/*

View File

@@ -14,15 +14,8 @@
#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) */