From 31696c445ccd4b8e5e27b046352cf384aee1d311 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 8 Nov 2003 04:08:20 +0000
Subject: [PATCH] Small gl2ps cleanups

---
 Common/Context.h        |  4 ++--
 Common/DefaultOptions.h | 12 ++++++------
 Common/Options.cpp      |  8 ++++----
 Common/Options.h        |  2 +-
 Graphics/CreateFile.cpp |  4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/Common/Context.h b/Common/Context.h
index 503f14b8f9..cf8c78e234 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -186,8 +186,8 @@ public :
 
   // print options 
   struct{
-    int format, compress;
-    int eps_quality, eps_background, eps_font_size;
+    int format;
+    int eps_quality, eps_background, eps_font_size, eps_compress;
     int eps_occlusion_culling, eps_best_root;
     char *eps_font;
     double eps_line_width_factor, eps_point_size_factor;
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 0c4ca632c8..4c987dcd7c 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -989,22 +989,22 @@ StringXNumber ViewOptions_Number[] = {
 } ;
 
 StringXNumber PrintOptions_Number[] = {
-  { F|O, "Compress" , opt_print_compress , 0 ,
-    "Compress PostScript/PDF output using zlib" },
   { F|O, "EpsBackground" , opt_print_eps_background , 1 ,
     "Save image background in PostScript/PDF output" },
+  { F|O, "EpsBestRoot" , opt_print_eps_best_root , 1 ,
+    "Try to minimize primitive splitting in BSP tree sorted PostScript/PDF output" },
+  { F|O, "EpsCompress" , opt_print_eps_compress , 0 ,
+    "Compress PostScript/PDF output using zlib" },
   { F|O, "EpsFontSize" , opt_print_eps_font_size , 12. ,
     "Font size used in PostScript/PDF output" },
   { F|O, "EpsLineWidthFactor" , opt_print_eps_line_width_factor , 0.2 ,
     "Width factor for lines in PostScript/PDF output" },
+  { F|O, "EpsOcclusionCulling" , opt_print_eps_occlusion_culling , 1 ,
+    "Cull occluded primitives (to reduce PostScript/PDF file size)" },
   { F|O, "EpsPointSizeFactor" , opt_print_eps_point_size_factor , 1. ,
     "Size factor for points in PostScript/PDF output" },
   { F|O, "EpsQuality" , opt_print_eps_quality , 1 ,
     "PostScript/PDF quality (1=simple sort, 2=BSP tree sort)" },
-  { F|O, "EpsOcclusionCulling" , opt_print_eps_occlusion_culling , 1 ,
-    "Cull occluded primitives (to reduce PostScript/PDF file size)" },
-  { F|O, "EpsBestRoot" , opt_print_eps_best_root , 1 ,
-    "Try to minimize primitive splitting in BSP tree sorted PostScript/PDF output" },
 
   { F|O, "Format" , opt_print_format , FORMAT_AUTO , 
     "File format (10=automatic)" }, 
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 3c9047963d..d948b2621d 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.116 2003-10-26 16:53:12 geuzaine Exp $
+// $Id: Options.cpp,v 1.117 2003-11-08 04:08:20 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -4514,11 +4514,11 @@ double opt_print_format(OPT_ARGS_NUM)
   return CTX.print.format;
 }
 
-double opt_print_compress(OPT_ARGS_NUM)
+double opt_print_eps_compress(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.print.compress = (int)val;
-  return CTX.print.compress;
+    CTX.print.eps_compress = (int)val;
+  return CTX.print.eps_compress;
 }
 
 double opt_print_eps_quality(OPT_ARGS_NUM)
diff --git a/Common/Options.h b/Common/Options.h
index 5420ac4e6e..4a13a3dbc7 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -462,7 +462,7 @@ double opt_view_line_width(OPT_ARGS_NUM);
 double opt_view_point_type(OPT_ARGS_NUM);
 double opt_view_line_type(OPT_ARGS_NUM);
 double opt_print_format(OPT_ARGS_NUM);
-double opt_print_compress(OPT_ARGS_NUM);
+double opt_print_eps_compress(OPT_ARGS_NUM);
 double opt_print_eps_quality(OPT_ARGS_NUM);
 double opt_print_eps_occlusion_culling(OPT_ARGS_NUM);
 double opt_print_eps_best_root(OPT_ARGS_NUM);
diff --git a/Graphics/CreateFile.cpp b/Graphics/CreateFile.cpp
index 9c8e9a5a4a..9ed226f1cb 100644
--- a/Graphics/CreateFile.cpp
+++ b/Graphics/CreateFile.cpp
@@ -1,4 +1,4 @@
-// $Id: CreateFile.cpp,v 1.49 2003-11-05 17:11:36 geuzaine Exp $
+// $Id: CreateFile.cpp,v 1.50 2003-11-08 04:08:20 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -216,7 +216,7 @@ void CreateOutputFile(char *name, int format)
       (CTX.print.eps_occlusion_culling ? GL2PS_OCCLUSION_CULL : 0) |
       (CTX.print.eps_best_root ? GL2PS_BEST_ROOT : 0) |
       (CTX.print.eps_background ? GL2PS_DRAW_BACKGROUND : 0) |
-      (CTX.print.compress ? GL2PS_COMPRESS : 0) |
+      (CTX.print.eps_compress ? GL2PS_COMPRESS : 0) |
       (format == FORMAT_PSTEX ? GL2PS_NO_TEXT : 0) |
       (format == FORMAT_EPSTEX ? GL2PS_NO_TEXT : 0) |
       (format == FORMAT_PDFTEX ? GL2PS_NO_TEXT : 0);
-- 
GitLab