App-RecordStream
view release on metacpan or search on metacpan
lib/App/RecordStream/Operation/totable.pm view on Meta::CPAN
if($this->{'CLEAR'})
{
if($value eq $lastr->{$field})
{
# This column matches the "last" value so we clear the cell.
$value = "";
}
else
{
# This column did not match so we do not clear the cell. We also
# invalidate all "last" field values to the right of this column.
my $startInvalidating = 0;
for(@{$this->{'FIELDS'}})
{
if($_ eq $field)
{
$startInvalidating = 1;
}
elsif($startInvalidating)
{
$lastr->{$_} = "";
src/fast-recs-collate/hash.c view on Meta::CPAN
* 3. The intent here is to compute a pointer to the last node of the
* lower chain into the low_tail variable. If this chain is empty,
* low_tail ends up with a null value.
* 4. If the lower chain is not empty, we simply tack the upper chain onto it.
* If the upper chain is a null pointer, nothing happens.
* 5. Otherwise if the lower chain is empty but the upper one is not,
* If the low chain is empty, but the high chain is not, then the
* high chain is simply transferred to the lower half of the table.
* 6. Otherwise if both chains are empty, there is nothing to do.
* 7. All the chain pointers are in the lower half of the table now, so
* we reallocate it to a smaller object. This, of course, invalidates
* all pointer-to-pointers which reference into the table from the
* first node of each chain.
* 8. Though it's unlikely, the reallocation may fail. In this case we
* pretend that the table _was_ reallocated to a smaller object.
* 9. Finally, update the various table parameters to reflect the new size.
*/
static void shrink_table(hash_t *hash)
{
hash_val_t chain, nchains;
( run in 0.239 second using v1.01-cache-2.11-cpan-4d50c553e7e )