Changeset 478

Show
Ignore:
Timestamp:
09/21/07 16:54:31 (1 year ago)
Author:
krobillard
Message:

Added CMake files.
File port 'write now handles char!.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/thune/files.c

    r458 r478  
    11541154    if( ur_is(val, UT_INT) ) 
    11551155    { 
    1156         if( ! ur_stringSlice( ut, tos, &buf, &end ) ) 
    1157         { 
    1158             buf = 0; 
    1159             ur_binarySlice( ut, tos, &buf, &end ); 
     1156        switch( ur_type(tos) ) 
     1157        { 
     1158            case UT_CHAR: 
     1159            { 
     1160                UString* str = ur_threadTmp( ut ); 
     1161                ur_arrayReserve( str, 1, 1 ); 
     1162                buf = str->ptr.c; 
     1163                end = buf + 1; 
     1164                *buf = ur_char(tos); 
     1165            } 
     1166                break; 
     1167 
     1168            case UT_STRING: 
     1169            case UT_BINARY: 
     1170                ur_binaryMem( ut, tos, &buf, &end ); 
     1171                break; 
     1172 
     1173            default: 
     1174                buf = 0; 
     1175                break; 
    11601176        } 
    11611177