xref: /original-bsd/old/eqn/common_source/funny.c (revision e78e7ec3)
1 #ifndef lint
2 static char sccsid[] = "@(#)funny.c	4.3 08/11/83";
3 #endif
4 
5 # include "e.h"
6 # include "e.def"
7 
8 funny(n) int n; {
9 	char *f;
10 
11 	yyval = oalloc();
12 	switch(n) {
13 	case SUM:
14 		f = "\\(*S"; break;
15 	case UNION:
16 		f = "\\(cu"; break;
17 	case INTER:	/* intersection */
18 		f = "\\(ca"; break;
19 	case PROD:
20 		f = "\\(*P"; break;
21 	default:
22 		error(FATAL, "funny type %d in funny", n);
23 	}
24 #ifndef NEQN
25 	printf(".ds %d \\s%d\\v'.3m'\\s+5%s\\s-5\\v'-.3m'\\s%d\n", yyval, ps, f, ps);
26 	eht[yyval] = VERT( (ps+5)*6 -(ps*6*2)/10 );
27 	ebase[yyval] = VERT( (ps*6*3)/10 );
28 #else NEQN
29 	printf(".ds %d %s\n", yyval, f);
30 	eht[yyval] = VERT(2);
31 	ebase[yyval] = 0;
32 #endif NEQN
33 	if(dbg)printf(".\tfunny: S%d <- %s; h=%d b=%d\n",
34 		yyval, f, eht[yyval], ebase[yyval]);
35 	lfont[yyval] = rfont[yyval] = ROM;
36 }
37