www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/17/05:23:49

Message-ID: <D1FB30BBA491D1118E6D006097BCAE39279276@Probe-nt-2a.Probe.co.uk>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Allegro Packfile routines vs. <stdio> functions...
Date: Fri, 17 Apr 1998 10:22:08 +0100
MIME-Version: 1.0

Jeremy Lounds writes:
> And here is mine that fails at _pack_fread :
[...]
>    the_file=pack_fopen( mFilename, F_READ );
>    pack_fseek( the_file, Start );
>    size=pack_fread( buffer, Len, the_file );
>    pack_fclose(the_file);
>    return(size);

You don't say _how_ it fails, which makes it rather tricky to say what 
the problem might be! The code looks ok to me, except that I would 
advise checking the return from pack_fopen() to make sure it is really
finding your object. What happens when you run this: does it crash,
or just return incorrect data?

	Shawn Hargreaves.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019