package xm::tabs;
use strict;
use xm::o;
"
expand tabulator ascii characters to their respective width.
(this snippet is taken from code2html, although no important part of it).
"}
sub expand {
my ($line, $TABSTOP) = @_;
$TABSTOP = 8 if not defined $TABSTOP;
while ((my $at = index($line, "\t")) != -1)
{
my $cnt = ($TABSTOP - ($at % $TABSTOP));
my $replace_with = ' ' x $cnt if ($cnt);
$line =~ s/\t/$replace_with/;
};
return $line;
}
my $x = shift;
return &checkTabulator ($x,8);
}
return xm::o::args_stdin(@_, DESC); }
return DO(xm::o::args_stdin(@_, DESC)); }
1;