www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/16/16:00:22

From: Yamaha / XYZZ <scriven AT CS DOT ColoState DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NEED HELP reading header for pcx image file
Date: Mon, 16 Dec 1996 11:26:40 -0700
Organization: XYZZ Software Co.
Lines: 20
Message-ID: <32B59460.15FB@CS.ColoState.edu>
References: <593sb2$6k7 AT News DOT Dal DOT Ca>
NNTP-Posting-Host: seurat.vis.colostate.edu
Mime-Version: 1.0
To: Graham Howard Wile <an118 AT chebucto DOT ns DOT ca>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Graham Howard Wile wrote:
> 
>         I have written code that seems to read in the first 128 bytes,
> which is the header for the pcx file. But when I look at it, it's
> gobble-de-gook, you can't read it. I've even tried reading it as a pcx
> structure. All my reads were done on the file opened in binary mode. Once
> I read in the header via binary, it even shows as garbage when I try to
> access individual header elements via my structure member variable after
> reading it into the structure. Can anybody tell me what's wrong?

Take a look at the PCX code on my page.  It's written for DJGPP.

My guess is that you're missing a "__attribute__ ((packed))"
somewhere...


-- Yamaha / XYZZ
mailto:scriven AT CS DOT ColoState DOT edu          
mailto:scriven AT VIS DOT ColoState DOT edu
http://www.vis.colostate.edu/~scriven/

- Raw text -


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