diff options
author | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-08-22 01:51:15 +0000 |
---|---|---|
committer | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-08-22 01:51:15 +0000 |
commit | cc5cac937e755775578294ca8a0f7765425c5af2 (patch) | |
tree | 8292467ba1f6c5fb9eddd6b55f922c8c29797356 /ACEXML/common/FileCharStream.cpp | |
parent | 91ebe3a3220a4069cb2ee2f90625353b52b512fa (diff) | |
download | ATCD-cc5cac937e755775578294ca8a0f7765425c5af2.tar.gz |
ChangeLogTag: Wed Aug 21 20:40:20 2002 Krishnakumar B <kitty@cs.wustl.edu>
Diffstat (limited to 'ACEXML/common/FileCharStream.cpp')
-rw-r--r-- | ACEXML/common/FileCharStream.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ACEXML/common/FileCharStream.cpp b/ACEXML/common/FileCharStream.cpp index 885ba18f0ad..1f66991c884 100644 --- a/ACEXML/common/FileCharStream.cpp +++ b/ACEXML/common/FileCharStream.cpp @@ -22,7 +22,7 @@ ACEXML_FileCharStream::open (const ACEXML_Char *name) delete[] this->filename_; this->filename_ = 0; - this->infile_ = ACE_OS::fopen (name, ACE_LIB_TEXT ("r")); + this->infile_ = ACE_OS::fopen (name, ACE_TEXT ("r")); if (this->infile_ == NULL) return -1; @@ -58,10 +58,8 @@ ACEXML_FileCharStream::close (void) int ACEXML_FileCharStream::get (ACEXML_Char& ch) { - // @@ Error checking? - ch = (unsigned char) fgetc (this->infile_); - - return (((char) ch) == EOF ? -1 :0); + ch = (ACEXML_Char) ACE_OS::fgetc (this->infile_); + return (ACE_OS::feof(this->infile_) ? -1 : 0); } int @@ -74,7 +72,7 @@ ACEXML_FileCharStream::read (ACEXML_Char *str, int ACEXML_FileCharStream::peek (void) { - ACEXML_Char ch = ::fgetc (this->infile_); - ::ungetc (ch, this->infile_); + ACEXML_Char ch = ACE_OS::fgetc (this->infile_); + ACE_OS::ungetc (ch, this->infile_); return ch; } |