Mercurial > hg > th-libs
comparison th_network.c @ 150:9bc7f60f3013
More portability stuff. :|
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Jan 2015 20:21:27 +0200 |
parents | 0a085e2e8bf5 |
children | b4e1b15a64e1 |
comparison
equal
deleted
inserted
replaced
149:6a0e9980b76b | 150:9bc7f60f3013 |
---|---|
941 char *p; | 941 char *p; |
942 size_t offs, left; | 942 size_t offs, left; |
943 | 943 |
944 fprintf(f, | 944 fprintf(f, |
945 "\n--------------------------------------------------------------\n" | 945 "\n--------------------------------------------------------------\n" |
946 "err=%d, status=%d, got_bytes=%zd, total_bytes=%zd\n" | 946 "err=%d, status=%d, got_bytes=%" TH_PRIu_SIZE_T ", total_bytes=%" TH_PRIu_SIZE_T "\n" |
947 "buf=0x%p, in_ptr=0x%04zx, ptr=0x%04zx\n", | 947 "buf=0x%p, in_ptr=0x%04" TH_PRIx_SIZE_T ", ptr=0x%04" TH_PRIx_SIZE_T "\n", |
948 conn->err, conn->status, conn->base.got_bytes, conn->base.total_bytes, | 948 conn->err, conn->status, conn->base.got_bytes, conn->base.total_bytes, |
949 conn->base.buf, conn->base.in_ptr - conn->base.buf, conn->base.ptr - conn->base.buf); | 949 conn->base.buf, conn->base.in_ptr - conn->base.buf, conn->base.ptr - conn->base.buf); |
950 | 950 |
951 // Dump buffer contents as a hexdump | 951 // Dump buffer contents as a hexdump |
952 for (offs = 0, left = conn->base.total_bytes, p = conn->base.buf; p < conn->base.in_ptr;) | 952 for (offs = 0, left = conn->base.total_bytes, p = conn->base.buf; p < conn->base.in_ptr;) |