File:  [Research Unix] / researchv9 / cmd / eqn / funny.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

# include "e.h"
# include "y.tab.h"

extern int Funnyps;
extern float Funnyht, Funnybase;
extern char *Sum, *Union, *Inter, *Prod;

funny(n)
	int n;
{
	char *f;

	yyval = salloc();
	switch(n) {
	case SUM:
		f = Sum; break;
	case UNION:
		f = Union; break;
	case INTER:	/* intersection */
		f = Inter; break;
	case PROD:
		f = Prod; break;
	default:
		error(FATAL, "funny type %d in funny", n);
	}
	printf(".ds %d %s\n", yyval, f);
	eht[yyval] = EM(1.0, ps+Funnyps) - EM(Funnyht, ps);
	ebase[yyval] = EM(Funnybase, ps);
	eps[yyval] = ps;
	dprintf(".\tS%d <- %s; h=%g b=%g\n", 
		yyval, f, eht[yyval], ebase[yyval]);
	lfont[yyval] = rfont[yyval] = ROM;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.