Blame


1 ed7c8e8d 2003-09-30 devnull This is sam (not including samterm) from the 4th edition of Plan 9,
2 ed7c8e8d 2003-09-30 devnull with changes so that it can be compiled under unix.
3 ed7c8e8d 2003-09-30 devnull (Tested on Solaris 7 and Debian 3.0r1.)
4 ed7c8e8d 2003-09-30 devnull
5 ed7c8e8d 2003-09-30 devnull Some extra libraries are needed. First, fetch libutf-2.0 and libfmt-2.0
6 ed7c8e8d 2003-09-30 devnull from
7 ed7c8e8d 2003-09-30 devnull http://pdos.lcs.mit.edu/~rsc/software/
8 ed7c8e8d 2003-09-30 devnull
9 ed7c8e8d 2003-09-30 devnull (Beware that in libfmt/fmt.c there is a line that says:
10 ed7c8e8d 2003-09-30 devnull 'u', __ifmt, /* in Plan 9, __flagfmt */
11 ed7c8e8d 2003-09-30 devnull Thus, sam will have to fmtinstall the other thing. Other ported programs
12 ed7c8e8d 2003-09-30 devnull may have to do the same. The fmt library should probably print messages
13 ed7c8e8d 2003-09-30 devnull about bad format characters to stderr, since no one seems to check the
14 ed7c8e8d 2003-09-30 devnull return codes.)
15 ed7c8e8d 2003-09-30 devnull
16 ed7c8e8d 2003-09-30 devnull Compile and install those two libraries.
17 ed7c8e8d 2003-09-30 devnull Set PREFIX in the Makefile to match, then compile sam.
18 ed7c8e8d 2003-09-30 devnull
19 ed7c8e8d 2003-09-30 devnull Your C compiler will emit many complaints of the form:
20 ed7c8e8d 2003-09-30 devnull sam.c:496: warning: passing arg 1 of `bufread' from incompatible pointer type
21 ed7c8e8d 2003-09-30 devnull
22 ed7c8e8d 2003-09-30 devnull This is because the Plan 9 compiler has a slightly different (better,
23 ed7c8e8d 2003-09-30 devnull ala Oberon) type system than ISO C. Popular compilers generate the right
24 ed7c8e8d 2003-09-30 devnull code, so in an act of civil disobediance I changed just enough to get
25 ed7c8e8d 2003-09-30 devnull it to compile, but left the type errors in. Now the next C standard can
26 ed7c8e8d 2003-09-30 devnull adopt this extension, because at least one important C program uses it!
27 ed7c8e8d 2003-09-30 devnull
28 ed7c8e8d 2003-09-30 devnull -- Scott Schwartz, 4 July 2003
29 ed7c8e8d 2003-09-30 devnull