Mail Archives: djgpp/1996/09/30/03:45:57
From: | jmarco AT cnct DOT com (John Panettiere)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | packed data structures?
|
Date: | Mon, 30 Sep 1996 05:18:48 GMT
|
Organization: | The Internet Conection
|
Lines: | 21
|
Message-ID: | <52nl1a$kqv@news2.cnct.com>
|
NNTP-Posting-Host: | nj-dialup234.cnct.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello, all.
At first I didn't know why my VBE2 code wasn't working, but then I
realized that djgpp wasn't packing the data structures - so I browsed
the info files and found "__attribute__((packed))", which seemed to be
the answer I was looking for. I applied this attribute to every field
in all of my VBE2 data structures, but the problem still seemed to
remain - 16 bit fields were being padded! Is there a known problem
with packing, or is there something I'm overlooking?
I've already downloaded the vbe2 sample code that is mentioned in the
faq, in fact its what my code is largely based on. The author of that
code doesn't go through the entire list of videomodes using the
"VideoModePtr" field returned in the VbeInfoBlock structure; this is
something I need to do and is at the heart of my present predicament.
Thanks in advance!
John Panettiere
- Raw text -