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