]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/std-string.hh
Run `make grand-replace'.
[lilypond.git] / flower / include / std-string.hh
index ca48190875e545e4dd06b9aeafd88782d18e0f50..8ae6dfa5af5cbbf8846ac019ca46103df3484c82 100644 (file)
@@ -1,41 +1,52 @@
 /*
-  std-string.hh -- declare std::string
+  std-string.hh -- declare string
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2006 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2006--2008 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #ifndef STD_STRING_HH
 #define STD_STRING_HH
  
 #include "compare.hh"
+#include "flower-proto.hh"
 
-#include <string>
-
-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>
 
-  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, ...);
-  
-  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 (I64, char const *format=0);
+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 const &find, string const &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 */