$outfile = $1;
if ($outfile =~ /\.(.+)$/ && $1 ne 'info')
{
- &am_file_error ($filename, "$.: ",
- "output `$outfile' has unrecognized extension");
+ am_file_error ("$filename:$.",
+ "output `$outfile' has unrecognized extension");
return;
}
}
{
my ($negate, $cond, $where) = @_;
- &am_file_error ($where, "$cond does not appear in AM_CONDITIONAL")
+ am_file_error ($where, "$cond does not appear in AM_CONDITIONAL")
if ! $configure_cond{$cond} && $cond !~ /^TRUE|FALSE$/;
$cond = "${cond}_TRUE"
if (! @cond_stack)
{
- &am_file_error ($where, "else without if");
+ am_file_error ($where, "else without if");
return;
}
$cond = condition_negate ($cond)
if $negate;
- &am_file_error ($where,
- "else reminder ($negate$cond) incompatible with "
- . "current conditional: $cond_stack[$#cond_stack]")
+ am_file_error ($where,
+ "else reminder ($negate$cond) incompatible with "
+ . "current conditional: $cond_stack[$#cond_stack]")
if $cond_stack[$#cond_stack] ne $cond;
}
if (! @cond_stack)
{
- &am_file_error ($where, "endif without if: $negate$cond");
+ am_file_error ($where, "endif without if: $negate$cond");
return;
}
$cond = condition_negate ($cond)
if $negate;
- &am_file_error ($where,
- "endif reminder ($negate$cond) incompatible with "
- . "current conditional: $cond_stack[$#cond_stack]")
+ am_file_error ($where,
+ "endif reminder ($negate$cond) incompatible with "
+ . "current conditional: $cond_stack[$#cond_stack]")
if $cond_stack[$#cond_stack] ne $cond;
}
my $last_var_name = '';
my $last_var_type = '';
my $last_var_value = '';
- my $here = "$amfile:$.";
# FIXME: shouldn't use $_ in this loop; it is too big.
while ($_)
{
+ my $here = "$amfile:$.";
+
$_ .= "\n"
unless substr ($_, -1, 1) eq "\n";
foreach (make_paragraphs ($file, %transform))
{
# Sanity checks.
- &am_file_error ($file, "blank line following trailing backslash:\n$_")
+ am_file_error ($file, "blank line following trailing backslash:\n$_")
if /\\$/;
- &am_file_error ($file, "comment following trailing backslash:\n$_")
+ am_file_error ($file, "comment following trailing backslash:\n$_")
if /\\#/;
if (/^$/)
elsif (/$ASSIGNMENT_PATTERN/mso)
{
my ($var, $type, $val) = ($1, $2, $3);
- &am_file_error ($file, "macro `$var' with trailing backslash")
+ am_file_error ($file, "macro `$var' with trailing backslash")
if /\\$/;
# Accumulating variables must not be output.
# am_file_error ($FILE, @ARGS)
# ----------------------------
-sub am_file_error
+sub am_file_error ($@)
{
my ($file, @args) = @_;