🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #500

two-letter font names in EQN

#500
From: Col. G. L. Sicherman
Date: Mon, 13 May 1985 17:45
28 lines
1387 bytes
There's no good reason for eqn to accept only one-letter font names.
If you want two-letter names, just change e.y and font.c:

font	: ...
	| FONT text	{ setfont(((char *)$2)[0]|((char *)$2)[1]<<8); }
	;

setfont(ch1) int ch1; {		/* CHANGE char TO int; --GLS */
	...
	if (017400 & ft) printf(".ft %c%c\n", 0377&ft, 0377&(ft>>8));
	else printf(".ft %c\n", ft);
	...

font(p1, p2) int p1, p2; {
	...
	printf(".ds %d \\f", yyval);
	if (017400 & ft) printf("(%c%c", 0377&ft, 0377&(ft>>8));
	else printf("%c", ft);
	printf("\\*(%d\\f", p2);
	if (017400 & p1) printf("(%c%c\n", 0377&p1, 0377&(p1>>8));
	else printf("%c\n", p1);
	ft = p1;
	if (017400 & ft) printf(".ft %c%c\n", 0377&ft, 0377&(ft>>8));
	else printf(".ft %c\n", ft);
}
-- 
Col. G. L. Sicherman
...{rocksvax|decvax}!sunybcs!colonel
Technical Details
Message-ID: <729@gloria.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!rochester!rocksanne!sunybcs!gloria!colonel

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site gloria.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!rochester!rocksanne!sunybcs!gloria!colonel
From: colonel@gloria.UUCP (Col. G. L. Sicherman)
Newsgroups: net.text
Subject: two-letter font names in EQN
Message-ID: <729@gloria.UUCP>
Date: Mon, 13-May-85 13:45:01 EDT
Article-I.D.: gloria.729
Posted: Mon May 13 13:45:01 1985
Date-Received: Thu, 16-May-85 05:15:50 EDT
Distribution: net
Organization: The Jack of Clubs Precision Instruments Co.
Lines: 28