]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/libc-extension.cc
Doc-de: update for web manual
[lilypond.git] / flower / libc-extension.cc
index 7b9b5d7821c265389a6a07e6ac793c65c376321a..78cd6be16062210dbbf4fab0d58121bfc3b67190 100644 (file)
@@ -1,16 +1,30 @@
 /*
-  libc-extension.cc --  compensate for lacking libc functions.
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the flowerlib
-
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <cmath>
 #include <cstdio>
 #include <cstring>
 #include <cctype>
+#include <cassert>
+
+using namespace std;
 
 #include "libc-extension.hh"
 
@@ -36,25 +50,6 @@ strnupr (char *start, int n)
   return start;
 }
 
-/*
-  There are some strange problems with round() on early glibcs.
-*/
-double
-my_round (double x)
-{
-  return floor (x -0.5)+ 1.0;
-}
-
-#ifndef isinf
-#if !HAVE_ISINF
-int
-isinf (double x)
-{
-  return x && (x == x/ 2);
-}
-#endif
-#endif
-
 #if !HAVE_MEMMEM
 
 /** locate a substring. #memmem# finds the first occurrence of
@@ -132,6 +127,27 @@ memrev (unsigned char *byte, int length)
   return byte;
 }
 
+/*
+  There are some strange problems with round() on early glibcs.
+*/
+double
+my_round (double x)
+{
+  return floor (x -0.5)+ 1.0;
+}
+
+/* namespace std { */
+  
+#ifndef isinf
+#if !HAVE_ISINF
+int
+isinf (double x)
+{
+  return x && (x == x/ 2);
+}
+#endif
+#endif
+
 #if ! HAVE_SNPRINTF
 int
 snprintf (char *str, size_t n, char const *format, ...)
@@ -157,3 +173,4 @@ vsnprintf (char *str, size_t n, char const *format, va_list args)
 }
 #endif
 
+/* } namespace std */