🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1222

guru when calling OpenDiskFont

#1222
From: The Prism
Date: Mon, 11 Sep 1989 21:55
60 lines
1723 bytes
Much thanks for responses to previous questions!  But, I've another...

When I call OpenDiskFont to load a font, I get a guru.

I have successfully opened the diskfont.library prior to my call to
OpenDiskFont, and I have a valid TextAttr structure, the pointer to which
is passed to OpenDiskFont.  Below is my code:
------------------

....

struct TextFont	*tf;
struct Library *DiskFontBase
struct TextAttr biggerfont = {
	"courier.font",
	18,
	0,
	0
};

main()
{
	....

	if(openlibraries())
		exit(0);
	setup_fonts();

	....
}

openlibraries()
{
	....

	/* prior to this line, I've opened up the intuition, graphics, and
	   dos libraries */
	if((DiskFontBase = (struct Library *)OpenLibrary("diskfont.library",0))
		== (struct Library *) NULL) {
			fprintf(stderr,"OpenLibrary(diskfont.library) returns error\n");
			return(1);
	}
	....
	return(0);
}

....

setup_fonts()
{
	fprintf(stderr,"going into OpenDiskFont()\n");
	if((tf = OpenDiskFont(&biggerfont))==(struct TextFont *)NULL)
		fprintf(stderr,"OpenDiskFont(biggerfont) returns error\n");
	fprintf(stderr,"back from OpenDiskFont()\n");
}

---------------------------

I get the message "going into OpenDiskFont()" message, then I get the guru.
Technical Details
Message-ID: <1319@jimi.cs.unlv.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!unsvax!jimi!stevie!jack

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!unsvax!jimi!stevie!jack
From: jack@stevie.cs.unlv.edu (The Prism)
Newsgroups: comp.sys.amiga.tech
Subject: guru when calling OpenDiskFont
Message-ID: <1319@jimi.cs.unlv.edu>
Date: 11 Sep 89 21:55:50 GMT
Sender: news@jimi.cs.unlv.edu
Reply-To: jack@jimi.cs.unlv.edu (The Prism)
Organization: UNLV Computer Science and Electrical Engineering
Lines: 60