]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/libc-extension.hh
9191d6476a2ecb29e1192e74e5c59abe9fe477f4
[lilypond.git] / flower / include / libc-extension.hh
1 /*
2   libc-extension.hh -- declare some string.h extensions
3
4   source file of the flowerlib
5
6   (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef LIBC_EXTENSION_HH
10 #define LIBC_EXTENSION_HH
11
12 #include <cstddef>
13 #include <cstdarg>
14 using namespace std;
15
16 #include "config.hh"
17
18 char *strnlwr (char *start, int n);
19 char *strnupr (char *start, int n);
20
21 #if ! HAVE_MEMMEM               /* GNU extension. */
22 void *memmem (void const *haystack, int haystack_len,
23               void const *needle, int needle_len);
24 #endif /* HAVE_MEMMEM */
25
26 #if ! HAVE_MEMRCHR
27 unsigned char *memrchr (unsigned char const *p, int n, char c);
28 #endif
29
30 #if ! HAVE_MEMREV
31 unsigned char *memrev (unsigned char *byte, int length_i);
32 #endif
33
34 double my_round (double);
35
36 /* namespace std { */
37   
38 #if ! HAVE_SNPRINTF             /* GNU extension. */
39 int snprintf (char *str, size_t n, char const *format, ...);
40  __attribute__ ((format (printf, 3, 4)));
41 #endif
42
43 #if ! HAVE_VSNPRINTF            /* GNU extension. */
44 int vsnprintf (char *str, size_t, char const *format, va_list args);
45 #endif
46
47 #ifndef isinf
48 #if ! HAVE_ISINF                /* BSD extension. */
49 int isinf (double x);
50 #endif
51 #endif
52
53 /* }; */
54
55 #endif /* LIBC_EXTENSION_HH */