Rev 5222 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5222 | Rev 6324 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* messages.c - error reporter - |
1 | /* messages.c - error reporter - |
2 | Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, |
- | |
3 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
- | |
4 | Free Software Foundation, Inc. |
2 | Copyright (C) 1987-2015 Free Software Foundation, Inc. |
5 | This file is part of GAS, the GNU Assembler. |
3 | This file is part of GAS, the GNU Assembler. |
Line 6... | Line 4... | ||
6 | 4 | ||
7 | GAS is free software; you can redistribute it and/or modify |
5 | GAS is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
Line 151... | Line 149... | ||
151 | 149 | ||
152 | identify (file); |
150 | identify (file); |
153 | if (file) |
151 | if (file) |
154 | { |
152 | { |
155 | if (line != 0) |
153 | if (line != 0) |
156 | fprintf (stderr, "%s:%u: ", file, line); |
154 | fprintf (stderr, "%s:%u: %s%s\n", file, line, _("Warning: "), buffer); |
157 | else |
155 | else |
158 | fprintf (stderr, "%s: ", file); |
156 | fprintf (stderr, "%s: %s%s\n", file, _("Warning: "), buffer); |
- | 157 | } |
|
159 | } |
158 | else |
160 | fprintf (stderr, _("Warning: ")); |
- | |
161 | fputs (buffer, stderr); |
- | |
162 | (void) putc ('\n', stderr); |
159 | fprintf (stderr, "%s%s\n", _("Warning: "), buffer); |
163 | #ifndef NO_LISTING |
160 | #ifndef NO_LISTING |
164 | listing_warning (buffer); |
161 | listing_warning (buffer); |
165 | #endif |
162 | #endif |
Line 217... | Line 214... | ||
217 | 214 | ||
218 | identify (file); |
215 | identify (file); |
219 | if (file) |
216 | if (file) |
220 | { |
217 | { |
221 | if (line != 0) |
218 | if (line != 0) |
222 | fprintf (stderr, "%s:%u: ", file, line); |
219 | fprintf (stderr, "%s:%u: %s%s\n", file, line, _("Error: "), buffer); |
223 | else |
220 | else |
224 | fprintf (stderr, "%s: ", file); |
221 | fprintf (stderr, "%s: %s%s\n", file, _("Error: "), buffer); |
- | 222 | } |
|
225 | } |
223 | else |
226 | fprintf (stderr, _("Error: ")); |
- | |
227 | fputs (buffer, stderr); |
- | |
228 | (void) putc ('\n', stderr); |
224 | fprintf (stderr, "%s%s\n", _("Error: "), buffer); |
229 | #ifndef NO_LISTING |
225 | #ifndef NO_LISTING |
230 | listing_error (buffer); |
226 | listing_error (buffer); |
231 | #endif |
227 | #endif |
Line 297... | Line 293... | ||
297 | as_assert (const char *file, int line, const char *fn) |
293 | as_assert (const char *file, int line, const char *fn) |
298 | { |
294 | { |
299 | as_show_where (); |
295 | as_show_where (); |
300 | fprintf (stderr, _("Internal error!\n")); |
296 | fprintf (stderr, _("Internal error!\n")); |
301 | if (fn) |
297 | if (fn) |
302 | fprintf (stderr, _("Assertion failure in %s at %s line %d.\n"), |
298 | fprintf (stderr, _("Assertion failure in %s at %s:%d.\n"), |
303 | fn, file, line); |
299 | fn, file, line); |
304 | else |
300 | else |
305 | fprintf (stderr, _("Assertion failure at %s line %d.\n"), file, line); |
301 | fprintf (stderr, _("Assertion failure at %s:%d.\n"), file, line); |
306 | fprintf (stderr, _("Please report this bug.\n")); |
302 | fprintf (stderr, _("Please report this bug.\n")); |
307 | xexit (EXIT_FAILURE); |
303 | xexit (EXIT_FAILURE); |
308 | } |
304 | } |
Line 309... | Line 305... | ||
309 | 305 | ||
Line 313... | Line 309... | ||
313 | void |
309 | void |
314 | as_abort (const char *file, int line, const char *fn) |
310 | as_abort (const char *file, int line, const char *fn) |
315 | { |
311 | { |
316 | as_show_where (); |
312 | as_show_where (); |
317 | if (fn) |
313 | if (fn) |
318 | fprintf (stderr, _("Internal error, aborting at %s line %d in %s\n"), |
314 | fprintf (stderr, _("Internal error, aborting at %s:%d in %s\n"), |
319 | file, line, fn); |
315 | file, line, fn); |
320 | else |
316 | else |
321 | fprintf (stderr, _("Internal error, aborting at %s line %d\n"), |
317 | fprintf (stderr, _("Internal error, aborting at %s:%d\n"), |
322 | file, line); |
318 | file, line); |
323 | fprintf (stderr, _("Please report this bug.\n")); |
319 | fprintf (stderr, _("Please report this bug.\n")); |
324 | xexit (EXIT_FAILURE); |
320 | xexit (EXIT_FAILURE); |
325 | } |
321 | } |