summaryrefslogtreecommitdiff
path: root/support/kamal/setups.h
blob: c0509e36637199e773162550a0e48028cb114144 (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
65
66
67
68
/* setup file */

#include        <stdio.h>
#ifdef MSC
#include        <string.h>
#include	<stdlib.h>	/* for type declarations */
#include	<io.h>		/* for type declarations */
#else
#include        <strings.h>
#include        <sys/ioctl.h>
#include        <sgtty.h>
#endif

#define     MAXLEN	1048576	/* maximum number of chars in a document */
#define     MAXWORD	100	/* maximum word length */
#define     MAXLINE	250	/* maximum line length */
#define     MAXENV	50	/* maximum number of environments */

extern char *malloc();

#ifdef IN_TM		/* can only declare globals once */
#else
extern
#endif
struct environment {
	char *env_name;		/* name of environment */
	int env_beg;		/* counter for \begin{environment} */
	int env_end;		/* counter for \end{environment} */
	int beg_line;		/* line number for \beging{environment} */
	} env[MAXENV];

#ifdef ANSI
int	begin_to_end(char*,char*);
int	command(char*,char*);
int	comm_file(FILE*,int*);
int	comment(char*);
int	def(char*,char*);
int	def_file(FILE*,int*);
int	display(char*);
int	dollar(char*,FILE*);
int	formula(char*);
int	get_buf_word(char*,char*);
int	getenv_file(FILE*,int*);
int	get_file_word(FILE*,char*,int*,int*);
int	is_new_env(char*,int);
int	one_dollar(char*);
void	scrbuf(FILE*,FILE*);
void	tmpbuf(FILE*,char*);
int	two_dollars(char*,FILE*);
#else
int	begin_to_end();
int	command();
int	comm_file();
int	comment();
int	def();
int	def_file();
int	display();
int	dollar();
int	formula();
int	get_buf_word();
int	getenv_file();
int	get_file_word();
int	is_new_env();
int	one_dollar();
void	scrbuf();
void	tmpbuf();
int	two_dollars();
#endif