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