Changeset 325 for cpp/frams/param
- Timestamp:
- 02/05/15 00:26:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r320 r325 37 37 static const char *strchrlimit(const char *t, int ch, const char *limit) 38 38 { 39 int n = (int)(limit - t); 40 for (; (n > 0) && *t; t++, n--) 41 if (*t == ch) return t; 42 return 0; 39 if (limit<t) return NULL; 40 return (const char*)memchr((const void*)t,ch,limit-t); 43 41 } 44 42 … … 1000 998 // ^ ^-t (after) ^ ^_next_field 1001 999 // \_t (before) \_field_end 1002 while ( strchr(" \n\r\t",*t)) if (t < end) t++; else return fields_loaded;1000 while (isspace(*t)) if (t < end) t++; else return fields_loaded; 1003 1001 1004 1002 field_end = strchrlimit(t, ',', end); if (!field_end) field_end = end; 1005 1003 next_field=field_end; 1006 while ((field_end>t) && strchr(" \t",field_end[-1])) field_end--;1004 while ((field_end>t) && isblank(field_end[-1])) field_end--; 1007 1005 quote = strchrlimit(t, '\"', field_end); 1008 1006 if (quote)
Note: See TracChangeset
for help on using the changeset viewer.