summaryrefslogtreecommitdiffstats
path: root/dimension/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/utility.c')
-rw-r--r--dimension/utility.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/dimension/utility.c b/dimension/utility.c
index 1961d3e..012e704 100644
--- a/dimension/utility.c
+++ b/dimension/utility.c
@@ -22,13 +22,17 @@
#include <stdio.h>
void
-dmnsn_diagnostic(const char *filename, unsigned int line, unsigned int col,
- const char *format, ...)
+dmnsn_diagnostic(const char *filename, int line, int col, const char *format,
+ ...)
{
va_list ap;
va_start(ap, format);
- fprintf(stderr, "%s:%u:%u: ", filename, line, col);
+ if (line >= 0 && col >= 0) {
+ fprintf(stderr, "%s:%d:%d: ", filename, line, col);
+ } else {
+ fprintf(stderr, "%s: ", filename);
+ }
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");