Show
Ignore:
Timestamp:
08/11/07 04:53:46 (16 months ago)
Author:
krobillard
Message:

Removed slice! datatype - series now have an end.
Added slice test.
ur_makeBinary() now takes pointer argument.
Fixed bug in _makeComponent().
Fixed compiler warnings. Minor optimization to if/.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/thune/thread_safe/parse.c

    r398 r450  
    308308                ++rit; 
    309309 
    310                 ur_initType( cell, UT_SLICE ); 
    311                 ur_sliceDT(cell) = UT_STRING; 
    312                 ur_setSeries( cell, pe->input.n, pos ); 
    313                 cell->slice.end = pe->input.end; 
     310                ur_initType( cell, UT_STRING ); 
     311                ur_setSlice( cell, pe->input.n, pos, pe->input.end ); 
    314312            } 
    315313                break; 
     
    321319                ++rit; 
    322320 
    323                 if( ur_is(cell, UT_SLICE) && (cell->series.n == pe->input.n) ) 
    324                     cell->slice.end = pos; 
     321                if( ur_is(cell, UT_STRING) && (cell->series.n == pe->input.n) ) 
     322                    cell->series.end = pos; 
    325323            } 
    326324                break; 
     
    812810                ++rit; 
    813811 
    814                 ur_initType( cell, UT_SLICE ); 
    815                 ur_sliceDT(cell) = UT_BLOCK; 
    816                 ur_setSeries( cell, pe->input.n, pos ); 
    817                 cell->slice.end = pe->input.end; 
     812                ur_initType( cell, UT_BLOCK ); 
     813                ur_setSlice( cell, pe->input.n, pos, pe->input.end ); 
    818814            } 
    819815                break; 
     
    826822                ++rit; 
    827823 
    828                 if( ur_is(cell, UT_SLICE) && (cell->series.n == pe->input.n) ) 
    829                     cell->slice.end = pos; 
     824                if( ur_is(cell, UT_BLOCK) && (cell->series.n == pe->input.n) ) 
     825                    cell->series.end = pos; 
    830826            } 
    831827                break; 
     
    10651061    if( ur_is(rules, UT_BLOCK) ) 
    10661062    { 
    1067         if( ur_is(ser, UT_STRING) || 
    1068             (ur_is(ser, UT_SLICE) && (ur_sliceDT(ser) == UT_STRING)) ) 
     1063        if( ur_is(ser, UT_STRING) ) 
    10691064        { 
    10701065            StringParser pe; 
     
    11121107            return; 
    11131108        } 
    1114         else if( ur_is(ser, UT_BLOCK) || 
    1115                 (ur_is(ser, UT_SLICE) && (ur_sliceDT(ser) == UT_BLOCK)) ) 
     1109        else if( ur_is(ser, UT_BLOCK) ) 
    11161110        { 
    11171111            BlockParser pe;