switch source tree from k&r to c99
This commit is contained in:
@@ -302,7 +302,7 @@ extern struct cross_target_s cross_target;
|
||||
if nethack is built with MONITOR_HEAP enabled and they aren't; this
|
||||
declaration has been moved out of the '#else' below to avoid getting
|
||||
a complaint from -Wmissing-prototypes when building with MONITOR_HEAP */
|
||||
extern char *FDECL(dupstr, (const char *));
|
||||
extern char *dupstr(const char *);
|
||||
|
||||
/*
|
||||
* MONITOR_HEAP is conditionally used for primitive memory leak debugging.
|
||||
@@ -314,9 +314,9 @@ extern char *FDECL(dupstr, (const char *));
|
||||
*/
|
||||
#ifdef MONITOR_HEAP
|
||||
/* plain alloc() is not declared except in alloc.c */
|
||||
extern long *FDECL(nhalloc, (unsigned int, const char *, int));
|
||||
extern void FDECL(nhfree, (genericptr_t, const char *, int));
|
||||
extern char *FDECL(nhdupstr, (const char *, const char *, int));
|
||||
extern long *nhalloc(unsigned int, const char *, int);
|
||||
extern void nhfree(genericptr_t, const char *, int);
|
||||
extern char *nhdupstr(const char *, const char *, int);
|
||||
/* this predates C99's __func__; that is trickier to use conditionally
|
||||
because it is not implemented as a preprocessor macro; MONITOR_HEAP
|
||||
wouldn't gain much benefit from it anyway so continue to live without it;
|
||||
@@ -332,7 +332,7 @@ extern char *FDECL(nhdupstr, (const char *, const char *, int));
|
||||
#define dupstr(s) nhdupstr(s, __FILE__, (int) __LINE__)
|
||||
#else /* !MONITOR_HEAP */
|
||||
/* declare alloc.c's alloc(); allocations made with it use ordinary free() */
|
||||
extern long *FDECL(alloc, (unsigned int)); /* alloc.c */
|
||||
extern long *alloc(unsigned int); /* alloc.c */
|
||||
#endif /* ?MONITOR_HEAP */
|
||||
|
||||
/* Used for consistency checks of various data files; declare it here so
|
||||
|
||||
Reference in New Issue
Block a user