Mercurial > hg > octave-terminal
changeset 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 | 67a5acac8e1b |
children | 0dc4d9f1366c 5d79384e3a1d |
files | src/c-file-ptr-stream.cc src/c-file-ptr-stream.h |
diffstat | 2 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/c-file-ptr-stream.cc +++ b/src/c-file-ptr-stream.cc @@ -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);
--- a/src/c-file-ptr-stream.h +++ b/src/c-file-ptr-stream.h @@ -74,10 +74,9 @@ int file_number () const { return f ? fileno (f) : -1; } - int seek (long offset, int origin) - { return f ? gnulib::fseek (f, offset, origin) : -1; } + int seek (long offset, int origin); - long tell (void) { return f ? gnulib::ftell (f) : -1; } + long tell (void); void clear (void) { if (f) clearerr (f); }