xref: /csrg-svn/old/eqn/common_source/funny.c (revision 14486)
1*14486Ssam #ifndef lint
2*14486Ssam static char sccsid[] = "@(#)funny.c	4.3 08/11/83";
3*14486Ssam #endif
411004Sshannon 
511004Sshannon # include "e.h"
611004Sshannon # include "e.def"
711004Sshannon 
811004Sshannon funny(n) int n; {
911004Sshannon 	char *f;
1011004Sshannon 
1111004Sshannon 	yyval = oalloc();
1211004Sshannon 	switch(n) {
1311004Sshannon 	case SUM:
1411004Sshannon 		f = "\\(*S"; break;
1511004Sshannon 	case UNION:
1611004Sshannon 		f = "\\(cu"; break;
1711004Sshannon 	case INTER:	/* intersection */
1811004Sshannon 		f = "\\(ca"; break;
1911004Sshannon 	case PROD:
2011004Sshannon 		f = "\\(*P"; break;
2111004Sshannon 	default:
2211004Sshannon 		error(FATAL, "funny type %d in funny", n);
2311004Sshannon 	}
2411023Sshannon #ifndef NEQN
2511004Sshannon 	printf(".ds %d \\s%d\\v'.3m'\\s+5%s\\s-5\\v'-.3m'\\s%d\n", yyval, ps, f, ps);
2611004Sshannon 	eht[yyval] = VERT( (ps+5)*6 -(ps*6*2)/10 );
2711004Sshannon 	ebase[yyval] = VERT( (ps*6*3)/10 );
2811023Sshannon #else NEQN
2911023Sshannon 	printf(".ds %d %s\n", yyval, f);
3011023Sshannon 	eht[yyval] = VERT(2);
3111023Sshannon 	ebase[yyval] = 0;
3211023Sshannon #endif NEQN
3311004Sshannon 	if(dbg)printf(".\tfunny: S%d <- %s; h=%d b=%d\n",
3411004Sshannon 		yyval, f, eht[yyval], ebase[yyval]);
3511004Sshannon 	lfont[yyval] = rfont[yyval] = ROM;
3611004Sshannon }
37