more lua notice from makedefs.c to mdlib.c

Add missing dependency of makedefs needing src/mdlib.c to unix
Makefile.src.
This commit is contained in:
PatR
2019-11-29 17:19:37 -08:00
parent 769799105c
commit 5226726c99
4 changed files with 54 additions and 38 deletions
+47 -13
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 mdlib.c $NHDT-Date: 1574646946 2019/11/25 01:55:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ /* NetHack 3.7 mdlib.c $NHDT-Date: 1575076762 2019/11/30 01:19:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) M. Stephenson, 1990, 1991. */
@@ -52,9 +52,9 @@ static char *FDECL(bannerc_string, (char *, const char *));
static void FDECL(opt_out_words, (char *, int *)); static void FDECL(opt_out_words, (char *, int *));
static void NDECL(build_savebones_compat_string); static void NDECL(build_savebones_compat_string);
static int idxopttext, done_runtime_opt_init_once = 0; static int idxopttext, done_runtime_opt_init_once = 0;
#define MAXOPT 30 #define MAXOPT 40
static char rttimebuf[MAXOPT]; static char rttimebuf[MAXOPT];
static char *opttext[ROWNO] = {0}; static char *opttext[120] = { 0 };
char optbuf[BUFSZ]; char optbuf[BUFSZ];
static struct version_info version; static struct version_info version;
static const char opt_indent[] = " "; static const char opt_indent[] = " ";
@@ -328,19 +328,25 @@ static void
build_savebones_compat_string() build_savebones_compat_string()
{ {
#ifdef VERSION_COMPATIBILITY #ifdef VERSION_COMPATIBILITY
unsigned long uver = VERSION_COMPATIBILITY; unsigned long uver = VERSION_COMPATIBILITY,
cver = (((unsigned long) VERSION_MAJOR << 24)
| ((unsigned long) VERSION_MINOR << 16)
| ((unsigned long) PATCHLEVEL << 8));
#endif #endif
Strcpy(save_bones_compat_buf, Strcpy(save_bones_compat_buf,
"save and bones files accepted from version"); "save and bones files accepted from version");
#ifdef VERSION_COMPATIBILITY #ifdef VERSION_COMPATIBILITY
Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d", if (uver != cver)
((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16), Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d",
((uver & 0x0000FF00L) >> 8), VERSION_MAJOR, VERSION_MINOR, ((uver >> 24) & 0x0ffUL),
PATCHLEVEL); ((uver >> 16) & 0x0ffUL),
#else ((uver >> 8) & 0x0ffUL),
Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only", VERSION_MAJOR, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
VERSION_MINOR, PATCHLEVEL); else
#endif #endif
Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only",
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
} }
static const char *build_opts[] = { static const char *build_opts[] = {
@@ -627,11 +633,39 @@ build_options()
idxopttext++; idxopttext++;
optbuf[0] = '\0'; optbuf[0] = '\0';
#if defined(MAKEDEFS_C) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_TARGET))
{
static const char *lua_info[] = {
"", "NetHack 3.7.* uses the 'Lua' interpreter to process some data:", "",
" About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", "",
/* 1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890123456
*/
" \"Permission is hereby granted, free of charge, to any person obtaining",
" a copy of this software and associated documentation files (the ",
" \"Software\"), to deal in the Software without restriction including",
" without limitation the rights to use, copy, modify, merge, publish,",
" distribute, sublicense, and/or sell copies of the Software, and to ",
" permit persons to whom the Software is furnished to do so, subject to",
" the following conditions:",
" The above copyright notice and this permission notice shall be",
" included in all copies or substantial portions of the Software.\"",
(const char *) 0
};
/* add lua copyright notice */
for (i = 0; lua_info[i]; ++i) {
opttext[idxopttext] = strdup(lua_info[i]);
if (idxopttext < (MAXOPT - 1))
idxopttext++;
}
}
#endif /* MAKEDEFS_C || (CROSSCOMPILE && CROSSCOMPILE_TARGET) */
/* end with a blank line */ /* end with a blank line */
opttext[idxopttext] = strdup(optbuf); opttext[idxopttext] = strdup("");
if (idxopttext < (MAXOPT - 1)) if (idxopttext < (MAXOPT - 1))
idxopttext++; idxopttext++;
optbuf[0] = '\0';
return; return;
} }
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 version.c $NHDT-Date: 1575072301 2019/11/30 00:05:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.62 $ */ /* NetHack 3.6 version.c $NHDT-Date: 1575076767 2019/11/30 01:19:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.63 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2018. */ /*-Copyright (c) Michael Allison, 2018. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -458,7 +458,7 @@ void
store_version(nhfp) store_version(nhfp)
NHFILE *nhfp; NHFILE *nhfp;
{ {
#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)
static const struct version_info version_data = { static const struct version_info version_data = {
VERSION_NUMBER, VERSION_FEATURES, VERSION_NUMBER, VERSION_FEATURES,
VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3 VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3
+3 -2
View File
@@ -1,5 +1,5 @@
# NetHack Makefile. # NetHack Makefile.
# NetHack 3.6 Makefile.src $NHDT-Date: 1575071867 2019/11/29 23:57:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ # NetHack 3.6 Makefile.src $NHDT-Date: 1575076770 2019/11/30 01:19:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.79 $
# Copyright (c) 2018 by Pasi Kallinen # Copyright (c) 2018 by Pasi Kallinen
# NetHack may be freely redistributed. See license for details. # NetHack may be freely redistributed. See license for details.
@@ -636,7 +636,8 @@ qt4yndlg.moc : ../win/Qt4/qt4yndlg.h
# build monst.o and objects.o before executing '$(MAKE) makedefs' # build monst.o and objects.o before executing '$(MAKE) makedefs'
$(MAKEDEFS): $(FIRSTOBJ) \ $(MAKEDEFS): $(FIRSTOBJ) \
../util/makedefs.c $(CONFIG_H) ../include/permonst.h \ ../util/makedefs.c ../src/mdlib.c $(CONFIG_H) \
../include/permonst.h \
../include/objclass.h ../include/monsym.h \ ../include/objclass.h ../include/monsym.h \
../include/artilist.h ../include/dungeon.h ../include/obj.h \ ../include/artilist.h ../include/dungeon.h ../include/obj.h \
../include/monst.h ../include/you.h ../include/flag.h \ ../include/monst.h ../include/you.h ../include/flag.h \
+2 -21
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 makedefs.c $NHDT-Date: 1575072306 2019/11/30 00:05:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.166 $ */ /* NetHack 3.6 makedefs.c $NHDT-Date: 1575076769 2019/11/30 01:19:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) M. Stephenson, 1990, 1991. */
@@ -1311,24 +1311,7 @@ void
do_options() do_options()
{ {
const char *optline; const char *optline;
int i, infocontext = 0; int infocontext = 0;
const char *lua_info[] = {
"NetHack 3.7.* uses the 'Lua' interpreter to process some data:\n",
" About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.\n",
/* 1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890123456
*/
" \"Permission is hereby granted, free of charge, to any person obtaining",
" a copy of this software and associated documentation files (the ",
" \"Software\"), to deal in the Software without restriction including",
" without limitation the rights to use, copy, modify, merge, publish,",
" distribute, sublicense, and/or sell copies of the Software, and to ",
" permit persons to whom the Software is furnished to do so, subject to",
" the following conditions:",
" The above copyright notice and this permission notice shall be",
" included in all copies or substantial portions of the Software.\"",
(const char *) 0
};
windowing_sanity(); windowing_sanity();
filename[0] = '\0'; filename[0] = '\0';
@@ -1342,8 +1325,6 @@ do_options()
} }
while ((optline = do_runtime_info(&infocontext)) != 0) while ((optline = do_runtime_info(&infocontext)) != 0)
Fprintf(ofp, "%s\n", optline); Fprintf(ofp, "%s\n", optline);
for (i = 0; (optline = lua_info[i]) != 0; ++i)
Fprintf(ofp, "%s\n", optline);
Fclose(ofp); Fclose(ofp);
return; return;
} }