Changeset 8694
- Timestamp:
- 2004-11-29T16:15:13+13:00 (19 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/packages/mg/lib/memlib.c
r3745 r8694 24 24 /* 25 25 $Log$ 26 Revision 1.2 2004/11/29 03:15:13 kjdon 27 added some changes made by Emanuel Dejanu (Simple Words) 28 26 29 Revision 1.1 2003/02/20 21:14:16 mdewsnip 27 30 Addition of MG package for search and retrieval … … 45 48 46 49 /* Defined as strdup is not an ANSI function */ 50 /* change the name so we do not have problems with other libs */ 47 51 char * 48 my_ strdup(const char *str)52 my_mg_strdup(const char *str) 49 53 { 50 54 char *ret_str = malloc(strlen(str)+1); … … 60 64 Free_func Xfree = free; 61 65 62 Strdup_func Xstrdup = my_ strdup;66 Strdup_func Xstrdup = my_mg_strdup; -
trunk/gsdl3/packages/mg/src/text/bool_parser.c
r3745 r8694 1017 1017 { 1018 1018 /* jump over whitespace */ 1019 while (isspace(*buf_ptr)) 1020 buf_ptr++; 1019 buf_ptr = skipspace(buf_ptr, end); 1021 1020 1022 1021 if (inaword(buf_ptr, end)) -
trunk/gsdl3/packages/mg/src/text/bool_parser.y
r3745 r8694 137 137 { 138 138 /* jump over whitespace */ 139 while (isspace(*buf_ptr)) 140 buf_ptr++; 141 139 buf_ptr = skipspace(buf_ptr, end); 140 142 141 if (inaword(buf_ptr, end)) 143 142 { -
trunk/gsdl3/packages/mg/src/text/mg_passes.c
r7228 r8694 27 27 # include <malloc.h> 28 28 #endif 29 29 #include <stdlib.h> 30 30 #include "memlib.h" 31 31 #include "messages.h" … … 44 44 /* 45 45 $Log$ 46 Revision 1.3 2004/11/29 03:15:13 kjdon 47 added some changes made by Emanuel Dejanu (Simple Words) 48 46 49 Revision 1.2 2004/04/25 23:01:18 kjdon 47 50 added a new -M option to mg_passes, allowing maxnumeric to be altered - made this change to keep gsdl3 mg inline with gsdl2 mg. -
trunk/gsdl3/packages/mg/src/text/words.c
r3745 r8694 10 10 return 0; 11 11 } 12 13 /* Return a the UTF-8 encoded Unicode string with begining 14 unicode spaces skipped. */ 15 u_char *skipspace(u_char *here, u_char *end) 16 { 17 unsigned short c; 18 int length; 19 while(here != end) { 20 length = parse_utf8_char(here, end, &c); 21 if (length == 0 || !is_unicode_space(c)) break; 22 here += length; 23 } 24 return here; 25 } 26 27 /* It determines whether a given place in a UTF-8 encoded 28 Unicode string is a unicode space. */ 29 int isaspace (const u_char *here, const u_char *end) 30 { 31 unsigned short c; 32 if (parse_utf8_char(here, end, &c) > 0) return is_unicode_space(c); 33 return 0; 34 } -
trunk/gsdl3/packages/mg/src/text/words.h
r7228 r8694 81 81 is part of a word. */ 82 82 83 int isaspace (const u_char *here, const u_char *end); 84 /* It determines whether a given place in a UTF-8 encoded 85 Unicode string is a unicode space. */ 86 87 u_char *skipspace(u_char *here, u_char *end); 88 /* Return a the UTF-8 encoded Unicode string with 89 begining unicode spaces skipped. */ 83 90 84 91 /* ========================================================================= -
trunk/gsdl3/packages/mg/sysfuncs.h
r3745 r8694 271 271 272 272 #ifndef _POSIX_VERSION 273 #ifdef __MSDOS__ 273 #if defined(__WIN32__) 274 #include <io.h> 275 #define lseek _lseek 276 #elif defined(__MSDOS__) 274 277 #include <io.h> 275 278 #else -
trunk/gsdl3/src/packages/mg/lib/memlib.c
r3745 r8694 24 24 /* 25 25 $Log$ 26 Revision 1.2 2004/11/29 03:15:13 kjdon 27 added some changes made by Emanuel Dejanu (Simple Words) 28 26 29 Revision 1.1 2003/02/20 21:14:16 mdewsnip 27 30 Addition of MG package for search and retrieval … … 45 48 46 49 /* Defined as strdup is not an ANSI function */ 50 /* change the name so we do not have problems with other libs */ 47 51 char * 48 my_ strdup(const char *str)52 my_mg_strdup(const char *str) 49 53 { 50 54 char *ret_str = malloc(strlen(str)+1); … … 60 64 Free_func Xfree = free; 61 65 62 Strdup_func Xstrdup = my_ strdup;66 Strdup_func Xstrdup = my_mg_strdup; -
trunk/gsdl3/src/packages/mg/src/text/bool_parser.c
r3745 r8694 1017 1017 { 1018 1018 /* jump over whitespace */ 1019 while (isspace(*buf_ptr)) 1020 buf_ptr++; 1019 buf_ptr = skipspace(buf_ptr, end); 1021 1020 1022 1021 if (inaword(buf_ptr, end)) -
trunk/gsdl3/src/packages/mg/src/text/bool_parser.y
r3745 r8694 137 137 { 138 138 /* jump over whitespace */ 139 while (isspace(*buf_ptr)) 140 buf_ptr++; 141 139 buf_ptr = skipspace(buf_ptr, end); 140 142 141 if (inaword(buf_ptr, end)) 143 142 { -
trunk/gsdl3/src/packages/mg/src/text/mg_passes.c
r7228 r8694 27 27 # include <malloc.h> 28 28 #endif 29 29 #include <stdlib.h> 30 30 #include "memlib.h" 31 31 #include "messages.h" … … 44 44 /* 45 45 $Log$ 46 Revision 1.3 2004/11/29 03:15:13 kjdon 47 added some changes made by Emanuel Dejanu (Simple Words) 48 46 49 Revision 1.2 2004/04/25 23:01:18 kjdon 47 50 added a new -M option to mg_passes, allowing maxnumeric to be altered - made this change to keep gsdl3 mg inline with gsdl2 mg. -
trunk/gsdl3/src/packages/mg/src/text/words.c
r3745 r8694 10 10 return 0; 11 11 } 12 13 /* Return a the UTF-8 encoded Unicode string with begining 14 unicode spaces skipped. */ 15 u_char *skipspace(u_char *here, u_char *end) 16 { 17 unsigned short c; 18 int length; 19 while(here != end) { 20 length = parse_utf8_char(here, end, &c); 21 if (length == 0 || !is_unicode_space(c)) break; 22 here += length; 23 } 24 return here; 25 } 26 27 /* It determines whether a given place in a UTF-8 encoded 28 Unicode string is a unicode space. */ 29 int isaspace (const u_char *here, const u_char *end) 30 { 31 unsigned short c; 32 if (parse_utf8_char(here, end, &c) > 0) return is_unicode_space(c); 33 return 0; 34 } -
trunk/gsdl3/src/packages/mg/src/text/words.h
r7228 r8694 81 81 is part of a word. */ 82 82 83 int isaspace (const u_char *here, const u_char *end); 84 /* It determines whether a given place in a UTF-8 encoded 85 Unicode string is a unicode space. */ 86 87 u_char *skipspace(u_char *here, u_char *end); 88 /* Return a the UTF-8 encoded Unicode string with 89 begining unicode spaces skipped. */ 83 90 84 91 /* ========================================================================= -
trunk/gsdl3/src/packages/mg/sysfuncs.h
r3745 r8694 271 271 272 272 #ifndef _POSIX_VERSION 273 #ifdef __MSDOS__ 273 #if defined(__WIN32__) 274 #include <io.h> 275 #define lseek _lseek 276 #elif defined(__MSDOS__) 274 277 #include <io.h> 275 278 #else -
trunk/indexers/mg/lib/memlib.c
r3745 r8694 24 24 /* 25 25 $Log$ 26 Revision 1.2 2004/11/29 03:15:13 kjdon 27 added some changes made by Emanuel Dejanu (Simple Words) 28 26 29 Revision 1.1 2003/02/20 21:14:16 mdewsnip 27 30 Addition of MG package for search and retrieval … … 45 48 46 49 /* Defined as strdup is not an ANSI function */ 50 /* change the name so we do not have problems with other libs */ 47 51 char * 48 my_ strdup(const char *str)52 my_mg_strdup(const char *str) 49 53 { 50 54 char *ret_str = malloc(strlen(str)+1); … … 60 64 Free_func Xfree = free; 61 65 62 Strdup_func Xstrdup = my_ strdup;66 Strdup_func Xstrdup = my_mg_strdup; -
trunk/indexers/mg/src/text/bool_parser.c
r3745 r8694 1017 1017 { 1018 1018 /* jump over whitespace */ 1019 while (isspace(*buf_ptr)) 1020 buf_ptr++; 1019 buf_ptr = skipspace(buf_ptr, end); 1021 1020 1022 1021 if (inaword(buf_ptr, end)) -
trunk/indexers/mg/src/text/bool_parser.y
r3745 r8694 137 137 { 138 138 /* jump over whitespace */ 139 while (isspace(*buf_ptr)) 140 buf_ptr++; 141 139 buf_ptr = skipspace(buf_ptr, end); 140 142 141 if (inaword(buf_ptr, end)) 143 142 { -
trunk/indexers/mg/src/text/mg_passes.c
r7228 r8694 27 27 # include <malloc.h> 28 28 #endif 29 29 #include <stdlib.h> 30 30 #include "memlib.h" 31 31 #include "messages.h" … … 44 44 /* 45 45 $Log$ 46 Revision 1.3 2004/11/29 03:15:13 kjdon 47 added some changes made by Emanuel Dejanu (Simple Words) 48 46 49 Revision 1.2 2004/04/25 23:01:18 kjdon 47 50 added a new -M option to mg_passes, allowing maxnumeric to be altered - made this change to keep gsdl3 mg inline with gsdl2 mg. -
trunk/indexers/mg/src/text/words.c
r3745 r8694 10 10 return 0; 11 11 } 12 13 /* Return a the UTF-8 encoded Unicode string with begining 14 unicode spaces skipped. */ 15 u_char *skipspace(u_char *here, u_char *end) 16 { 17 unsigned short c; 18 int length; 19 while(here != end) { 20 length = parse_utf8_char(here, end, &c); 21 if (length == 0 || !is_unicode_space(c)) break; 22 here += length; 23 } 24 return here; 25 } 26 27 /* It determines whether a given place in a UTF-8 encoded 28 Unicode string is a unicode space. */ 29 int isaspace (const u_char *here, const u_char *end) 30 { 31 unsigned short c; 32 if (parse_utf8_char(here, end, &c) > 0) return is_unicode_space(c); 33 return 0; 34 } -
trunk/indexers/mg/src/text/words.h
r7228 r8694 81 81 is part of a word. */ 82 82 83 int isaspace (const u_char *here, const u_char *end); 84 /* It determines whether a given place in a UTF-8 encoded 85 Unicode string is a unicode space. */ 86 87 u_char *skipspace(u_char *here, u_char *end); 88 /* Return a the UTF-8 encoded Unicode string with 89 begining unicode spaces skipped. */ 83 90 84 91 /* ========================================================================= -
trunk/indexers/mg/sysfuncs.h
r3745 r8694 271 271 272 272 #ifndef _POSIX_VERSION 273 #ifdef __MSDOS__ 273 #if defined(__WIN32__) 274 #include <io.h> 275 #define lseek _lseek 276 #elif defined(__MSDOS__) 274 277 #include <io.h> 275 278 #else
Note:
See TracChangeset
for help on using the changeset viewer.