2 warn.cc -- implement warnings
4 source file of the Flower Library
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
14 /* Is progress indication at NEWLINE? */
15 static bool progress_newline
= true;
17 /* Display user information that is not a full message. */
19 progress_indication (String s
)
21 /* Test if all silly progress_indication ("\n") can be dropped now. */
25 fputs (s
.to_str0 (), stderr
);
28 progress_newline
= s
[s
.length () - 1] == '\n';
31 /* Display a single user message. Always starts on a new line. */
35 if (!progress_newline
)
37 progress_indication (s
);
40 /* Display a warning message. Always starts on a new line. */
44 message (_f ("warning: %s", s
.to_str0 ()) + "\n");
48 non_fatal_error (String s
)
50 message (_f ("error: %s", s
.to_str0 ()) + "\n");
53 /* Display an error message. Always starts on a new line. */
62 programming_error (String s
)
64 message (_f ("programming error: %s", s
) + "\n");
65 message (_ ("continuing, cross fingers") + "\n");