Mercurial > octave
diff src/c-file-ptr-stream.cc @ 12927:f9c1f7c1ead0 stable
maint: undo part of previous gnulib changes
* c-file-ptr-stream.cc (c_file_ptr_buf::seek):
Move here from c-file-ptr-stream.h. Don't call gnulib::fseek.
* c-file-ptr-stream.cc (c_file_ptr_buf::tell):
Move here from c-file-ptr-stream.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 05 Aug 2011 18:50:43 -0400 |
parents | e116dd862879 |
children | 9a498efac5f1 |
line wrap: on
line diff
--- a/src/c-file-ptr-stream.cc Fri Aug 05 10:58:43 2011 -0500 +++ b/src/c-file-ptr-stream.cc Fri Aug 05 18:50:43 2011 -0400 @@ -193,6 +193,20 @@ } int +c_file_ptr_buf::seek (long offset, int origin) +{ + // gnulib::fseek doesn't seem to work, so don't use it until problem + // can be properly diagnosed and fixed. + return f ? fseek (f, offset, origin) : -1; +} + +long +c_file_ptr_buf::tell (void) +{ + return f ? gnulib::ftell (f) : -1; +} + +int c_file_ptr_buf::file_close (FILE *f) { return gnulib::fclose (f);