Lines Matching refs:raw
9 /* VSTRING *hex_quote(hex, raw)
11 /* const char *raw;
13 /* VSTRING *hex_unquote(raw, hex)
14 /* VSTRING *raw;
25 /* result value is the raw argument in case of success, a null pointer
56 /* hex_quote - raw data to quoted */
58 VSTRING *hex_quote(VSTRING *hex, const char *raw)
64 for (cp = raw; (ch = *(unsigned const char *) cp) != 0; cp++) {
75 /* hex_unquote - quoted data to raw */
77 VSTRING *hex_unquote(VSTRING *raw, const char *hex)
82 VSTRING_RESET(raw);
103 VSTRING_ADDCH(raw, ch);
105 VSTRING_TERMINATE(raw);
106 return (raw);
131 VSTRING *raw = vstring_alloc(BUFLEN);
135 while ((len = read_buf(VSTREAM_IN, raw)) > 0) {
136 hex_quote(hex, STR(raw));
137 if (hex_unquote(raw, STR(hex)) == 0)
139 if (LEN(raw) != len)
140 msg_fatal("len %ld != raw len %ld", (long) len, (long) LEN(raw));
141 if (vstream_fwrite(VSTREAM_OUT, STR(raw), LEN(raw)) != LEN(raw))
145 vstring_free(raw);