errors: show carets

* src/locations.c (caret_info): New, persistant information useful
for...
(location_caret): New, print a caret.
(cleanup_caret): Release caret_info cleanly, call it...
* src/main.c (main): Here.
* src/complain.c (error_message): Call location_caret here.
This commit is contained in:
Theophile Ranquet
2012-11-30 14:34:56 +01:00
parent 0db2648930
commit 3f5d1b2c67
6 changed files with 110 additions and 9 deletions

View File

@@ -216,5 +216,7 @@ main (int argc, char *argv[])
timevar_stop (TV_TOTAL);
timevar_print (stderr);
cleanup_caret ();
return complaint_issued ? EXIT_FAILURE : EXIT_SUCCESS;
}