Browse code

pdfdecode: change various debug messages for clarity

Kevin Lin authored on 2016/04/06 06:04:10
Showing 1 changed files
... ...
@@ -276,8 +276,6 @@ static int filter_ascii85decode(struct pdf_struct *pdf, struct pdf_obj *obj, str
276 276
     if(cli_memstr(ptr, remaining, "~>", 2) == NULL)
277 277
         cli_dbgmsg("cli_pdf: no EOF marker found\n");
278 278
 
279
-    cli_dbgmsg("cli_pdf: %lu bytes remaining\n", (unsigned long)remaining);
280
-
281 279
     while (remaining > 0) {
282 280
         int byte = (remaining--) ? (int)*ptr++ : EOF;
283 281
 
... ...
@@ -310,12 +308,12 @@ static int filter_ascii85decode(struct pdf_struct *pdf, struct pdf_obj *obj, str
310 310
 
311 311
             declen += 4;
312 312
         } else if(byte == EOF) {
313
-            cli_dbgmsg("cli_pdf: %d bytes remaining in last quintet\n", quintet);
313
+            cli_dbgmsg("cli_pdf: last quintet contains %d bytes\n", quintet);
314 314
             if(quintet) {
315 315
                 int i;
316 316
 
317 317
                 if(quintet == 1) {
318
-                    cli_dbgmsg("cli_pdf: only 1 byte in last quintet\n");
318
+                    cli_dbgmsg("cli_pdf: invalid last quintet (only 1 byte)\n");
319 319
                     rc = CL_EFORMAT;
320 320
                     break;
321 321
                 }
... ...
@@ -440,7 +438,7 @@ static int filter_rldecode(struct pdf_struct *pdf, struct pdf_obj *obj, struct p
440 440
     if (rc == CL_SUCCESS) {
441 441
         free(token->content);
442 442
 
443
-        cli_dbgmsg("cli_pdf: inflated %lu bytes from %lu total bytes\n",
443
+        cli_dbgmsg("cli_pdf: decoded %lu bytes from %lu total bytes\n",
444 444
                    (unsigned long)declen, (unsigned long)(token->length));
445 445
 
446 446
         token->content = decoded;