Hi Daniel,
If 64bit types are available in the system, shouldn't we use them?
Something like re-defining the functions if 64bit types are available:
#ifdef int64_t
#define PDF_USE_BUILTIN_64BIT_SUPPORT 0
#else
#define PDF_USE_BUILTIN_64BIT_SUPPORT 1
#endif
And then...
#if PDF_USE_BUILTIN_64BIT_SUPPORT
pdf_status_t pdf_i64_copy(const pdf_i64_t orig, pdf_i64_t *copy)
{
if (copy == NULL)
{
return PDF_ERROR;
}
copy->high = orig.high;
copy->low = orig.low;
return PDF_OK;
}/*end pdf_i64_copy*/
#else
pdf_status_t pdf_i64_copy(const pdf_i64_t orig, pdf_i64_t *copy)
{
*copy=orig;
return PDF_OK;
}
#endif
And so on... or even directly with macros.
Best regards,
-Aleksander