src/dumpstats.c
static int dump_binary(struct chunk *out, const char *buf, int bsize)
{
	unsigned char c;
	int ptr = 0;

	while (ptr < bsize) {
		c = buf[ptr];

		if (out->len > out->size - 2)
			break;
		out->str[out->len++] = hextab[(c >> 4) & 0xF];
		out->str[out->len++] = hextab[c & 0xF];

		ptr++;
	}
	return ptr;
}
/* print a buffer in hexa.
 * Print stopped if <bsize> is reached, or if no more place in the chunk.
 */
print a buffer in hexa.
Print stopped if  is reached, or if no more place in the chunk.
print a buffer in hexa . Print stopped if is reached or if no more place in the chunk .
static int dump_binary(struct chunk *out, const char *buf, int bsize)
{
	unsigned char c;
	int ptr = 0;
	while (ptr < bsize) {
		c = buf[ptr];
		if (out->len > out->size - 2)
			break;
		out->str[out->len++] = hextab[(c >> 4) & 0xF];
		out->str[out->len++] = hextab[c & 0xF];
		ptr++;
	}
	return ptr;
}
static int dump_binary ( struct chunk * out , const char * buf , int bsize ) { unsigned char c ; int ptr = 0 ; while ( ptr < bsize ) { c = buf [ ptr ] ; if ( out -> len > out -> size - 2 ) break ; out -> str [ out -> len ++ ] = hextab [ ( c >> 4 ) & 0xF ] ; out -> str [ out -> len ++ ] = hextab [ c & 0xF ] ; ptr ++ ; } return ptr ; }
print a buffer in hexa.
print a buffer in hexa .