Report filenames in error messages.
--- a/assemble.c Thu Feb 12 02:18:24 2009 -0500
+++ b/assemble.c Thu Feb 12 02:37:59 2009 -0500
@@ -30,7 +30,8 @@
int i;
for (i = 0; i < pd->error_count; i++)
{
- printf("ERROR: (line %d) %s\n",
+ printf("%s:%d: ERROR: %s\n",
+ pd->errors[i].filename ? pd->errors[i].filename : "???",
pd->errors[i].error_position,
pd->errors[i].error);
} // for
--- a/finderrors.c Thu Feb 12 02:18:24 2009 -0500
+++ b/finderrors.c Thu Feb 12 02:37:59 2009 -0500
@@ -88,7 +88,10 @@
if (a->error_count > 0)
{
- report("FAIL: %s (line %d) %s\n", fname, a->errors[0].error_position, a->errors[0].error);
+ report("FAIL: %s (line %d) %s\n",
+ a->errors[0].filename ? a->errors[0].filename : "???",
+ a->errors[0].error_position,
+ a->errors[0].error);
return 1;
} // if
--- a/preprocess.c Thu Feb 12 02:18:24 2009 -0500
+++ b/preprocess.c Thu Feb 12 02:37:59 2009 -0500
@@ -31,7 +31,8 @@
int i;
for (i = 0; i < pd->error_count; i++)
{
- printf("ERROR: (line %d) %s\n",
+ printf("%s:%d: ERROR: %s\n",
+ pd->errors[i].filename ? pd->errors[i].filename : "???",
pd->errors[i].error_position,
pd->errors[i].error);
} // for
--- a/testoutput.c Thu Feb 12 02:18:24 2009 -0500
+++ b/testoutput.c Thu Feb 12 02:37:59 2009 -0500
@@ -22,7 +22,8 @@
int i;
for (i = 0; i < pd->error_count; i++)
{
- printf("ERROR: (line %d) %s\n",
+ printf("%s:%d: ERROR: %s\n",
+ pd->errors[i].filename ? pd->errors[i].filename : "???",
pd->errors[i].error_position,
pd->errors[i].error);
} // for
--- a/testparse.c Thu Feb 12 02:18:24 2009 -0500
+++ b/testparse.c Thu Feb 12 02:37:59 2009 -0500
@@ -66,7 +66,8 @@
int i;
for (i = 0; i < pd->error_count; i++)
{
- printf("ERROR: (position %d) %s\n",
+ printf("%s:%d: ERROR: %s\n",
+ pd->errors[i].filename ? pd->errors[i].filename : "???",
pd->errors[i].error_position,
pd->errors[i].error);
} // for