Show
Ignore:
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/main_cbr.c

    r20 r28  
    77 
    88int main() { 
    9     unsigned int num_cols = 7; 
    10     char * cols[] = { 
     9    unsigned int num_cols = 7;  
     10    unsigned int i; 
     11 
     12    ezxml_t f1 = ezxml_parse_file("another.xml"), engine, column; 
     13    char * cols[num_cols]; 
     14     
     15    for (engine = ezxml_child(f1, "engine"); engine; engine = engine->next){ 
     16        i = 0; 
     17        for (column = ezxml_child(engine, "column"); column; column = column->next){ 
     18            cols[i] = ezxml_child(column, "name")->txt; 
     19            i++; 
     20        } 
     21    } 
     22 
     23 
     24    free(f1); 
     25                             
     26    /* char * cols[] = { 
    1127        "BER", "throughput", 
    1228        "mod_scheme", "tx_power", 
    1329        "noise_power", "path_loss", 
    1430        "utility" 
    15     }; 
     31    };*/ 
     32     
     33    for (i = 0; i<num_cols; i++){ 
     34        printf(" %s",cols[i]); 
     35    } 
     36    printf("\n"); 
     37 
    1638    float vals[num_cols]; 
    1739    vals[0] = 1e-3f;    // BER