]> granicus.if.org Git - nethack/commitdiff
status bits
authornethack.rankin <nethack.rankin>
Sun, 30 Nov 2003 11:04:54 +0000 (11:04 +0000)
committernethack.rankin <nethack.rankin>
Sun, 30 Nov 2003 11:04:54 +0000 (11:04 +0000)
     Declare structure before using it in prototypes, and declare atol()
for configurations which don't have or don't use <stdlib.h>.  (Some
#ifdef MICRO code for atoi at the end of system.h might need to be done
for atol too.)

include/system.h
src/botl.c

index a4efff98322c918a39163e60c6b00affb04f2bf8..fa90c33b465a8b461a10acd6a8d3337add941ead 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)system.h   3.4     2001/12/07      */
+/*     SCCS Id: @(#)system.h   3.4     2003/11/30      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -222,6 +222,7 @@ E char *FDECL(getcwd, (char *,int));
 #ifdef ULTRIX
 E int FDECL(close, (int));
 E int FDECL(atoi, (const char *));
+E long FDECL(atol, (const char *));
 E int FDECL(chdir, (const char *));
 # if !defined(ULTRIX_CC20) && !defined(__GNUC__)
 E int FDECL(chmod, (const char *,int));
@@ -247,6 +248,7 @@ E int FDECL(abs, (int));
 # endif
 E int FDECL(atexit, (void (*)(void)));
 E int FDECL(atoi, (const char *));
+E long FDECL(atol, (const char *));
 E int FDECL(chdir, (const char *));
 E int FDECL(chown, (const char *,unsigned,unsigned));
 # ifdef __DECC_VER
index e753b8f111ad48947dc5fc4f9c83f034b9ab0dd9..dbdec61d5fdfb9d9be8e2f139cb5799a8107c7e6 100644 (file)
@@ -16,6 +16,15 @@ const char * const enc_stat[] = {
 };
 
 #ifdef STATUS_VIA_WINDOWPORT
+struct istat_s {
+       long time;
+       unsigned anytype;
+       anything a;
+       char *val;
+       int valwidth;
+       int idxmax;
+};
+
 STATIC_DCL void NDECL(init_blstats);
 STATIC_DCL char *FDECL(anything_to_s, (char *, anything *, int));
 STATIC_DCL void FDECL(s_to_anything, (anything *, char *, int));
@@ -306,15 +315,6 @@ bot()
 
 #else  /* STATUS_VIA_WINDOWPORT */
 
-struct istat_s {
-       long time;
-       unsigned anytype;
-       anything a;
-       char *val;
-       int valwidth;
-       int idxmax;
-};
-
 /* If entries are added to this, botl.h will require updating too */
 struct istat_s blstats[2][MAXBLSTATS] = {
     {