home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / c / 3195 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  2.0 KB

  1. Path: sparky!uunet!gatech!news.ans.net!cmcl2!adm!smoke!gwyn
  2. From: gwyn@smoke.brl.mil (Doug Gwyn)
  3. Newsgroups: comp.std.c
  4. Subject: <iso646.h>
  5. Keywords: Standard C international header implementation
  6. Message-ID: <19457@smoke.brl.mil>
  7. Date: 13 Dec 92 08:18:51 GMT
  8. Organization: U.S. Army Ballistic Research Lab (BRL), APG, MD.
  9. Lines: 59
  10.  
  11. /*
  12.     <iso646.h> -- macros for use in place of certain tokens that are
  13.         not expressible in the invariant subset of ISO 646:1991
  14.  
  15.     public-domain implementation for all versions of C
  16.  
  17.     last edit:    13-Dec-1992    Gwyn@ARL.Army.Mil
  18.  
  19.     complies with the following standard:
  20.         ANSI/ISO 9899:1990[1992] (as expected to be amended in 1993)
  21.  
  22.     Usage:    ??=include <iso646.h>
  23.  
  24.     Notes:    The C standard has always required that the following
  25.         trigraphs be supported in translation phase 1:
  26.             ??= mapped to #
  27.             ??( mapped to [
  28.             ??/ mapped to \
  29.             ??) mapped to ]
  30.             ??' mapped to ^
  31.             ??< mapped to {
  32.             ??! mapped to |
  33.             ??> mapped to }
  34.             ??- mapped to ~
  35.  
  36.         The forthcoming normative addendum to the C standard that
  37.         requires conforming implementations to provide <iso646.h>
  38.         also requires support in translation phases 3..4 for the
  39.         following preprocessing tokens:
  40.             %: alternate spelling for #
  41.             %:%: alternate spelling for ##
  42.         It also requires support in translation phases 3..7 for the
  43.         following preprocessing tokens:
  44.             <% alternate spelling for {
  45.             %> alternate spelling for }
  46.             <: alternate spelling for [
  47.             :> alternate spelling for ]
  48.  
  49.         The C standard also requires that the "difficult" characters
  50.         be somehow provided in both the basic source and execution
  51.         character sets, regardless of the provision of trigraph,
  52.         digraph, and macro alternatives for these characters.
  53.  
  54.         It is suggested that all C programmers avoid use of the
  55.         following identifiers in their programs, in case somebody
  56.         later needs to use <iso646.h> in maintaining the programs.
  57.  */
  58.  
  59. #define or    ||
  60. #define bitor    |
  61. #define or_eq    |=
  62. #define xor    ^
  63. #define xor_eq    ^=
  64. #define compl    ~
  65. #define and    &&
  66. #define bitand    &
  67. #define and_eq    &=
  68. #define not    !
  69. #define ne    !=
  70.