parallel: Indention.

This commit is contained in:
Ole Tange 2013-08-21 17:11:25 +02:00
parent 81a8a116b7
commit 2c587e4055

View file

@ -343,7 +343,7 @@ sub spreadstdin {
my $one_time_through; my $one_time_through;
my $blocksize = $opt::blocksize; my $blocksize = $opt::blocksize;
my $in = *STDIN; my $in = *STDIN;
piperead: while(1) { while(1) {
my $anything_written = 0; my $anything_written = 0;
if(not read($in,substr($buf,length $buf,0),$blocksize)) { if(not read($in,substr($buf,length $buf,0),$blocksize)) {
# End-of-file # End-of-file
@ -351,7 +351,6 @@ sub spreadstdin {
# Force the while-loop once if everything was read by header reading # Force the while-loop once if everything was read by header reading
$one_time_through++ and last; $one_time_through++ and last;
} }
if($opt::r) { if($opt::r) {
# Remove empty lines # Remove empty lines
$buf=~s/^\s*\n//gm; $buf=~s/^\s*\n//gm;
@ -4733,15 +4732,6 @@ sub populate {
# max line length is reached # max line length is reached
# Returns: N/A # Returns: N/A
my $self = shift; my $self = shift;
# if($opt::pipe) {
# # --pipe => Do no read any args
# $self->push([Arg->new("")]);
# return;
# }
# if($opt::roundrobin) {
# $self->push([Arg->new("")]);
# return;
# }
my $next_arg; my $next_arg;
while (not $self->{'arg_queue'}->empty()) { while (not $self->{'arg_queue'}->empty()) {
$next_arg = $self->{'arg_queue'}->get(); $next_arg = $self->{'arg_queue'}->get();
@ -5102,9 +5092,6 @@ sub replace_placeholders {
my $quote = shift; my $quote = shift;
my $context_replace = $self->{'context_replace'}; my $context_replace = $self->{'context_replace'};
my $replaced; my $replaced;
# print ::my_dump($self);
if($self->{'context_replace'}) { if($self->{'context_replace'}) {
$replaced = $self->context_replace_placeholders($target,$quote); $replaced = $self->context_replace_placeholders($target,$quote);
} else { } else {
@ -5158,7 +5145,7 @@ sub context_replace_placeholders {
$word{$1} ||= 1; $word{$1} ||= 1;
} }
if(not %word) { if(not %word) {
# The line did no contain any replacementstrings => return unchanged # The line did no contain any replacement strings => return unchanged
return $target; return $target;
} }
# For each word: Generate the replacement string for that word. # For each word: Generate the replacement string for that word.