2008-06-18 13:26:38 +00:00
|
|
|
diff -up texlive-2007/texk/lacheck/lacheck.lex.lacheck texlive-2007/texk/lacheck/lacheck.lex
|
|
|
|
--- texlive-2007/texk/lacheck/lacheck.lex.lacheck 2006-01-17 22:41:51.000000000 +0100
|
2008-08-27 13:45:49 +00:00
|
|
|
+++ texlive-2007/texk/lacheck/lacheck.lex 2008-08-27 13:20:52.000000000 +0200
|
|
|
|
@@ -1042,11 +1042,12 @@ char *name;
|
|
|
|
void g_checkend(n)
|
|
|
|
int n;
|
|
|
|
{
|
|
|
|
- if ( check_top_level_end(yytext,n) == 1 )
|
|
|
|
+ if ( check_top_level_end(yytext,n) == 1 ) {
|
|
|
|
if ( CG_TYPE != n )
|
|
|
|
print_bad_match(yytext,n);
|
|
|
|
else
|
|
|
|
pop();
|
|
|
|
+ }
|
|
|
|
}
|
2008-06-18 13:26:38 +00:00
|
|
|
|
2008-08-27 13:45:49 +00:00
|
|
|
void e_checkend(n, name)
|
2009-10-16 05:36:21 +00:00
|
|
|
@@ -1075,6 +1075,7 @@ char *name;
|
|
|
|
{
|
|
|
|
print_bad_match(name,3);
|
|
|
|
pop();
|
|
|
|
+ if (gstackp <= 0) return;
|
|
|
|
}
|
|
|
|
|
|
|
|
pop();
|
|
|
|
@@ -1090,11 +1091,13 @@ int type;
|
|
|
|
line_count,
|
|
|
|
eg_command( end_command , type) ) ;
|
|
|
|
|
|
|
|
- printf("\"%s\", line %d: -> unmatched \"%s\"\n",
|
|
|
|
- CG_FILE,
|
|
|
|
- CG_LINE,
|
|
|
|
- bg_command( CG_NAME ) ) ;
|
|
|
|
- warn_count += 2;
|
|
|
|
+ if (gstackp > 0) {
|
|
|
|
+ printf("\"%s\", line %d: -> unmatched \"%s\"\n",
|
|
|
|
+ CG_FILE,
|
|
|
|
+ CG_LINE,
|
|
|
|
+ bg_command( CG_NAME ) ) ;
|
|
|
|
+ warn_count += 2;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
int check_top_level_end(end_command,type)
|