From: Jan Nieuwenhuizen Date: Thu, 26 Jan 2006 21:55:37 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.7.30~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d6c6392807de389455742f23d70ab62fb3e6ac4f;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 805ea68fcb..0e4e425b7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-26 Jan Nieuwenhuizen + + * Fix -DSTRING_UTILS_INLINED. + 2006-01-26 Han-Wen Nienhuys * lily/relocate.cc (setup_paths): mingw uses std string too. diff --git a/flower/file-name.cc b/flower/file-name.cc index 54449f907e..2302baa46b 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -56,7 +56,7 @@ static std::string slashify (std::string file_name) { replace_all (file_name, '\\', '/'); - replace_all (file_name, std::String ("//"), "/"); + replace_all (file_name, std::string ("//"), "/"); return file_name; } diff --git a/flower/include/std-string.hh b/flower/include/std-string.hh index 6c83bc526f..c07ffdfac1 100644 --- a/flower/include/std-string.hh +++ b/flower/include/std-string.hh @@ -19,7 +19,6 @@ #endif - #include "compare.hh" #if STD_STRING @@ -32,7 +31,7 @@ namespace std { typedef size_t ssize; #define NPOS std::string::npos - // typedef string std::string; + } #else /* ! STD_STRING */ @@ -44,6 +43,7 @@ namespace std { class String; typedef int ssize; #define NPOS -1 + } #include "string.hh" @@ -52,20 +52,22 @@ namespace std { namespace std { - std::string to_string (std::string s); - std::string to_string (char c, int n = 1); - std::string to_string (int i, char const *format = 0); - std::string to_string (double f, char const *format = 0); - std::string to_string (long b); - std::string to_string (bool b); - std::string to_string (char const *format, ...); + 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 b); + string to_string (bool b); + string to_string (char const *format, ...); - std::string &replace_all (std::string &str, std::string find, std::string replace); - std::string &replace_all (std::string &str, char find, char replace); - char *string_copy (std::string s); + 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 (std::string const &, std::string const &); - INSTANTIATE_COMPARE (std::string const &, string_compare); + int string_compare (string const &, string const &); + + INSTANTIATE_COMPARE (string const &, string_compare); } + #endif /* STD_STRING_HH */ diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 11dbe28189..ddae249b1e 100644 --- a/flower/include/string-data.hh +++ b/flower/include/string-data.hh @@ -91,7 +91,6 @@ class String_data #define INLINE inline #endif #include "string-data.icc" - #endif #endif // STRING_DATA_HH diff --git a/flower/include/string-data.icc b/flower/include/string-data.icc index 078e5724b2..d3c5f591a2 100644 --- a/flower/include/string-data.icc +++ b/flower/include/string-data.icc @@ -11,7 +11,6 @@ #include "string-data.hh" -//#include #include #include #include diff --git a/flower/include/string.hh b/flower/include/string.hh index 7dd9932fe4..2673c8c074 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -118,14 +118,6 @@ private: String substitute (char find, char replace); }; -#ifdef STRING_UTILS_INLINED -#ifndef INLINE -#define INLINE inline -#endif -#include "string.icc" -/* we should be resetting INLINE. oh well. */ -#endif - // because char const* also has an operator ==, this is for safety: bool operator == (String s1, char const *s2); bool operator == (char const *s1, String s2); @@ -139,11 +131,12 @@ ostream &operator << (ostream &os, String d); } -/* - technically incorrect, but lets keep it here: this is a - catch all place for this stuff. -*/ -#include "international.hh" - +#ifdef STRING_UTILS_INLINED +#ifndef INLINE +#define INLINE inline +#endif +#include "string.icc" +/* we should be resetting INLINE. oh well. */ +#endif #endif /* STRING_HH */ diff --git a/flower/include/string.icc b/flower/include/string.icc index 5f8a39a495..765297af6a 100644 --- a/flower/include/string.icc +++ b/flower/include/string.icc @@ -11,6 +11,9 @@ namespace std { + bool operator == (String const&, String const&); + bool operator != (String const&, String const&); + INLINE char const * String::c_str () const diff --git a/flower/stringutil.cc b/flower/stringutil.cc index 0134136192..74b5630d61 100644 --- a/flower/stringutil.cc +++ b/flower/stringutil.cc @@ -15,9 +15,7 @@ #define memmove mymemmove #endif -#ifdef STRING_UTILS_INLINED -#undef STRING_UTILS_INLINED -#endif +#ifndef STRING_UTILS_INLINED #ifdef INLINE #undef INLINE @@ -48,4 +46,6 @@ mymemmove (void *dest, void const *src, size_t n) } #endif +#endif /* STRING_UTILS_INLINED */ + #endif /* !STD_STRING */