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