comparison dbutil.c @ 198:65585699d980

* add a "label" argument to printhex() * make some vars static in random.c
author Matt Johnston <matt@ucc.asn.au>
date Tue, 10 May 2005 17:02:05 +0000
parents 257f09a63dab
children ca7e76d981d9 e5ad9fa8b1fa c5d3ef11155f
comparison
equal deleted inserted replaced
197:a6eb598d8686 198:65585699d980
428 428
429 return m_strdup(hbuf); 429 return m_strdup(hbuf);
430 } 430 }
431 431
432 #ifdef DEBUG_TRACE 432 #ifdef DEBUG_TRACE
433 void printhex(unsigned char* buf, int len) { 433 void printhex(const char * label, const unsigned char * buf, int len) {
434 434
435 int i; 435 int i;
436 436
437 fprintf(stderr, "%s\n", label);
437 for (i = 0; i < len; i++) { 438 for (i = 0; i < len; i++) {
438 fprintf(stderr, "%02x", buf[i]); 439 fprintf(stderr, "%02x", buf[i]);
439 if (i % 16 == 15) { 440 if (i % 16 == 15) {
440 fprintf(stderr, "\n"); 441 fprintf(stderr, "\n");
441 } 442 }