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

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


Make compile again.
 [rsc] --rw-rw-r-- M 1146153 glenda sys 4800 Dec 30 11:34 acme/bin/source/adict/win.c
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:9,15 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:9,15
	  {
	  	p = realloc(p, n);
	  	if(p == nil)
	- 		threadprint(2, "realloc failed: %r");
	+ 		fprint(2, "realloc failed: %r");
	  	return p;
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:20,26 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:20,26
	  
	  	w->ctl = open("/mnt/acme/new/ctl", ORDWR);
	  	if(w->ctl<0 || read(w->ctl, buf, 12)!=12)
	- 		 threadprint (2, "can't open window ctl file: %r");
	+ 		 fprint (2, "can't open window ctl file: %r");
	  	ctlwrite(w, "noscroll\n");
	  	w->winid = atoi(buf);
	  	w->event = openfile(w, "event");
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:38,44 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:38,44
	  	sprint(buf, "/mnt/acme/%d/%s", w->winid, f);
	  	fd = open(buf, ORDWR|OCEXEC);
	  	if(fd < 0)
	- 		 threadprint (2,"can't open window %s file: %r", f);
	+ 		 fprint (2,"can't open window %s file: %r", f);
	  	return fd;
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:50,56 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:50,56
	  	sprint(buf, "/mnt/acme/%d/body", w->winid);
	  	w->body = Bopen(buf, mode|OCEXEC);
	  	if(w->body == nil)
	- 		 threadprint(2,"can't open window body file: %r");
	+ 		 fprint(2,"can't open window body file: %r");
	  }
	  
	  void
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:59,65 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:59,65
	  	if(w->body == nil)
	  		openbody(w, OWRITE);
	  	if(Bwrite(w->body, s, n) != n)
	- 		  threadprint(2,"write error to window: %r");
	+ 		  fprint(2,"write error to window: %r");
	  	Bflush(w->body);
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:71,81 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:71,81
	  	if(w->data < 0)
	  		w->data = openfile(w, "data");
	  	if(write(w->addr, addr, strlen(addr)) < 0){
	- 		threadprint(2, "mail: warning: badd address %s:%r\n", addr);
	+ 		fprint(2, "mail: warning: badd address %s:%r\n", addr);
	  		return;
	  	}
	  	if(write(w->data, repl, nrepl) != nrepl)
	- 		 threadprint(2, "writing data: %r");
	+ 		 fprint(2, "writing data: %r");
	  }
	  
	  static int
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:104,113 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:104,113
	  	while(m < q1){
	  		n = sprint(buf, "#%d", m);
	  		if(write(w->addr, buf, n) != n)
	- 			  threadprint(2,"writing addr: %r");
	+ 			  fprint(2,"writing addr: %r");
	  		n = read(w->data, buf, sizeof buf);
	  		if(n <= 0)
	- 			  threadprint(2,"reading data: %r");
	+ 			  fprint(2,"reading data: %r");
	  		nr = nrunes(buf, n);
	  		while(m+nr >q1){
	  			do; while(n>0 && (buf[--n]&0xC0)==0x80);
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:128,134 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:128,134
	  	if(w->addr < 0)
	  		w->addr = openfile(w, "addr");
	  	if(write(w->addr, addr, strlen(addr)) < 0)
	- 		  threadprint(2,"writing addr");
	+ 		  fprint(2,"writing addr");
	  	ctlwrite(w, "dot=addr\n");
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:139,145 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:139,145
	  
	  	fd = openfile(w, "tag");
	  	if(write(fd, s, n) != n)
	- 		  threadprint(2,"tag write: %r");
	+ 		  fprint(2,"tag write: %r");
	  	close(fd);
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:150,156 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:150,156
	  
	  	n = strlen(s);
	  	if(write(w->ctl, s, n) != n)
	- 		 threadprint(2,"write error to ctl file: %r");
	+ 		 fprint(2,"write error to ctl file: %r");
	  }
	  
	  int
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:206,212 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:206,212
	  	if(w->nbuf == 0){
	  		w->nbuf = read(w->event, w->buf, sizeof w->buf);
	  		if(w->nbuf <= 0)
	- 			  threadprint(2,"event read error: %r");
	+ 			  fprint(2,"event read error: %r");
	  		w->bufp = w->buf;
	  	}
	  	w->nbuf--;
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:222,228 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:222,228
	  	while('0'<=(c=getec(w)) && c<='9')
	  		n = n*10+(c-'0');
	  	if(c != ' ')
	- 		 threadprint(2, "event number syntax");
	+ 		 fprint(2, "event number syntax");
	  	return n;
	  }
	  
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:258,264 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:258,264
	  	e->flag = geten(w);
	  	e->nr = geten(w);
	  	if(e->nr > EVENTSIZE)
	- 		  threadprint(2, "wevent: event string too long");
	+ 		  fprint(2, "wevent: event string too long");
	  	e->nb = 0;
	  	for(i=0; i<e->nr; i++){
	  		e->r[i] = geter(w, e->b+e->nb, &nb);
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:267,273 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:267,273
	  	e->r[e->nr] = 0;
	  	e->b[e->nb] = 0;
	  	if(getec(w) != '\n')
	- 		 threadprint(2, "wevent: event syntax 2");
	+ 		 fprint(2, "wevent: event syntax 2");
	  }
	  
	  void
	/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:282,288 - 
	/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:282,288
	  void
	  wwriteevent(Win *w, Event *e)
	  {
	- 	threadprint(w->event, "%c%c%d %d\n", e->c1, e->c2, e->q0, e->q1);
	+ 	fprint(w->event, "%c%c%d %d\n", e->c1, e->c2, e->q0, e->q1);
	  }
	  
	  int


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].