Home | History | Annotate | Download | only in test

Lines Matching refs:hex

239    decodes liberally, in that hex digits can be adjacent, in which case two in
240 a row writes a byte. Or they can delimited by any non-hex character, where
241 the delimiters are ignored except when a single hex digit is followed by a
245 local unsigned char *h2b(const char *hex, unsigned *len)
250 in = malloc((strlen(hex) + 1) >> 1);
256 if (*hex >= '0' && *hex <= '9')
257 val = (val << 4) + *hex - '0';
258 else if (*hex >= 'A' && *hex <= 'F')
259 val = (val << 4) + *hex - 'A' + 10;
260 else if (*hex >= 'a' && *hex <= 'f')
261 val = (val << 4) + *hex - 'a' + 10;
268 } while (*hex++); /* go through the loop with the terminating null */
275 /* generic inflate() run, where hex is the hexadecimal input data, what is the
284 local void inf(char *hex, char *what, unsigned step, int win, unsigned len,
311 in = h2b(hex, &have); assert(in != NULL);
507 local int try(char *hex, char *id, int err)
515 /* convert to hex */
516 in = h2b(hex, &len);