From 66317920512db86f2261a66b1017539926c29e08 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 19 Jul 2003 12:32:16 +0000 Subject: [PATCH] * flower/libc-extension.cc (lrint)[!HAVE_LRINT]: Use round () and cast #define. * NEWS: Typo and fill-paragraph fixes. --- ChangeLog | 5 ++++- NEWS | 25 +++++++++++-------------- flower/libc-extension.cc | 33 +++++++++++++++------------------ 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6213389803..362447fdca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2003-07-19 Jan Nieuwenhuizen - * flower/libc-extension.cc (lrint)[!HAVE_LRINT]: Add casting #define. + * NEWS: Typo and fill-paragraph fixes. + + * flower/libc-extension.cc (lrint)[!HAVE_LRINT]: Use round () and + cast #define. * configure.in: * config.hh.in: Check for lrint. diff --git a/NEWS b/NEWS index de69b094d0..3958b8443e 100644 --- a/NEWS +++ b/NEWS @@ -1,13 +1,12 @@ New features in 1.8 since 1.6 ============================= -** There chord entry code has been completely rewritten. It is now +** The chord entry code has been completely rewritten. It is now cleaner and more flexible. -** A new syntax has been added for text entry. - -This syntax is more friendly than the old mechanism, and it is -implemented in a more robust and modular way. +** A new syntax has been added for text entry. This syntax is more +friendly than the old mechanism, and it is implemented in a more +robust and modular way. ** Deeper integration of the input language and Scheme. You can now use LilyPond identifiers in Scheme, and use Scheme expressions instead of @@ -37,9 +36,8 @@ A beamed slurred pair of eighth notes can be entered as In version 2.0, postfix syntax will be the only syntax available, and the dashes will become optional. -** User code may now be executed during interpreting. - -The syntax for this code is +** User code may now be executed during interpreting. The syntax for +this code is \applycontext #SCHEME-FUNCTION @@ -75,19 +73,18 @@ syntax for this is .. NOTE-\stopGroup -** Ottava brackets are now fully supported as a feature. -The syntax is +** Ottava brackets are now fully supported as a feature. The syntax +is #(set-octavation 1) -** Metronome markings are printed when a -\tempo command is processed. +** Metronome markings are printed when a \tempo command is processed. ** Fingerings can be put on chords horizontally. -** The appearance of various glyphs has been fine-tuned +** The appearance of various glyphs has been fine-tuned. -** Different types of percent style repeats may now be nested +** Different types of percent style repeats may now be nested. ** The emacs support has been extended. diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 198ecbb7fe..e994344d7f 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -13,9 +13,6 @@ #include #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 -- 2.39.2