diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-17 08:09:25 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-17 08:09:25 +0000 |
commit | 1ac39dc62b1920d39095e05ce92fdef6afb7fbcf (patch) | |
tree | a2f6c717bbe6af4201ed3c704c88870afb1d34df /ace | |
parent | cc91701d7182ff5de8d24a8323007c33958dc7a1 (diff) | |
download | ATCD-1ac39dc62b1920d39095e05ce92fdef6afb7fbcf.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/IOStream.h | 25 | ||||
-rw-r--r-- | ace/IOStream_T.cpp | 9 |
2 files changed, 27 insertions, 7 deletions
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<STREAM>::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<STREAM>::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. |