Browse Source

Plan 9 from Bell Labs 2003-01-02

David du Colombier 19 years ago
parent
commit
910ebaa364

+ 6 - 2
acme/mail/src/mail.c

@@ -39,7 +39,7 @@ int			shortmenu;
 void
 usage(void)
 {
-	fprint(2, "usage: Mail [-sS] [mailboxname [directoryname]]\n");
+	fprint(2, "usage: Mail [-sS] [-o outgoing] [mailboxname [directoryname]]\n");
 	threadexitsall("usage");
 }
 
@@ -93,6 +93,9 @@ threadmain(int argc, char *argv[])
 	case 'S':
 		shortmenu = 2;
 		break;
+	case 'o':
+		outgoing = EARGF(usage());
+		break;
 	default:
 		usage();
 	}ARGEND
@@ -138,7 +141,8 @@ threadmain(int argc, char *argv[])
 		user = "none";
 	if(mailboxdir == nil)
 		mailboxdir = estrstrdup("/mail/box/", user);
-	outgoing = estrstrdup(mailboxdir, "/outgoing");
+	if(outgoing == nil)
+		outgoing = estrstrdup(mailboxdir, "/outgoing");
 
 	s = estrstrdup(maildir, "ctl");
 	mbox.ctlfd = open(s, ORDWR|OCEXEC);

+ 15 - 5
acme/mail/src/mesg.c

@@ -62,6 +62,12 @@ char *okheaders[] =
 	nil
 };
 
+char *extraheaders[] =
+{
+	"Resent-",
+	nil,
+};
+
 char*
 line(char *data, char **pp)
 {
@@ -339,7 +345,7 @@ mesgmenu0(Window *w, Message *mbox, char *realdir, char *dir, int ind, Biobuf *f
 	char *name, *tmp;
 	int ogf=0;
 
-	if (strcmp(realdir, "/mail/fs/outgoing/") == 0)
+	if(strstr(realdir, "outgoing") != nil)
 		ogf=1;
 
 	/* show mail box in reverse order, pieces in forward order */
@@ -954,7 +960,7 @@ mimedisplay(Message *m, char *name, char *rootdir, Window *w, int fileonly)
 }
 
 void
-printheader(char *dir, Biobuf *b)
+printheader(char *dir, Biobuf *b, char **okheaders)
 {
 	char *s;
 	char *lines[100];
@@ -987,8 +993,11 @@ mesgload(Message *m, char *rootdir, char *file, Window *w)
 			mesgline(m, "To", m->to);
 			mesgline(m, "CC", m->cc);
 			mesgline(m, "Subject", m->subject);
-		}else
-			printheader(dir, w->body);
+			printheader(dir, w->body, extraheaders);
+		}else{
+			printheader(dir, w->body, okheaders);
+			printheader(dir, w->body, extraheaders);
+		}
 		Bprint(w->body, "\n");
 	}
 
