| | |
| | | |
| | | |
| | | for (i = 0; i < len1; i++) { |
| | | if ((strStart < 0) && isspace(str1[i])) { |
| | | if ((strStart < 0) && isspace((unsigned char)str1[i])) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | |
| | | if ((strStop >= 0) && quot && !isspace(str1[i])) { |
| | | if ((strStop >= 0) && quot && !isspace((unsigned char)str1[i])) { |
| | | valid = 0; |
| | | } |
| | | |
| | | if (!quot && !isspace(str1[i]) && (str1[i] != ',')) { |
| | | if (!quot && !isspace((unsigned char)str1[i]) && (str1[i] != ',')) { |
| | | strStop = i; |
| | | } |
| | | |
| | | if (isspace(str1[i])) { |
| | | if (isspace((unsigned char)str1[i])) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | for (i = 0; i < len1; i++) { |
| | | if ((strStart < 0) && isspace(str1[i])) { |
| | | if ((strStart < 0) && isspace((unsigned char)str1[i])) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | strStart = i; |
| | | } |
| | | |
| | | if (!isspace(str1[i]) && (str1[i] != ',')) { |
| | | if (!isspace((unsigned char)str1[i]) && (str1[i] != ',')) { |
| | | strStop = i; |
| | | } |
| | | |
| | | if (isspace(str1[i])) { |
| | | if (isspace((unsigned char)str1[i])) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | size_t skipWhitespace(const char * cmd, size_t len) { |
| | | size_t i; |
| | | for (i = 0; i < len; i++) { |
| | | if (!isspace(cmd[i])) { |
| | | if (!isspace((unsigned char)cmd[i])) { |
| | | return i; |
| | | } |
| | | } |
| | |
| | | size_t patternSeparatorShortPos(const char * pattern, size_t len) { |
| | | size_t i; |
| | | for (i = 0; (i < len) && pattern[i]; i++) { |
| | | if (islower(pattern[i])) { |
| | | if (islower((unsigned char)pattern[i])) { |
| | | return i; |
| | | } |
| | | } |