Mail Archives: djgpp/1998/02/08/00:00:36
From: | Jason Alexander <jalex AT ea DOT oac DOT uci DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Bytes and words
|
Date: | Sat, 07 Feb 1998 20:43:51 -0800
|
Organization: | University of California, Irvine
|
Lines: | 29
|
Message-ID: | <34DD3806.92C44AF4@ea.oac.uci.edu>
|
NNTP-Posting-Host: | pv1821.pv.reshsg.uci.edu
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
In the _Encyclopedia of Graphics File Formats_, published by O'Reilly
& Associates, the discussion of the Targa format (pg.647) says that the
structure of the file header is:
typedef struct _TgaHeader
{
BYTE IDLength;
BYTE ColorMapType;
BYTE ImageType;
WORD CMapStart;
WORD CMapLength;
BYTE CMapDepth;
BYTE XOffSet;
WORD YOffSet;
WORD Width;
WORD Height;
BYTE PixelDepth;
BYTE ImageDescriptor
} TGAHEAD;
If I try to include this in a simple program, gcc complains about the
use of semicolons in a structure and (it seems) about the use of
'BYTE'. Is the above just meant to be a very formal looking piece of
pseudocode, or can one actually declare bytes and words (2 bytes?) in
this manner?
- Raw text -