[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Patch to roberto's struct library...
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Mon, 21 Jan 2008 16:25:17 -0500
Miles Bader wrote:
> Duck <email@example.com> writes:
>> Roberto's small but useful 'struct' library, here:
> My that does look handy!
> I was just thinking about trying to parse some binary files using
> lpeg, but wasn't quite sure how I was going to deal with floats etc..
> "struct.c" looks like it would be just the rhint.
> Roberto, care to put a minimal copyright/license statement in the
> comment, just to make it easier for us all to steal ? :-)
I was just about to need that kind of library, the timing of this thread
is perfect for me.
I won't need it in my current project, but I noticed that struct,
contrary to lpack, doesn't have a way to capture a size_t sized integer.
On some platform, especially Windows x64, the long is 32bits only, while
the size_t is 64bits. It would be a nice addition to struct.
On the other hand, lpack has the opposite problem for size+string
matching. On Windows x64, 'p', 'P' and 'a' match a string with a
prefixed sized of respectively 8 (unsigned char), 16 (unsigned short)
and 64bits (size_t). It would be handy to have a string matching pattern
which uses 'unsigned int' as a size type.