[TUHS] # as first character of file
Sven Mascheck
mascheck+tuhs at in-ulm.de
Thu Jan 5 14:24:03 AEST 2017
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
#
More information about the TUHS
mailing list