The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] # as first character of file
@ 2017-01-04 16:41 ron minnich
  2017-01-04 16:46 ` Clem Cole
  2017-01-05  4:24 ` Sven Mascheck
  0 siblings, 2 replies; 3+ messages in thread
From: ron minnich @ 2017-01-04 16:41 UTC (permalink / raw)


I just went looking at the v6 source to confirm a memory, namely that cpp
was only invoked if a # was the first character in the file. Hence, this:
https://github.com/dspinellis/unix-history-repo/blob/Research-V6-Snapshot-Development/usr/source/c/c01.c#L1

People occasionally forgot this, and hilarity ensued.

Now I'm curious. Anyone know when that convention ended?

ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170104/134f2d5a/attachment.html>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [TUHS] # as first character of file
  2017-01-04 16:41 [TUHS] # as first character of file ron minnich
@ 2017-01-04 16:46 ` Clem Cole
  2017-01-05  4:24 ` Sven Mascheck
  1 sibling, 0 replies; 3+ messages in thread
From: Clem Cole @ 2017-01-04 16:46 UTC (permalink / raw)


IIRC the V7 compiler did not require it.   It's possible Typesetter C may
have also.


On Wed, Jan 4, 2017 at 11:41 AM, ron minnich <rminnich at gmail.com> wrote:

> I just went looking at the v6 source to confirm a memory, namely that cpp
> was only invoked if a # was the first character in the file. Hence, this:
> https://github.com/dspinellis/unix-history-repo/blob/Research-V6-Snapshot-
> Development/usr/source/c/c01.c#L1
>
> People occasionally forgot this, and hilarity ensued.
>
> Now I'm curious. Anyone know when that convention ended?
>
> ron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170104/faf1983a/attachment.html>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [TUHS] # as first character of file
  2017-01-04 16:41 [TUHS] # as first character of file ron minnich
  2017-01-04 16:46 ` Clem Cole
@ 2017-01-05  4:24 ` Sven Mascheck
  1 sibling, 0 replies; 3+ messages in thread
From: Sven Mascheck @ 2017-01-05  4:24 UTC (permalink / raw)


On Wed, Jan 04, 2017 at 04:41:06PM +0000, ron minnich wrote:
> I just went looking at the v6 source to confirm a memory, namely that cpp
> was only invoked if a # was the first character in the file. Hence, this:
> https://github.com/dspinellis/unix-history-repo/blob/Research-V6-Snapshot-Development/usr/source/c/c01.c#L1

In v6 cc(1) still does the job itself. Here is where it actually happens, in expand():
https://github.com/dspinellis/unix-history-repo/blob/Research-V6-Snapshot-Development/usr/source/s1/cc.c#L249

> Now I'm curious. Anyone know when that convention ended?

In v7 various files still have # as first character, but the requirement has gone,
https://github.com/dspinellis/unix-history-repo/tree/Research-V7/usr/src/cmd/cpp

    # cat x.h
     /* */
    #define macro value
    macro

    # /lib/cpp x.h
    # 1 "x.h"
    
    value
    #


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-05  4:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-04 16:41 [TUHS] # as first character of file ron minnich
2017-01-04 16:46 ` Clem Cole
2017-01-05  4:24 ` Sven Mascheck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).