Plan 9 from Bell Labs’s /usr/web/sources/extra/changes/2005/1104

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


devmnt: ignore zero-length blocks.
devssl: don't generate zero-length blocks.
 [rsc] --rw-rw-r-- M 323293 glenda sys 21549 Nov  4 07:39 sys/src/9/port/devmnt.c
	/n/sourcesdump/2005/1104/plan9/sys/src/9/port/devmnt.c:850,856 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/9/port/devmnt.c:850,856
	  		b = devtab[m->c->type]->bread(m->c, m->msize, 0);
	  		if(b == nil)
	  			return -1;
	- 		if(BLEN(b) == 0){
	+ 		if(blocklen(b) == 0){
	  			freeblist(b);
	  			return -1;
	  		}
 [rsc] --rw-rw-r-- M 323293 glenda sys 26133 Nov  4 07:39 sys/src/9/port/devssl.c
	/n/sourcesdump/2005/1104/plan9/sys/src/9/port/devssl.c:618,624 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/9/port/devssl.c:618,625
	  			if(b == nil)
	  				error("ssl message too short (digesting)");
	  			checkdigestb(s, b);
	- 			b->rp += s->diglen;
	+ 			pullblock(&b, s->diglen);
	+ 			len -= s->diglen;
	  			break;
	  		case Sdigenc:
	  			b = decryptb(s, b);
	/n/sourcesdump/2005/1104/plan9/sys/src/9/port/devssl.c:626,632 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/9/port/devssl.c:627,633
	  			if(b == nil)
	  				error("ssl message too short (dig+enc)");
	  			checkdigestb(s, b);
	- 			b->rp += s->diglen;
	+ 			pullblock(&b, s->diglen);
	  			len -= s->diglen;
	  			break;
	  		}

Document mouse buttons.
 [rsc] --rw-rw-r-- M 323293 presotto sys 1732 Nov  4 08:15 sys/man/3/kbmap
	/n/sourcesdump/2005/1104/plan9/sys/man/3/kbmap:46,58 - 
	/n/sourcesdump/2005/1105/plan9/sys/man/3/kbmap:46,61
	  .IR utf (6)),
	  or as 
	  .BI ^ X
	- to represent a control character or as
	- .BI M n
	- to represent a mouse button.
	+ to represent a control character.
	  .PP
	+ The Unicode character can also be
	+ .BI M n
	+ to represent mouse button
	+ .IR n .
	  The map
	  .B /sys/lib/kbmap/mouse-fn
	- maps the F1, F2, and F3 keys to the three mouse buttons.
	+ maps the F1 through F5 keys to the three mouse buttons and the two
	+ scroll wheel buttons.
	  Similarly, 
	  .B mouse-csa
	  maps the left Control, Start, and Alt keys to the three mouse buttons.

Fix dependencies on lib.$O.a for parallel builds.
 [rsc] --rw-rw-r-- M 323293 glenda sys 1877 Nov  4 08:19 sys/src/cmd/auth/mkfile
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/auth/mkfile:118,128 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/auth/mkfile:118,128
	  	mk nukedirs
	  	rm -f *.[$OS] *.[$OS].a [$OS].* y.tab.? y.debug y.output $TARG *.acid
	  
	- $O.authsrv: lib.$O.a authsrv.$O secureidcheck.$O
	- 	$LD -o $O.authsrv $prereq
	+ $O.%: lib.$O.a
	+ $O.rsa2ssh $O.rsafill $O.rsa2x509 $O.rsa2pub $O.rsa2csr: rsa2any.$O
	+ $O.authsrv $O.guard.srv: secureidcheck.$O
	  
	- $O.guard.srv: lib.$O.a guard.srv.$O secureidcheck.$O
	- 	$LD -o $O.guard.srv $prereq
	+ rsa2ssh.$O rsafill.$O rsa2x509.$O rsa2pub.$O rsa2csr.$O: rsa2any.h
	  
	  $BIN/netkey:V:	$O.netkey
	  	cp $O.netkey /$objtype/bin/netkey
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/auth/mkfile:138,144 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/auth/mkfile:138,141
	  
	  $BIN/disable:V:
	  	cp disable $target
	- 
	- $O.rsa2ssh $O.rsafill $O.rsa2x509 $O.rsa2pub $O.rsa2csr: rsa2any.$O
	- rsa2ssh.$O rsafill.$O rsa2x509.$O rsa2pub.$O rsa2csr.$O: rsa2any.h
	  

