version 1.54, 2013/02/20 17:01:15 |
version 1.55, 2013/02/20 17:15:08 |
Line 139 do_mvis(wchar_t *dst, wint_t c, int flag |
|
Line 139 do_mvis(wchar_t *dst, wint_t c, int flag |
|
((iswspace(c) && (nextc == L'\r' || nextc == L'\n')) || |
((iswspace(c) && (nextc == L'\r' || nextc == L'\n')) || |
/* Out of range */ |
/* Out of range */ |
(!iswspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) || |
(!iswspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) || |
/* Specific char to be escaped */ |
/* Specific char to be escaped */ |
wcschr(L"#$@[\\]^`{|}~", c) != NULL)) { |
wcschr(L"#$@[\\]^`{|}~", c) != NULL)) { |
*dst++ = L'='; |
*dst++ = L'='; |
*dst++ = XTOA(((unsigned int)c >> 4) & 0xf); |
*dst++ = XTOA(((unsigned int)c >> 4) & 0xf); |
Line 204 do_mbyte(wchar_t *dst, wint_t c, int fla |
|
Line 204 do_mbyte(wchar_t *dst, wint_t c, int fla |
|
} else { |
} else { |
if ((flags & VIS_NOSLASH) == 0) |
if ((flags & VIS_NOSLASH) == 0) |
*dst++ = L'\\'; |
*dst++ = L'\\'; |
|
|
if (c & 0200) { |
if (c & 0200) { |
c &= 0177; |
c &= 0177; |
*dst++ = L'M'; |
*dst++ = L'M'; |
} |
} |
|
|
if (iswcntrl(c)) { |
if (iswcntrl(c)) { |
*dst++ = L'^'; |
*dst++ = L'^'; |
if (c == 0177) |
if (c == 0177) |
Line 304 makeextralist(int flags, const char *src |
|
Line 304 makeextralist(int flags, const char *src |
|
*d++ = L'#'; |
*d++ = L'#'; |
} |
} |
|
|
if (flags & VIS_SP) *d++ = L' '; |
if (flags & VIS_SP) *d++ = L' '; |
if (flags & VIS_TAB) *d++ = L'\t'; |
if (flags & VIS_TAB) *d++ = L'\t'; |
if (flags & VIS_NL) *d++ = L'\n'; |
if (flags & VIS_NL) *d++ = L'\n'; |
if ((flags & VIS_NOSLASH) == 0) *d++ = L'\\'; |
if ((flags & VIS_NOSLASH) == 0) *d++ = L'\\'; |
*d = L'\0'; |
*d = L'\0'; |
Line 397 istrsenvisx(char *mbdst, size_t *dlen, c |
|
Line 397 istrsenvisx(char *mbdst, size_t *dlen, c |
|
/* Decrement input byte count. */ |
/* Decrement input byte count. */ |
mbslength -= clen; |
mbslength -= clen; |
} |
} |
len = src - psrc; |
len = src - psrc; |
src = psrc; |
src = psrc; |
/* |
/* |
* In the single character input case, we will have actually |
* In the single character input case, we will have actually |
Line 455 istrsenvisx(char *mbdst, size_t *dlen, c |
|
Line 455 istrsenvisx(char *mbdst, size_t *dlen, c |
|
/* |
/* |
* Conversion error, process as a byte(s) instead. |
* Conversion error, process as a byte(s) instead. |
* Examine each byte and higher-order bytes for |
* Examine each byte and higher-order bytes for |
* data. E.g., |
* data. E.g., |
* 0x0000a264 -> a2 64 |
* 0x0000a264 -> a2 64 |
* 0x1f00a264 -> 1f 00 a2 64 |
* 0x1f00a264 -> 1f 00 a2 64 |
*/ |
*/ |