]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/libc-extension.hh
Issue 4550 (2/2) Avoid "using namespace std;" in included files
[lilypond.git] / flower / include / libc-extension.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef LIBC_EXTENSION_HH
21 #define LIBC_EXTENSION_HH
22
23 #include <cstddef>
24 #include <cstdarg>
25
26 #include "config.hh"
27
28 char *strnlwr (char *start, int n);
29 char *strnupr (char *start, int n);
30
31 #if ! HAVE_MEMMEM               /* GNU extension. */
32 void *memmem (void const *haystack, int haystack_len,
33               void const *needle, int needle_len);
34 #endif /* HAVE_MEMMEM */
35
36 #if ! HAVE_MEMRCHR
37 unsigned char *memrchr (unsigned char const *p, int n, char c);
38 #endif
39
40 #if ! HAVE_MEMREV
41 unsigned char *memrev (unsigned char *byte, int length_i);
42 #endif
43
44 double my_round (double);
45
46 /* namespace std { */
47
48 #if ! HAVE_SNPRINTF             /* GNU extension. */
49 int snprintf (char *str, size_t n, char const *format, ...);
50 __attribute__ ((format (printf, 3, 4)));
51 #endif
52
53 #if ! HAVE_VSNPRINTF            /* GNU extension. */
54 int vsnprintf (char *str, size_t, char const *format, va_list args);
55 #endif
56
57 #ifndef isinf
58 #if ! HAVE_ISINF                /* BSD extension. */
59 int isinf (double x);
60 #endif
61 #endif
62
63 /* }; */
64
65 #endif /* LIBC_EXTENSION_HH */