when doing HTML conversion.
Also, remove perl function prototypes as they are not considered best
practice.
# or base64 to feed it into a formatting filter.
#
# or base64 to feed it into a formatting filter.
#
-sub process_text (*$$;$)
{
my ($input, $encoding, $charset, $boundary) = @_;
my $text, $filterpid, $prefixpid, $finread, $finwrite;
{
my ($input, $encoding, $charset, $boundary) = @_;
my $text, $filterpid, $prefixpid, $finread, $finwrite;
# Filter HTML through a converter program
#
# Filter HTML through a converter program
#
-sub process_html (*$$;$)
{
my ($input, $encoding, $charset, $boundary) = @_;
my $filterpid, $prefixpid, $finread, $finwrite;
{
my ($input, $encoding, $charset, $boundary) = @_;
my $filterpid, $prefixpid, $finread, $finwrite;
my @conv = (@htmlconv, $charset);
exec (@conv) ||
my @conv = (@htmlconv, $charset);
exec (@conv) ||
- die "Unable to exec $filterprogram: $!\n";
+ die "Unable to exec $htmlconv[0]: $!\n";
} else {
die "Fork for $htmlconv[0] failed: $!\n";
}
} else {
die "Fork for $htmlconv[0] failed: $!\n";
}
# Decide what to do, based on what kind of content it is.
#
# Decide what to do, based on what kind of content it is.
#
-sub process_part (*$$$$;$)
{
my ($input, $content_type, $encoding, $charset, $boundary, $name) = @_;
my ($type, $subtype) = (split('/', $content_type, -1), '');
{
my ($input, $content_type, $encoding, $charset, $boundary, $name) = @_;
my ($type, $subtype) = (split('/', $content_type, -1), '');
# the content of this part
#
# the content of this part
#
-sub process_multipart ($$$)
{
my ($input, $subtype, $boundary) = @_;
my $altout;
{
my ($input, $subtype, $boundary) = @_;
my $altout;
# "Eat" a MIME part; consume content until we hit the boundary or EOF
#
# "Eat" a MIME part; consume content until we hit the boundary or EOF
#
{
my ($input, $boundary) = @_;
my $ret;
{
my ($input, $boundary) = @_;
my $ret;
# Return the decoder subroutine to use
#
# Return the decoder subroutine to use
#
# Match a line against the boundary string
#
# Match a line against the boundary string
#
{
my ($line, $boundary) = @_;
{
my ($line, $boundary) = @_;