7 void conv(struct ustr
*ustr
)
16 fprintf(ferr
, "conv(Biobufhdr *Bp=0x%p)\n", ustr
);
17 while (ustr_uc(ustr
, &r
) >= 0) {
19 case 's': /* set point size */
20 ustr_int(ustr
, &fontsize
);
22 case 'f': /* set font to postion */
23 ustr_int(ustr
, &fontpos
);
26 inputlineno
= save
; /* ugh */
28 case 'c': /* print rune */
32 case 'C': /* print special character */
33 ustr_str(ustr
, special
, 10);
36 case 'N': /* print character with numeric value from current font */
39 case 'H': /* go to absolute horizontal position */
43 case 'V': /* go to absolute vertical position */
47 case 'h': /* go to relative horizontal position */
51 case 'v': /* go to relative vertical position */
55 case '0': case '1': case '2': case '3': case '4':
56 case '5': case '6': case '7': case '8': case '9':
57 /* move right nn units, then print character c */
61 error(FATAL
, "EOF or error reading input\n");
62 else if (r
< '0' || r
> '9')
63 error(FATAL
, "integer expected\n");
69 case 'p': /* begin page */
74 case 'n': /* end of line (information only 'b a' follows) */
75 ustr_eol(ustr
); /* toss rest of line */
78 case 'w': /* paddable word space (information only) */
80 case 'D': /* graphics function */
81 /* flush ps font before drawing pictures */
82 setpsfont(findpfn(troffontab
[fontpos
].psfontid
), fontsize
);
85 case 'x': /* device control functions */
88 case '#': /* comment */
89 ustr_eol(ustr
); /* toss rest of line */
94 error(WARNING
, "unknown troff function <%c>\n", r
);
100 fprintf(ferr
, "r=0x%x\n", r
);
102 fprintf(ferr
, "leaving conv\n");