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