changeset 22704:b5407b1ab11a

Provide extra info message when gl2ps buffer overflows (bug #49482). * gl2ps-print.cc (gl2ps_renderer::draw): If buffer overflows, print a warning message that Octave will retry with a larger buffer size.
author Rik <rik@octave.org>
date Mon, 31 Oct 2016 12:22:43 -0700
parents f8674f166dd5
children e9a0aa0a49ed
files libinterp/corefcn/gl2ps-print.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc	Mon Oct 31 10:40:45 2016 -0400
+++ b/libinterp/corefcn/gl2ps-print.cc	Mon Oct 31 12:22:43 2016 -0700
@@ -217,7 +217,7 @@
             std::fseek (tmpf, 0, SEEK_SET);
             octave_ftruncate_wrapper (fileno (tmpf), 0);
 
-            // For LaTeX output the fltk print process uses 2 drawnow() commands.
+            // For LaTeX output the print process uses 2 drawnow() commands.
             // The first one is for the pdf/ps/eps graph to be included.  The
             // print_cmd is saved as old_print_cmd.  Then the second drawnow()
             // outputs the tex-file and the graphic filename to be included is
@@ -263,6 +263,9 @@
 
             octave::opengl_renderer::draw (go);
 
+            if (buffer_overflow)
+              warning ("gl2ps_renderer::draw: retrying with buffer size: %.1E B\n", double (2*buffsize));
+
             if (! buffer_overflow)
               old_print_cmd = print_cmd;