]> git.donarmstrong.com Git - lilypond.git/blob - flower/warn.cc
``slikken kreng''
[lilypond.git] / flower / warn.cc
1 /*
2   warn.cc -- implement warnings
3
4   source file of the Flower Library
5
6   (c)  1997--2000 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 }
20
21 void
22 warning (String s)
23 {
24   message (_f ("warning: %s\n", s.to_str0 ()));
25 }
26
27 void
28 non_fatal_error (String s)
29 {
30   message (_f ("error: %s\n", s.to_str0 ()));
31 }
32
33 void
34 error (String s)
35 {
36   non_fatal_error (s);
37   exit (1);
38 }
39
40 void
41 programming_error (String s)
42 {
43   message (_f ("programming error: %s (Continuing; cross thumbs)\n",
44                s.to_str0 ()));
45 }
46