1*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 3*7c478bd9Sstevel@tonic-gate 4*7c478bd9Sstevel@tonic-gate 5*7c478bd9Sstevel@tonic-gate /* 6*7c478bd9Sstevel@tonic-gate * Copyright (c) 1980 Regents of the University of California. 7*7c478bd9Sstevel@tonic-gate * All rights reserved. The Berkeley software License Agreement 8*7c478bd9Sstevel@tonic-gate * specifies the terms and conditions for redistribution. 9*7c478bd9Sstevel@tonic-gate */ 10*7c478bd9Sstevel@tonic-gate 11*7c478bd9Sstevel@tonic-gate /* 12*7c478bd9Sstevel@tonic-gate * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc. 13*7c478bd9Sstevel@tonic-gate * All Rights Reserved. 14*7c478bd9Sstevel@tonic-gate */ 15*7c478bd9Sstevel@tonic-gate 16*7c478bd9Sstevel@tonic-gate #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ 17*7c478bd9Sstevel@tonic-gate 18*7c478bd9Sstevel@tonic-gate /* t..c : external declarations */ 19*7c478bd9Sstevel@tonic-gate 20*7c478bd9Sstevel@tonic-gate # include "stdio.h" 21*7c478bd9Sstevel@tonic-gate # include "ctype.h" 22*7c478bd9Sstevel@tonic-gate 23*7c478bd9Sstevel@tonic-gate # define MAXLIN 200 24*7c478bd9Sstevel@tonic-gate # define MAXHEAD 100 25*7c478bd9Sstevel@tonic-gate # define MAXCOL 20 26*7c478bd9Sstevel@tonic-gate # define MAXCHS 2000 27*7c478bd9Sstevel@tonic-gate # define MAXSTR 1024 28*7c478bd9Sstevel@tonic-gate # define MAXRPT 100 29*7c478bd9Sstevel@tonic-gate # define CLLEN 10 30*7c478bd9Sstevel@tonic-gate # define SHORTLINE 4 31*7c478bd9Sstevel@tonic-gate # define BIGBUF 8192 32*7c478bd9Sstevel@tonic-gate extern char *gets1(); 33*7c478bd9Sstevel@tonic-gate extern int nlin, ncol, iline, nclin, nslin; 34*7c478bd9Sstevel@tonic-gate extern int style[MAXHEAD][MAXCOL]; 35*7c478bd9Sstevel@tonic-gate extern int ctop[MAXHEAD][MAXCOL]; 36*7c478bd9Sstevel@tonic-gate extern char font[MAXHEAD][MAXCOL][2]; 37*7c478bd9Sstevel@tonic-gate extern char csize[MAXHEAD][MAXCOL][4]; 38*7c478bd9Sstevel@tonic-gate extern char vsize[MAXHEAD][MAXCOL][4]; 39*7c478bd9Sstevel@tonic-gate extern char cll[MAXCOL][CLLEN]; 40*7c478bd9Sstevel@tonic-gate extern int stynum[]; 41*7c478bd9Sstevel@tonic-gate extern int F1, F2; 42*7c478bd9Sstevel@tonic-gate extern int lefline[MAXHEAD][MAXCOL]; 43*7c478bd9Sstevel@tonic-gate extern int fullbot[]; 44*7c478bd9Sstevel@tonic-gate extern char *instead[]; 45*7c478bd9Sstevel@tonic-gate extern int expflg; 46*7c478bd9Sstevel@tonic-gate extern int ctrflg; 47*7c478bd9Sstevel@tonic-gate extern int evenflg; 48*7c478bd9Sstevel@tonic-gate extern int evenup[]; 49*7c478bd9Sstevel@tonic-gate extern int boxflg; 50*7c478bd9Sstevel@tonic-gate extern int dboxflg; 51*7c478bd9Sstevel@tonic-gate extern int linsize; 52*7c478bd9Sstevel@tonic-gate extern int tab; 53*7c478bd9Sstevel@tonic-gate extern int pr1403; 54*7c478bd9Sstevel@tonic-gate extern int linsize, delim1, delim2; 55*7c478bd9Sstevel@tonic-gate extern int allflg; 56*7c478bd9Sstevel@tonic-gate extern int textflg; 57*7c478bd9Sstevel@tonic-gate extern int left1flg; 58*7c478bd9Sstevel@tonic-gate extern int rightl; 59*7c478bd9Sstevel@tonic-gate struct colstr {char *col, *rcol;}; 60*7c478bd9Sstevel@tonic-gate extern struct colstr *table[]; 61*7c478bd9Sstevel@tonic-gate extern int *alocv(); 62*7c478bd9Sstevel@tonic-gate extern char *cspace, *cstore; 63*7c478bd9Sstevel@tonic-gate extern char *chspace(); 64*7c478bd9Sstevel@tonic-gate extern char *maknew(); 65*7c478bd9Sstevel@tonic-gate extern char *exstore, *exlim; 66*7c478bd9Sstevel@tonic-gate extern int sep[]; 67*7c478bd9Sstevel@tonic-gate extern int used[], lused[], rused[]; 68*7c478bd9Sstevel@tonic-gate extern int linestop[]; 69*7c478bd9Sstevel@tonic-gate extern char *leftover; 70*7c478bd9Sstevel@tonic-gate extern char *last, *ifile; 71*7c478bd9Sstevel@tonic-gate extern int texname; 72*7c478bd9Sstevel@tonic-gate extern int texct; 73*7c478bd9Sstevel@tonic-gate extern char texstr[]; 74*7c478bd9Sstevel@tonic-gate extern int linstart; 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate extern FILE *tabin, *tabout; 78*7c478bd9Sstevel@tonic-gate # define CRIGHT 80 79*7c478bd9Sstevel@tonic-gate # define CLEFT 40 80*7c478bd9Sstevel@tonic-gate # define CMID 60 81*7c478bd9Sstevel@tonic-gate # define S1 31 82*7c478bd9Sstevel@tonic-gate # define S2 32 83*7c478bd9Sstevel@tonic-gate # define TMP 38 84*7c478bd9Sstevel@tonic-gate # define SF 35 85*7c478bd9Sstevel@tonic-gate # define SL 34 86*7c478bd9Sstevel@tonic-gate # define LSIZE 33 87*7c478bd9Sstevel@tonic-gate # define SIND 37 88*7c478bd9Sstevel@tonic-gate # define SVS 36 89*7c478bd9Sstevel@tonic-gate /* this refers to the relative position of lines */ 90*7c478bd9Sstevel@tonic-gate # define LEFT 1 91*7c478bd9Sstevel@tonic-gate # define RIGHT 2 92*7c478bd9Sstevel@tonic-gate # define THRU 3 93*7c478bd9Sstevel@tonic-gate # define TOP 1 94*7c478bd9Sstevel@tonic-gate # define BOT 2 95