Changeset 510 for trunk/thune/files.c

Show
Ignore:
Timestamp:
02/10/08 23:53:46 (9 months ago)
Author:
krobillard
Message:

'loop is now an opcode and can act as loop.to for integers.
File port! read now handles optional limit.
console.out now handles binary!.
Can now 'make an int! from first 4 bytes of a binary!
Added ur_initDecimal macro.
Added 'fcalc.
Removed word inc/dec.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/files.c

    r483 r510  
    317317        UPortDevice* dev = _devicePtr( ut, ur_s_prev(tos) ); 
    318318        if( dev ) 
    319             dev->read( ut, tos /*, part*/ ); 
     319            dev->read( ut, tos, part ); 
    320320        return; 
    321321    } 
     
    10991099 
    11001100 
    1101 // (port buf len -- port buf) 
    1102 UR_CALL( _fileRead ) 
     1101// (port buf -- port buf) 
     1102void _fileRead( UThread* ut, UCell* tos, int part ) 
    11031103{ 
    11041104    UBlock* blk; 
     
    11221122 
    11231123 
    1124         len = READ_BUF_SIZE; 
     1124        len = part ? part : READ_BUF_SIZE; 
    11251125 
    11261126        if( ur_is(tos, UT_BINARY) || ur_is(tos, UT_STRING) )