Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0310/1

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


awk: fix printf("%c", 0) and the utf() function.
 [rsc] --rw-rw-r-- M 357477 glenda sys 12346 Mar 10 10:41 sys/src/cmd/awk/lex.c
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/awk/lex.c:86,93 - 
	/n/sourcesdump/2006/0311/plan9/sys/src/cmd/awk/lex.c:86,93
	  	{ "system",	FSYSTEM,	BLTIN },
	  	{ "tolower",	FTOLOWER,	BLTIN },
	  	{ "toupper",	FTOUPPER,	BLTIN },
	- 	{ "while",	WHILE,		WHILE },
	  	{ "utf",	FUTF,		BLTIN },
	+ 	{ "while",	WHILE,		WHILE },
	  };
	  
	  #define DEBUG
 [rsc] --rw-rw-r-- M 357477 glenda sys 42795 Mar 10 11:44 sys/src/cmd/awk/run.c
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/awk/run.c:903,910 - 
	/n/sourcesdump/2006/0311/plan9/sys/src/cmd/awk/run.c:903,912
	  			if (isnum(x)) {
	  				if (getfval(x))
	  					sprintf(p, fmt, (int) getfval(x));
	- 				else
	+ 				else{
	  					*p++ = '\0';
	+ 					*p = '\0';
	+ 				}
	  			} else
	  				sprintf(p, fmt, getsval(x)[0]);
	  			break;


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.