From bad971bf5cd7a7e0bafecb118d5e65119036693f Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 23 Jun 2005 07:15:44 +0000
Subject: [PATCH] fix small bug with overflowing feedback buffer and PDF output

---
 Graphics/gl2ps.cpp | 26 ++++++++++++++------------
 Graphics/gl2ps.h   |  4 ++--
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/Graphics/gl2ps.cpp b/Graphics/gl2ps.cpp
index 3045517b93..298043d200 100644
--- a/Graphics/gl2ps.cpp
+++ b/Graphics/gl2ps.cpp
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.cpp,v 1.99 2005-06-20 17:33:18 geuzaine Exp $ */
+/* $Id: gl2ps.cpp,v 1.100 2005-06-23 07:15:44 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
@@ -4672,17 +4672,19 @@ GL2PSDLL_API GLint gl2psEndPage(void)
 
   res = gl2psPrintPrimitives();
 
-  switch(gl2ps->format){
-  case GL2PS_TEX :
-    gl2psPrintTeXFooter();
-    break;
-  case GL2PS_PS :
-  case GL2PS_EPS :
-    gl2psPrintPostScriptFooter();
-    break;
-  case GL2PS_PDF :
-    gl2psPrintPDFFooter();
-    break;
+  if(res != GL2PS_OVERFLOW){
+    switch(gl2ps->format){
+    case GL2PS_TEX :
+      gl2psPrintTeXFooter();
+      break;
+    case GL2PS_PS :
+    case GL2PS_EPS :
+      gl2psPrintPostScriptFooter();
+      break;
+    case GL2PS_PDF :
+      gl2psPrintPDFFooter();
+      break;
+    }
   }
 
   fflush(gl2ps->stream);
diff --git a/Graphics/gl2ps.h b/Graphics/gl2ps.h
index 04d369b486..cc46824eeb 100644
--- a/Graphics/gl2ps.h
+++ b/Graphics/gl2ps.h
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.h,v 1.60 2005-06-18 18:41:28 geuzaine Exp $ */
+/* $Id: gl2ps.h,v 1.61 2005-06-23 07:15:44 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
@@ -77,7 +77,7 @@
 
 #define GL2PS_MAJOR_VERSION 1
 #define GL2PS_MINOR_VERSION 2
-#define GL2PS_PATCH_VERSION 5
+#define GL2PS_PATCH_VERSION 6
 
 #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
                        0.01 * GL2PS_MINOR_VERSION + \
-- 
GitLab