Add debug printfs.

This commit is contained in:
Michael R Sweet 2024-08-26 09:19:34 -04:00
parent 7d22477917
commit 206f75403a
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244

View File

@ -188,6 +188,8 @@ pdfioFileCreate(
int fd; // File descriptor int fd; // File descriptor
PDFIO_DEBUG("pdfioFileCreate(filename=\"%s\", version=\"%s\", media_box=%p, crop_box=%p, error_cb=%p, error_cbdata=%p)\n", filename, version, (void *)media_box, (void *)crop_box, (void *)error_cb, (void *)error_cbdata);
// Range check input... // Range check input...
if (!filename) if (!filename)
return (NULL); return (NULL);
@ -390,6 +392,8 @@ pdfioFileCreateOutput(
pdfio_error_cb_t error_cb, // I - Error callback or `NULL` for default pdfio_error_cb_t error_cb, // I - Error callback or `NULL` for default
void *error_cbdata) // I - Error callback data, if any void *error_cbdata) // I - Error callback data, if any
{ {
PDFIO_DEBUG("pdfioFileCreate(output_cb=%p, output_cbdata=%p, version=\"%s\", media_box=%p, crop_box=%p, error_cb=%p, error_cbdata=%p)\n", (void *)output_cb, (void *)output_cbdata, version, (void *)media_box, (void *)crop_box, (void *)error_cb, (void *)error_cbdata);
return (create_common("output.pdf", /*fd*/-1, output_cb, output_cbdata, version, media_box, crop_box, error_cb, error_cbdata)); return (create_common("output.pdf", /*fd*/-1, output_cb, output_cbdata, version, media_box, crop_box, error_cb, error_cbdata));
} }
@ -524,6 +528,8 @@ pdfioFileCreateTemporary(
unsigned tmpnum; // Temporary filename number unsigned tmpnum; // Temporary filename number
PDFIO_DEBUG("pdfioFileCreate(buffer=%p, bufsize=%lu, version=\"%s\", media_box=%p, crop_box=%p, error_cb=%p, error_cbdata=%p)\n", (void *)buffer, (unsigned long)bufsize, version, (void *)media_box, (void *)crop_box, (void *)error_cb, (void *)error_cbdata);
// Range check input... // Range check input...
if (!buffer || bufsize < 32) if (!buffer || bufsize < 32)
{ {
@ -938,6 +944,8 @@ pdfioFileOpen(
off_t xref_offset; // Offset to xref table off_t xref_offset; // Offset to xref table
PDFIO_DEBUG("pdfioFileOpen(filename=\"%s\", password_cb=%p, password_cbdata=%p, error_cb=%p, error_cbdata=%p)\n", filename, (void *)password_cb, (void *)password_cbdata, (void *)error_cb, (void *)error_cbdata);
// Range check input... // Range check input...
if (!filename) if (!filename)
return (NULL); return (NULL);
@ -1295,6 +1303,8 @@ create_common(
unsigned char id_value[16]; // File ID value unsigned char id_value[16]; // File ID value
PDFIO_DEBUG("create_common(filename=\"%s\", fd=%d, output_cb=%p, output_cbdata=%p, version=\"%s\", media_box=%p, crop_box=%p, error_cb=%p, error_cbdata=%p)\n", filename, fd, (void *)output_cb, (void *)output_cbdata, version, (void *)media_box, (void *)crop_box, (void *)error_cb, (void *)error_cbdata);
// Range check input... // Range check input...
if (!filename || (fd < 0 && !output_cb)) if (!filename || (fd < 0 && !output_cb))
return (NULL); return (NULL);