Pārlūkot izejas kodu

More debug output

master
JustAnotherArchivist pirms 1 gada
vecāks
revīzija
2e579964f9
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      warc-dump-responses.c

+ 4
- 0
warc-dump-responses.c Parādīt failu

@@ -1,4 +1,5 @@
#define _GNU_SOURCE
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -38,6 +39,9 @@ int main(int argc, char* argv[]) {
bufp = buf;
checkstate:
DEBUG_PRINTF("Have %zu bytes of buffer (at %p)\n", n, (void*)bufp);
DEBUG_PRINTF("Beginning of buffer: ");
for (int i = 0; i < 64; ++i) DEBUG_PRINTF(isprint(*(bufp + i)) ? "%c" : "\\x%02x", *(bufp + i) & 0xFF);
DEBUG_PRINTF("\n");
if (n == 0) {
break;
}


Notiek ielāde…
Atcelt
Saglabāt