io.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/* 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.
*/
/*
* Copyright (c) 1983-1988, 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
# include "e.h"
#include <locale.h>
int eqnexit();
int noeqn;
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
(void) textdomain(TEXT_DOMAIN);
}
eqnexit(n) {
#ifdef gcos
if (n)
exit(0);
#endif
exit(n);
}
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); */
}
printf(".ps \\n(99\n.ft \\n(98\n");
printf(".EN");
putchar('\n');
break;
}
}
do_inline();
else
}
return(0);
}
getline(s) register char *s; {
register c;
break;
}
if (c==lefteq)
s--;
*s++ = '\0';
return(c);
}
do_inline() {
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");
}
/* 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');
}
}
max(i,j) int i,j; {
return (i>j ? i : j);
}
oalloc() {
int i;
for (i=11; i<100; i++)
if (used[i]++ == 0) return(i);
return(0);
}
ofree(n) int n; {
used[n] = 0;
}
setps(p) int p; {
}
}
static char *nullstr = "-";
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 */
}
yyerror() {;}
init() {
ct = 0;
}
if (fatal>0)
if (fatal>0)
if (fatal > 0)
eqnexit(1);
}