3 void setfont(char *ch1
)
6 if (strcmp(ch1
, "I") == 0) { /* I and italic mean merely position 2 */
9 } else if (strcmp(ch1
, "B") == 0) { /* and similarly for B & bold */
12 } else if (strcmp(ch1
, "R") == 0) { /* and R and roman */
16 ft
= ROM
; /* assume it's a roman style */
19 if (ftp
>= &ftstack
[10])
20 ERROR
"font stack overflow (10)" FATAL
;
22 if (ch1
[1] == 0) { /* 1-char name */
26 sprintf(ftp
->name
, "(%s", ch1
);
27 dprintf(".\tsetfont %s %c\n", ch1
, ft
);
30 void font(int p1
, int p2
)
32 /* old font in p1, new in ft */
34 lfont
[yyval
] = rfont
[yyval
] = ft
==ITAL
? ITAL
: ROM
;
43 getstr(temp
, sizeof(temp
));
45 if (strcmp(temp
, "I") == 0 || strncmp(temp
, "it", 2) == 0) {
48 } else if (strcmp(temp
, "B") == 0 || strncmp(temp
, "bo", 2) == 0) {
51 } else if (strcmp(temp
, "R") == 0 || strncmp(temp
, "ro", 2) == 0) {
55 ft
= ROM
; /* assume it's a roman style */
58 if (temp
[1] == 0) /* 1-char name */
59 strcpy(ftstack
[0].name
, temp
);
61 sprintf(ftstack
[0].name
, "(%.2s", temp
);
66 extern double Fatshift
;
69 printf(".ds %d \\*(%d\\h'-\\w'\\*(%d'u+%gm'\\*(%d\n", p
, p
, p
, Fatshift
, p
);