diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-20 12:21:51 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-20 12:21:51 +0000 |
commit | bf0521a145614c7ea50c410e71dd8d4a46f10151 (patch) | |
tree | 5e8d124a1069319a1889f86df2ba629433624ceb /libstdc++ | |
parent | 1d04086fdc98b52c5c7afe54448304d08f4f40e3 (diff) | |
download | gcc-bf0521a145614c7ea50c410e71dd8d4a46f10151.tar.gz |
* string, std/straits.h, std/bastring.h: Revert recent change. Needs
some libiberty support before it can be re-enabled.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25336 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++')
-rw-r--r-- | libstdc++/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++/std/bastring.h | 3 | ||||
-rw-r--r-- | libstdc++/std/straits.h | 14 | ||||
-rw-r--r-- | libstdc++/string | 2 |
4 files changed, 11 insertions, 13 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog index e537abacfad..4243e916e13 100644 --- a/libstdc++/ChangeLog +++ b/libstdc++/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 20 13:17:17 1999 Jeffrey A Law (law@cygnus.com) + + * string, std/straits.h, std/bastring.h: Revert recent change. Needs + some libiberty support before it can be re-enabled. + Thu Feb 18 19:53:17 1999 Marc Espie <espie@cvs.openbsd.org> * configure.in: Handle OpenBSD with and without threads. diff --git a/libstdc++/std/bastring.h b/libstdc++/std/bastring.h index 30fb669a842..f188628cc77 100644 --- a/libstdc++/std/bastring.h +++ b/libstdc++/std/bastring.h @@ -298,8 +298,7 @@ private: public: const charT* c_str () const - { if (length () == 0) return traits::empty(); - terminate (); return data (); } + { if (length () == 0) return ""; terminate (); return data (); } void resize (size_type n, charT c); void resize (size_type n) { resize (n, eos ()); } diff --git a/libstdc++/std/straits.h b/libstdc++/std/straits.h index b510ac74a96..c80e7ab7a68 100644 --- a/libstdc++/std/straits.h +++ b/libstdc++/std/straits.h @@ -40,8 +40,6 @@ template <class charT> struct string_char_traits { typedef charT char_type; // for users to acquire the basic character type - static const char_type __nullstr[1]; - // constraints static void assign (char_type& c1, const char_type& c2) @@ -53,10 +51,9 @@ struct string_char_traits { static bool lt (const char_type& c1, const char_type& c2) { return (c1 < c2); } static char_type eos () { return char_type(); } // the null character - static char_type* empty() { return __nullstr; } static bool is_del(char_type a) { return 0; } // characteristic function for delimiters of charT - + // speed-up functions static int compare (const char_type* s1, const char_type* s2, size_t n) @@ -68,7 +65,7 @@ struct string_char_traits { return 0; } - + static size_t length (const char_type* s) { size_t l = 0; @@ -120,7 +117,6 @@ struct string_char_traits <char> { static bool lt (const char_type& c1, const char_type& c2) { return (c1 < c2); } static char_type eos () { return 0; } - static char_type* empty() { return ""; } static bool is_del(char_type a) { return isspace(a); } static int compare (const char_type* s1, const char_type* s2, size_t n) @@ -135,8 +131,8 @@ struct string_char_traits <char> { { return (char_type*) memset (s1, c, n); } }; +#if 0 #include <cwctype> -#include <cwchar> struct string_char_traits <wchar_t> { typedef wchar_t char_type; @@ -149,7 +145,6 @@ struct string_char_traits <wchar_t> { static bool lt (const char_type& c1, const char_type& c2) { return (c1 < c2); } static char_type eos () { return 0; } - static char_type* empty() { return L""; } static bool is_del(char_type a) { return iswspace(a); } static int compare (const char_type* s1, const char_type* s2, size_t n) @@ -158,10 +153,9 @@ struct string_char_traits <wchar_t> { { return wcslen (s); } static char_type* copy (char_type* s1, const char_type* s2, size_t n) { return wmemcpy (s1, s2, n); } - static char_type* move (char_type* s1, const char_type* s2, size_t n) - { return (char_type*) wmemmove (s1, s2, n); } static char_type* set (char_type* s1, const char_type& c, size_t n) { return wmemset (s1, c, n); } }; +#endif } // extern "C++" #endif diff --git a/libstdc++/string b/libstdc++/string index 3865c418b21..fa6f1abaa70 100644 --- a/libstdc++/string +++ b/libstdc++/string @@ -7,7 +7,7 @@ extern "C++" { typedef basic_string <char> string; -typedef basic_string <wchar_t> wstring; +// typedef basic_string <wchar_t> wstring; } // extern "C++" #endif |