X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Fstd-string.hh;h=57805bbe21d95206d55d65ea8fc820062a5e43fe;hb=f9214bac21e9926dc3248416f58190c98c4167a9;hp=1cae94727bb06bfb0d67c72f5e8cf69fb4925c79;hpb=1f308cefc064db00c46e8ade7248fdc242c74767;p=lilypond.git diff --git a/flower/include/std-string.hh b/flower/include/std-string.hh index 1cae94727b..57805bbe21 100644 --- a/flower/include/std-string.hh +++ b/flower/include/std-string.hh @@ -1,9 +1,9 @@ /* - std-string.hh -- declare std::string + std-string.hh -- declare string source file of the GNU LilyPond music typesetter - (c) 2006 Jan Nieuwenhuizen + (c) 2006--2007 Jan Nieuwenhuizen */ #ifndef STD_STRING_HH @@ -11,30 +11,40 @@ #include "compare.hh" -#include - -namespace std { +#if 0 +/* + leads to dubious crashes - libstdc++ bug? + */ +#ifndef NDEBUG +#define _GLIBCXX_DEBUG 1 +#endif +#endif - typedef size_t ssize; -#define NPOS std::string::npos +#include - string to_string (string s); - string to_string (char c, int n = 1); - string to_string (int i, char const *format = 0); - string to_string (double f, char const *format = 0); - string to_string (long); - string to_string (unsigned); - string to_string (bool b); - string to_string (char const *format, ...); - - string &replace_all (string &str, string find, string replace); - string &replace_all (string &str, char find, char replace); - char *string_copy (string s); +using namespace std; + +typedef size_t ssize; +#define NPOS string::npos + +string to_string (string s); +string to_string (char c, int n=1); +string to_string (int i, char const *format=0); +string to_string (double f, char const *format=0); +string to_string (long); +string to_string (long unsigned); +string to_string (unsigned); +string to_string (bool b); +string to_string (char const *format, ...) + __attribute__ ((format (printf, 1, 2))); - int string_compare (string const &, string const &); +string &replace_all (string &str, string find, string replace); +string &replace_all (string &str, char find, char replace); +char *string_copy (string s); + +int string_compare (string const &, string const &); - INSTANTIATE_COMPARE (string const &, string_compare); -} +INSTANTIATE_COMPARE (string const &, string_compare); #endif /* STD_STRING_HH */