summaryrefslogtreecommitdiff
path: root/support/tr2latex/setups.h
blob: 8232e8935532e04e556c9fdacb16fb902c822e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef SETUPS__H
#define SETUPS__H

/*
** tr2latex - troff to LaTeX converter
** COPYRIGHT (C) 1987 Kamal Al-Yahya, 1991,1992 Christian Engel
**
** Module: setups.h
**
** setup file
*/

#include	<ctype.h>
#include	<errno.h>
#include	<stdio.h>
#include	<stdlib.h>
#include	<string.h>
#include	<time.h>

#define	MAXLEN	(1024*1024)		/* maximum length of document */
#define	MAXWORD	250				/* maximum word length */
#define	MAXLINE	500				/* maximum line length */
#define	MAXDEF	200				/* maximum number of defines */
#define MAXARGS 128				/* maximal number of arguments */

#define EOS		'\0'			/* end of string */

#ifdef MAIN				/* can only declare globals once */
#  define GLOBAL
#else
#  define GLOBAL extern
#endif

GLOBAL int math_mode,	/* math mode status */
	       de_arg,		/* .de argument */
	       IP_stat[20],	/* IP status */
	       QP_stat,		/* QP status */
               TP_stat,		/* TP status */
	       RSRE;		/* block indentation level */

GLOBAL int debug_o;

GLOBAL struct defs {
	char *def_macro;
	char *replace;
	int illegal;
} def[MAXDEF];

GLOBAL struct mydefs {
	char *def_macro;
	char *replace;
	int illegal;
	int arg_no;
	int par;		/* if it impiles (or contains) a par break */
} mydef[MAXDEF];

GLOBAL struct measure {
	char old_units[MAXWORD];	float old_value;
	char units[MAXWORD];		float value;
	char def_units[MAXWORD];	/* default units */
	int def_value;			/* default value: 0 means take last one */
} linespacing, indent, tmpind, space, vspace;

#endif