Changeset 279 for trunk/thune/files.c

Show
Ignore:
Timestamp:
09/21/06 03:54:47 (2 years ago)
Author:
krobillard
Message:

Thune -

tail? returns true for none.
Errors inside nested parse are now re-thrown.
ur_cstring() now handles string slice!.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/files.c

    r274 r279  
    302302UR_CALL( uc_read ) 
    303303{ 
     304    const char* fn; 
    304305    int part = 0; 
    305306 
     
    319320    } 
    320321 
    321     if( ur_is(tos, UT_STRING) )     // UT_FILE 
     322    fn = ur_cstring( tos ); 
     323    if( fn ) 
    322324    { 
    323325        int err; 
    324         const char* fn; 
    325         UString* str = ur_bin(tos); 
    326  
    327         ur_termCStr( str ); 
    328  
    329         fn = str->ptr.c + tos->series.it; 
     326 
    330327        err = ur_isDir( fn ); 
    331328        if( err < 0 ) 
     
    433430        } 
    434431    } 
     432    else 
     433    { 
     434        ur_throwErr( UR_ERR_DATATYPE, "read expected string!/port!" ); 
     435    } 
    435436} 
    436437