tt.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, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
* All Rights Reserved.
*/
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
/* tt.c: subroutines for drawing horizontal lines */
# include "t..c"
{
return(0);
return(0);
}
min(a,b)
{
return(a<b ? a : b);
}
fspan(i,c)
{
c++;
}
lspan(i,c)
{
int k;
if (ctype(i,c) != 's') return(0);
c++;
return(0);
for(k=0; ctype(i,--c) == 's'; k++);
return(k);
}
ctspan(i,c)
{
int k;
c++;
c++;
return(k);
}
{
if (ic==0)
else
}
allh(i)
{
/* return true if every element in line i is horizontal */
/* also at least one must be horizontl */
int c, one, k;
if (fullbot[i]) return(1);
{
k = thish(i,c);
if (k==0) return(0);
if (k==1) continue;
one=1;
}
return(one);
}
thish(i,c)
{
int t;
char *s;
if (c<0)return(0);
if (i<0) return(0);
t = ctype(i,c);
if (t=='_' || t == '-')
return('-');
if (t=='=')return('=');
if (t=='^') return(1);
if (fullbot[i] )
return(fullbot[i]);
if (t==0) return(1);
if (s==0 || (point(s) && *s==0))
return(1);
if (vspen(s)) return(1);
if (t=barent( s))
return(t);
return(0);
}