Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0320/3

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


libdraw: handle displayless font access
 [rsc] --rw-rw-r-- M 898628 glenda sys 4179 Mar 20 08:53 sys/src/libdraw/alloc.c
	/n/sourcesdump/2006/0320/plan9/sys/src/libdraw/alloc.c:201,207 - 
	/n/sourcesdump/2006/0321/plan9/sys/src/libdraw/alloc.c:201,207
	  	Display *d;
	  	Image *w;
	  
	- 	if(i == 0)
	+ 	if(i == 0 || i->display == 0)
	  		return 0;
	  	/* make sure no refresh events occur on this if we block in the write */
	  	d = i->display;
 [rsc] --rw-rw-r-- M 898628 glenda sys 9108 Mar 20 08:53 sys/src/libdraw/init.c
	/n/sourcesdump/2006/0320/plan9/sys/src/libdraw/init.c:419,424 - 
	/n/sourcesdump/2006/0321/plan9/sys/src/libdraw/init.c:419,426
	  int
	  flushimage(Display *d, int visible)
	  {
	+ 	if(d == nil)
	+ 		return 0;
	  	if(visible){
	  		*d->bufp++ = 'v';	/* five bytes always reserved for this */
	  		if(d->_isnewdisplay){
 [rsc] --rw-rw-r-- M 898628 glenda sys 1054 Mar 20 08:53 sys/src/libdraw/readsubfont.c
	/n/sourcesdump/2006/0320/plan9/sys/src/libdraw/readsubfont.c:54,60 - 
	/n/sourcesdump/2006/0321/plan9/sys/src/libdraw/readsubfont.c:54,60
	  }
	  
	  Subfont*
	- readsubfont(Display*d, char *name, int fd, int dolock)
	+ readsubfont(Display *d, char *name, int fd, int dolock)
	  {
	  	return readsubfonti(d, name, fd, nil, dolock);
	  }


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.