@@ -1025,7 +1034,8 @@ mesgload(Message *m, char *rootdir, char *file, Window *w)
 				Bprint(w->body, "\n===> %s (%s) [%s]\n", strchr(name, '/')+1, mp->type, mp->disposition);
 			if(strcmp(mp->type, "text")==0 || strncmp(mp->type, "text/", 5)==0){
 				mimedisplay(mp, name, rootdir, w, 1);
-				printheader(subdir, w->body);
+				printheader(subdir, w->body, okheaders);
+				printheader(subdir, w->body, extraheaders);
 				winwritebody(w, "\n", 1);
 				s = readbody(mp->type, subdir, &n);
 				winwritebody(w, s, n);

+ 13 - 13
dist/replica/plan9.db

@@ -467,7 +467,7 @@
 386/lib/libauthsrv.a - 664 sys sys 1038443219 31942
 386/lib/libbin.a - 664 sys sys 1038443219 2556
 386/lib/libbio.a - 664 sys sys 1038443219 28390
-386/lib/libc.a - 664 sys sys 1039758626 496612
+386/lib/libc.a - 664 sys sys 1041443377 496640
 386/lib/libcontrol.a - 664 sys sys 1040456880 243448
 386/lib/libdisk.a - 664 sys sys 1038443222 43692
 386/lib/libdraw.a - 664 sys sys 1040456882 372606
@@ -607,7 +607,7 @@ acme/bin/source/win/win.c - 664 sys sys 1015011255 4240
 acme/bin/unind - 755 sys sys 1015011256 27
 acme/mail - 20000000775 sys sys 1015011265 0
 acme/mail/386 - 20000000775 sys sys 1015011538 0
-acme/mail/386/Mail - 775 sys sys 1041145349 175523
+acme/mail/386/Mail - 775 sys sys 1041481688 175845
 acme/mail/Mail - 775 sys sys 1015011264 202
 acme/mail/alpha - 20000000775 sys sys 1015011521 0
 acme/mail/arm - 20000000775 sys sys 1015011525 0
@@ -620,8 +620,8 @@ acme/mail/readme - 664 sys sys 1017166342 2725
 acme/mail/src - 20000000775 sys sys 1015364010 0
 acme/mail/src/dat.h - 664 sys sys 1033936953 3857
 acme/mail/src/html.c - 664 sys sys 1034016085 1333
-acme/mail/src/mail.c - 664 sys sys 1037034918 10909
-acme/mail/src/mesg.c - 664 sys sys 1037034919 26017
+acme/mail/src/mail.c - 664 sys sys 1041481453 10994
+acme/mail/src/mesg.c - 664 sys sys 1041481453 26236
 acme/mail/src/mkfile - 664 sys sys 1037034918 364
 acme/mail/src/reply.c - 664 sys sys 1041137203 11326
 acme/mail/src/util.c - 664 sys sys 1022112164 1391
@@ -3726,7 +3726,7 @@ sys/lib/man - 20000000775 sys sys 960356011 0
 sys/lib/man/checkman.awk - 664 sys sys 1017679304 6277
 sys/lib/man/colophon - 664 sys sys 956337727 545
 sys/lib/man/lookman - 20000000775 sys sys 956337764 0
-sys/lib/man/lookman/index - 664 sys sys 1021580074 1335770
+sys/lib/man/lookman/index - 664 sys sys 1041446757 1380093
 sys/lib/man/lookman/junkwords - 664 sys sys 956337764 3059
 sys/lib/man/lookman/mkindex - 775 sys sys 1017679307 306
 sys/lib/man/mkhtmlindex - 775 sys sys 959447575 1235
@@ -4378,7 +4378,7 @@ sys/man/1/0intro - 664 sys sys 958249499 9623
 sys/man/1/2a - 664 sys sys 944959673 1032
 sys/man/1/2c - 664 sys sys 1016731553 7349
 sys/man/1/2l - 664 sys sys 944959675 4074
-sys/man/1/INDEX - 664 sys sys 1026845791 3334
+sys/man/1/INDEX - 664 sys sys 1041446629 2895
 sys/man/1/INDEX.html - 664 sys sys 1026845791 15882
 sys/man/1/aan - 664 sys sys 1019856818 1622
 sys/man/1/acid - 664 sys sys 1016833872 9422
@@ -4524,7 +4524,7 @@ sys/man/2/0intro - 664 sys sys 958249500 11777
 sys/man/2/9p - 664 sys sys 1032632905 14553
 sys/man/2/9pfid - 664 sys sys 1030451710 3644
 sys/man/2/9pfile - 664 sys sys 1017423719 4426
-sys/man/2/INDEX - 664 sys sys 1020375094 19606
+sys/man/2/INDEX - 664 sys sys 1041446630 20120
 sys/man/2/INDEX.html - 664 sys sys 1019918562 26387
 sys/man/2/abort - 664 sys sys 944959693 331
 sys/man/2/abs - 664 sys sys 944959693 461
@@ -4665,7 +4665,7 @@ sys/man/2/wait - 664 sys sys 1015091528 2481
 sys/man/2/window - 664 sys sys 950593499 5522
 sys/man/3 - 20000000775 sys sys 1017251174 0
 sys/man/3/0intro - 664 sys sys 984709634 1873
-sys/man/3/INDEX - 664 sys sys 1020375094 363
+sys/man/3/INDEX - 664 sys sys 1041446630 369
 sys/man/3/INDEX.html - 664 sys sys 1019918563 3519
 sys/man/3/apm - 664 sys sys 984709634 1625
 sys/man/3/arch - 664 sys sys 958419692 1425
@@ -4701,7 +4701,7 @@ sys/man/3/usb - 664 sys sys 1019866708 6648
 sys/man/3/vga - 664 sys sys 1020356225 4827
 sys/man/4 - 20000000775 sys sys 1018581459 0
 sys/man/4/0intro - 664 sys sys 944959699 472
-sys/man/4/INDEX - 664 sys sys 1026846912 928
+sys/man/4/INDEX - 664 sys sys 1041446630 953
 sys/man/4/INDEX.html - 664 sys sys 1026846913 4513
 sys/man/4/acme - 664 sys sys 1015024813 9642
 sys/man/4/archfs - 664 sys sys 960000712 533
@@ -4797,7 +4797,7 @@ sys/man/8 - 20000000775 sys sys 1018384448 0
 sys/man/8/0intro - 664 sys sys 944959679 247
 sys/man/8/9load - 664 sys sys 1015024984 8340
 sys/man/8/9pcon - 664 sys sys 1018973955 2226
-sys/man/8/INDEX - 664 sys sys 1026847121 2329
+sys/man/8/INDEX - 664 sys sys 1041446630 2472
 sys/man/8/INDEX.html - 664 sys sys 1026847121 7728
 sys/man/8/aliasmail - 664 sys sys 1026847121 1203
 sys/man/8/apm - 664 sys sys 1017679308 1811
@@ -5104,7 +5104,7 @@ sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/io.h - 664 sys sys 1015014519 7956
 sys/src/9/pc/kbd.c - 664 sys sys 1039753498 9134
 sys/src/9/pc/l.s - 664 sys sys 1026847645 20867
-sys/src/9/pc/main.c - 664 sys sys 1034202255 14255
+sys/src/9/pc/main.c - 664 sys sys 1041431178 14272
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/memory.c - 664 sys sys 1032303986 12994
 sys/src/9/pc/mkfile - 664 sys sys 1040002514 2995
@@ -5185,7 +5185,7 @@ sys/src/9/port/devenv.c - 664 sys sys 1019762849 6562
 sys/src/9/port/devfs.c - 664 sys sys 1041350175 11171
 sys/src/9/port/devkprof.c - 664 sys sys 1014931173 3111
 sys/src/9/port/devloopback.c - 664 sys sys 1018721201 14968
-sys/src/9/port/devmnt.c - 664 sys sys 1039743586 21096
+sys/src/9/port/devmnt.c - 664 sys sys 1041443399 21588
 sys/src/9/port/devmntstats.c - 664 sys sys 1014931173 4039
 sys/src/9/port/devmouse.c - 664 sys sys 1036827459 11420
 sys/src/9/port/devnmouse.c - 664 sys sys 1036812999 3738
@@ -11582,7 +11582,7 @@ sys/src/libthread/channel.c - 664 sys sys 1018387005 8517
 sys/src/libthread/chanprint.c - 664 sys sys 1014928156 328
 sys/src/libthread/create.c - 664 sys sys 1014928156 2829
 sys/src/libthread/debug.c - 664 sys sys 1014928157 832
-sys/src/libthread/example.c - 664 sys sys 1014928157 1419
+sys/src/libthread/example.c - 664 sys sys 1041440306 1402
 sys/src/libthread/exec.c - 664 sys sys 1014928157 1844
 sys/src/libthread/exit.c - 664 sys sys 1015701273 1209
 sys/src/libthread/id.c - 664 sys sys 1014928157 1121

+ 14 - 0
dist/replica/plan9.log

@@ -16873,3 +16873,17 @@
 1041361316 8 c sys/src/fs/sony/9sonyfs.c - 664 sys sys 1041361261 2962
 1041364878 0 c sys/src/libc/9sys/dirfstat.c - 664 sys sys 1041363499 676
 1041364878 1 c sys/src/libc/9sys/dirstat.c - 664 sys sys 1041363499 688
+1041431541 0 c sys/src/9/pc/main.c - 664 sys sys 1041431178 14272
+1041440553 0 c sys/src/libthread/example.c - 664 sys sys 1041440306 1402
+1041444156 0 c 386/lib/libc.a - 664 sys sys 1041443377 496640
+1041444156 1 c sys/src/9/port/devmnt.c - 664 sys sys 1041443399 21588
+1041447759 0 c sys/lib/man/lookman/index - 664 sys sys 1041446757 1380093
+1041447759 1 c sys/man/1/INDEX - 664 sys sys 1041446629 2895
+1041447759 2 c sys/man/2/INDEX - 664 sys sys 1041446630 20120
+1041447759 3 c sys/man/3/INDEX - 664 sys sys 1041446630 369
+1041447759 4 c sys/man/4/INDEX - 664 sys sys 1041446630 953
+1041447759 5 c sys/man/8/INDEX - 664 sys sys 1041446630 2472
+1041474863 0 c acme/mail/src/mesg.c - 664 sys sys 1041474760 26262
+1041481459 0 c acme/mail/src/mail.c - 664 sys sys 1041481453 10994
+1041481459 1 c acme/mail/src/mesg.c - 664 sys sys 1041481453 26236
+1041481703 0 c acme/mail/386/Mail - 775 sys sys 1041481688 175845

File diff suppressed because it is too large
+ 170 - 60
sys/lib/man/lookman/index


+ 3 - 40
sys/man/1/INDEX

@@ -49,14 +49,6 @@ win acme
 ar ar
 ascii ascii
 unicode ascii
-aviation aviation
-dist aviation
-fd aviation
-ft aviation
-jepget aviation
-path aviation
-sa aviation
-wx aviation
 awk awk
 basename basename
 bc bc
@@ -76,15 +68,11 @@ cat cat
 read cat
 chgrp chgrp
 chmod chmod
-cj cj
 cleanname cleanname
 cmp cmp
 colors colors
 getmap colors
 comm comm
-compress compress
-uncompress compress
-zcat compress
 con con
 rx con
 telnet con
@@ -104,13 +92,11 @@ dd dd
 delatex deroff
 deroff deroff
 diff diff
-distill distill
 doc2txt doc2txt
 mswordstrings doc2txt
 olefs doc2txt
 doctype doctype
 du du
-dup dup
 echo echo
 ed ed
 emacs emacs
@@ -130,19 +116,6 @@ fmt fmt
 htmlfmt fmt
 fortune fortune
 freq freq
-4s games
-5s games
-ana games
-catclock games
-clock games
-festoon games
-fireworks games
-fsim games
-games games
-life games
-mandel games
-smiley games
-swar games
 grap grap
 graph graph
 grep grep
@@ -173,10 +146,6 @@ ktrace ktrace
 leak leak
 lens lens
 lex lex
-capture lml
-grab lml
-lml lml
-playback lml
 look look
 lp lp
 lc ls
@@ -201,12 +170,6 @@ news news
 nm nm
 ns ns
 p p
-pac pac
-pac1dec pac
-pac2dec pac
-pac3dec pac
-pac4dec pac
-pacenc pac
 page page
 iam passwd
 netkey passwd
@@ -217,9 +180,6 @@ tpic pic
 pipefile pipefile
 plot plot
 plumb plumb
-pq pq
-pqgen pq
-pqsrv pq
 pr pr
 kprof prof
 prof prof
@@ -227,6 +187,8 @@ tprof prof
 proof proof
 ps ps
 psu ps
+pdf2ps ps2pdf
+ps2pdf ps2pdf
 pbd pwd
 pwd pwd
 . rc
@@ -257,6 +219,7 @@ B sam
 sam sam
 sam.save sam
 aescbc secstore
+ipso secstore
 secstore secstore
 sed sed
 seq seq

+ 38 - 3
sys/man/2/INDEX

@@ -360,11 +360,20 @@ string draw
 stringbg draw
 stringn draw
 stringnbg draw
+dsa dsa
+dsagen dsa
+dsaprivalloc dsa
+dsaprivfree dsa
+dsaprivtopub dsa
+dsapuballoc dsa
+dsapubfree dsa
+dsasigalloc dsa
+dsasigfree dsa
+dsasign dsa
+dsaverify dsa
 dup dup
-egalloc elgamal
 egdecrypt elgamal
 egencrypt elgamal
-egfree elgamal
 eggen elgamal
 egprivalloc elgamal
 egprivfree elgamal
@@ -440,6 +449,7 @@ fcall fcall
 fcallfmt fcall
 read9pmsg fcall
 sizeD2M fcall
+sizeS2M fcall
 statcheck fcall
 fd2path fd2path
 fgetc fgetc
@@ -652,6 +662,7 @@ hunload httpd
 hurlfmt httpd
 hurlunesc httpd
 hversion httpd
+hvprint httpd
 hwrite httpd
 hxferenc httpd
 hypot hypot
@@ -663,6 +674,16 @@ freemap intmap
 insertkey intmap
 intmap intmap
 lookupkey intmap
+closeioproc ioproc
+iocall ioproc
+ioclose ioproc
+iodial ioproc
+iointerrupt ioproc
+ioopen ioproc
+ioproc ioproc
+ioread ioproc
+ioreadn ioproc
+iowrite ioproc
 iounit iounit
 defmask ip
 eipfmt ip
@@ -905,6 +926,7 @@ dnsquery ndb
 ipattr ndb
 ndb ndb
 ndbcat ndb
+ndbchanged ndb
 ndbclose ndb
 ndbfree ndb
 ndbgetval ndb
@@ -1057,7 +1079,21 @@ rregexec regexp
 rregsub regexp
 remove remove
 rendezvous rendezvous
+X509gen rsa
+X509toRSApub rsa
+X509verify rsa
+asn1dump rsa
+asn1toRSApriv rsa
+decodepem rsa
 rsa rsa
+rsadecrypt rsa
+rsaencrypt rsa
+rsagen rsa
+rsaprivalloc rsa
+rsaprivfree rsa
+rsaprivtopub rsa
+rsapuballoc rsa
+rsapubfree rsa
 chartorune rune
 fullrune rune
 rune rune
@@ -1249,7 +1285,6 @@ threadkillgrp thread
 threadmain thread
 threadnotify thread
 threadpid thread
-threadprint thread
 threadsetgrp thread
 threadsetname thread
 threadwaitchan thread

+ 1 - 0
sys/man/3/INDEX

@@ -10,6 +10,7 @@ dup dup
 env env
 ether ether
 floppy floppy
+fs fs
 i82365 i82365
 ip ip
 kprof kprof

+ 2 - 0
sys/man/4/INDEX

@@ -31,6 +31,7 @@ keyfs keyfs
 warning keyfs
 kfs kfs
 lnfs lnfs
+mntgen mntgen
 namespace namespace
 nntpfs nntpfs
 paqfs paqfs
@@ -45,6 +46,7 @@ snapfs snap
 9fs srv
 srv srv
 srvold9p srv
+srvssh srv
 32vfs tapefs
 cpiofs tapefs
 tapefs tapefs

+ 18 - 10
sys/man/8/INDEX

@@ -6,7 +6,7 @@ ld 9load
 aliasmail aliasmail
 apm apm
 auth auth
-auth.srv auth
+authsrv auth
 changeuser auth
 convkeys auth
 convkeys2 auth
@@ -19,26 +19,22 @@ status auth
 wrkey auth
 boot boot
 booting booting
-buildindex buildindex
 checkarenas checkarenas
-checkindex checkindex
 cpurc cpurc
 termrc cpurc
 cron cron
 dhcpd dhcpd
+dhcpleases dhcpd
 rarpd dhcpd
 tftpd dhcpd
 drawterm drawterm
-fmtarenas fmtarenas
-fmtindex fmtindex
-fmtisect fmtisect
 exsort fs
 fs fs
 fsconfig fsconfig
-echo httpd
 httpd httpd
 imagemap httpd
 man2html httpd
+mirror httpd
 save httpd
 init init
 ipconfig ipconfig
@@ -127,7 +123,6 @@ mbr prep
 prep prep
 qer qer
 runq qer
-rdarena rdarena
 reboot reboot
 applychanges replica
 applylog replica
@@ -142,8 +137,6 @@ secstored secstore
 secuser secstore
 securenet securenet
 send send
-imap4d smtp
-pop3 smtp
 smtp smtp
 smtpd smtp
 snoopy snoopy
@@ -165,4 +158,19 @@ setup.disk update
 setup.kfs update
 update update
 venti venti
+buildindex ventiaux
+checkarenas ventiaux
+checkindex ventiaux
+copy ventiaux
+fmtarenas ventiaux
+fmtindex ventiaux
+fmtisect ventiaux
+rdarena ventiaux
+rdarenablocks ventiaux
+read ventiaux
+ventiaux ventiaux
+wrarenablocks ventiaux
+write ventiaux
 vga vga
+X509gen x509
+x509 x509

+ 1 - 0
sys/src/9/pc/main.c

@@ -684,6 +684,7 @@ isaconfig(char *class, int ctlrno, ISAConf *isa)
 	if(p == nil)
 		return 0;
 
+	isa->type = "";
 	isa->nopt = tokenize(p, isa->opt, NISAOPT);
 	for(i = 0; i < isa->nopt; i++){
 		p = isa->opt[i];

+ 13 - 0
sys/src/9/port/devmnt.c

@@ -482,6 +482,19 @@ mntstat(Chan *c, uchar *dp, int n)
 		error("returned stat buffer count too large");
 
 	if(r->reply.nstat > n){
+		/*
+		 * 12/31/2002 RSC
+		 * 
+		 * This should be nstat-2, which is the first two
+		 * bytes of the stat buffer.  But dirstat and dirfstat
+		 * depended on getting the full nstat (they didn't
+		 * add BIT16SZ themselves).  I fixed dirstat and dirfstat
+		 * but am leaving this unchanged for now.  After a
+		 * few months, once enough of the relevant binaries
+		 * have been recompiled for other reasons, we can
+		 * change this to nstat-2.  Devstat gets this right
+		 * (via convD2M).
+		 */
 		/* doesn't fit; just patch the count and return */
 		PBIT16((uchar*)dp, r->reply.nstat);
 		n = BIT16SZ;

+ 4 - 4
sys/src/libthread/example.c

@@ -28,11 +28,11 @@ mouseproc(void *arg)
 	if((mfd = open("/dev/mouse", OREAD)) < 0)
 		sysfatal("open /dev/mouse: %r\en");
 	for(;;){
-		if(read(mfd, &m, sizeof m) != sizeof m)
+		if(read(mfd, m, sizeof m) != sizeof m)
 			sysfatal("eof");
 		if(atoi(m+1+2*12)&4)
 			sysfatal("button 3");
-		send(mousechan, &m);
+		send(mc, m);
 	}
 }
 
@@ -64,11 +64,11 @@ threadmain(int argc, char *argv[])
 
 	/* create mouse event channel and mouse process */
 	a[0].c = chancreate(sizeof m, 0);
-	proccreate(mouseproc, a[0].c, STACKSIZE);
+	proccreate(mouseproc, a[0].c, STACK);
 
 	/* create clock event channel and clock process */
 	a[1].c = chancreate(sizeof(ulong), 0);	/* clock event channel */
-	proccreate(clockproc, a[1].c, STACKSIZE);
+	proccreate(clockproc, a[1].c, STACK);
 
 	for(;;){
 		switch(alt(a)){

Some files were not shown because too many files changed in this diff