Changeset 1925
- Timestamp:
- 04/04/07 16:36:13 (1 year ago)
- Files:
-
- libswish3/trunk/README (modified) (1 diff)
- libswish3/trunk/TODO (modified) (2 diffs)
- libswish3/trunk/bindings/perl/3.xs (modified) (1 diff)
- libswish3/trunk/src/libswish3/config.c (modified) (1 diff)
- libswish3/trunk/src/libswish3/swish.c (modified) (1 diff)
- libswish3/trunk/src/swish_words.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libswish3/trunk/README
r1923 r1925 45 45 46 46 47 48 Profiling with gprof 49 --------------------------- 50 51 The default Makefile.am files include the -pg flag in order 52 to get profiling information. You should remove the -pg before 53 compiling for a production (i.e., non-development) system. 54 55 See the gprof man page. 56 57 Basically: 58 59 gprof .libs/swish_lint 60 61 should give the 'make test' profile. 62 libswish3/trunk/TODO
r1913 r1925 1 * fix warnings from make test 2 1 3 * add new MIME via config 2 4 … … 11 13 * Native format: is SQL too slow? BDB? QDBM? or just use Xapian by default? 12 14 13 * config API (madness really)15 * make config.c conform to the documented API in libswish3.3.pod 14 16 15 17 * tokenizer: regexp lib? libswish3/trunk/bindings/perl/3.xs
r1923 r1925 212 212 } 213 213 214 /* 215 swish_WordList * 216 swish_perl_re_tokenizer(xmlChar * string, 217 xmlChar * metaname, 218 xmlChar * context, 219 int maxwordlen, 220 int minwordlen, 221 int word_pos, 222 int offset) 223 { 224 225 226 227 228 } 229 */ 214 230 215 231 libswish3/trunk/src/libswish3/config.c
r1924 r1925 118 118 xmlHashTablePtr c, metas, parsers, index, prop, alias, parsewords; 119 119 120 /* verify locale */121 swish_verify_utf8_locale();122 123 120 if (SWISH_DEBUG) 124 121 swish_debug_msg("creating default config"); libswish3/trunk/src/libswish3/swish.c
r1924 r1925 36 36 /* global debug flag */ 37 37 setenv("SWISH_DEBUG", "0", 0); 38 SWISH_DEBUG = (int)strtol(getenv("SWISH_DEBUG"), (char**)NULL, 10); 38 if (!SWISH_DEBUG) 39 SWISH_DEBUG = (int)strtol(getenv("SWISH_DEBUG"), (char**)NULL, 10); 39 40 40 41 swish_init_parser(); 41 42 swish_init_memory(); 42 43 swish_init_words(); 44 swish_verify_utf8_locale(); 45 43 46 } 44 47 libswish3/trunk/src/swish_words.c
r1924 r1925 45 45 int usage(); 46 46 47 int debug = 0;47 extern int SWISH_DEBUG; 48 48 49 49 … … 52 52 { 53 53 54 char *descr = "swish_words is an example program for testing the word parser\n";54 char *descr = "swish_words is an example program for testing the word parser\n"; 55 55 printf("swish_words [opts] [string(s)]\n"); 56 56 printf("opts:\n --file file.txt\n --debug\n"); … … 107 107 err(1, "-d option requires a positive integer as argument\n"); 108 108 109 setenv("SWISH_DEBUG", optarg, 1); 110 debug = (int) strtol(getenv("SWISH_DEBUG"), (char **) NULL, 10); 111 /* printf("debug at level %d\n", debug); */ 112 109 SWISH_DEBUG = (int) strtol(optarg, (char **) NULL, 10); 113 110 break; 114 111
