8672 proc_t changes broke genunix dmods and walker
[unleashed.git] / usr / src / cmd / tbl / tf.c
blobf39f6556398b47afa9c87f10761d7e1d0b39e2ed
1 /*
2 * Copyright 1990 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
9 /*
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
17 /* tf.c: save and restore fill mode around table */
18 # include "t..c"
20 void
21 savefill(void)
23 /* remembers various things: fill mode, vs, ps in mac 35 (SF) */
24 fprintf(tabout, ".de %d\n",SF);
25 fprintf(tabout, ".ps \\n(.s\n");
26 fprintf(tabout, ".vs \\n(.vu\n");
27 fprintf(tabout, ".in \\n(.iu\n");
28 fprintf(tabout, ".if \\n(.u .fi\n");
29 fprintf(tabout, ".if \\n(.j .ad\n");
30 fprintf(tabout, ".if \\n(.j=0 .na\n");
31 fprintf(tabout, "..\n");
32 fprintf(tabout, ".nf\n");
33 /* set obx offset if useful */
34 fprintf(tabout, ".nr #~ 0\n");
35 fprintf(tabout, ".if n .nr #~ 0.6n\n");
38 void
39 rstofill(void)
41 fprintf(tabout, ".%d\n",SF);
44 void
45 endoff(void)
47 int i;
48 for(i=0; i<MAXHEAD; i++)
49 if (linestop[i])
50 fprintf(tabout, ".nr #%c 0\n", 'a'+i);
51 for(i=0; i<texct; i++)
52 fprintf(tabout, ".rm %c+\n",texstr[i]);
53 fprintf(tabout, "%s\n", last);
56 void
57 ifdivert(void)
59 fprintf(tabout, ".ds #d .d\n");
60 fprintf(tabout, ".if \\(ts\\n(.z\\(ts\\(ts .ds #d nl\n");
63 void
64 saveline(void)
66 fprintf(tabout, ".if \\n+(b.=1 .nr d. \\n(.c-\\n(c.-1\n");
67 linstart=iline;
70 void
71 restline(void)
73 fprintf(tabout,".if \\n-(b.=0 .nr c. \\n(.c-\\n(d.-%d\n", iline-linstart);
74 linstart = 0;
77 void
78 cleanfc(void)
80 fprintf(tabout, ".fc\n");