tbl: use \s(NN instead of \sNN
[troff.git] / tbl / tf.c
blobd9ad0dde70e1ec7261f2e044eb5c47ff64c9b979
1 /* tf.c: save and restore fill mode around table */
2 # include "t.h"
4 void
5 savefill(void)
7 /* remembers various things: fill mode, vs, ps in mac 35 (SF) */
8 fprintf(tabout, ".de %d\n", SF);
9 fprintf(tabout, ".ps \\n(.s\n");
10 fprintf(tabout, ".vs \\n(.vu\n");
11 fprintf(tabout, ".in \\n(.iu\n");
12 fprintf(tabout, ".if \\n(.u .fi\n");
13 fprintf(tabout, ".if \\n(.j .ad\n");
14 fprintf(tabout, ".if \\n(.j=0 .na\n");
15 fprintf(tabout, "..\n");
16 fprintf(tabout, ".nf\n");
17 /* set obx offset if useful */
18 fprintf(tabout, ".nr #~ 0\n");
19 fprintf(tabout, ".if \\n(.T .if n .nr #~ 0.6n\n");
23 void
24 rstofill(void)
26 fprintf(tabout, ".%d\n", SF);
30 void
31 endoff(void)
33 int i;
35 for (i = 0; i < MAXHEAD; i++)
36 if (linestop[i])
37 fprintf(tabout, ".nr #%c 0\n", linestop[i] + 'a' - 1);
38 for (i = 0; i < texct; i++)
39 fprintf(tabout, ".rm %c+\n", texstr[i]);
40 fprintf(tabout, "%s\n", last);
44 void
45 ifdivert(void)
47 fprintf(tabout, ".ds #d .d\n");
48 fprintf(tabout, ".if \\(ts\\n(.z\\(ts\\(ts .ds #d nl\n");
52 void
53 saveline(void)
55 fprintf(tabout, ".if \\n+(b.=1 .nr d. \\n(.c-\\n(c.-1\n");
56 linstart = iline;
60 void
61 restline(void)
63 fprintf(tabout, ".if \\n-(b.=0 .nr c. \\n(.c-\\n(d.-%d\n", iline - linstart);
64 linstart = 0;
68 void
69 cleanfc(void)
71 fprintf(tabout, ".fc\n");