Show
Ignore:
Timestamp:
03/07/08 22:33:11 (10 months ago)
Author:
karpet
Message:

more config refactoring

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libswish3/trunk/src/swish_header.c

    r2042 r2046  
    3636#ifdef LIBXML_READER_ENABLED 
    3737    int i; 
    38  
    39     /* 
    40      * initialize the library and check potential API mismatches 
    41      * between the version it was compiled for and the actual shared 
    42      * library used. 
    43      */ 
    44     LIBXML_TEST_VERSION 
     38    swish_Config *config; 
     39     
     40    swish_init();     
    4541 
    4642    for (i=1; i < argc; i++) { 
    47  
    4843        printf("config file %s\n", argv[i]); 
    49         if (swish_validate_header( (char*)argv[i] )) { 
    50             printf("%s ok\n", argv[i]); 
    51         } 
    52         else { 
    53             fprintf(stderr, "%s failed\n", argv[i]); 
    54         } 
    55  
     44        config = swish_read_header( (char*)argv[i] ); 
     45        swish_debug_config(config); 
     46        swish_free_config(config); 
    5647    } 
    5748         
    58     /* 
    59      * Cleanup function for the XML library. 
    60      */ 
    61     xmlCleanupParser(); 
     49     
    6250    /* 
    6351     * this is to debug memory for regression tests