Re[2]: [AD] dat tool save header patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
VPh> Just one thing I'm thinking of: I see you take the filename to build
VPh> the identifier. It might be better to take the whole path, and then
VPh> C/C++ identifierize the resultant name in case a project uses something
VPh> like npc/ids.h, objects/ids.h and maps/ids.h. Also, a valid filename is
VPh> not the same as a valid cpp identifier, so some encoding would be
VPh> needed anyway. Like a file can start with a number but an identifier
VPh> can't. Just a thought.
Yeah, I guess my solution was a bit too easy. I'll submit a new patch
tomorrow that uses whole path, and replaces all '.' and '/' chars with '_'.
Any other chars that needs to be replaced? (I guess anything except numbers
and letters?)
Also, I'll add '_' to start to make sure first char is valid. IIRC, that
means I should replace utoupper() with utolower() too, since upper case
names starting with '_' are reserved for compiler use (or was it lower case
names that was reserved?). Maybe I'm too much of a newbie to write this, but
I'll try. :)
--
Sincerely,
Daniel Schlyder
PS. Really looking forward to your Ogg lib.