home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / ansidecl.h < prev    next >
C/C++ Source or Header  |  2000-12-05  |  3KB  |  105 lines

  1. /* Copyright (C) 1990 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. $Id: ansidecl.h,v 1.7 2000/12/05 21:23:42 cph Exp $
  5.  
  6. The GNU C Library is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. The GNU C Library is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with the GNU C Library; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* ANSI and traditional C compatibility macros
  21.  
  22.    ANSI C is assumed if STDC_HEADERS is #defined.
  23.  
  24.     Macros
  25.         PTR        - Generic pointer type
  26.         LONG_DOUBLE    - `long double' type
  27.         CONST        - `const' keyword
  28.         VOLATILE    - `volatile' keyword
  29.         SIGNED        - `signed' keyword
  30.         PTRCONST    - Generic const pointer (void *const)
  31.  
  32.     EXFUN(name, prototype)        - declare external function NAME
  33.                       with prototype PROTOTYPE
  34.     DEFUN(name, arglist, args)    - define function NAME with
  35.                       args ARGLIST of types in ARGS
  36.     DEFUN_VOID(name)        - define function NAME with no args
  37.     AND                - argument separator for ARGS
  38.     NOARGS                - null arglist
  39.     DOTS                - `...' in args
  40.  
  41.     For example:
  42.     extern int EXFUN(printf, (CONST char *format DOTS));
  43.     int DEFUN(fprintf, (stream, format),
  44.           FILE *stream AND CONST char *format DOTS) { ... }
  45.     void DEFUN_VOID(abort) { ... }
  46. */
  47.  
  48. #ifndef    _ANSIDECL_H
  49. #define    _ANSIDECL_H    1
  50.  
  51.  
  52. /* Every source file includes this file,
  53.    so they will all get the switch for lint.  */
  54. /* LINTLIBRARY */
  55.  
  56. #if defined(__STDC__) || defined(STDC_HEADERS)
  57. #define HAVE_STDC
  58.  
  59. #define    PTR        void *
  60. #define    PTRCONST    void *CONST
  61. #define    LONG_DOUBLE    long double
  62.  
  63. #define    AND        ,
  64. #define    NOARGS        void
  65. #define    VOLATILE    volatile
  66. #define    SIGNED        signed
  67. #define    DOTS        , ...
  68.  
  69. /* Some systems don't declare their libraries correctly, making CONST
  70.    impossible to have. */
  71. #ifdef CONST
  72. #undef CONST
  73. #endif
  74.  
  75. #ifdef NO_CONST
  76. #define CONST
  77. #else
  78. #define    CONST        const
  79. #endif
  80.  
  81. #define    EXFUN(name, proto)        name proto
  82. #define    DEFUN(name, arglist, args)    name(args)
  83. #define    DEFUN_VOID(name)        name(NOARGS)
  84.  
  85. #else /* not (__STDC__ || STDC_HEADERS) */
  86.  
  87. #define    PTR        char *
  88. #define    PTRCONST    PTR
  89. #define    LONG_DOUBLE    double
  90.  
  91. #define    AND        ;
  92. #define    NOARGS
  93. #define    CONST
  94. #define    VOLATILE
  95. #define    SIGNED
  96. #define    DOTS
  97.  
  98. #define    EXFUN(name, proto)        name()
  99. #define    DEFUN(name, arglist, args)    name arglist args;
  100. #define    DEFUN_VOID(name)        name()
  101.  
  102. #endif /* not (__STDC__ || STDC_HEADERS)  */
  103.  
  104. #endif    /* _ANSIDECL_H */
  105.