2 warn.cc -- implement warnings
4 source file of the Flower Library
6 (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
14 #include "international.hh"
18 /* Is progress indication at NEWLINE? */
19 static bool progress_newline = true;
21 /* Display user information that is not a full message. */
23 progress_indication (string s)
25 /* Test if all silly progress_indication ("\n") can be dropped now. */
29 fputs (s.c_str (), stderr);
32 progress_newline = s[s.length () - 1] == '\n';
35 /* Display a single user message. Always starts on a new line. */
39 if (!progress_newline)
41 progress_indication (s);
44 /* Display a warning message. Always starts on a new line. */
48 message (_f ("warning: %s", s.c_str ()) + "\n");
52 non_fatal_error (string s)
54 message (_f ("error: %s", s.c_str ()) + "\n");
57 /* Display an error message. Always starts on a new line. */
66 programming_error (string s)
68 message (_f ("programming error: %s", s) + "\n");
69 message (_ ("continuing, cross fingers") + "\n");