diff options
author | wkj <devnull@localhost> | 2004-05-16 07:55:57 +0000 |
---|---|---|
committer | wkj <devnull@localhost> | 2004-05-16 07:55:57 +0000 |
commit | c5561c23cf394806cbf6d70a96f2dc0253f93745 (patch) | |
tree | f4a5b99f88454917a5bada0f2a97d1505051968c /src/cmd/tbl/tg.c | |
parent | b855148c9b6d28fedfd083d037bcf246f1913d92 (diff) | |
download | plan9port-c5561c23cf394806cbf6d70a96f2dc0253f93745.tar.gz plan9port-c5561c23cf394806cbf6d70a96f2dc0253f93745.tar.bz2 plan9port-c5561c23cf394806cbf6d70a96f2dc0253f93745.zip |
Checkpoint -- still merging with Taj's version of the world.
Diffstat (limited to 'src/cmd/tbl/tg.c')
-rw-r--r-- | src/cmd/tbl/tg.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/cmd/tbl/tg.c b/src/cmd/tbl/tg.c index 6abb1490..e12bdc4e 100644 --- a/src/cmd/tbl/tg.c +++ b/src/cmd/tbl/tg.c @@ -12,53 +12,53 @@ gettext(char *sp, int ilin, int icol, char *fn, char *sz) if (texname == 0) error("Too many text block diversions"); if (textflg == 0) { - Bprint(&tabout, ".nr %d \\n(.lu\n", SL); /* remember old line length */ + fprintf(tabout, ".nr %d \\n(.lu\n", SL); /* remember old line length */ textflg = 1; } - Bprint(&tabout, ".eo\n"); - Bprint(&tabout, ".am %s\n", reg(icol, CRIGHT)); - Bprint(&tabout, ".br\n"); - Bprint(&tabout, ".di %c+\n", texname); + fprintf(tabout, ".eo\n"); + fprintf(tabout, ".am %s\n", reg(icol, CRIGHT)); + fprintf(tabout, ".br\n"); + fprintf(tabout, ".di %c+\n", texname); rstofill(); if (fn && *fn) - Bprint(&tabout, ".nr %d \\n(.f\n.ft %s\n", S1, fn); - Bprint(&tabout, ".ft \\n(.f\n"); /* protect font */ + fprintf(tabout, ".nr %d \\n(.f\n.ft %s\n", S1, fn); + fprintf(tabout, ".ft \\n(.f\n"); /* protect font */ vs = vsize[icol][stynum[ilin]]; if ((sz && *sz) || (vs && *vs)) { - Bprint(&tabout, ".nr %d \\n(.v\n", S9); + fprintf(tabout, ".nr %d \\n(.v\n", S9); if (vs == 0 || *vs == 0) vs = "\\n(.s+2"; if (sz && *sz) - Bprint(&tabout, ".ps %s\n", sz); - Bprint(&tabout, ".vs %s\n", vs); - Bprint(&tabout, ".if \\n(%du>\\n(.vu .sp \\n(%du-\\n(.vu\n", S9, S9); + fprintf(tabout, ".ps %s\n", sz); + fprintf(tabout, ".vs %s\n", vs); + fprintf(tabout, ".if \\n(%du>\\n(.vu .sp \\n(%du-\\n(.vu\n", S9, S9); } if (cll[icol][0]) - Bprint(&tabout, ".ll %sn\n", cll[icol]); + fprintf(tabout, ".ll %sn\n", cll[icol]); else - Bprint(&tabout, ".ll \\n(%du*%du/%du\n", SL, ctspan(ilin, icol), ncol + 1); - Bprint(&tabout, ".if \\n(.l<\\n(%2s .ll \\n(%2su\n", reg(icol, CRIGHT), + fprintf(tabout, ".ll \\n(%du*%du/%du\n", SL, ctspan(ilin, icol), ncol + 1); + fprintf(tabout, ".if \\n(.l<\\n(%2s .ll \\n(%2su\n", reg(icol, CRIGHT), reg(icol, CRIGHT)); if (ctype(ilin, icol) == 'a') - Bprint(&tabout, ".ll -2n\n"); - Bprint(&tabout, ".in 0\n"); + fprintf(tabout, ".ll -2n\n"); + fprintf(tabout, ".in 0\n"); while (gets1(line, sizeof(line))) { if (line[0] == 'T' && line[1] == '}' && line[2] == tab) break; if (match("T}", line)) break; - Bprint(&tabout, "%s\n", line); + fprintf(tabout, "%s\n", line); } if (fn && *fn) - Bprint(&tabout, ".ft \\n(%d\n", S1); + fprintf(tabout, ".ft \\n(%d\n", S1); if (sz && *sz) - Bprint(&tabout, ".br\n.ps\n.vs\n"); - Bprint(&tabout, ".br\n"); - Bprint(&tabout, ".di\n"); - Bprint(&tabout, ".nr %c| \\n(dn\n", texname); - Bprint(&tabout, ".nr %c- \\n(dl\n", texname); - Bprint(&tabout, "..\n"); - Bprint(&tabout, ".ec \\\n"); + fprintf(tabout, ".br\n.ps\n.vs\n"); + fprintf(tabout, ".br\n"); + fprintf(tabout, ".di\n"); + fprintf(tabout, ".nr %c| \\n(dn\n", texname); + fprintf(tabout, ".nr %c- \\n(dl\n", texname); + fprintf(tabout, "..\n"); + fprintf(tabout, ".ec \\\n"); /* copy remainder of line */ if (line[2]) tcopy (sp, line + 3); @@ -74,8 +74,8 @@ void untext(void) { rstofill(); - Bprint(&tabout, ".nf\n"); - Bprint(&tabout, ".ll \\n(%du\n", SL); + fprintf(tabout, ".nf\n"); + fprintf(tabout, ".ll \\n(%du\n", SL); } |