delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/30/14:49:30

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro: pack_fread()
Date: 30 Jan 1998 16:59:13 GMT
Organization: Oxford University, England
Lines: 35
Message-ID: <6at0t1$5c4$10@news.ox.ac.uk>
References: <MPG DOT f3b0c7939c7dde59896c2 AT news> <34D15BD1 DOT 85340453 AT csun DOT edu>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 29 Jan 1998 20:49:21 -0800 in comp.os.msdos.djgpp Ryan Bright
<rmb56313 AT csun DOT edu> wrote:

: AFAIK, however, if you're not going take advantage of the compression,
: password, or datafile access capabilities of packfiles, there's really
: no reason to use them at all.  It would only decrease the portability of
: your code.

True, but there are benefits, particularly if you're using Allegro for
everything anyway.  Shawn wrote all of the code for Allegro using
packfile functions, even the code to load BMP, PCX, MID, WAV, VOC, etc
files; as a consequence, when he implemented the `#' extension to the
packfile functions it immediately applied to all of these file loaders
too.

: Also, it will add a flag (F_NOPACK_MAGIC) to the beginning
: of the file, stating that it is, in fact, not compressed.

In fact that's not true.  The flag is only added (1) if the file is
opened for writing, and (2) if the `!' flag is explicitly given
(i.e. only if you open a file for writing and say "Please put the
magic byte on!").

:  pf = pack_fopen("/autoexec.bat", "rt!");

The `t' flag is not understood by packfile functions, incidentally.

: > *** Remove SPAMGUARD ***
: > ***  when replying!  ***
: No!

Save Usenet!  Fight anti-spammers! :)

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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