From 1ac39dc62b1920d39095e05ce92fdef6afb7fbcf Mon Sep 17 00:00:00 2001 From: schmidt Date: Mon, 17 Nov 1997 08:09:25 +0000 Subject: *** empty log message *** --- ace/IOStream.h | 25 +++++++++++++++++++++---- ace/IOStream_T.cpp | 9 ++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) (limited to 'ace') diff --git a/ace/IOStream.h b/ace/IOStream.h index c47fb18f98a..7e33a5a7959 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -284,14 +284,31 @@ protected: virtual ACE_HANDLE get_handle (void); #if defined (ACE_HAS_STANDARD_CPP_LIBRARY) - char *base (void) const { return eback_saved_; } - char *ebuf (void) const { return eback_saved_ + streambuf_size_; } - int blen (void) const { return streambuf_size_; } + char *base (void) const + { + return cur_mode_ == get_mode_ ? eback_saved_ + : cur_mode_ == put_mode_ ? pbase_saved_ + : 0; + } + char *ebuf (void) const + { + return cur_mode_ == 0 ? 0 : base() + streambuf_size_; + } + + int blen (void) const + { + return streambuf_size_; + } + void setb (char* b, char* eb, int a=0) { setbuf (b, (eb - b)); } - int out_waiting (void) { return pptr () - pbase (); } + + int out_waiting (void) + { + return pptr () - pbase (); + } #endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ }; diff --git a/ace/IOStream_T.cpp b/ace/IOStream_T.cpp index 4f52ae60b3a..be58c574282 100644 --- a/ace/IOStream_T.cpp +++ b/ace/IOStream_T.cpp @@ -8,7 +8,7 @@ #if !defined (ACE_LACKS_ACE_IOSTREAM) #if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) && defined (__GNUG__) -# if ! defined (ACE_IOSTREAM_T_H) +# if !defined (ACE_IOSTREAM_T_H) // _Only_ define this when compiling this .cpp file standalone, not // when instantiating templates. Its purpose is to provide something // for global constructors and destructors to be tied to. Without it, @@ -116,9 +116,11 @@ ACE_IOStream::operator>> (ACE_IOStream_String &v) if (ipfx0 ()) { char c; - iostream::operator>> (c); + this->get (c); - for (v = c; this->get (c) && !isspace (c); v += c) + for (v = c; + this->get (c) && !isspace (c); + v += c) continue; } @@ -144,6 +146,7 @@ ACE_IOStream::operator<< (ACE_IOStream_String &v) return *this; } + // A more clever put operator for strings that knows how to deal with // quoted strings containing back-quoted quotes. -- cgit v1.2.1