]> git.donarmstrong.com Git - lilypond.git/blob - flower/warn.cc
270b4c2525ad190f6d3ce7578adc668c25beab7f
[lilypond.git] / flower / warn.cc
1 /*
2   warn.cc -- implement warnings
3
4   source file of the Flower Library
5
6   (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include <stdlib.h>
10 #include <stdio.h>
11
12 #include "warn.hh"
13
14
15 void
16 message (String s)
17 {
18   fputs (s.to_str0 (), stderr);
19   fflush (stderr);
20 }
21
22 void
23 warning (String s)
24 {
25   message (_f ("warning: %s\n", s.to_str0 ()));
26 }
27
28 void
29 non_fatal_error (String s)
30 {
31   message (_f ("error: %s\n", s.to_str0 ()));
32 }
33
34 void
35 error (String s)
36 {
37   non_fatal_error (s);
38   exit (1);
39 }
40
41 void
42 programming_error (String s)
43 {
44   message (_f ("programming error: %s (Continuing; cross thumbs)\n",
45                s.to_str0 ()));
46 }
47