home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume3 / totri / README < prev    next >
Text File  |  1989-02-03  |  1KB  |  21 lines

  1. The DRAFT ANSI C standard specifies that all conforming compilers must
  2. support "trigraphs" as an alternate means of writing certain characters
  3. (which are absent from the international ISO 646 repertoire).
  4. Personally, I think that trigraphs are UGLY, and absolutely the WRONG
  5. way to solve this problem.  Certainly I believe that trigraph processing
  6. does not belong in the C compiler, but would be better specified as
  7. an external facility.
  8.  
  9. In any case, since the standard specifies that the conversion from
  10. trigraphs takes place in the very first processing phase, it is
  11. easy to implement trigraphs as a simple preprocessor.  I have written
  12. two programs:  one that removes (translates) all trigraph sequences
  13. into the more usual ASCII representation, and the second, which
  14. does the reverse (converts US-ASCII into trigraphs).
  15.  
  16. I hope someone finds these useful.  I have donated the source code
  17. to the public domain.  Both programs are implemented as filters,
  18. but it would be easy to change the interface by rewriting main.
  19. The functions that do the work take input and outfile "FILE *"
  20. descriptors.
  21.