home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / stdmacs.h < prev    next >
C/C++ Source or Header  |  1994-10-23  |  2KB  |  66 lines

  1. /* RCS      -- $Header: /u5/dvadura/src/public/dmake/src/RCS/stdmacs.h,v 1.1 1994/10/06 17:42:51 dvadura Exp $
  2. -- SYNOPSIS -- general use macros.
  3. -- 
  4. -- DESCRIPTION
  5. --     ANSI macro relies on the fact that it can be replaced by (), or by
  6. --    its value, where the value is one value due to the preprocessors
  7. --    handling of arguments that are surrounded by ()'s as a single
  8. --    argument.
  9. --
  10. -- AUTHOR
  11. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  12. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  13. --
  14. -- COPYRIGHT
  15. --      Copyright (c) 1992,1994 by Dennis Vadura.  All rights reserved.
  16. -- 
  17. --      This program is free software; you can redistribute it and/or
  18. --      modify it under the terms of the GNU General Public License
  19. --      (version 1), as published by the Free Software Foundation, and
  20. --      found in the file 'LICENSE' included with this distribution.
  21. -- 
  22. --      This program is distributed in the hope that it will be useful,
  23. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  24. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  25. --      GNU General Public License for more details.
  26. -- 
  27. --      You should have received a copy of the GNU General Public License
  28. --      along with this program;  if not, write to the Free Software
  29. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  30. --
  31. -- LOG
  32. --     $Log: stdmacs.h,v $
  33.  * Revision 1.1  1994/10/06  17:42:51  dvadura
  34.  * dmake Release Version 4.0, Initial revision
  35.  *
  36. */
  37.  
  38. #ifndef    MACROS_h
  39. #define    MACROS_h
  40.  
  41. /* stupid AIX and Mac MPW define __STDC__ as special, but defined(__STDC__) is false, and
  42.  * it's value is nothing */
  43. #if !defined(__STDC__) && !defined(_AIX) && !defined(_MPW)
  44. #define __STDC__ 0
  45. #endif
  46.  
  47. #if __STDC__ || defined(__TURBOC__)
  48. #define    ANSI(x)    x
  49. #else
  50. #define    ANSI(x)    ()
  51. #endif
  52.  
  53. #define    NIL(p)    ((p*)NULL)
  54.  
  55. #if !defined(atarist)
  56. #define    offsetof(type,id) ((size_t)&((type*)NULL)->id)
  57. #endif
  58.  
  59. #define    FALSE    0
  60. #define    TRUE    1
  61.  
  62. #define PUBLIC
  63.  
  64. #endif
  65.  
  66.