octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer ove


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer overflow when printing
Date: Thu, 31 Dec 2015 23:07:59 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.2.1

Follow-up Comment #17, bug #46417 (project octave):

Why do you need freopen here?  Wouldn't it be sufficient to just use fclose
and the fopen?  In any case, there does appear to be a gnulib replacement for
freopen, so just add the freopen module to bootstrap.conf and use
gnulib::freopen.

Or, instead of reopening the file, can't you just reset the position to the
beginning when you try the operation again with a larger buffer?  Or, if you
need to truncate the file, use ftruncate.  There is a gnulib module that
appears to provide that function for Windows, so portability shouldn't be an
issue.

The error function no longer returns so you don't need an "else" after that.

Also, why not use gnulib::tmpfile?  That gives you a FILE* to a temporary file
that will be deleted automatically when it is closed or when the program
terminates.  Then you don't need to bother with the unlink step yourself.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46417>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]