[sane-devel] coolscan2 in 1.0.8
Major A
andras at users.sourceforge.net
Sun Apr 14 17:08:54 BST 2002
Henning,
> doc/backend-writing.txt says:
>
> * Please do not assume that size_t' is unsigned int'. On some
> systems, it's unsigned long' and the size of this type may be bigger
> than that of an int (this is true for practially any of the 64-bit
> systems). To print a variable of type size_t portably, cast the
> variable to u_long and print it with the %lu specifier. E.g.:
>
> size_t len;
> DBG(3, "len=%lu\n", (u_long) len);
Damn, I should have read that first... done it now. It's not perfectly
portable though, because unsigned long is only required by ISO C to be
>=32bits, if I remember correctly. There is hardware out there which
has a larger address space than the size of the integer registers (an
example is the 68040 and 68060, which have 32-bit registers and 40-bit
addresses, if I'm not much mistaken). It all still depends on the OS,
of course.
Andras
===========================================================================
Major Andras
e-mail: andras at users.sourceforge.net
www: http://andras.webhop.org/
===========================================================================
More information about the sane-devel
mailing list