xref: /illumos-gate/usr/src/cmd/eqn/e.h (revision 9164a50bf932130cbb5097a16f6986873ce0e6e5)
1 /*
2  * Copyright 2005 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 #ifndef	_E_H
16 #define	_E_H
17 
18 #ifdef	__cplusplus
19 extern "C" {
20 #endif
21 
22 #include <stdio.h>
23 
24 #define	FATAL	1
25 #define	ROM	'1'
26 #ifndef NEQN
27 #define	ITAL	'2'
28 #define	BLD	'3'
29 #else	/* NEQN */
30 #define	ITAL	'1'
31 #define	BLD	'1'
32 #endif	/* NEQN */
33 
34 #ifndef NEQN
35 #define	VERT(n)	((((n)+1)/3)*3)
36 #define	POINT	72
37 #define	EM(m, ps)	(int)((((float)(m)*(ps) * resolution) / POINT))
38 #else	/* NEQN */
39 #define	VERT(n)	(20 * (n))
40 #endif	/* NEQN */
41 #define	EFFPS(p)	((p) >= 6 ? (p) : 6)
42 
43 extern int	dbg;
44 extern int	ct;
45 extern int	lp[];
46 extern int	used[];	/* available registers */
47 extern int	ps;	/* dflt init pt size */
48 extern int	resolution;	/* resolution of ditroff */
49 extern int	deltaps;	/* default change in ps */
50 extern int	gsize;	/* global size */
51 extern int	gfont;	/* global font */
52 extern int	ft;	/* dflt font */
53 extern FILE	*curfile;	/* current input file */
54 extern int	ifile;	/* input file number */
55 extern int	linect;	/* line number in current file */
56 extern int	eqline;	/* line where eqn started */
57 extern int	svargc;
58 extern char	**svargv;
59 extern int	eht[];
60 extern int	ebase[];
61 extern int	lfont[];
62 extern int	rfont[];
63 extern int	yyval;
64 extern int	*yypv;
65 extern int	yylval;
66 extern int	eqnreg, eqnht;
67 extern int	lefteq, righteq;
68 extern int	lastchar;	/* last character read by lex */
69 extern int	markline;	/* 1 if this EQ/EN contains mark or lineup */
70 
71 typedef struct s_tbl {
72 	char	*name;
73 	char	*defn;
74 	struct s_tbl *next;
75 } tbl;
76 extern  char    *spaceval;  /* use in place of normal \x (for pic) */
77 
78 #ifdef	__cplusplus
79 }
80 #endif
81 
82 #endif	/* _E_H */
83