]> git.donarmstrong.com Git - lilypond.git/blob - flower/warn.cc
(start_translation_timestep):
[lilypond.git] / flower / warn.cc
1 /*
2   warn.cc -- implement warnings
3
4   source file of the Flower Library
5
6   (c) 1997--2004 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; crossing fingers)\n",
45                s.to_str0 ()));
46 }
47