Lines Matching refs:source

40 str_totext(const char *source, isc_buffer_t *target);
53 base32_totext(isc_region_t *source, int wordlength, const char *wordbreak,
63 while (source->length > 0) {
64 buf[0] = base[((source->base[0] >> 3) & 0x1f)]; /* 5 + */
65 if (source->length == 1) {
66 buf[1] = base[(source->base[0] << 2) & 0x1c];
72 buf[1] = base[((source->base[0] << 2) & 0x1c) | /* 3 = 8 */
73 ((source->base[1] >> 6) & 0x03)]; /* 2 + */
74 buf[2] = base[((source->base[1] >> 1) & 0x1f)]; /* 5 + */
75 if (source->length == 2) {
76 buf[3] = base[(source->base[1] << 4) & 0x10];
81 buf[3] = base[((source->base[1] << 4) & 0x10) | /* 1 = 8 */
82 ((source->base[2] >> 4) & 0x0f)]; /* 4 + */
83 if (source->length == 3) {
84 buf[4] = base[(source->base[2] << 1) & 0x1e];
89 buf[4] = base[((source->base[2] << 1) & 0x1e) | /* 4 = 8 */
90 ((source->base[3] >> 7) & 0x01)]; /* 1 + */
91 buf[5] = base[((source->base[3] >> 2) & 0x1f)]; /* 5 + */
92 if (source->length == 4) {
93 buf[6] = base[(source->base[3] << 3) & 0x18];
98 buf[6] = base[((source->base[3] << 3) & 0x18) | /* 2 = 8 */
99 ((source->base[4] >> 5) & 0x07)]; /* 3 + */
100 buf[7] = base[source->base[4] & 0x1f]; /* 5 = 8 */
102 isc_region_consume(source, 5);
105 if (source->length != 0 && wordlength >= 0 &&
112 if (source->length > 0) {
113 isc_region_consume(source, source->length);
119 isc_base32_totext(isc_region_t *source, int wordlength, const char *wordbreak,
121 return base32_totext(source, wordlength, wordbreak, target, base32,
126 isc_base32hex_totext(isc_region_t *source, int wordlength,
128 return base32_totext(source, wordlength, wordbreak, target, base32hex,
133 isc_base32hexnp_totext(isc_region_t *source, int wordlength,
135 return base32_totext(source, wordlength, wordbreak, target, base32hex,
377 base32_decoderegion(isc_region_t *source, const char base[], bool pad,
383 while (source->length != 0) {
384 int c = *source->base;
386 isc_region_consume(source, 1);
393 isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target) {
394 return base32_decoderegion(source, base32, true, target);
398 isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target) {
399 return base32_decoderegion(source, base32hex, true, target);
403 isc_base32hexnp_decoderegion(isc_region_t *source, isc_buffer_t *target) {
404 return base32_decoderegion(source, base32hex, false, target);
408 str_totext(const char *source, isc_buffer_t *target) {
413 l = strlen(source);
419 memmove(region.base, source, l);