version 1.11, 2013/06/02 14:11:38 |
version 1.12, 2013/11/25 18:02:50 |
|
|
i = c = 0; |
i = c = 0; |
while (i < len) { |
while (i < len) { |
if (str[i] == '%' && i <= (len - 2)) { |
if (str[i] == '%' && i <= (len - 2)) { |
if (isxdigit(str[i + 1]) && |
if (isxdigit((unsigned char)str[i + 1]) && |
isxdigit(str[i + 2])) { |
isxdigit((unsigned char)str[i + 2])) { |
code[0] = str[i + 1]; |
code[0] = str[i + 1]; |
code[1] = str[i + 2]; |
code[1] = str[i + 2]; |
code[2] = 0; |
code[2] = 0; |
|
|
*lenp = len; |
*lenp = len; |
|
|
#define allowed_in_string(_x) \ |
#define allowed_in_string(_x) \ |
(isalnum(_x) || strchr("-_.:/= ", _x)) |
(isalnum((unsigned char)_x) || strchr("-_.:/= ", _x)) |
|
|
for (i = 0; i < len; i++) { |
for (i = 0; i < len; i++) { |
if (ptr[i] == '&') |
if (ptr[i] == '&') |
|
|
} |
} |
|
|
return (ptr); |
return (ptr); |
|
#undef allowed_in_string |
} |
} |
|
|
char * |
char * |
|
|
|
|
/* Count elements */ |
/* Count elements */ |
for (i = 0; i < (len - 1); i++) { |
for (i = 0; i < (len - 1); i++) { |
if (isspace(arg[i])) { |
if (isspace((unsigned char)arg[i])) { |
/* filter out additional options */ |
/* filter out additional options */ |
if (arg[i + 1] == '-') { |
if (arg[i + 1] == '-') { |
printf("invalid input\n"); |
printf("invalid input\n"); |