53 #define STR(x) vstring_str(x)
54 #define LEN(x) VSTRING_LEN(x)
64 for (cp = raw; (ch = *(
unsigned const char *) cp) != 0; cp++) {
83 for (cp = hex; (ch = *cp) != 0; cp++) {
86 ch = (cp[1] -
'0') << 4;
87 else if (cp[1] >=
'a' && cp[1] <=
'f')
88 ch = (cp[1] -
'a' + 10) << 4;
89 else if (cp[1] >=
'A' && cp[1] <=
'F')
90 ch = (cp[1] -
'A' + 10) << 4;
95 else if (cp[2] >=
'a' && cp[2] <=
'f')
96 ch |= (cp[2] -
'a' + 10);
97 else if (cp[2] >=
'A' && cp[2] <=
'F')
98 ch |= (cp[2] -
'A' + 10);
129 int main(
int unused_argc,
char **unused_argv)
135 while ((len = read_buf(
VSTREAM_IN, raw)) > 0) {
140 msg_fatal(
"len %ld != raw len %ld", (
long) len, (
long)
LEN(raw));
int main(int argc, char **argv)
#define VSTRING_TERMINATE(vp)
#define VSTRING_ADDCH(vp, ch)
VSTRING * vstring_sprintf_append(VSTRING *vp, const char *format,...)
#define VSTRING_RESET(vp)
VSTRING * hex_unquote(VSTRING *raw, const char *hex)
VSTRING * vstring_alloc(ssize_t len)
VSTRING * hex_quote(VSTRING *hex, const char *raw)
#define vstring_avail(vp)
NORETURN msg_fatal(const char *fmt,...)
#define vstream_fread(v, b, n)
int vstream_fflush(VSTREAM *stream)
#define vstream_fwrite(v, b, n)
VSTRING * vstring_free(VSTRING *vp)
#define VSTRING_AT_OFFSET(vp, offset)