[comp.lang.c] ?? in existing source code

gwyn@BRL.ARPA (VLD/VMB) (05/27/88)

I previously stated that I didn't think trigraphs broke much existing
code.  This was challenged, with reference to UNIX source code (which
is AT&T's problem, and they bought into this).  I decided to search
my branch's existing C application sources, with the following results:
INSTALLED APPLICATIONS:
	298 source files
	145,540 source lines
	3 lines containing ??, in comments, unaffected by trigraphs.
APPLICATION UNDER DEVELOPMENT:
	124 source files
	36,393 source lines
	11 lines containing ??, in comments, unaffected by trigraphs.
(Obviously there are more unresolved questions in the code under
development.)  No special care was taken when writing this code to
worry about trigraphs; also, several people contributed to this code.

This supports my claim about lack of code breakage by trigraphs.

tanner@ki4pv.UUCP (05/31/88)

In article <14830@brl-adm.ARPA>, gwyn@BRL.ARPA (VLD/VMB) writes:
)  [ stats of his current progs; no non-comment instances of "??" ] ....
) This supports my claim about lack of code breakage by trigraphs.

For contrast, I just processed the body of the most important prog
in our major application.
	total	97 files	25758 lines
	"??"	 4 files	    6 lines

All of the "??" instances were in strings to be output in case of
exception conditions.
-- 
{allegra codas killer decvax!ucf-cs}!ki4pv!tanner

gwyn@brl-smoke.ARPA (Doug Gwyn ) (06/01/88)

In article <6944@ki4pv.uucp> tanner@ki4pv.UUCP writes:
>	total	97 files	25758 lines
>	"??"	 4 files	    6 lines
>All of the "??" instances were in strings to be output in case of
>exception conditions.

So, would any of them be adversely impacted by the trigraph mappings?

For those of you who haven't bothered to find out what trigraphs
really are, only the following sequences are mapped as trigraphs:
	??=  ??(  ??/  ??)  ??'  ??<  ??!  ??>  ??-
Other occurrences of ?? are not affected.

jfh@rpp386.UUCP (John F. Haugh II) (06/04/88)

I didn't run SCCS-gets on all of the files, so this includes all of the
past versions as well as the current.  Out of 245 files covering about
45,000 lines of source, there were no ??'s.

And who uses two question marks in a string or whatever anyway??

- John.

g-rh@cca.CCA.COM (Richard Harter) (06/04/88)

>And who uses two question marks in a string or whatever anyway??

Actually, we have one, for a very obvious reason.  In a help program
? gives you a simple summary of commands, including the information that
?? gives you a complete listing of topics.  The list of predefined tokens
contains "??".
-- 

In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die.
	Richard Harter, SMDS  Inc.

tanner@ki4pv.UUCP (06/04/88)

In article <8003@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
) [cites my stats on "??" presence] [includes list of trigraphs]
> So, would any of them be adversely impacted by the trigraph mappings?

Well, now that you mention it, yes.  Some of these WOULD be replaced
by a trigraph-swallowing compiler.
-- 
{allegra codas killer decvax!ucf-cs}!ki4pv!tanner