+ my $snl = $mynl;
+ my $newsavenl = "";
+ $snl = "" if $mode == 0;
+ if ($mode && $line =~ />$/) {
+ $newsavenl = $snl;
+ $snl = ' ';
+ }
+ $line =~ s/\n/\r/og if $mode == 1;
+ #my $p = qq($line$snl);
+ if ($buffered) {
+ if (length $outqueue >= 128) {
+ print $outqueue;
+ $outqueue = "";
+ }
+ $outqueue .= "$savenl$line$snl";
+ $lasttime = time;
+ } else {
+ print $savenl, $line, $snl;;
+ }
+ $savenl = $newsavenl;