xref: /onnv-gate/usr/src/cmd/eqn/e.h (revision 364:f36290b8cb0b)
1*364Sceastha /*
2*364Sceastha  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*364Sceastha  * Use is subject to license terms.
4*364Sceastha  */
5*364Sceastha 
60Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
70Sstevel@tonic-gate /*	  All Rights Reserved  	*/
80Sstevel@tonic-gate 
90Sstevel@tonic-gate /*
100Sstevel@tonic-gate  * Copyright (c) 1980 Regents of the University of California.
110Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
120Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
130Sstevel@tonic-gate  */
14*364Sceastha 
15*364Sceastha #ifndef	_E_H
16*364Sceastha #define	_E_H
170Sstevel@tonic-gate 
18*364Sceastha #pragma ident	"%Z%%M%	%I%	%E% SMI"
19*364Sceastha 
20*364Sceastha #ifdef	__cplusplus
21*364Sceastha extern "C" {
22*364Sceastha #endif
230Sstevel@tonic-gate 
240Sstevel@tonic-gate #include <stdio.h>
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #define	FATAL	1
270Sstevel@tonic-gate #define	ROM	'1'
280Sstevel@tonic-gate #ifndef NEQN
290Sstevel@tonic-gate #define	ITAL	'2'
300Sstevel@tonic-gate #define	BLD	'3'
31*364Sceastha #else	/* NEQN */
320Sstevel@tonic-gate #define	ITAL	'1'
330Sstevel@tonic-gate #define	BLD	'1'
34*364Sceastha #endif	/* NEQN */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #ifndef NEQN
370Sstevel@tonic-gate #define	VERT(n)	((((n)+1)/3)*3)
38*364Sceastha #define	POINT	72
39*364Sceastha #define	EM(m, ps)	(int)((((float)(m)*(ps) * resolution) / POINT))
40*364Sceastha #else	/* NEQN */
410Sstevel@tonic-gate #define	VERT(n)	(20 * (n))
42*364Sceastha #endif	/* NEQN */
430Sstevel@tonic-gate #define	EFFPS(p)	((p) >= 6 ? (p) : 6)
440Sstevel@tonic-gate 
450Sstevel@tonic-gate extern int	dbg;
460Sstevel@tonic-gate extern int	ct;
470Sstevel@tonic-gate extern int	lp[];
480Sstevel@tonic-gate extern int	used[];	/* available registers */
490Sstevel@tonic-gate extern int	ps;	/* dflt init pt size */
500Sstevel@tonic-gate extern int	resolution;	/* resolution of ditroff */
510Sstevel@tonic-gate extern int	deltaps;	/* default change in ps */
520Sstevel@tonic-gate extern int	gsize;	/* global size */
530Sstevel@tonic-gate extern int	gfont;	/* global font */
540Sstevel@tonic-gate extern int	ft;	/* dflt font */
550Sstevel@tonic-gate extern FILE	*curfile;	/* current input file */
560Sstevel@tonic-gate extern int	ifile;	/* input file number */
570Sstevel@tonic-gate extern int	linect;	/* line number in current file */
580Sstevel@tonic-gate extern int	eqline;	/* line where eqn started */
590Sstevel@tonic-gate extern int	svargc;
600Sstevel@tonic-gate extern char	**svargv;
610Sstevel@tonic-gate extern int	eht[];
620Sstevel@tonic-gate extern int	ebase[];
630Sstevel@tonic-gate extern int	lfont[];
640Sstevel@tonic-gate extern int	rfont[];
650Sstevel@tonic-gate extern int	yyval;
660Sstevel@tonic-gate extern int	*yypv;
670Sstevel@tonic-gate extern int	yylval;
680Sstevel@tonic-gate extern int	eqnreg, eqnht;
690Sstevel@tonic-gate extern int	lefteq, righteq;
700Sstevel@tonic-gate extern int	lastchar;	/* last character read by lex */
710Sstevel@tonic-gate extern int	markline;	/* 1 if this EQ/EN contains mark or lineup */
720Sstevel@tonic-gate 
730Sstevel@tonic-gate typedef struct s_tbl {
740Sstevel@tonic-gate 	char	*name;
750Sstevel@tonic-gate 	char	*defn;
760Sstevel@tonic-gate 	struct s_tbl *next;
770Sstevel@tonic-gate } tbl;
780Sstevel@tonic-gate extern  char    *spaceval;  /* use in place of normal \x (for pic) */
79*364Sceastha 
80*364Sceastha #ifdef	__cplusplus
81*364Sceastha }
82*364Sceastha #endif
83*364Sceastha 
84*364Sceastha #endif	/* _E_H */
85