Changeset 1925

Show
Ignore:
Timestamp:
04/04/07 16:36:13 (1 year ago)
Author:
karpet
Message:

verify locale should also be global

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libswish3/trunk/README

    r1923 r1925  
    4545 
    4646 
     47 
     48Profiling with gprof 
     49--------------------------- 
     50 
     51The default Makefile.am files include the -pg flag in order 
     52to get profiling information. You should remove the -pg before 
     53compiling for a production (i.e., non-development) system. 
     54 
     55See the gprof man page. 
     56 
     57Basically: 
     58 
     59 gprof .libs/swish_lint 
     60 
     61should give the 'make test' profile. 
     62 
  • libswish3/trunk/TODO

    r1913 r1925  
     1* fix warnings from make test 
     2 
    13* add new MIME via config 
    24 
     
    1113* Native format: is SQL too slow? BDB? QDBM? or just use Xapian by default? 
    1214 
    13 * config API (madness really) 
     15* make config.c conform to the documented API in libswish3.3.pod 
    1416 
    1517* tokenizer: regexp lib? 
  • libswish3/trunk/bindings/perl/3.xs

    r1923 r1925  
    212212} 
    213213 
     214/* 
     215swish_WordList * 
     216swish_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*/ 
    214230 
    215231 
  • libswish3/trunk/src/libswish3/config.c

    r1924 r1925  
    118118    xmlHashTablePtr c, metas, parsers, index, prop, alias, parsewords; 
    119119 
    120     /* verify locale */ 
    121     swish_verify_utf8_locale(); 
    122  
    123120    if (SWISH_DEBUG) 
    124121        swish_debug_msg("creating default config"); 
  • libswish3/trunk/src/libswish3/swish.c

    r1924 r1925  
    3636    /* global debug flag */ 
    3737    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); 
    3940 
    4041    swish_init_parser(); 
    4142    swish_init_memory(); 
    4243    swish_init_words(); 
     44    swish_verify_utf8_locale(); 
     45 
    4346} 
    4447 
  • libswish3/trunk/src/swish_words.c

    r1924 r1925  
    4545int             usage(); 
    4646 
    47 int             debug = 0
     47extern int SWISH_DEBUG
    4848 
    4949 
     
    5252{ 
    5353 
    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"; 
    5555    printf("swish_words [opts] [string(s)]\n"); 
    5656    printf("opts:\n --file file.txt\n --debug\n"); 
     
    107107                err(1, "-d option requires a positive integer as argument\n"); 
    108108 
    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); 
    113110            break; 
    114111