>Multi-character constants are not allowed. Why are there any in XBlockFile?
>We should do this in a compatable manner. An enum would be better -- one
>that uses integers, not character constants.
Anthony,
it eases debugging if field types are character constants. You see 'MAP '
and instantly know that this must be part of the block entry for the map.
I've added a workaround, tell me if it helps.
>And what kind of coding is that? What's wrong with a for loop? Why code
>around it?
Oops. Sorry, that's a bad habit of mine. Consider them replaced through
"for"s.
>XEndianFile.h: At top level:
>XEndianFile.h:71: warning: `long int sTypeSizes[6]' defined but not used
>XEndianFile.h:77: warning: `long int sTypeBounds[3]' defined but not used
>
>What are these structs for? And powerc needs to be documented. Any other
>preprocessor things to document? Hmmm.... I'll grep it.
They belong in the .cpp file, sorry. They're there so XBlockFile's
templates can correctly walk data structures. See WriteStruct() and
ReadStruct() (and where XBlockFile uses those) for an example. These are
platform dependent, you put the following into sTypeSizes:
<size of packed char>, <size of char as struct field>, <size of packed
short>, <size of short as struct field>, <size of packed long>, <size of
long as struct field>
The SFT_* constants are indexes into this array.
sTypeBounds contains a list on which boundaries the specified types are to
be aligned:
<align char on>, <align short on>, <align long on>
I hope you know how the linux compiler aligns structures in RAM ? Can you
send me the conditional for that? It's different for 680x0 and PowerPC, and
I guess it also will be for PowerPC.
>DATA_CHUNK_SIZE -- self evident, but did not know about it with
> -- grep.
Umm what does this mean? Could you re-phrase? What does grep do?
>PRAGMA_STRUCT_ALIGN -- normally defined by Apple's headers,
> -- but you're fortunately not including them
CodeWarrior seems to include them, but with XEndianFile these are obsolete
anyway and I just removed them.
>TRUE -- these are C++ keywords. Try "true" and "false"
>FALSE
Pardon? I thought TRUE and FALSE were the new standard for C++ booleans,
since CW didn't declare them I thought I'd do it when they're missing.
"true" and "false" are Macintosh-specific, I thought. Is it different
actually?
>__X_BLOCK_FILE__ -- these are reserved for use by the
>__X_ENDIAN_FILE__ -- standards committee or library writers:
> -- You're not allowed to start a preprocessor
> -- symbols with an underscore. Use X_BLOCK_FILE_H
> -- instead.
Changed.
>/usr/lib/crt1.o(.text+0xb0): undefined reference to `main'
>collect2: ld returned 1 exit status
>
>Hmmm.... were we supposed to get a test suite?
What do you mean? Let me guess ... egcc doesn't find main()? It's declared
as int main(void) in HelloWorld.cpp. What does egcc expect?
Cheers,
-- M. Uli Kusterer
------------------------------------------------------------
http://www.weblayout.com/witness
'The Witnesses of TeachText are everywhere...'
--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html