]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/libc-extension.cc
* flower/libc-extension.cc (lrint)[!HAVE_LRINT]: Use round () and
[lilypond.git] / flower / libc-extension.cc
index 198ecbb7fe31cc3d3f6d0f4d5a17ef6f6c6371d5..e994344d7f351d01a004a32f82f1e75a964262d8 100644 (file)
@@ -13,9 +13,6 @@
 #include <ctype.h>
 #include "libc-extension.hh"
 
-/*
-  urg: why soo wierd?
- */
 char* 
 strnlwr (char* start ,int n)
 {
@@ -39,6 +36,20 @@ strnupr (char* start, int n)
 }
 
 
+#if ! HAVE_LRINT
+#define lrint(__x) ((long) (round (__x)
+#endif
+
+
+#if !HAVE_ISINF
+int
+isinf (double x)
+{
+  return x && ( x == x/ 2) ;
+}
+#endif
+
+
 #if !HAVE_MEMMEM
 
 /** locate a substring. #memmem# finds the first occurrence of
@@ -64,7 +75,7 @@ _memmem (Byte const *haystack, int haystack_len,
         if (*subneedle++ != *subhaystack++)
          goto next;
        
-      // completed the needle. Gotcha.
+      /* Completed the needle.  Gotcha.  */
       return (Byte *) haystack;
       next:
        haystack++;
@@ -120,10 +131,6 @@ strrev (Byte* byte, int length_i)
   return byte;
 }
 
-#if ! HAVE_LRINT
-#define lrint(__x) ((long)(double) __x)
-#endif
-
 #if ! HAVE_SNPRINTF
 int 
 snprintf (char *str, size_t, char const *format, ...)
@@ -144,13 +151,3 @@ vsnprintf (char *str, size_t, char const *format, va_list args)
   return i;
 }
 #endif
-
-
-#if !HAVE_ISINF
-int
-isinf (double x)
-{
-  return x && ( x == x/ 2) ;
-}
-
-#endif