[comp.unix.wizards] C preprocessor portability question -- initial #

roy@phri.UUCP (Roy Smith) (11/06/86)

	Back in the "good old days" (i.e. v6) a c source file was only run
through the preprocessor if the first character in the file was a '#'.  Are
there any systems out there that still enforce this, or is it strictly a
relic of the past?
-- 
Roy Smith, {allegra,philabs}!phri!roy
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016

"you can't spell unix without deoxyribonucleic!"

mangler@cit-vax.Caltech.Edu (System Mangler) (11/10/86)

In article <2484@phri.UUCP>, roy@phri.UUCP (Roy Smith) writes:
>	Back in the "good old days" (i.e. v6) a c source file was only run
> through the preprocessor if the first character in the file was a '#'.

Now I understand why it's so rare to see identifying comments at
the beginning of Unix source files!

Don Speck   speck@vlsi.caltech.edu  {seismo,rutgers,nike}!cit-vax!speck

guy@sun.uucp (Guy Harris) (11/10/86)

> 
> 	Back in the "good old days" (i.e. v6) a c source file was only run
> through the preprocessor if the first character in the file was a '#'.  Are
> there any systems out there that still enforce this, or is it strictly a
> relic of the past?

It's strictly a relic of the past.  Check out the source code to the 4.3BSD
kernel; for example, the most common first character there is "/".
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com (or guy@sun.arpa)

jsdy@hadron.UUCP (Joseph S. D. Yao) (11/26/86)

In article <1153@cit-vax.Caltech.Edu> mangler@cit-vax.Caltech.Edu (System Mangler) writes:
>In article <2484@phri.UUCP>, roy@phri.UUCP (Roy Smith) writes:
>>	Back in the "good old days" (i.e. v6) a c source file was only run
>> through the preprocessor if the first character in the file was a '#'.
>Now I understand why it's so rare to see identifying comments at
>the beginning of Unix source files!

I don't see that.  A bunch of software came out in those days:
--------------------
#

/*********************************************************************\
**
** myprog - my program
**
** Syntax:
**	myprog [ -option ] [ files ... ]
	... etc.
**
\*********************************************************************/

#etc.
--------------------
I authored some of it, and tried to encourage this kind of
documentation in my group.  These days, we just lop the first
two lines.
(For people with line truncators, line
3 ends "**\" and line 11+N ends "**/",
just for pretty.)
-- 

	Joe Yao		hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}
			jsdy@hadron.COM (not yet domainised)