gary@cirl.UUCP (Gary Girzon) (01/23/86)
There seems to be a minor bug in Proff, the recently distributed text formatter. The command .wr <string> causes a break in text formatting which is undesirable if the command is to be used to send printer escape sequences (such as bold, italics, etc). Indeed, there is a brk() call in the command interpreter [pxxparse()] code. However, eliminating the brk() call causes the .wr <string> argument to be written at the begining of the formatted text. If anyone has fixed this bug, please post. Otherwise, proff seems to run fine (both 4.2 BSD and AMIGA, using Lattice 3.02 - although the linker will complain). Gary Girzon ..{harvard,ihnp4}!think!cirl!gary
gary@cirl.UUCP (Gary Girzon) (01/30/86)
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