1 #ifndef lint
2 static char sccsid[] = "@(#)funny.c	2.2 (CWI) 87/04/01";
3 #endif lint
4 # include "e.h"
5 # include "y.tab.h"
6 
7 extern int Funnyps;
8 extern float Funnyht, Funnybase;
9 extern char *Sum, *Union, *Inter, *Prod;
10 
11 funny(n)
12 	int n;
13 {
14 	char *f;
15 
16 	yyval = salloc();
17 	switch(n) {
18 	case SUM:
19 		f = Sum; break;
20 	case UNION:
21 		f = Union; break;
22 	case INTER:	/* intersection */
23 		f = Inter; break;
24 	case PROD:
25 		f = Prod; break;
26 	default:
27 		error(FATAL, "funny type %d in funny", n);
28 	}
29 	printf(".ds %d %s\n", yyval, f);
30 	eht[yyval] = EM(1.0, ps+Funnyps) - EM(Funnyht, ps);
31 	ebase[yyval] = EM(Funnybase, ps);
32 	eps[yyval] = ps;
33 	dprintf(".\tS%d <- %s; h=%g b=%g\n",
34 		yyval, f, eht[yyval], ebase[yyval]);
35 	lfont[yyval] = rfont[yyval] = ROM;
36 }
37