| 1312 | | keeptBlock = orMakeBlock( blk->used ); |
| 1313 | | keeptBlkIndex = orBlockN( keeptBlock ); |
| 1314 | | orRefPush( OT_BLOCK, keeptBlkIndex ); |
| 1315 | | keept = keeptBlock->values; |
| | 1311 | keeptBlock = orMakeBlock( blk->used ); |
| | 1312 | keeptBlkIndex = orBlockN( keeptBlock ); |
| | 1313 | orRefPush( OT_BLOCK, keeptBlkIndex ); |
| | 1314 | keept = keeptBlock->values; |
| 1330 | | keeptBlock = orBlockPtr( keeptBlkIndex ); |
| 1331 | | keept = keeptBlock->values; |
| 1332 | | |
| 1333 | | if( !orIfTrue(orRESULT)){ |
| 1334 | | memCpy( keept + sdest, blk->values + si, vlen * sizeof(OValue) ); |
| 1335 | | sdest += vlen; |
| 1336 | | keeptBlock->used = sdest; |
| 1337 | | } |
| | 1329 | keeptBlock = orBlockPtr( keeptBlkIndex ); |
| | 1330 | keept = keeptBlock->values; |
| | 1331 | |
| | 1332 | if( ! orIfTrue(orTOS) ) |
| | 1333 | { |
| | 1334 | memCpy( keept + sdest, blk->values + si, |
| | 1335 | vlen * sizeof(OValue) ); |
| | 1336 | sdest += vlen; |
| | 1337 | keeptBlock->used = sdest; |
| | 1338 | } |
| 1360 | | |
| 1361 | | blk = orBlockPtr( serN ); // Reacquire. |
| 1362 | | send = blk->used; |
| 1363 | | keeptBlock = orBlockPtr( keeptBlkIndex ); |
| 1364 | | keept = keeptBlock->values; |
| 1365 | | |
| 1366 | | if( !orIfTrue(orRESULT)){ |
| 1367 | | memCpy( keept + sdest, blk->values + si, (blk->used - si) * sizeof(OValue) ); |
| 1368 | | sdest += blk->used - si; |
| 1369 | | keeptBlock->used = sdest; |
| 1370 | | } |
| 1371 | | } |
| 1372 | | |
| 1373 | | orResultBLOCK( serN ); |
| 1374 | | blk->used = sorig + sdest; |
| 1375 | | orRESULT->series.it = sorig; |
| 1376 | | memCpy( blk->values + sorig, keept, sdest * sizeof(OValue)); |
| 1377 | | orRefPop( 1 ); //free(keept); |
| 1378 | | } |
| 1379 | | break; |
| | 1361 | blk = orBlockPtr( serN ); // Reacquire. |
| | 1362 | send = blk->used; |
| | 1363 | keeptBlock = orBlockPtr( keeptBlkIndex ); |
| | 1364 | keept = keeptBlock->values; |
| | 1365 | |
| | 1366 | if( ! orIfTrue(orTOS) ) |
| | 1367 | { |
| | 1368 | memCpy( keept + sdest, blk->values + si, |
| | 1369 | (blk->used - si) * sizeof(OValue) ); |
| | 1370 | sdest += blk->used - si; |
| | 1371 | keeptBlock->used = sdest; |
| | 1372 | } |
| | 1373 | } |
| | 1374 | |
| | 1375 | orResultBLOCK( serN ); |
| | 1376 | blk->used = sorig + sdest; |
| | 1377 | a1->series.it = sorig; |
| | 1378 | memCpy( blk->values + sorig, keept, sdest * sizeof(OValue)); |
| | 1379 | orRefPop( 1 ); //free(keept); |
| | 1380 | } |
| | 1381 | break; |
| 1443 | | if( !orIfTrue(orRESULT)){ |
| 1444 | | strNCpy( keept + sdest, str->charArray + ssrc, (str->used - ssrc) ); |
| 1445 | | sdest += str->used - ssrc; |
| 1446 | | } |
| 1447 | | } |
| 1448 | | |
| 1449 | | orResultSTRING( serN ); |
| 1450 | | str->used = sorig + sdest; |
| 1451 | | orRESULT->series.it = sorig; |
| 1452 | | strNCpy( str->charArray + sorig, keept, str->used ); |
| 1453 | | free(keept); |
| | 1444 | if( ! orIfTrue(orTOS) ) |
| | 1445 | { |
| | 1446 | strNCpy( keept + sdest, str->charArray + ssrc, |
| | 1447 | (str->used - ssrc) ); |
| | 1448 | sdest += str->used - ssrc; |
| | 1449 | } |
| | 1450 | } |
| | 1451 | |
| | 1452 | orResultSTRING( serN ); |
| | 1453 | str->used = sorig + sdest; |
| | 1454 | a1->series.it = sorig; |
| | 1455 | strNCpy( str->charArray + sorig, keept, str->used ); |
| | 1456 | free(keept); |
| 1457 | | default: |
| 1458 | | orError("remove-each for this type not implemented"); |
| 1459 | | |
| 1460 | | |
| 1461 | | /* case OT_LIST: */ |
| 1462 | | /* if( a1->type == OT_BLOCK ) */ |
| 1463 | | /* { */ |
| 1464 | | /* orError( "foreach block! list! not implemented" ); */ |
| 1465 | | /* break; */ |
| 1466 | | /* } */ |
| 1467 | | |
| 1468 | | /* orResultNONE; */ |
| 1469 | | |
| 1470 | | /* if( a2->series.index ) */ |
| 1471 | | /* { */ |
| 1472 | | /* OValue* begin; */ |
| 1473 | | /* OValue* it; */ |
| 1474 | | |
| 1475 | | /* blk = orBLOCK(a2); */ |
| 1476 | | /* begin = blk->values; */ |
| 1477 | | /* it = begin + a2->series.index; */ |
| 1478 | | |
| 1479 | | /* while( it->LIST_NEXT > 0 ) */ |
| 1480 | | /* { */ |
| 1481 | | /* orCopyV( wval, it[1] ); */ |
| 1482 | | |
| 1483 | | /* orEvalBlock( orBlockPtr( body ), bi ); */ |
| 1484 | | /* if( orErrorThrown ) */ |
| 1485 | | /* goto error; */ |
| 1486 | | |
| 1487 | | /* //blk = orBlockPtr( serN ); // Reacquire. */ |
| 1488 | | /* //orListNextNode( blk, it ); */ |
| 1489 | | /* it = begin + it->LIST_NEXT; */ |
| 1490 | | /* } */ |
| 1491 | | /* } */ |
| 1492 | | /* break; */ |
| | 1460 | default: |
| | 1461 | orError("remove-each for this type not implemented"); |