diff -r be04fd67923b -r 783e91c5f445 core-legacy/util.cpp --- a/core-legacy/util.cpp Sun Nov 23 21:21:49 2008 -0600 +++ b/core-legacy/util.cpp Sun Nov 23 21:22:04 2008 -0600 @@ -82,91 +82,6 @@ } } -/* :TODO: this should skip string literals */ -void UTIL_TrimComments(char *buffer) -{ - int num_sc = 0; - size_t len = strlen(buffer); - if (buffer) - { - for (int i = len - 1; i >= 0; i--) - { - if (buffer[i] == '/') - { - if (++num_sc >= 2 && i==0) - { - buffer[i] = '\0'; - return; - } - } else { - if (num_sc >= 2) - { - buffer[i] = '\0'; - return; - } - num_sc = 0; - } - /* size_t won't go below 0, manually break out */ - if (i == 0) - { - break; - } - } - } -} - -void UTIL_KeySplit(const char *str, char *buf1, size_t len1, char *buf2, size_t len2) -{ - size_t start; - size_t len = strlen(str); - - for (start = 0; start < len; start++) - { - if (!isspace(str[start])) - { - break; - } - } - - size_t end; - for (end = start; end < len; end++) - { - if (isspace(str[end])) - { - break; - } - } - - size_t i, c = 0; - for (i = start; i < end; i++, c++) - { - if (c >= len1) - { - break; - } - buf1[c] = str[i]; - } - buf1[c] = '\0'; - - for (start = end; start < len; start++) - { - if (!isspace(str[start])) - { - break; - } - } - - for (c = 0; start < len; start++, c++) - { - if (c >= len2) - { - break; - } - buf2[c] = str[start]; - } - buf2[c] = '\0'; -} - bool UTIL_PathCmp(const char *path1, const char *path2) { size_t pos1 = 0, pos2 = 0;