Changeset 480

Show
Ignore:
Timestamp:
09/24/07 23:27:09 (13 months ago)
Author:
krobillard
Message:

Line comments now set SOL for next value.
Select! now supports a negative index.

Location:
trunk/thune
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/doc/UserManual

    r476 r480  
    646646    "Hello world" :s 
    647647    s 2,4 slice .          ; "ello" 
    648     s -2 slice .           ; ""Hello wor" 
     648    s -2 slice .           ; "Hello wor" 
    649649 
    650650 
  • trunk/thune/eval.c

    r471 r480  
    170170                goto set_none; 
    171171        } 
     172        ur_throwErr( UR_ERR_SCRIPT, "Invalid select!" ); 
     173        return 0; 
    172174    } 
    173175    else 
    174176    { 
    175         if( ur_pick( ut, val, ur_sel(sel) - 1, res ) ) 
    176             return 1; 
    177     } 
    178  
    179     ur_throwErr( UR_ERR_SCRIPT, "Invalid select!" ); 
    180     return 0; 
     177        int n = ur_sel(sel); 
     178        if( n ) 
     179        { 
     180            if( n > 0 ) 
     181                --n; 
     182            if( ur_pick( ut, val, n, res ) ) 
     183                return 1; 
     184        } 
     185    } 
    181186 
    182187set_none: 
  • trunk/thune/make.c

    r469 r480  
    10541054    if( count == (UR_MAX_PATH_LEN - 1) ) \ 
    10551055        return 0; \ 
    1056     if( *cp >= '0' && *cp <= '9' ) \ 
    1057     { \ 
     1056    if( (*cp >= '0' && *cp <= '9') || (*cp == '-') ) { \ 
    10581057        node[ count ] = ur_stringToInt( cp, it, 0 ); \ 
    10591058    } else { \ 
  • trunk/thune/tokenize.c

    r458 r480  
    517517            ++lines; 
    518518            ++it; 
     519            sol = 1; 
    519520            goto start; 
    520521        }