Index: lingucomponent/source/thesaurus/mythes/mythes.cxx =================================================================== RCS file: /cvs/whiteboard/lingucomponent/source/thesaurus/mythes/Attic/mythes.cxx,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 mythes.cxx --- lingucomponent/source/thesaurus/mythes/mythes.cxx 10 Dec 2003 14:27:01 -0000 1.1.2.1 +++ lingucomponent/source/thesaurus/mythes/mythes.cxx 13 Dec 2003 23:24:38 -0000 @@ -8,19 +8,8 @@ // some basic utility routines -// string duplication routine -char * mystrdup(const char * p) -{ - - int sl = strlen(p) + 1; - char * d = (char *)malloc(sl); - if (d) { - memcpy(d,p,sl); - return d; - } - return NULL; -} - +extern void mychomp(char * s); +extern char * mystrdup(const char * s); // return index of char in string int mystr_indexOfChar(const char * d, int c) @@ -29,16 +18,6 @@ if (p) return (int)(p-d); return -1; } - - -// remove cross-platform text line end characters -void mychomp(char * s) -{ - int k = strlen(s); - if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; - if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; -} - MyThes::MyThes(const char* idxpath, const char * datpath) {