Duncan Neithercut wrote:


Hi,
Dont know about UINT


According to my dos C compiler (1990 vintage) UINT is probably unsigned int of 16 bits (2 bytes); discovered via limits.h:

#define INT_MAX     0x7FFF
#define INT_MIN     ((int)0x8000)
#define UINT_MAX    0xFFFFU
...
#define LONG_MAX    0x7FFFFFFFL
#define LONG_MIN    ((long)0x80000000L)
#define ULONG_MAX   0xFFFFFFFFUL


Tho' my compiler doesn't know about uint or dword (so they may be defined in a header file somewhere).


However, the sizeof(int) is *VERY* implementation dependent. I wrote a program a few years ago on a system that was 4 byte int (= long). I've ported it to many different OS's except one: DOS - where it was a 2 byte int (= short) [that was fairly easy to get around, the problem was the IO library (in particular tty) that was a pig to convert]. A Windoze NT C compiler used int = 8 bytes.

So your routines may be making a false assumption! But then again, they may just assume the smallest (ie int = short) and ignore the spare 2 (or 6) bytes.



Reply via email to