X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=diagnostic.c;h=ad81055eaf0d71879fc1ccab76a2618b099c4226;hb=798ad4944c5714d572ce492a72a0836b83a55dd4;hp=eacf085389f7087743c844088c010c63af295938;hpb=33a03247c00d9a5dc659f4be9065d649d839e629;p=cparser diff --git a/diagnostic.c b/diagnostic.c index eacf085..ad81055 100644 --- a/diagnostic.c +++ b/diagnostic.c @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -40,7 +40,8 @@ static const source_position_t *curr_pos = NULL; /** * prints an additional source position */ -static void print_source_position(FILE *out, const source_position_t *pos) { +static void print_source_position(FILE *out, const source_position_t *pos) +{ fprintf(out, "at line %u", pos->linenr); if (curr_pos == NULL || curr_pos->input_name != pos->input_name) fprintf(out, " of \"%s\"", pos->input_name); @@ -68,7 +69,7 @@ static void diagnosticvf(const char *const fmt, va_list ap) case 'C': { const wint_t val = va_arg(ap, wint_t); - fputwc(val, stderr); + fprintf(stderr, "%lc", val); break; }