[comp.sys.atari.st] rsrc_load, etc.

0ALEVI@POMONA.BITNET (04/06/88)

Date: 5 April 1988, 14:30:09 PST
From: 0ALEVI at POMONA
To:   INFO-ATARI16 at SCORE.STANFORD.EDU
Subject: rsrc_load, etc.

First of all, I'm sorry about sending multiple files to everybody.

Second of all, about rsrc_load:
  After getting a retcode of 0 from rsrc_load, I did an rsrc_gaddr
and ended up with a retcode of 1.
What does this mean?
Is the Abacus book 'Gem Programming Reference Guide' correct in saying
that 0 is an error?
Somebody told me that he thought that this is incorrect.  He didn't sound
completely sure though.
Can anybody give me a definite answer?
If so, what am I doing wrong?
-any help will be greatly appreciated.
Sincerely,
Alan M. Levi
(*  0alevi@pomona.bitnet *)

wes@obie.UUCP (Barnacle Wes) (04/10/88)

In article <8804052209.AA25739@ucbvax.Berkeley.EDU>, 0ALEVI@POMONA.BITNET writes:
>   After getting a retcode of 0 from rsrc_load, I did an rsrc_gaddr
> and ended up with a retcode of 1.
> What does this mean?

From MWC 2.1.7 Lexicon (Sybex _Programmer's Guid to GEM_ concurs):

int rsrc_load(filename)
char *filename;
rsrc_load returns 0 if an error occurred, and a number greater than 0
if one did not.

int rsrc_gaddr(type, index, address)
int type, index;
char **address;
rsrc_gaddr returns 0 if an error occurred, and a number greater than 0
if one did not.

> Is the Abacus book 'Gem Programming Reference Guide' correct in saying
> that 0 is an error?

Yep.

> Somebody told me that he thought that this is incorrect.  He didn't sound
> completely sure though.
> Can anybody give me a definite answer?
> If so, what am I doing wrong?

Are you sure you have the correct filename for the resource file?  Did
you put the complete filename in, including the .RSC extension?  Have
you checked to make sure the RSC file hasn't been garbaged?

> -any help will be greatly appreciated.

Hope it did :-)

-- 
    /\              -  "Against Stupidity,  -    {backbones}!
   /\/\  .    /\    -  The Gods Themselves  -  utah-cs!utah-gr!
  /    \/ \/\/  \   -   Contend in Vain."   -  uplherc!sp7040!
 / U i n T e c h \  -       Schiller        -     obie!wes