| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | QWK problem(s) |
BS> Hello Bob!
BS> Wed 2003-08-13 09:39, Bob Jones (1:343/41) wrote to Bo Simonsen:
BJ> === cut here ===
BJ> 6. If he is declaring his own structures for reading squish bases,
BJ> you might find this syntax helpful:
BJ> struct _mystruct
BJ> {
BJ> int field;
BJ> } __attribute__((packed));
BJ> .that should give the same structure size as Scott was using on
BJ> the DOS-based compilers. Of course, __attribute__((a)) gets
BJ> #defined to spaces on non-__GNUC__ platforms..
BJ> === cut here ===
BJ> So, I would recommend checking to see if the structure you are
BJ> using has the __attribute__((packed)); statement included. If it
BJ> does, then we had some padding under DOS / OS/2 / Win32 environment
BJ> that wasn't clean in the old code. If the attribute isn't there,
BJ> then I'd try adding it for the structure being read and/or written
BJ> in binary format to the qwk file.... Since I haven't looked at the
BJ> specific code you're dealing with, this may not be the issue with
BJ> the qwk code....
BS> Wow it worked! :-)
I'm glad Wes mentioned that one, because I would have been looking for the
solution..... Now that I've seen other messages showing that it is a 5
byte value being written out, I understand why the problem. GCC was
probably writing 8 bytes at a time instead of 5 until you added the
__attribute__((packed)); statement......
Please let me know when you have that change checked into CVS. After that,
I'll bump the build number by one and recompile on my system.
Thanks!
Take care.....
Bob Jones, 1:343/41
--- Maximus/2 3.01
* Origin: Top Hat 2 BBS (1:343/41)SEEN-BY: 633/267 270 @PATH: 343/41 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.