Commit b0c6e36d authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed line numbers in error messages and improved redefinition error

(based on a patch by Jon Griffiths).
parent f08b1863
......@@ -481,8 +481,9 @@ static void sort_names(void)
if (!strcmp( Names[i]->name, Names[i+1]->name ))
{
current_line = max( Names[i]->lineno, Names[i+1]->lineno );
fatal_error( "'%s' redefined (previous definition at line %d)\n",
Names[i]->name, min( Names[i]->lineno, Names[i+1]->lineno ) );
fatal_error( "'%s' redefined\n%s:%d: First defined here\n",
Names[i]->name, input_file_name,
min( Names[i]->lineno, Names[i+1]->lineno ) );
}
}
}
......@@ -498,7 +499,7 @@ SPEC_TYPE ParseTopLevel( FILE *file, int def_only )
const char *token;
input_file = file;
current_line = 1;
current_line = 0;
if (owner_name[0]) SpecType = SPEC_WIN16;
while ((token = GetToken(1)) != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment