From: cyrille.lefevre-lists@laposte.net (Cyrille Lefevre)
Subject: [TUHS] History of #! interpretation in Unix
Date: Thu, 20 Jan 2011 05:09:43 +0100 [thread overview]
Message-ID: <4D37B587.8050409@laposte.net> (raw)
In-Reply-To: <20110119203506.GB12678@lisa.in-ulm.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
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 <stdio.h>
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
next prev parent reply other threads:[~2011-01-20 4:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 8:43 Warren Toomey
2011-01-16 9:55 ` John Cowan
2011-01-16 13:20 ` Sven Mascheck
2011-01-16 17:17 ` John Cowan
2011-01-16 19:19 ` Sven Mascheck
2011-01-16 20:17 ` John Cowan
2011-01-16 20:42 ` Larry McVoy
2011-01-16 21:08 ` Sven Mascheck
2011-01-16 21:37 ` John Cowan
2011-01-17 16:35 ` Warner Losh
2011-01-17 20:47 ` John Cowan
2011-01-17 10:09 ` Tim Bradshaw
2011-01-16 10:53 ` Wilko Bulte
2011-01-17 16:25 ` Warner Losh
2011-01-17 19:02 ` Jeremy C. Reed
2011-01-17 20:51 ` John Cowan
2011-01-17 22:41 ` Jeremy C. Reed
2011-01-17 20:58 ` Sven Mascheck
2011-01-19 4:10 ` Cyrille Lefevre
2011-01-19 20:35 ` Sven Mascheck
2011-01-20 4:09 ` Cyrille Lefevre [this message]
2011-01-28 19:38 ` Jeremy C. Reed
2011-01-30 15:05 ` Sven Mascheck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D37B587.8050409@laposte.net \
--to=cyrille.lefevre-lists@laposte.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).