Changeset 145
- Timestamp:
- 05/11/06 15:55:43 (3 years ago)
- Location:
- trunk/orca
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/files.c
r144 r145 259 259 OR_NATIVE( orReadNative ) 260 260 { 261 if( a1->type == OT_FILE)261 if( orIs(a1, OT_FILE) ) 262 262 { 263 263 int n; … … 275 275 else if( n == 1 ) 276 276 { 277 // TODO: Hold a1 from GC (or copy fn).278 277 orReadDir( a1, fn ); 279 278 } … … 365 364 } 366 365 } 367 else if( a1->type == OT_PORT)366 else if( orIs(a1, OT_PORT) ) 368 367 { 369 368 OArray* arr = &orEnv->devices; … … 541 540 542 541 543 OR_NATIVE ( orDecompressNative )542 OR_NATIVE_PUB( orDecompressNative ) 544 543 { 545 544 #define BUF_LOW 32 -
trunk/orca/unix/os.c
r144 r145 168 168 if( dir ) 169 169 { 170 OIndex hold; 171 OIndex blkN; 170 172 OBlock* blk = orMakeBlock( 0 ); 173 174 blkN = orBlockN(blk); 175 hold = orHold( OT_BLOCK, blkN ); 171 176 172 177 while( (entry = readdir( dir )) ) … … 180 185 closedir( dir ); 181 186 182 orResult( OT_BLOCK, blk - orBLOCKS ); 183 return; 184 } 185 186 orResultFALSE; 187 orRelease( hold ); 188 orResultBLOCK( blkN ); 189 } 190 else 191 { 192 orResultFALSE; 193 } 187 194 } 188 195 -
trunk/orca/win32/os.c
r144 r145 191 191 if( handle != -1 ) 192 192 { 193 OIndex hold; 194 OIndex blkN; 193 195 OBlock* blk = orMakeBlock( 0 ); 194 196 197 blkN = orBlockN(blk); 198 hold = orHold( OT_BLOCK, blkN ); 199 195 200 do 196 201 { … … 201 206 _findclose( handle ); 202 207 203 orResult( OT_BLOCK, blk - orBLOCKS ); 204 return; 205 } 206 207 orResultFALSE; 208 orRelease( hold ); 209 orResultBLOCK( blkN ); 210 } 211 else 212 { 213 orResultFALSE; 214 } 208 215 } 209 216
