[parchive2-cvs] library/src/file file.cc,1.25,1.26
Status: Pre-Alpha
Brought to you by:
coppit
|
From: <gu...@us...> - 2003-05-07 09:30:15
|
Update of /cvsroot/parchive2/library/src/file
In directory sc8-pr-cvs1:/tmp/cvs-serv11036
Modified Files:
file.cc
Log Message:
sync() seems to be buggy. Broke the library.
Index: file.cc
===================================================================
RCS file: /cvsroot/parchive2/library/src/file/file.cc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** file.cc 6 May 2003 22:57:00 -0000 1.25
--- file.cc 7 May 2003 09:30:09 -0000 1.26
***************
*** 154,158 ****
if (reference_counts[the_stream] == 0)
! delete the_stream;
}
--- 154,160 ----
if (reference_counts[the_stream] == 0)
! {the_stream->close();
! delete the_stream;
! }
}
***************
*** 192,197 ****
istream& File::read(char* __s, streamsize __n)
{
! the_stream->read(__s, __n);
! the_stream->sync();
return (*(ifstream*)the_stream);
}
--- 194,199 ----
istream& File::read(char* __s, streamsize __n)
{
! return the_stream->read(__s, __n);
! // the_stream->sync();
return (*(ifstream*)the_stream);
}
***************
*** 199,203 ****
ostream& File::write(char* __s, streamsize __n)
{
! the_stream->write(__s, __n);
return the_stream->flush();
}
--- 201,205 ----
ostream& File::write(char* __s, streamsize __n)
{
! return the_stream->write(__s, __n);
return the_stream->flush();
}
|