Changeset 144 for trunk/orca/unix/os.c

Show
Ignore:
Timestamp:
05/11/06 14:23:03 (3 years ago)
Author:
krobillard
Message:

Native arguments are now kept on the stack until after the call and the
result is now always put into a1.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/unix/os.c

    r136 r144  
    8383   change-dir 
    8484*/ 
    85 void orChangeDirNative( OValue* a1 ) 
     85OR_NATIVE_PUB(orChangeDirNative ) 
    8686{ 
    8787    int logic = 0; 
     
    9797   what-dir 
    9898*/ 
    99 void orWhatDirNative() 
     99OR_NATIVE_PUB( orWhatDirNative ) 
    100100{ 
    101101    if( getcwd( orTmp, OR_TMP_SIZE ) ) 
     
    121121  No error if directory exists. 
    122122*/ 
    123 void orMakeDirNative( OValue* a1 ) 
     123OR_NATIVE_PUB( orMakeDirNative ) 
    124124{ 
    125125    int err; 
     
    139139#define REF_TIME    a1 
    140140 
    141 void orNowNative( OValue* a1 ) 
    142 { 
    143     OValue* res; 
     141OR_NATIVE_PUB( orNowNative ) 
     142{ 
    144143    struct timeval tp; 
    145144 
     
    149148    //        sizeof(tp.tv_sec), sizeof(tp.tv_usec) ); 
    150149 
    151     res = orRESULT; 
    152150    if( orRefineSet( REF_TIME ) ) 
    153         orSetTF( res, OT_TIME ); 
     151        orSetTF( a1, OT_TIME ); 
    154152    else 
    155         orSetTF( res, OT_DATE ); 
    156  
    157     orSeconds(res) = tp.tv_sec + (tp.tv_usec * 0.000001); 
     153        orSetTF( a1, OT_DATE ); 
     154 
     155    orSeconds(a1) = tp.tv_sec + (tp.tv_usec * 0.000001); 
    158156} 
    159157 
     
    162160  Sets result. 
    163161*/ 
    164 void orReadDir( const char* filename ) 
     162void orReadDir( OValue* a1, const char* filename ) 
    165163{ 
    166164    DIR* dir;