* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
+
#define _GNU_SOURCE /* for program_invocation_name */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <error.h>
+#include "../src/compiler.h"
+
+
void (*error_print_progname)(void);
-static void print_prognmae(void) {
+static void print_progname(void) {
fprintf(stderr, "PROG");
}
-int main(int argc, char **argv) {
+int main(int argc unused, char **argv unused) {
program_invocation_name = "./example_error";
error(0, 0, "<message>");
error_at_line(0, ENOMEM, "file", 42, "<message>");
error_at_line(0, ENOMEM, "file", 42, "<message>");
- error_print_progname = print_prognmae;
+ error_print_progname = print_progname;
error_one_per_line = 1;
error(0, 0, "<message>");