Style fixes.

This commit is contained in:
Dan Moschuk 2000-07-01 17:49:34 +00:00
parent e63a7af508
commit d81584ae91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62357

View file

@ -56,17 +56,18 @@ vis(dst, c, flag, nextc)
c = (unsigned char)c;
if (flag & VIS_HTTPSTYLE) {
if (!((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z') || c == '$' || c == '-'
|| c == '_' || c == '\'' || c == '+' || c == '!' ||
c == '(' || c == ')' || c == ',' || c == '"' ||
c == ';' || c == '/' || c == '?' || c == ':' ||
c == '@' || c == '&' || c == '=' || c == '+')) {
*dst++ = '%';
snprintf(dst, 4, (c < 16 ? "0%X" : "%X"), c);
dst += 2;
goto done;
}
/* Described in RFC 1808 */
if (!(isalnum(c) /* alpha-numeric */
/* safe */
|| c == '$' || c == '-' || c == '_' || c == '.' || c == '+'
/* extra */
|| c == '!' || c == '*' || c == '\'' || c == '('
|| c == ')' || c == ',')) {
*dst++ = '%';
snprintf(dst, 4, (c < 16 ? "0%X" : "%X"), c);
dst += 2;
goto done;
}
}
if (isgraph(c) ||