| 1 |
diff -up texlive-2007/texk/lacheck/lacheck.lex.lacheck texlive-2007/texk/lacheck/lacheck.lex
|
| 2 |
--- texlive-2007/texk/lacheck/lacheck.lex.lacheck 2006-01-17 22:41:51.000000000 +0100
|
| 3 |
+++ texlive-2007/texk/lacheck/lacheck.lex 2008-08-27 13:20:52.000000000 +0200
|
| 4 |
@@ -1042,11 +1042,12 @@ char *name;
|
| 5 |
void g_checkend(n)
|
| 6 |
int n;
|
| 7 |
{
|
| 8 |
- if ( check_top_level_end(yytext,n) == 1 )
|
| 9 |
+ if ( check_top_level_end(yytext,n) == 1 ) {
|
| 10 |
if ( CG_TYPE != n )
|
| 11 |
print_bad_match(yytext,n);
|
| 12 |
else
|
| 13 |
pop();
|
| 14 |
+ }
|
| 15 |
}
|
| 16 |
|
| 17 |
void e_checkend(n, name)
|
| 18 |
@@ -1075,6 +1075,7 @@ char *name;
|
| 19 |
{
|
| 20 |
print_bad_match(name,3);
|
| 21 |
pop();
|
| 22 |
+ if (gstackp <= 0) return;
|
| 23 |
}
|
| 24 |
|
| 25 |
pop();
|
| 26 |
@@ -1090,11 +1091,13 @@ int type;
|
| 27 |
line_count,
|
| 28 |
eg_command( end_command , type) ) ;
|
| 29 |
|
| 30 |
- printf("\"%s\", line %d: -> unmatched \"%s\"\n",
|
| 31 |
- CG_FILE,
|
| 32 |
- CG_LINE,
|
| 33 |
- bg_command( CG_NAME ) ) ;
|
| 34 |
- warn_count += 2;
|
| 35 |
+ if (gstackp > 0) {
|
| 36 |
+ printf("\"%s\", line %d: -> unmatched \"%s\"\n",
|
| 37 |
+ CG_FILE,
|
| 38 |
+ CG_LINE,
|
| 39 |
+ bg_command( CG_NAME ) ) ;
|
| 40 |
+ warn_count += 2;
|
| 41 |
+ }
|
| 42 |
}
|
| 43 |
|
| 44 |
int check_top_level_end(end_command,type)
|