Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | pack: Simplify signed integer packing calculation | Tomasz Kramkowski | 2021-08-14 | 1 | -7/+1 |
| | | | | | | | | | | | | | Because of the fact that uintmax_t guarantees at least a full 64 bit width and because of C's behavior when a signed type is converted to an unsigned type and the value is out of range, the new code just sign-extends and converts to a uintmax_t wide two's complement signed value. As an aside, the old code was written forgetting the fact that that uintmax_t + intmax_t would be first converted to uintmax_t + uintmax_t before being evaluated. The end result was the same except it ended up being offset by 2^8s. | ||||
* | always va_end even when an error occurs | Tomasz Kramkowski | 2021-08-07 | 1 | -4/+6 |
| | |||||
* | fix up missed pack_type chars | Tomasz Kramkowski | 2021-08-06 | 1 | -1/+1 |
| | |||||
* | use xmacros to generate type related code | Tomasz Kramkowski | 2021-08-06 | 1 | -19/+15 |
| | |||||
* | add pack_type and pack_endian and use them | Tomasz Kramkowski | 2021-08-06 | 1 | -16/+16 |
| | |||||
* | Fix license information content and format | Tomasz Kramkowski | 2021-08-05 | 1 | -1/+1 |
| | |||||
* | Define PRIuSIZE to avoid issues compiling with msvcrt | Tomasz Kramkowski | 2021-08-05 | 1 | -2/+2 |
| | | | | | | | | On windows and when cross compiling with mingw the standard library only supports C89 which means that print format arguments cannot take "%zu". To fix this, a PRIuSIZE macros is needed which expands to PRIu32 on windows 32 bit and PRIu64 on windows 64 bit. | ||||
* | explicitly cast printf %p params to (void *) | Tomasz Kramkowski | 2021-08-05 | 1 | -1/+1 |
| | |||||
* | Implement a basic pack function | Tomasz Kramkowski | 2020-09-12 | 1 | -0/+81 |