Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/9

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


64-bit fixes
 [jmk] --rw-rw-r-- M 107020 glenda sys 3752 Nov 19 20:04 sys/src/cmd/rc/io.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/io.c:28,34 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/io.c:28,35
	  			poct(f, va_arg(ap, unsigned));
	  			break;
	  		case 'p':
	- 			phex(f, (long)va_arg(ap, char *)); break; /*unportable*/
	+ 			pptr(f, va_arg(ap, void*));
	+ 			break;
	  		case 'Q':
	  			pquo(f, va_arg(ap, char *));
	  			break;
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/io.c:94,102 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/io.c:95,109
	  }
	  
	  void
	- phex(io *f, long p)
	+ pptr(io *f, void *v)
	  {
	  	int n;
	+ 	uintptr p;
	+ 
	+ 	p = (uintptr)v;
	+ 	if(sizeof(uintptr) == sizeof(uvlong) && p>>32)
	+ 		for(n = 60;n>=32;n-=4) pchr(f, "0123456789ABCDEF"[(p>>n)&0xF]);
	+ 
	  	for(n = 28;n>=0;n-=4) pchr(f, "0123456789ABCDEF"[(p>>n)&0xF]);
	  }
	  
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/io.c:109,115 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/io.c:116,122
	  }
	  
	  void
	- pdec(io *f, long n)
	+ pdec(io *f, int n)
	  {
	  	if(n<0){
	  		n=-n;
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/io.c:131,137 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/io.c:138,144
	  }
	  
	  void
	- poct(io *f, ulong n)
	+ poct(io *f, unsigned n)
	  {
	  	if(n>7)
	  		poct(f, n>>3);
 [jmk] --rw-rw-r-- M 107020 glenda sys 535 Nov 19 20:04 sys/src/cmd/rc/io.h
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/io.h:13,21 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/io.h:13,21
	  void closeio(io*);
	  void flush(io*);
	  int fullbuf(io*, int);
	- void pdec(io*, long);
	- void poct(io*, ulong);
	- void phex(io*, long);
	+ void pdec(io*, int);
	+ void poct(io*, unsigned);
	+ void pptr(io*, void*);
	  void pquo(io*, char*);
	  void pwrd(io*, char*);
	  void pstr(io*, char*);
 [jmk] --rw-rw-r-- M 107020 glenda sys 9330 Nov 19 20:04 sys/src/cmd/rc/plan9.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/plan9.c:350,356 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/plan9.c:350,356
	  int
	  Globsize(char *p)
	  {
	- 	ulong isglob = 0, globlen = NDIR+1;
	+ 	int isglob = 0, globlen = NDIR+1;
	  	for(;*p;p++){
	  		if(*p==GLOB){
	  			p++;
 [jmk] --rw-rw-r-- M 107020 rsc sys 8697 Nov 19 20:04 sys/src/cmd/rc/win32.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/rc/win32.c:307,313 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/rc/win32.c:307,313
	  int
	  Globsize(char *p)
	  {
	- 	ulong isglob = 0, globlen = NDIR+1;
	+ 	int isglob = 0, globlen = NDIR+1;
	  	for(;*p;p++){
	  		if(*p==GLOB){
	  			p++;


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.