xref: /csrg-svn/old/eqn/common_source/funny.c (revision 11023)
1*11023Sshannon /*	funny.c	4.2	83/02/12	*/
211004Sshannon 
311004Sshannon # include "e.h"
411004Sshannon # include "e.def"
511004Sshannon 
611004Sshannon funny(n) int n; {
711004Sshannon 	char *f;
811004Sshannon 
911004Sshannon 	yyval = oalloc();
1011004Sshannon 	switch(n) {
1111004Sshannon 	case SUM:
1211004Sshannon 		f = "\\(*S"; break;
1311004Sshannon 	case UNION:
1411004Sshannon 		f = "\\(cu"; break;
1511004Sshannon 	case INTER:	/* intersection */
1611004Sshannon 		f = "\\(ca"; break;
1711004Sshannon 	case PROD:
1811004Sshannon 		f = "\\(*P"; break;
1911004Sshannon 	default:
2011004Sshannon 		error(FATAL, "funny type %d in funny", n);
2111004Sshannon 	}
22*11023Sshannon #ifndef NEQN
2311004Sshannon 	printf(".ds %d \\s%d\\v'.3m'\\s+5%s\\s-5\\v'-.3m'\\s%d\n", yyval, ps, f, ps);
2411004Sshannon 	eht[yyval] = VERT( (ps+5)*6 -(ps*6*2)/10 );
2511004Sshannon 	ebase[yyval] = VERT( (ps*6*3)/10 );
26*11023Sshannon #else NEQN
27*11023Sshannon 	printf(".ds %d %s\n", yyval, f);
28*11023Sshannon 	eht[yyval] = VERT(2);
29*11023Sshannon 	ebase[yyval] = 0;
30*11023Sshannon #endif NEQN
3111004Sshannon 	if(dbg)printf(".\tfunny: S%d <- %s; h=%d b=%d\n",
3211004Sshannon 		yyval, f, eht[yyval], ebase[yyval]);
3311004Sshannon 	lfont[yyval] = rfont[yyval] = ROM;
3411004Sshannon }
35