Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!cisunx!msw From: msw@cisunx.UUCP (Matt S Wartell) Newsgroups: comp.std.c Subject: Re: End user implications of trigraphs (SUMMARY) Summary: summary of responses to question about ANSI trigraphs Keywords: trigraphs Message-ID: <17903@cisunx.UUCP> Date: 3 May 89 13:30:49 GMT References: <17806@cisunx.UUCP> Reply-To: msw@unix.cis.pittsburgh.edu (Matt S Wartell) Followup-To: junk Distribution: na Organization: University of Pittsburgh Lines: 27 Thanks to all who responded to my somewhat naive question about trigraphs. As was pointed out by all of the respondants, my question was ill-formed. I had asked if puts("trigraph??"); would break under the pANS. Since ??" is not a ISO-646 trigraph, my example would work fine. If the question were: puts("trigraph??!"); the answer would be: yes, this will generate "trigraph|" instead of "trigraph??!". It was also pointed out that ISO-646 trigraphs _have_ been incorporated into the proposed standard. For what it's worth, trigraphs are here. However, a few people noted that self-respecting ANSI compilers would probably have a "disable-trigraphs" or "enable-trigraphs" option. A helpful solution came from Karl Heuer via Mark Brader's .signature: sed -e "s;??\\([-=(/)']\\);?\\\\?\\1;g" will protect trigraphs-that-weren't-meant-to-be-trigraphs in existing code. Thus, the ??! from my example would become ?\?! when transformed by sed. One caveat: the ?\? construction may fail on pre-ANSI compilers. Thanks again to Karl Heuer, Marv Rubinstein, Gordon L. Burditt, Stephen J. Friedl, Mark Brader and David H. Wolfskill for their kind responses. -- matt wartell, university of pittsburgh msw@unix.cis.pittsburgh.edu