Mercurial > octave-nkf
comparison src/file-io.cc @ 11081:f9284142a060
avoid another use of ::fileno
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Oct 2010 02:00:05 -0400 |
parents | 594adb99a25e |
children | 69b2f237060e |
comparison
equal
deleted
inserted
replaced
11080:36ceff79607b | 11081:f9284142a060 |
---|---|
492 { | 492 { |
493 tmode.erase (pos, 1); | 493 tmode.erase (pos, 1); |
494 | 494 |
495 FILE *fptr = ::fopen (fname.c_str (), tmode.c_str ()); | 495 FILE *fptr = ::fopen (fname.c_str (), tmode.c_str ()); |
496 | 496 |
497 int fd = ::fileno (fptr); | 497 int fd = fileno (fptr); |
498 | 498 |
499 gzFile gzf = ::gzdopen (fd, tmode.c_str ()); | 499 gzFile gzf = ::gzdopen (fd, tmode.c_str ()); |
500 | 500 |
501 if (fptr) | 501 if (fptr) |
502 retval = octave_zstdiostream::create (fname, gzf, fd, | 502 retval = octave_zstdiostream::create (fname, gzf, fd, |