RE: [GD-General] Feedback wanted on POSH
Brought to you by:
vexxed72
From: Garett B. <gt...@st...> - 2003-11-19 02:41:07
|
Brian, After looking at posh.h I'm a bit confused. You have defined a whole list of basic types (posh_..._t), signed and unsigned integers of 8, 16, and 32 bits respectively. I notice, however, the only platform you support that requires these typedefs is PalmOS, and then only for the 32-bit integers. This seems like overkill, especially considering the duplication of integer/signed types. This leaves me wondering whether some platforms define char as unsigned char while others define char as signed char. Why not simply define posh types based on the number of bits and leave the signed/unsigned up to the user? For example: typdef char my_byte; void Foo(unsigned my_byte bar) {/*...*/}; Also, I find it misleading to call an unsigned char a "byte", since all of the char types are technically a byte and your posh "byte" has no intrinsic indication of being unsigned. Also, having the same signed type appear under two different names may leave the user wondering whether there is a need to explicitly convert a variable of type i16 to s16, which serves no purpose. Grandmaster B, I seek enlightenment on these matters, would you mind explaining your reasoning? Regards, Garett Bass gt...@st... -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Brian Hook Sent: Tuesday, November 18, 2003 12:07 PM To: gam...@li... Subject: [GD-General] Feedback wanted on POSH I've been working on a portable open source "harness", a header file that (ideally) handles a lot of configuration crap for most people. You know what I mean, the standard stuff like defining the proper DLL export signature, sized types, etc. I'm still dismayed every time I see some open source library doing: #if WHATEVER typedef unsigned int my_u32_t; typedef long long my_i64_t; #endif POSHLIB isn't very well tested or reviewed. It consists of a header file and an optional source file: http://www.poshlib.org I'd appreciate it if anyone is bored and has some free time, if they could look at it and let me know their opinions or if they spot any obvious bugs. Thanks, Brian |