xref: /illumos-gate/usr/src/cmd/eqn/e.h (revision 2a8bcb4e)
1*779fc935Sceastha /*
2*779fc935Sceastha  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*779fc935Sceastha  * Use is subject to license terms.
4*779fc935Sceastha  */
5*779fc935Sceastha 
67c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
77c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
87c478bd9Sstevel@tonic-gate 
97c478bd9Sstevel@tonic-gate /*
107c478bd9Sstevel@tonic-gate  * Copyright (c) 1980 Regents of the University of California.
117c478bd9Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
127c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
137c478bd9Sstevel@tonic-gate  */
147c478bd9Sstevel@tonic-gate 
15*779fc935Sceastha #ifndef	_E_H
16*779fc935Sceastha #define	_E_H
17*779fc935Sceastha 
18*779fc935Sceastha #ifdef	__cplusplus
19*779fc935Sceastha extern "C" {
20*779fc935Sceastha #endif
217c478bd9Sstevel@tonic-gate 
227c478bd9Sstevel@tonic-gate #include <stdio.h>
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate #define	FATAL	1
257c478bd9Sstevel@tonic-gate #define	ROM	'1'
267c478bd9Sstevel@tonic-gate #ifndef NEQN
277c478bd9Sstevel@tonic-gate #define	ITAL	'2'
287c478bd9Sstevel@tonic-gate #define	BLD	'3'
29*779fc935Sceastha #else	/* NEQN */
307c478bd9Sstevel@tonic-gate #define	ITAL	'1'
317c478bd9Sstevel@tonic-gate #define	BLD	'1'
32*779fc935Sceastha #endif	/* NEQN */
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifndef NEQN
357c478bd9Sstevel@tonic-gate #define	VERT(n)	((((n)+1)/3)*3)
36*779fc935Sceastha #define	POINT	72
37*779fc935Sceastha #define	EM(m, ps)	(int)((((float)(m)*(ps) * resolution) / POINT))
38*779fc935Sceastha #else	/* NEQN */
397c478bd9Sstevel@tonic-gate #define	VERT(n)	(20 * (n))
40*779fc935Sceastha #endif	/* NEQN */
417c478bd9Sstevel@tonic-gate #define	EFFPS(p)	((p) >= 6 ? (p) : 6)
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate extern int	dbg;
447c478bd9Sstevel@tonic-gate extern int	ct;
457c478bd9Sstevel@tonic-gate extern int	lp[];
467c478bd9Sstevel@tonic-gate extern int	used[];	/* available registers */
477c478bd9Sstevel@tonic-gate extern int	ps;	/* dflt init pt size */
487c478bd9Sstevel@tonic-gate extern int	resolution;	/* resolution of ditroff */
497c478bd9Sstevel@tonic-gate extern int	deltaps;	/* default change in ps */
507c478bd9Sstevel@tonic-gate extern int	gsize;	/* global size */
517c478bd9Sstevel@tonic-gate extern int	gfont;	/* global font */
527c478bd9Sstevel@tonic-gate extern int	ft;	/* dflt font */
537c478bd9Sstevel@tonic-gate extern FILE	*curfile;	/* current input file */
547c478bd9Sstevel@tonic-gate extern int	ifile;	/* input file number */
557c478bd9Sstevel@tonic-gate extern int	linect;	/* line number in current file */
567c478bd9Sstevel@tonic-gate extern int	eqline;	/* line where eqn started */
577c478bd9Sstevel@tonic-gate extern int	svargc;
587c478bd9Sstevel@tonic-gate extern char	**svargv;
597c478bd9Sstevel@tonic-gate extern int	eht[];
607c478bd9Sstevel@tonic-gate extern int	ebase[];
617c478bd9Sstevel@tonic-gate extern int	lfont[];
627c478bd9Sstevel@tonic-gate extern int	rfont[];
637c478bd9Sstevel@tonic-gate extern int	yyval;
647c478bd9Sstevel@tonic-gate extern int	*yypv;
657c478bd9Sstevel@tonic-gate extern int	yylval;
667c478bd9Sstevel@tonic-gate extern int	eqnreg, eqnht;
677c478bd9Sstevel@tonic-gate extern int	lefteq, righteq;
687c478bd9Sstevel@tonic-gate extern int	lastchar;	/* last character read by lex */
697c478bd9Sstevel@tonic-gate extern int	markline;	/* 1 if this EQ/EN contains mark or lineup */
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate typedef struct s_tbl {
727c478bd9Sstevel@tonic-gate 	char	*name;
737c478bd9Sstevel@tonic-gate 	char	*defn;
747c478bd9Sstevel@tonic-gate 	struct s_tbl *next;
757c478bd9Sstevel@tonic-gate } tbl;
767c478bd9Sstevel@tonic-gate extern  char    *spaceval;  /* use in place of normal \x (for pic) */
77*779fc935Sceastha 
78*779fc935Sceastha #ifdef	__cplusplus
79*779fc935Sceastha }
80*779fc935Sceastha #endif
81*779fc935Sceastha 
82*779fc935Sceastha #endif	/* _E_H */
83