]> granicus.if.org Git - nethack/commitdiff
FDECL and NDECL
authornhmall <nhmall@nethack.org>
Sun, 31 Jan 2021 19:15:08 +0000 (14:15 -0500)
committernhmall <nhmall@nethack.org>
Sun, 31 Jan 2021 19:15:08 +0000 (14:15 -0500)
include/tradstdc.h

index 3827195f53f06b7a6a258bf60b18208861396dae..09decb4b15ee073a755583d5d120344c092ed962 100644 (file)
@@ -180,30 +180,17 @@ typedef const char *vA;
  * Used for robust ANSI parameter forward declarations:
  * int VDECL(sprintf, (char *, const char *, ...));
  *
- * NDECL() is used for functions with zero arguments;
- * FDECL() is used for functions with a fixed number of arguments;
  * VDECL() is used for functions with a variable number of arguments.
  * Separate macros are needed because ANSI will mix old-style declarations
  * with prototypes, except in the case of varargs
   */
 
-#define NDECL(f) f(void)
-
-#define FDECL(f, p) f p
-
 #if defined(MSDOS) || defined(USE_STDARG)
 #define VDECL(f, p) f p
 #else
 #define VDECL(f, p) f()
 #endif
 
-/*
- * Used for definitions of functions which take no arguments to force
- * an explicit match with the NDECL prototype.  Needed in some cases
- * (MS Visual C 2005) for functions called through pointers.
- */
-#define VOID_ARGS void
-
 /* generic pointer, always a macro; genericptr_t is usually a typedef */
 #define genericptr void *
 
@@ -238,12 +225,8 @@ typedef const char *vA;
 
 #else /* NHSTDC */ /* a "traditional" C  compiler */
 
-#define NDECL(f) f()
-#define FDECL(f, p) f()
 #define VDECL(f, p) f()
 
-#define VOID_ARGS /*empty*/
-
 #if defined(AMIGA) || defined(HPUX) || defined(POSIX_TYPES) \
     || defined(__DECC) || defined(__BORLANDC__)
 #define genericptr void *
@@ -335,7 +318,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
 #endif
 #endif
 
-/* These are used for arguments within FDECL/VDECL prototype declarations.
+/* These are used for arguments within VDECL prototype declarations.
  */
 #ifdef UNWIDENED_PROTOTYPES
 #define CHAR_P char
@@ -360,7 +343,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
 #define ALIGNTYP_P int
 #else
 /* Neither widened nor unwidened prototypes.  Argument list expansion
- * by FDECL/VDECL always empty; all xxx_P vanish so defs aren't needed. */
+ * by VDECL always empty; all xxx_P vanish so defs aren't needed. */
 #endif
 #endif
 
@@ -393,14 +376,8 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
  * include files have prototypes and the compiler also complains that
  * prototyped and unprototyped declarations don't match.
  */
-#undef NDECL
-#undef FDECL
 #undef VDECL
-#define NDECL(f) f()
-#define FDECL(f, p) f()
 #define VDECL(f, p) f()
-#undef VOID_ARGS
-#define VOID_ARGS /*empty*/
 #endif
 #endif