diff options
-rw-r--r-- | common.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -8,6 +8,7 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) { char buf[1024] = { '\0' }; char *s = buf; + char c = '\0'; rewind(fd); while (line && !feof(fd) && fgets(buf, sizeof(buf), fd)) { @@ -36,8 +37,10 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) { for (column--; column; column--) { fputc(' ', stderr); } + + c = span == 1 ? '^' : '"'; for (; span; span--) { - fputc('"', stderr); + fputc(c, stderr); } fputc('\n', stderr); } |