/*
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#include "e.h"
#include <stdlib.h>
#include <locale.h>
int noeqn;
void error(int, char *, char *);
static void do_inline(void);
int eqn(int, char *[]);
static int getaline(char *);
static void init(void);
void nrwid(int, int, int);
int oalloc(void);
void ofree(int);
static void setfile(int, char *[]);
void setps(int);
int
{
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
}
int
{
int i, type;
init_tbl(); /* install keywords in tables */
;
printf(".nr 99 \\n(.s\n.nr 98 \\n(.f\n");
markline = 0;
init();
yyparse();
if (eqnreg > 0) {
/*
* printf(".if \\n(%d>\\n(.l .tm too-long eqn,
* file %s, between lines %d-%d\n",
* eqnreg, svargv[ifile], eqline, linect);
*/
/* for -ms macros */
}
printf(".ps \\n(99\n.ft \\n(98\n");
printf(".EN");
putchar('\n');
break;
}
;
do_inline();
else
}
return (0);
}
static int
getaline(char *s)
{
int c;
"input line too long: %.20s\n"), in);
break;
}
if (c == lefteq)
s--;
*s++ = '\0';
return (c);
}
static void
do_inline(void)
{
int ds;
printf(".nr 99 \\n(.s\n.nr 98 \\n(.f\n");
do {
if (*in)
init();
yyparse();
if (eqnreg > 0) {
}
printf(".ps \\n(99\n.ft \\n(98\n");
if (*in)
printf(".ps \\n(99\n.ft \\n(98\n");
}
void
{
if (dbg)
/* suppposed to leave room for a subscript or superscript */
#ifndef NEQN
#else /* NEQN */
#endif /* NEQN */
else if (before > 0)
printf("\\f%c\\s%d\\*(%d%s\\s\\n(99\\f\\n(98",
#ifndef NEQN
#else /* NEQN */
#endif /* NEQN */
putchar('\n');
}
}
int
max(int i, int j)
{
return (i > j ? i : j);
}
int
oalloc(void)
{
int i;
for (i = 11; i < 100; i++)
if (used[i]++ == 0)
return (i);
return (0);
}
void
ofree(int n)
{
used[n] = 0;
}
void
setps(int p)
{
}
void
{
}
static void
{
case 'e': noeqn++; break;
case 0: goto endargs;
default: dbg = 1;
}
svargc--;
svargv++;
}
ifile = 1;
linect = 1;
if (svargc <= 0) {
}
else
openinfile(); /* opens up the first input file */
}
void
yyerror(void)
{
}
static void
init(void)
{
ct = 0;
}
void
{
if (fatal > 0)
if (fatal > 0)
if (fatal > 0)
exit(1);
}