]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/warn.cc
*** empty log message ***
[lilypond.git] / flower / warn.cc
index 4fa9dcd2052173a2a6c4d2a3c8ded8fa169dd261..270b4c2525ad190f6d3ce7578adc668c25beab7f 100644 (file)
@@ -1,38 +1,47 @@
+/*
+  warn.cc -- implement warnings
+
+  source file of the Flower Library
+
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
 #include <stdlib.h>
-#include <stream.h>
+#include <stdio.h>
+
 #include "warn.hh"
 
 
 void
-error (String s)
+message (String s)
 {
-  cerr <<  _ ("error: ") << s << '\n';
-
-  exit (1);
+  fputs (s.to_str0 (), stderr);
+  fflush (stderr);
 }
 
 void
-non_fatal_error (String s)
+warning (String s)
 {
-  cerr <<  _ ("error: ") << s << '\n';
+  message (_f ("warning: %s\n", s.to_str0 ()));
 }
 
 void
-warning (String m)
+non_fatal_error (String s)
 {
-  cerr << _ ("warning: ") <<m <<endl;
-
+  message (_f ("error: %s\n", s.to_str0 ()));
 }
 
 void
-message (String m)
+error (String s)
 {
-  cerr << m<<endl;
+  non_fatal_error (s);
+  exit (1);
 }
 
 void
 programming_error (String s)
 {
-  cerr << _("programming error: ") << s << _(" (Continuing; cross thumbs)") << '\n';
+  message (_f ("programming error: %s (Continuing; cross thumbs)\n",
+              s.to_str0 ()));
 }