Proff (.wr fix)

Gary Girzon gary at cirl.UUCP
Fri Jan 31 05:31:20 AEST 1986


The following is a simple kludge to fix the .wr command so it does not
cause line breaks. However, the .wr <string> will only be written after 
a word is formatted (i.e. after at least one space). This is ok for using
.wr to insert bold and italic printer commands, but may be a problem
with underlining (will a space be underlined?). Note that getpstr seems
to strip numbers in the .wr sequence, unless quotes are used.

In pxxparse.c, replace the old WR: code 

>	case WR:	/****/
>		brk(); 
>		getpstr(buf+rest,special);
>		defn = special;
>		while(*defn) 
>			putchar(*defn++);
>		break;

with the following:

	case WR:	/****/
		getpstr(buf+rest,special); /* convert the <string> */
		putwrd(special);	   /* insert into outbuf   */
		outw -= width(special);    /* subtract from count  */
		outwds--;		   /* and word count       */
		break;


-----------------------------------------------------------------------

					Gary Girzon
					{harvard,ihnp4}!think!cirl!gary



More information about the Comp.sources.bugs mailing list