[comp.sys.amiga.programmer] opening diskfont.library

faheyr@silver.ucs.indiana.edu (Bob Fahey) (03/31/91)

I'm having an unusual problem when opening diskfont.library...

Actually, there is no problem in opening it, IF it exists in the libs:
dir. But, if it isn't in libs:, my system crashes with nice guru 00000004.
(illegal instr). 

Could someone tell me what I am doing wrong? Here's the code I am using:

if (!(diskfontbase = OpenLibrary("diskfont.library", 33L)))
{
	alert(0); /* my routine to display an alert which DOES work correctly*/
	Close_All(); /*closes all opened libraries, windows, etc*/
	exit(FALSE);
}

diskfontbase is of type struct Library... Control never makes it out of the
if... line if diskfont.library doesn't exist, but works fine if it finds it.

Any ideas? Thanks.
Bob
|      ///| a.k.a. NECR0SIS     faheyr@cssun.cs.indiana.edu  -or-            |
|  \\\///_|                     faheyr@silver.ucs.indiana.edu -or-           |
|   \XX/  |  M  I  G  A         faheyr@rose.ucs.indiana.edu                  |
|	      "'Ere long done do does did..."  - The Smiths                  |
|             "...life is seen through the eyes of a dog..."  - Skinny Puppy |

peter@cbmvax.commodore.com (Peter Cherna) (04/03/91)

In article <faheyr.670381151@silver> faheyr@silver.ucs.indiana.edu (Bob Fahey) writes:
>I'm having an unusual problem when opening diskfont.library...

>if (!(diskfontbase = OpenLibrary("diskfont.library", 33L)))

The library name you must use is DiskfontBase (note the capital D and B, and
the lowercase f).  Many people accidentally capitalize the f, including
myself in my original response.  Tip of the hat to Ewout for spotting it...

>Bob

     Peter
--
Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"If all you have is a hammer, everything looks like a nail."

mykes@amiga0.SF-Bay.ORG (Mike Schwartz) (04/03/91)

In article <20278@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes:
>In article <faheyr.670381151@silver> faheyr@silver.ucs.indiana.edu (Bob Fahey) writes:
>>I'm having an unusual problem when opening diskfont.library...
>
>>if (!(diskfontbase = OpenLibrary("diskfont.library", 33L)))
>
>The library name you must use is DiskFontBase (not the capital D, F, and B).
>Many people forget to capitalize the F.
>
>>Bob
>
>     Peter
>--
>Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
>{uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
>My opinions do not necessarily represent the opinions of my employer.
>"If all you have is a hammer, everything looks like a nail."

The Manx 'C' compiler wants DiskfontBase...

--
****************************************************
* I want games that look like Shadow of the Beast  *
* but play like Leisure Suit Larry.                *
****************************************************

jsmoller@jsmami.UUCP (Jesper Steen Moller) (04/04/91)

In article <mykes.1342@amiga0.SF-Bay.ORG>, Mike Schwartz writes:

> In article <20278@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes:
> >In article <faheyr.670381151@silver> faheyr@silver.ucs.indiana.edu (Bob Fahey) writes:
> >>I'm having an unusual problem when opening diskfont.library...
> >
> >>if (!(diskfontbase = OpenLibrary("diskfont.library", 33L)))
> >
> >The library name you must use is DiskFontBase (note the capital D, F, and B).
> >Many people forget to capitalize the F.
>
> >     Peter
> 
> The Manx 'C' compiler wants DiskfontBase...

So does SAS/C. And the Commodore supplied diskfont.fd is keen
on that, too.

In file "Work:AD/FD/diskfont.fd", Commodore-Amiga writes:

> * "diskfont.library"
> ##base _DiskfontBase

Greets, Jesper

--                     __
Jesper Steen Moller   ///  VOICE: +45 31 62 46 45
Maglemosevej 52  __  ///  USENET: cbmehq!cbmdeo!jsmoller
DK-2920 Charl    \\\///  FIDONET: 2:231/84.45
Denmark           \XX/

peter@cbmvax.commodore.com (Peter Cherna) (04/05/91)

In article <18ee4e12.ARN1263@jsmami.UUCP> cbmehq!cbmdeo!jsmami!jsmoller (Jesper S. Moller) writes:
>In article <mykes.1342@amiga0.SF-Bay.ORG>, Mike Schwartz writes:
>> >The library name you must use is DiskFontBase (note the capital D, F, and B).
>> >Many people forget to capitalize the F.
>>
>> >     Peter
>> 
>> The Manx 'C' compiler wants DiskfontBase...
>
>So does SAS/C. And the Commodore supplied diskfont.fd is keen
>on that, too.

Yes, I had it wrong.  I corrected it in a followup.  Sorry for any
confusion I added.

>Jesper Steen Moller   ///  VOICE: +45 31 62 46 45

     Peter
--
Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"If all you have is a hammer, everything looks like a nail."