From mboxrd@z Thu Jan 1 00:00:00 1970 From: cyrille.lefevre-lists@laposte.net (Cyrille Lefevre) Date: Thu, 20 Jan 2011 05:09:43 +0100 Subject: [TUHS] History of #! interpretation in Unix In-Reply-To: <20110119203506.GB12678@lisa.in-ulm.de> References: <20110116084330.GA27396@minnie.tuhs.org> <4D366439.8020808@laposte.net> <20110119203506.GB12678@lisa.in-ulm.de> Message-ID: <4D37B587.8050409@laposte.net> Le 19/01/2011 21:35, Sven Mascheck a écrit : > > Cyrille Lefevre wrote: > >> yet another reference but more in the spirit of what csh does, it only >> checks for a simple hash (#), no explaim mark (!), and is enclosed in >> UCB_SCRIPT define. >> >> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/sys/sys/sys1.c > > Perhaps you missed the ! in the macro? right %-/ > #define SCRMAG '#!' multi-character character constant ! u.u_exdata.ux_mag == SCRMAG makes me wonder... $ cat x.c #include main() { int c = '#!'; printf("%x", c); return 0; } $ make x cc x.c -o x x.c:2:18: warning: multi-character character constant $ ./x 2321 $ man ascii ... | 20 sp | 21 ! | 22 " | 23 # | 24 $ | 25 % | 26 & | 27 ' | ... well, it works ! Regards, Cyrille Lefevre -- mailto:Cyrille.Lefevre-lists at laposte.net