1 /* t1.c: main control and input switching */
5 # define MACROS "/usr/lib/tmac.s"
6 # define PYMACS "/usr/lib/tmac.m"
12 main(int argc, char *argv[])
18 fprintf(stderr, "error");
26 tbl(int argc, char *argv[])
30 /*x=malloc((char *)0); uncomment when allocation breaks*/
31 /*Binit(&tabout, 1, OWRITE); /* tabout=stdout */
33 while (gets1(line, sizeof(line))) {
34 fprintf(tabout, "%s\n", line);
35 if (prefix(".TS", line))
47 setinp(int argc, char **argv)
64 while (sargc > 0 && **sargv == '-') {
65 if (match("-ms", *sargv)) {
69 if (match("-mm", *sargv)) {
73 if (match("-TX", *sargv))
75 if (match("-", *sargv))
82 /* file closing is done by GCOS troff preprocessor */
87 if (match(ifile, "-")) {
90 tabin = fopen(ifile, "r");
92 fprintf(tabout, ".ds f. %s\n", ifile);
93 fprintf(tabout, ".lf %d %s\n", iline, name);
95 error("Can't open file");