source file of the GNU LilyPond music typesetter
- (c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
- Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+ Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "config.hh"
-#include <math.h> /* isinf */
-#include <stdio.h>
-#include <string.h> /* memset */
+#include <cstdio>
+#include <cstring> /* memset */
+using namespace std;
#include "international.hh"
#include "libc-extension.hh"
#include "main.hh"
#include "file-path.hh"
-/* MacOS S fix:
- source-file.hh includes cmath which undefines isinf and isnan
-*/
-#ifdef __APPLE__
-inline int my_isinf (Real r) { return isinf (r); }
-inline int my_isnan (Real r) { return isnan (r); }
-#endif
-
LY_DEFINE (ly_find_file, "ly:find-file",
1, 0, 0, (SCM name),
"Return the absolute file name of @var{name}, "
if (scm_exact_p (s) == SCM_BOOL_F)
{
Real r (scm_to_double (s));
-#ifdef __APPLE__
- if (my_isinf (r) || my_isnan (r))
-#else
if (isinf (r) || isnan (r))
-#endif
{
programming_error (_ ("infinity or NaN encountered while converting Real number"));
programming_error (_ ("setting to zero"));