summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-21 04:41:36 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-21 04:41:36 +0000
commit7dbb8d1e451cc2865f95cf58c9fa0b0d27d382a7 (patch)
tree69d03a1f9450505db2e0a4c91be50b4a9802cc7b /bin
parent6d60adf2d886974d61a913f110bfce7f09ff8cd6 (diff)
downloadATCD-7dbb8d1e451cc2865f95cf58c9fa0b0d27d382a7.tar.gz
Allow program to proceed even there are errors.
Added more comprehensive error messages.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/indent_macros.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/indent_macros.perl b/bin/indent_macros.perl
index 7ae2a8814c0..3429d746dba 100755
--- a/bin/indent_macros.perl
+++ b/bin/indent_macros.perl
@@ -7,6 +7,7 @@ eval '(exit $?0)' && eval 'exec perl -i -S $0 ${1+"$@"}'
# This perl script re-arrange the macro indentation so it's easier to
# see the layering relationship.
+$lineno = 0;
$indent = 0;
sub inc_indent
@@ -22,12 +23,13 @@ sub dec_indent
sub get_indent
{
$retv = 0;
- die ("Unbalanced macro pairs\n") if ($indent < 0);
+ print STDERR "$0 (", $lineno, "): Unbalanced macro pairs\n" if ($indent < 0);
$retv = $indent - 1 if ($indent > 0);
$retv;
}
while (<>) {
+ $lineno++;
if (/^[ \t]*\#[ \t]*((if|el|en|).*)/)
{
$cont = $1;
@@ -54,4 +56,4 @@ while (<>) {
}
}
-die ("Unbalanced macro pairs\n") if ($indent < 0);
+die ("$0 (EOF): Unbalanced macro pairs\n") if ($indent != 0);