Add statusbar, httpfile.
 [rsc] --rw-rw-r-- M 323293 glenda sys 992 Nov  4 08:21 sys/src/cmd/aux/mkfile
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/aux/mkfile:27,32 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/aux/mkfile:27,33
	  	rdwr\
	  	reboot\
	  	searchfs\
	+ 	statusbar\
	  	stub\
	  	timesync\
	  	trampoline\
 [rsc] --rw-rw-r-- M 323293 glenda sys 1243 Nov  4 08:23 sys/src/cmd/ip/mkfile
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/ip/mkfile:4,9 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/ip/mkfile:4,10
	  	ftpd\
	  	gping\
	  	hogports\
	+ 	httpfile\
	  	ipconfig\
	  	ping\
	  	pppoe\

Add statusbar.
 [rsc] --rw-rw-r-- M 323293 rsc sys 6015 Nov  4 08:21 sys/src/cmd/aux/statusbar.c

Use offset 0 in #v/vgabios.
 [rsc] --rw-rw-r-- M 323293 glenda sys 6329 Nov  4 08:20 sys/src/cmd/aux/vga/io.c
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/aux/vga/io.c:11,16 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/aux/vga/io.c:11,17
	  static int iowfd = -1;
	  static int iolfd = -1;
	  static int biosfd = -1;
	+ static ulong biosoffset = 0;
	  
	  enum {
	  	Nctlchar	= 256,
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/aux/vga/io.c:202,215 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/aux/vga/io.c:203,220
	  {
	  	char file[64];
	  
	- 	if(biosfd == -1)
	+ 	if(biosfd == -1){
	  		biosfd = open("#v/vgabios", OREAD);
	- 	if(biosfd == -1) {
	+ 		biosoffset = 0;
	+ 	}
	+ 	if(biosfd == -1){
	  		snprint(file, sizeof file, "#p/%d/mem", getpid());
	  		biosfd = devopen(file, OREAD);
	+ 		biosoffset = 0x80000000;
	  	}
	- 
	- 	seek(biosfd, 0x80000000|offset, 0);
	+ 	if(biosfd == -1)
	+ 		return -1;
	+ 	seek(biosfd, biosoffset+offset, 0);
	  	return read(biosfd, buf, len);
	  }
	  

Buffer warning/error outputs to avoid interlacing in parallel mk.
 [rsc] --rw-rw-r-- M 323293 glenda sys 12071 Nov  4 08:20 sys/src/cmd/cc/cc.h
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/cc.h:449,454 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/cc.h:449,455
	  EXTERN	Node*	nodproto;
	  EXTERN	Node*	nodcast;
	  EXTERN	Biobuf	outbuf;
	+ EXTERN	Biobuf	diagbuf;
	  EXTERN	char*	outfile;
	  EXTERN	char*	pathname;
	  EXTERN	int	peekc;
 [rsc] --rw-rw-r-- M 323293 glenda sys 34138 Nov  4 08:20 sys/src/cmd/cc/sub.c
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/sub.c:1159,1168 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/sub.c:1159,1170
	  	va_start(arg, fmt);
	  	vseprint(buf, buf+sizeof(buf), fmt, arg);
	  	va_end(arg);
	- 	print("%L %s\n", (n==Z)? nearln: n->lineno, buf);
	+ 	Bprint(&diagbuf, "%L %s\n", (n==Z)? nearln: n->lineno, buf);
	  
	- 	if(debug['X'])
	+ 	if(debug['X']){
	+ 		Bflush(&diagbuf);
	  		abort();
	+ 	}
	  	if(n != Z)
	  	if(debug['v'])
	  		prtree(n, "diagnostic");
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/sub.c:1169,1175 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/sub.c:1171,1177
	  
	  	nerrors++;
	  	if(nerrors > 10) {
	- 		print("too many errors\n");
	+ 		Bprint(&diagbuf, "too many errors\n");
	  		errorexit();
	  	}
	  }
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/sub.c:1181,1191 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/sub.c:1183,1193
	  	va_list arg;
	  
	  	if(debug['w']) {
	- 		print("warning: ");
	+ 		Bprint(&diagbuf, "warning: ");
	  		va_start(arg, fmt);
	  		vseprint(buf, buf+sizeof(buf), fmt, arg);
	  		va_end(arg);
	- 		print("%L %s\n", (n==Z)? nearln: n->lineno, buf);
	+ 		Bprint(&diagbuf, "%L %s\n", (n==Z)? nearln: n->lineno, buf);
	  
	  		if(n != Z)
	  		if(debug['v'])
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/sub.c:1209,1218 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/sub.c:1211,1220
	  	va_start(arg, fmt);
	  	vseprint(buf, buf+sizeof(buf), fmt, arg);
	  	va_end(arg);
	- 	print("%L %s\n", lineno, buf);
	+ 	Bprint(&diagbuf, "%L %s\n", lineno, buf);
	  	nerrors++;
	  	if(nerrors > 10) {
	- 		print("too many errors\n");
	+ 		Bprint(&diagbuf, "too many errors\n");
	  		errorexit();
	  	}
	  }
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/cc/sub.c:1226,1235 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/cc/sub.c:1228,1239
	  	va_start(arg, fmt);
	  	vseprint(buf, buf+sizeof(buf), fmt, arg);
	  	va_end(arg);
	- 	print("%L %s\n", (n==Z)? nearln: n->lineno, buf);
	+ 	Bprint(&diagbuf, "%L %s\n", (n==Z)? nearln: n->lineno, buf);
	  
	- 	if(debug['X'])
	+ 	if(debug['X']){
	+ 		Bflush(&diagbuf);
	  		abort();
	+ 	}
	  	if(n != Z)
	  	if(debug['v'])
	  		prtree(n, "diagnostic");

Your text here.
 [rsc] --rw-rw-r-- M 323293 rsc sys 3791 Nov  4 08:14 sys/src/cmd/fcp.c
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/fcp.c:201,207 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/fcp.c:201,207
	  
	  	while(n = pread(fdf, bp, len, o)){
	  		if(n < 0){
	- 			fprint(2, "reading %s: %r\n", from);
	+ 			fprint(2, "reading %s at %lld: %r\n", from, o);
	  			_exits("bad");
	  		}
	  		if(pwrite(fdt, buf, n, o) != n){

64-bit safe.
 [rsc] --rw-rw-r-- M 323293 glenda sys 13457 Nov  4 08:15 sys/src/cmd/bc.y
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:6,13 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:6,13
	  	#define	bsp_max	5000
	  
	  	Biobuf	*in;
	- 	Biobuf	stdin;
	- 	Biobuf	stdout;
	+ 	Biobuf	bstdin;
	+ 	Biobuf	bstdout;
	  	char	cary[1000];
	  	char*	cp = { cary };
	  	char	string[1000];
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:17,23 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:17,23
	  	int	bindx = 0;
	  	int	lev = 0;
	  	int	ln;
	- 	int*	ttp;
	+ 	char*	ttp;
	  	char*	ss = "";
	  	int	bstack[10] = { 0 };
	  	char*	numb[15] =
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:26,33 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:26,33
	  		" 6", " 7", " 8", " 9", " 10", " 11",
	  		" 12", " 13", " 14"
	  	};
	- 	int*	pre;
	- 	int*	post;
	+ 	char*	pre;
	+ 	char*	post;
	  
	  	long	peekc = -1;
	  	int	sargc;
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:59,81 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:59,81
	  		"u","v","w","x","y","z"
	  	};
	  	char*	dot = { "." };
	- 	int	bspace[bsp_max];
	- 	int*	bsp_nxt = { bspace };
	+ 	char*	bspace[bsp_max];
	+ 	char**	bsp_nxt = bspace;
	  	int	bdebug = 0;
	  	int	lflag;
	  	int	cflag;
	  	int	sflag;
	  
	- 	int*	bundle(int, ...);
	- 	void	conout(int*, char*);
	+ 	char*	bundle(int, ...);
	+ 	void	conout(char*, char*);
	  	int	cpeek(int, int, int);
	  	int	getch(void);
	- 	int*	geta(char*);
	- 	int*	getf(char*);
	+ 	char*	geta(char*);
	+ 	char*	getf(char*);
	  	void	getout(void);
	- 	void	output(int*);
	+ 	void	output(char*);
	  	void	pp(char*);
	- 	void	routput(int*);
	+ 	void	routput(char*);
	  	void	tp(char*);
	  	void	yyerror(char*, ...);
	  	int	yyparse(void);
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:86,98 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:86,97
	  %}
	  %union
	  {
	- 	int*	iptr;
	  	char*	cptr;
	  	int	cc;
	  }
	  
	- %type	<iptr>	pstat stat stat1 def slist dlets e ase nase
	- %type	<iptr>	slist re fprefix cargs eora cons constant lora
	+ %type	<cptr>	pstat stat stat1 def slist dlets e ase nase
	+ %type	<cptr>	slist re fprefix cargs eora cons constant lora
	  %type	<cptr>	crs
	  
	  %token	<cptr>	LETTER EQOP _AUTO DOT
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:122,128 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:121,127
	  		ttp = bundle(6, pre, $6, post , "0", numb[lev], "Q");
	  		conout(ttp, (char*)$1);
	  		rcrs = crs;
	- 		output((int*)"");	/* this is horse puk!! */
	+ 		output("");
	  		lev = bindx = 0;
	  	}
	  
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:548,555 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:547,554
	  	_DEFINE LETTER '('
	  	{
	  		$$ = getf($2);
	- 		pre = (int*)"";
	- 		post = (int*)"";
	+ 		pre = (char*)"";
	+ 		post = (char*)"";
	  		lev = 1;
	  		bindx = 0;
	  		bstack[bindx] = 0;
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:791,797 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:790,796
	  	if(ifile > sargc) {
	  		if(ifile >= sargc+2)
	  			getout();
	- 		in = &stdin;
	+ 		in = &bstdin;
	  		Binit(in, 0, OREAD);
	  		ln = 0;
	  		goto loop;
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:807,819 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:806,820
	  	return 0;		/* shut up ken */
	  }
	  
	- int*
	+ char*
	  bundle(int a, ...)
	  {
	- 	int i, *p, *q;
	- 
	- 	p = &a;
	- 	i = *p++;
	+ 	int i;
	+ 	char **q;
	+ 	va_list arg;
	+ 	
	+ 	i = a;
	+ 	va_start(arg, a);
	  	q = bsp_nxt;
	  	if(bdebug)
	  		fprint(2, "bundle %d elements at %lx\n", i, q);
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:820,863 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:821,868
	  	while(i-- > 0) {
	  		if(bsp_nxt >= &bspace[bsp_max])
	  			yyerror("bundling space exceeded");
	- 		*bsp_nxt++ = *p++;
	+ 		*bsp_nxt++ = va_arg(arg, char*);
	  	}
	  	*bsp_nxt++ = 0;
	- 	yyval.iptr = q;
	- 	return q;
	+ 	va_end(arg);
	+ 	yyval.cptr = (char*)q;
	+ 	return (char*)q;
	  }
	  
	  void
	- routput(int *p)
	+ routput(char *p)
	  {
	+ 	char **pp;
	+ 	
	  	if(bdebug)
	  		fprint(2, "routput(%lx)\n", p);
	- 	if(p >= &bspace[0] && p < &bspace[bsp_max]) {
	+ 	if((char**)p >= &bspace[0] && (char**)p < &bspace[bsp_max]) {
	  		/* part of a bundle */
	- 		while(*p != 0)
	- 			routput((int*)(*p++));
	+ 		pp = (char**)p;
	+ 		while(*pp != 0)
	+ 			routput(*pp++);
	  	} else
	- 		Bprint(&stdout, (char*)p);	/* character string */
	+ 		Bprint(&bstdout, p);	/* character string */
	  }
	  
	  void
	- output(int *p)
	+ output(char *p)
	  {
	  	routput(p);
	  	bsp_nxt = &bspace[0];
	- 	Bprint(&stdout, "\n");
	- 	Bflush(&stdout);
	+ 	Bprint(&bstdout, "\n");
	+ 	Bflush(&bstdout);
	  	cp = cary;
	  	crs = rcrs;
	  }
	  
	  void
	- conout(int *p, char *s)
	+ conout(char *p, char *s)
	  {
	- 	Bprint(&stdout, "[");
	+ 	Bprint(&bstdout, "[");
	  	routput(p);
	- 	Bprint(&stdout, "]s%s\n", s);
	- 	Bflush(&stdout);
	+ 	Bprint(&bstdout, "]s%s\n", s);
	+ 	Bflush(&bstdout);
	  	lev--;
	  }
	  
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:866,873 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:871,878
	  {
	  	if(ifile > sargc)
	  		ss = "teletype";
	- 	Bprint(&stdout, "c[%s on line %d, %s]pc\n", s, ln+1, ss);
	- 	Bflush(&stdout);
	+ 	Bprint(&bstdout, "c[%s on line %d, %s]pc\n", s, ln+1, ss);
	+ 	Bflush(&bstdout);
	  	cp = cary;
	  	crs = rcrs;
	  	bindx = 0;
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:880,888 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:885,893
	  {
	  	/* puts the relevant stuff on pre and post for the letter s */
	  	bundle(3, "S", s, pre);
	- 	pre = yyval.iptr;
	+ 	pre = yyval.cptr;
	  	bundle(4, post, "L", s, "s.");
	- 	post = yyval.iptr;
	+ 	post = yyval.cptr;
	  }
	  
	  void
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:890,908 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:895,913
	  {
	  	/* same as pp, but for temps */
	  	bundle(3, "0S", s, pre);
	- 	pre = yyval.iptr;
	+ 	pre = yyval.cptr;
	  	bundle(4, post, "L", s, "s.");
	- 	post = yyval.iptr;
	+ 	post = yyval.cptr;
	  }
	  
	  void
	  yyinit(int argc, char **argv)
	  {
	- 	Binit(&stdout, 1, OWRITE);
	+ 	Binit(&bstdout, 1, OWRITE);
	  	sargv = argv;
	  	sargc = argc - 1;
	  	if(sargc == 0) {
	- 		in = &stdin;
	+ 		in = &bstdin;
	  		Binit(in, 0, OREAD);
	  	} else if((in = Bopen(sargv[1], OREAD)) == 0)
	  		yyerror("cannot open input file");
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/bc.y:914,934 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/bc.y:919,939
	  void
	  getout(void)
	  {
	- 	Bprint(&stdout, "q");
	- 	Bflush(&stdout);
	+ 	Bprint(&bstdout, "q");
	+ 	Bflush(&bstdout);
	  	exits(0);
	  }
	  
	- int*
	+ char*
	  getf(char *p)
	  {
	- 	return (int*)funtab[*p - 'a'];
	+ 	return funtab[*p - 'a'];
	  }
	  
	- int*
	+ char*
	  geta(char *p)
	  {
	- 	return (int*)atab[*p - 'a'];
	+ 	return atab[*p - 'a'];
	  }
	  
	  void


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.