Definition at line 39 of file lwout_wkb.c.
40{
41 char *hex;
42 uint32_t i;
43 if ( ! bytes || ! size )
44 {
45 lwerror(
"hexbutes_from_bytes: invalid input");
46 return NULL;
47 }
49 hex[2*size] = '\0';
50 for( i = 0; i < size; i++ )
51 {
52
53 hex[2*i] =
hexchr[bytes[i] >> 4];
54
55 hex[2*i+1] =
hexchr[bytes[i] & 0x0F];
56 }
57 return hex;
58}
void * lwalloc(size_t size)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References hexchr, lwalloc(), and lwerror().
Referenced by cu_twkb(), cu_twkb_idlist(), cu_twkb_in(), cu_wkb_in(), do_test_s32_varint(), do_test_s64_varint(), do_test_u32_varint(), and do_test_u64_varint().