View | Details | Raw Unified | Return to bug 18829 | Differences between
and this patch

Collapse All | Expand All

(-)vis.c (+15 lines)
Lines 52-57 Link Here
52
	register int flag;
52
	register int flag;
53
{
53
{
54
	c = (unsigned char)c;
54
	c = (unsigned char)c;
55
56
	if (flag & VIS_HTTPSTYLE) {
57
	    if (!((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')
58
		|| (c >= 'a' && c <= 'z') || c == '$' || c == '-'
59
		|| c == '_' || c == '\'' || c == '+' || c == '!' ||
60
		c == '(' || c == ')' || c == ',' || c == '"' ||
61
		c == ';' || c == '/' || c == '?' || c == ':' ||
62
		c == '@' || c == '&' || c == '=' || c == '+')) {
63
		*dst++ = '%';
64
		snprintf(dst, 4, (c < 16 ? "0%X" : "%X"), c);
65
		dst += 2;
66
		goto done;
67
	    }
68
	}
69
55
	if (isgraph(c) ||
70
	if (isgraph(c) ||
56
	   ((flag & VIS_SP) == 0 && c == ' ') ||
71
	   ((flag & VIS_SP) == 0 && c == ' ') ||
57
	   ((flag & VIS_TAB) == 0 && c == '\t') ||
72
	   ((flag & VIS_TAB) == 0 && c == '\t') ||

Return to bug 18829