4 int dns_domain_todot_cat(stralloc
*out
,const char *d
)
12 return stralloc_append(out
,".");
18 if ((ch2
>= 'A') && (ch2
<= 'Z'))
20 if (((ch2
>= 'a') && (ch2
<= 'z')) || ((ch2
>= '0') && (ch2
<= '9')) || (ch2
== '-') || (ch2
== '_')) {
21 if (!stralloc_append(out
,&ch2
)) return 0;
25 buf
[3] = '0' + (ch3
& 7); ch3
>>= 3;
26 buf
[2] = '0' + (ch3
& 7); ch3
>>= 3;
27 buf
[1] = '0' + (ch3
& 7);
29 if (!stralloc_catb(out
,buf
,4)) return 0;
33 if (!stralloc_append(out
,".")) return 0;