[plplot] Add new svn patch

Orion Poplawski orion at fedoraproject.org
Wed Dec 19 04:07:30 UTC 2012


commit 7f023e63dfc2e0348db08177576d3ca2edc94673
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Dec 18 21:06:31 2012 -0700

    Add new svn patch

 plplot-svn12202.patch => plplot-svn12281.patch |10046 +++++++++++++++++++++---
 1 files changed, 9170 insertions(+), 876 deletions(-)
---
diff --git a/plplot-svn12202.patch b/plplot-svn12281.patch
similarity index 99%
rename from plplot-svn12202.patch
rename to plplot-svn12281.patch
index 16edbd7..a988c22 100644
--- a/plplot-svn12202.patch
+++ b/plplot-svn12281.patch
@@ -1,6 +1,6 @@
 diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/CMakeLists.txt plplot-trunk/bindings/ada/CMakeLists.txt
 --- plplot-5.9.9/bindings/ada/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/ada/CMakeLists.txt	2011-11-30 09:19:44.347824759 -0700
++++ plplot-trunk/bindings/ada/CMakeLists.txt	2011-11-30 09:19:44.000000000 -0700
 @@ -56,6 +56,17 @@
  
    add_library(plplotada${LIB_TAG} ${plplotada${LIB_TAG}_LIB_SRCS})
@@ -29,12 +29,303 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/CMakeLists.txt plplot-trunk/b
      set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}")
      set(PC_CONFIGURED_FILE
        ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot.adb plplot-trunk/bindings/ada/plplot.adb
+--- plplot-5.9.9/bindings/ada/plplot.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ada/plplot.adb	2012-12-14 08:51:04.076319310 -0700
+@@ -1,4 +1,4 @@
+--- $Id: plplot.adb 11717 2011-04-21 00:47:06Z airwin $
++-- $Id: plplot.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Thick Ada binding to PLplot
+ 
+@@ -826,8 +826,8 @@
+         Red_4, Green_4, Blue_4 : Real_Vector (0..3); -- define 4
+         Hue_3, Lightness_3, Saturation_3 : Real_Vector (0..2); -- define 3
+         Hue_4, Lightness_4, Saturation_4 : Real_Vector (0..3); -- define 4
+-        Reverse_Hue_3 : Boolean_Array_1D (0..2);
+-        Reverse_Hue_4 : Boolean_Array_1D (0..3);
++        Alt_Hue_Path_3 : Boolean_Array_1D (0..2);
++        Alt_Hue_Path_4 : Boolean_Array_1D (0..3);
+     begin
+         Set_Number_Of_Colors_In_Color_Map_1(256);
+ 
+@@ -899,10 +899,10 @@
+                     Saturation_3(0) := 0.0;
+                     Saturation_3(1) := 0.0;
+                     Saturation_3(2) := 0.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Blue_Green_Red => -- This appears to be the PLplot default color theme.
+                 begin
+@@ -915,10 +915,10 @@
+                     Red_3(0) := 0.0;
+                     Red_3(1) := 0.0;
+                     Red_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Green_Blue =>
+                 begin
+@@ -931,10 +931,10 @@
+                     Red_3(0) := 1.0;
+                     Red_3(1) := 0.0;
+                     Red_3(2) := 0.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Cyan_Blue =>
+                 begin
+@@ -947,10 +947,10 @@
+                     Lightness_3(0) := 0.5;
+                     Lightness_3(1) := 0.5;
+                     Lightness_3(2) := 0.5;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Blue_Black_Red =>
+                 begin
+@@ -966,11 +966,11 @@
+                     Lightness_4(1) := 0.0;
+                     Lightness_4(2) := 0.0;
+                     Lightness_4(3) := 0.5;
+-                    Reverse_Hue_4(0) := False;
+-                    Reverse_Hue_4(1) := False;
+-                    Reverse_Hue_4(2) := False;
+-                    Reverse_Hue_4(3) := False;
+-                    Set_Color_Map_1_Piecewise(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Reverse_Hue_4);
++                    Alt_Hue_Path_4(0) := False;
++                    Alt_Hue_Path_4(1) := False;
++                    Alt_Hue_Path_4(2) := False;
++                    Alt_Hue_Path_4(3) := False;
++                    Set_Color_Map_1_Piecewise(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Alt_Hue_Path_4);
+                 end;
+             when Red_Blue_Green =>
+                 begin
+@@ -983,10 +983,10 @@
+                     Saturation_3(0) := 1.0;
+                     Saturation_3(1) := 1.0;
+                     Saturation_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Yellow =>
+                 begin
+@@ -999,10 +999,10 @@
+                     Saturation_3(0) := 1.0;
+                     Saturation_3(1) := 1.0;
+                     Saturation_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+         end case;
+     end Quick_Set_Color_Map_1;
+@@ -2378,15 +2378,14 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses
+-        
++        Alt_Hue_Path    : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.        
+         PL_Color_Model : PLBOOL;
+-        PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range);
++        PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range);
+         
+     begin
+         -- Check for consistent array lengths.
+         if  Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or
+-            Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length 
++            Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length 
+         then
+             Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***");
+         end if;
+@@ -2397,23 +2396,23 @@
+             PL_Color_Model := PLfalse;
+         end if;
+ 
+-        for i in Reverse_Hue'range loop
+-            if Reverse_Hue(i) then
+-                PL_Reverse_Hue(i) := PLtrue;
++        for i in Alt_Hue_Path'range loop
++            if Alt_Hue_Path(i) then
++                PL_Alt_Hue_Path(i) := PLtrue;
+             else
+-                PL_Reverse_Hue(i) := PLfalse;
++                PL_Alt_Hue_Path(i) := PLfalse;
+             end if;
+         end loop;
+ 
+-        plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue);
++        plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Alt_Hue_Path);
+     end Set_Color_Map_1_Piecewise;
+     
+     
+-    -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
+-    -- plscmap1l
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure Set_Color_Map_1_Piecewise
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -2421,20 +2420,20 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type) is
++        Alt_Hue_Path    : Alt_Hue_Path_Type) is
+         
+-        Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range);
++        Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range);
+     begin
+-        if Reverse_Hue = Reverse_Hue_All then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := True;
++        if Alt_Hue_Path = Alt_Hue_Path_All then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := True;
+             end loop;
+-        elsif Reverse_Hue = Reverse_Hue_None then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := False;
++        elsif Alt_Hue_Path = Alt_Hue_Path_None then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := False;
+             end loop;
+         end if;
+-        Set_Color_Map_1_Piecewise(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array);
++        Set_Color_Map_1_Piecewise(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alt_Hue_Path_Array);
+     end Set_Color_Map_1_Piecewise;
+ 
+ 
+@@ -2449,15 +2448,14 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D) is   -- False means red<->green<->blue<->red, True reverses
+-        
++        Alt_Hue_Path    : Boolean_Array_1D) is   -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.        
+         PL_Color_Model : PLBOOL;
+-        PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range);
++        PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range);
+         
+     begin
+         -- Check for consistent array lengths.
+         if  Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or
+-            Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length 
++            Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length 
+         then
+             Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***");
+         end if;
+@@ -2468,23 +2466,23 @@
+             PL_Color_Model := PLfalse;
+         end if;
+ 
+-        for i in Reverse_Hue'range loop
+-            if Reverse_Hue(i) then
+-                PL_Reverse_Hue(i) := PLtrue;
++        for i in Alt_Hue_Path'range loop
++            if Alt_Hue_Path(i) then
++                PL_Alt_Hue_Path(i) := PLtrue;
+             else
+-                PL_Reverse_Hue(i) := PLfalse;
++                PL_Alt_Hue_Path(i) := PLfalse;
+             end if;
+         end loop;
+ 
+-        plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue);
++        plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Alt_Hue_Path);
+     end Set_Color_Map_1_Piecewise_And_Alpha;
+     
+     
+-    -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
+-    -- plscmap1la
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure Set_Color_Map_1_Piecewise_And_Alpha
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -2492,20 +2490,20 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type) is
++        Alt_Hue_Path    : Alt_Hue_Path_Type) is
+         
+-        Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range);
++        Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range);
+     begin
+-        if Reverse_Hue = Reverse_Hue_All then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := True;
++        if Alt_Hue_Path = Alt_Hue_Path_All then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := True;
+             end loop;
+-        elsif Reverse_Hue = Reverse_Hue_None then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := False;
++        elsif Alt_Hue_Path = Alt_Hue_Path_None then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := False;
+             end loop;
+         end if;
+-        Set_Color_Map_1_Piecewise_And_Alpha(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array);
++        Set_Color_Map_1_Piecewise_And_Alpha(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Alt_Hue_Path_Array);
+     end Set_Color_Map_1_Piecewise_And_Alpha;
+ 
+ 
 diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot.ads plplot-trunk/bindings/ada/plplot.ads
 --- plplot-5.9.9/bindings/ada/plplot.ads	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/ada/plplot.ads	2011-11-02 09:43:05.335072004 -0600
++++ plplot-trunk/bindings/ada/plplot.ads	2012-12-14 08:51:04.077319305 -0700
 @@ -1,4 +1,4 @@
 --- $Id: plplot.ads 11717 2011-04-21 00:47:06Z airwin $
-+-- $Id: plplot.ads 12021 2011-11-01 08:35:52Z jbauck $
++-- $Id: plplot.ads 12212 2012-08-13 23:17:31Z airwin $
  
  -- Thick Ada binding to PLplot
  
@@ -47,12 +338,411 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot.ads plplot-trunk/bindi
  --------------------------------------------------------------------------------
  
      -- Modes for parsing command line arguments (redux).
+@@ -728,7 +728,7 @@
+ 
+     type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, 
+         Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow);
+-    type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All);
++    type Alt_Hue_Path_Type is (Alt_Hue_Path_None, Alt_Hue_Path_All);
+ 
+ 
+     -- Quick application of pre-fabricated color schemes to color map 1.
+@@ -1574,13 +1574,13 @@
+         H_Or_R         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D);   -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path    : Boolean_Array_1D);   -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.    
+     
+-    
+-    -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure Set_Color_Map_1_Piecewise
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -1588,7 +1588,7 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type);
++        Alt_Hue_Path    : Alt_Hue_Path_Type);
+ 
+ 
+     -- Set color map 1 colors using a piece-wise linear relationship between
+@@ -1602,13 +1602,14 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D);   -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path    : Boolean_Array_1D);   -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.
+     
+     
+-    -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure Set_Color_Map_1_Piecewise_And_Alpha
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -1616,7 +1617,7 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type);
++        Alt_Hue_Path    : Alt_Hue_Path_Type);
+ 
+ 
+     -- Set number of colors in cmap 1
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot_thin.ads plplot-trunk/bindings/ada/plplot_thin.ads
+--- plplot-5.9.9/bindings/ada/plplot_thin.ads	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ada/plplot_thin.ads	2012-12-14 08:51:04.077319305 -0700
+@@ -1,4 +1,4 @@
+--- $Id: plplot_thin.ads 11717 2011-04-21 00:47:06Z airwin $
++-- $Id: plplot_thin.ads 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Thin Ada binding to PLplot
+ 
+@@ -28,7 +28,7 @@
+ -- I hope that this is wrong and that they are really PLINTs like the API says.
+ -- I converted these as a : out PLINT. These are the only *-ed quantities that I set to "outs".
+ 
+--- I made the final arg in plscmap1l, rev, an array of PLBOOLs, not an in out 
++-- I made the final arg in plscmap1l, alt_hue_path, an array of PLBOOLs, not an in out 
+ -- parameter; impossible to tell from C syntax which is intended, but I think 
+ -- this is right.
+ 
+@@ -468,7 +468,7 @@
+             l   : PLFLT;   -- lightness 
+             s   : PLFLT;   -- saturation 
+             p   : PLFLT;   -- position 
+-            rev : Integer; -- if set, interpolate through h=0 
++            alt_hue_path : Integer; -- if set, interpolate through h=0 
+         end record;
+ 
+     -- A PLBufferingCB is a control block for interacting with devices
+@@ -1373,7 +1373,7 @@
+     procedure
+     plscmap1l(itype : PLINT; npts : PLINT; intensity : PL_Float_Array;
+         coord1 : PL_Float_Array; coord2 : PL_Float_Array; coord3 : PL_Float_Array; 
+-        rev : PL_Bool_Array);
++        alt_hue_path : PL_Bool_Array);
+     pragma Import(C, plscmap1l, "c_plscmap1l");
+ 
+ 
+@@ -1384,7 +1384,7 @@
+     procedure
+     plscmap1la(itype : PLINT; npts : PLINT;
+         intensity, coord1, coord2, coord3, a : PL_Float_Array; 
+-        rev : PL_Bool_Array);
++        alt_hue_path : PL_Bool_Array);
+     pragma Import(C, plscmap1la, "c_plscmap1la");
+ 
+ 
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot_traditional.adb plplot-trunk/bindings/ada/plplot_traditional.adb
+--- plplot-5.9.9/bindings/ada/plplot_traditional.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ada/plplot_traditional.adb	2012-12-14 08:51:04.078319300 -0700
+@@ -1,4 +1,4 @@
+--- $Id: plplot_traditional.adb 11717 2011-04-21 00:47:06Z airwin $
++-- $Id: plplot_traditional.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Ada binding to PLplot using the traditional PLplot subprogram names
+ 
+@@ -827,8 +827,8 @@
+         Red_4, Green_4, Blue_4 : Real_Vector (0..3); -- define 4
+         Hue_3, Lightness_3, Saturation_3 : Real_Vector (0..2); -- define 3
+         Hue_4, Lightness_4, Saturation_4 : Real_Vector (0..3); -- define 4
+-        Reverse_Hue_3 : Boolean_Array_1D (0..2);
+-        Reverse_Hue_4 : Boolean_Array_1D (0..3);
++        Alt_Hue_Path_3 : Boolean_Array_1D (0..2);
++        Alt_Hue_Path_4 : Boolean_Array_1D (0..3);
+     begin
+         plscmap1n(256);
+ 
+@@ -900,10 +900,10 @@
+                     Saturation_3(0) := 0.0;
+                     Saturation_3(1) := 0.0;
+                     Saturation_3(2) := 0.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Blue_Green_Red => -- This appears to be the PLplot default color theme.
+                 begin
+@@ -916,10 +916,10 @@
+                     Red_3(0) := 0.0;
+                     Red_3(1) := 0.0;
+                     Red_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Green_Blue =>
+                 begin
+@@ -932,10 +932,10 @@
+                     Red_3(0) := 1.0;
+                     Red_3(1) := 0.0;
+                     Red_3(2) := 0.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Cyan_Blue =>
+                 begin
+@@ -948,10 +948,10 @@
+                     Lightness_3(0) := 0.5;
+                     Lightness_3(1) := 0.5;
+                     Lightness_3(2) := 0.5;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Blue_Black_Red =>
+                 begin
+@@ -967,11 +967,11 @@
+                     Lightness_4(1) := 0.0;
+                     Lightness_4(2) := 0.0;
+                     Lightness_4(3) := 0.5;
+-                    Reverse_Hue_4(0) := False;
+-                    Reverse_Hue_4(1) := False;
+-                    Reverse_Hue_4(2) := False;
+-                    Reverse_Hue_4(3) := False;
+-                    plscmap1l(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Reverse_Hue_4);
++                    Alt_Hue_Path_4(0) := False;
++                    Alt_Hue_Path_4(1) := False;
++                    Alt_Hue_Path_4(2) := False;
++                    Alt_Hue_Path_4(3) := False;
++                    plscmap1l(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Alt_Hue_Path_4);
+                 end;
+             when Red_Blue_Green =>
+                 begin
+@@ -984,10 +984,10 @@
+                     Saturation_3(0) := 1.0;
+                     Saturation_3(1) := 1.0;
+                     Saturation_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+             when Red_Yellow =>
+                 begin
+@@ -1000,10 +1000,10 @@
+                     Saturation_3(0) := 1.0;
+                     Saturation_3(1) := 1.0;
+                     Saturation_3(2) := 1.0;
+-                    Reverse_Hue_3(0) := False;
+-                    Reverse_Hue_3(1) := False;
+-                    Reverse_Hue_3(2) := False;
+-                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3);
++                    Alt_Hue_Path_3(0) := False;
++                    Alt_Hue_Path_3(1) := False;
++                    Alt_Hue_Path_3(2) := False;
++                    plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3);
+                 end;
+         end case;
+     end Quick_Set_Color_Map_1;
+@@ -2273,15 +2273,15 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path   : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.
+         
+         PL_Color_Model : PLBOOL;
+-        PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range);
++        PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range);
+         
+     begin
+         -- Check for consistent array lengths.
+         if  Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or
+-            Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length 
++            Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length 
+         then
+             Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***");
+         end if;
+@@ -2292,22 +2292,23 @@
+             PL_Color_Model := PLfalse;
+         end if;
+ 
+-        for i in Reverse_Hue'range loop
+-            if Reverse_Hue(i) then
+-                PL_Reverse_Hue(i) := PLtrue;
++        for i in Alt_Hue_Path'range loop
++            if Alt_Hue_Path(i) then
++                PL_Alt_Hue_Path(i) := PLtrue;
+             else
+-                PL_Reverse_Hue(i) := PLfalse;
++                PL_Alt_Hue_Path(i) := PLfalse;
+             end if;
+         end loop;
+ 
+-        PLplot_Thin.plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue);
++        PLplot_Thin.plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Alt_Hue_Path);
+     end plscmap1l;
+     
+     
+-    -- Overloaded version of plscmap1l which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of plscmap1l which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure plscmap1l
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -2315,20 +2316,20 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type) is
++        Alt_Hue_Path    : Alt_Hue_Path_Type) is
+         
+-        Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range);
++        Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range);
+     begin
+-        if Reverse_Hue = Reverse_Hue_All then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := True;
++        if Alt_Hue_Path = Alt_Hue_Path_All then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := True;
+             end loop;
+-        elsif Reverse_Hue = Reverse_Hue_None then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := False;
++        elsif Alt_Hue_Path = Alt_Hue_Path_None then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := False;
+             end loop;
+         end if;
+-        plscmap1l(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array);
++        plscmap1l(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alt_Hue_Path_Array);
+     end plscmap1l;
+ 
+ 
+@@ -2342,15 +2343,15 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D) is   -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path    : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.
+         
+         PL_Color_Model : PLBOOL;
+-        PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range);
++        PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range);
+         
+     begin
+         -- Check for consistent array lengths.
+         if  Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or
+-            Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length 
++            Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length 
+         then
+             Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***");
+         end if;
+@@ -2361,22 +2362,23 @@
+             PL_Color_Model := PLfalse;
+         end if;
+ 
+-        for i in Reverse_Hue'range loop
+-            if Reverse_Hue(i) then
+-                PL_Reverse_Hue(i) := PLtrue;
++        for i in Alt_Hue_Path'range loop
++            if Alt_Hue_Path(i) then
++                PL_Alt_Hue_Path(i) := PLtrue;
+             else
+-                PL_Reverse_Hue(i) := PLfalse;
++                PL_Alt_Hue_Path(i) := PLfalse;
+             end if;
+         end loop;
+ 
+-        PLplot_Thin.plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue);
++        PLplot_Thin.plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Alt_Hue_Path);
+     end plscmap1la;
+     
+     
+-    -- Overloaded version of plscmap1la which allows simplified (non-)reversal of 
+-    -- the traversed hue range. This is an Ada-like way of doing what is described
++    -- Overloaded version of plscmap1la which allows simplified (alt_hue_path false) interpolation.
++    -- This is an Ada-like way of doing what is described
+     -- in the PLplot documentation when a C user passes a null pointer as the
+-    -- final argument instead of an array of booleans to indicate hue reversal.
++    -- final argument instead of an array of booleans to indicate which
++    -- of the two hue interpolation paths to take.
+     procedure plscmap1la
+        (Color_Model    : Color_Model_Type; -- HLS or RGB
+         Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here
+@@ -2384,20 +2386,20 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type) is
++        Alt_Hue_Path    : Alt_Hue_Path_Type) is
+         
+-        Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range);
++        Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range);
+     begin
+-        if Reverse_Hue = Reverse_Hue_All then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := True;
++        if Alt_Hue_Path = Alt_Hue_Path_All then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := True;
+             end loop;
+-        elsif Reverse_Hue = Reverse_Hue_None then
+-            for i in Reverse_Hue_Array'range loop
+-                Reverse_Hue_Array(i) := False;
++        elsif Alt_Hue_Path = Alt_Hue_Path_None then
++            for i in Alt_Hue_Path_Array'range loop
++                Alt_Hue_Path_Array(i) := False;
+             end loop;
+         end if;
+-        plscmap1la(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array);
++        plscmap1la(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Alt_Hue_Path_Array);
+     end plscmap1la;
+ 
+ 
 diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot_traditional.ads plplot-trunk/bindings/ada/plplot_traditional.ads
 --- plplot-5.9.9/bindings/ada/plplot_traditional.ads	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/ada/plplot_traditional.ads	2011-11-02 09:43:05.342071748 -0600
++++ plplot-trunk/bindings/ada/plplot_traditional.ads	2012-12-14 08:51:04.079319295 -0700
 @@ -1,4 +1,4 @@
 --- $Id: plplot_traditional.ads 11717 2011-04-21 00:47:06Z airwin $
-+-- $Id: plplot_traditional.ads 12021 2011-11-01 08:35:52Z jbauck $
++-- $Id: plplot_traditional.ads 12212 2012-08-13 23:17:31Z airwin $
  
  -- Ada binding to PLplot using the traditional PLplot subprogram names
  
@@ -65,9 +755,54 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/ada/plplot_traditional.ads plplot
  --------------------------------------------------------------------------------
  
      -- Modes for parsing command line arguments (redux).
+@@ -726,7 +726,7 @@
+ 
+     type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, 
+         Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow);
+-    type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All);
++    type Alt_Hue_Path_Type is (Alt_Hue_Path_None, Alt_Hue_Path_All);
+ 
+ 
+     -- Quick application of pre-fabricated color schemes to color map 1.
+@@ -1465,7 +1465,7 @@
+         H_Or_R         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D);   -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path   : Boolean_Array_1D);   -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.
+     
+     
+     -- Overloaded version of plscmap1l which allows simplified (non-)reversal of 
+@@ -1479,7 +1479,7 @@
+                                               -- Note: Hue is 0.0 .. 360.0.
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type);
++        Alt_Hue_Path    : Alt_Hue_Path_Type);
+ 
+ 
+     -- Set color map 1 colors using a piece-wise linear relationship between
+@@ -1492,7 +1492,7 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Boolean_Array_1D);   -- False means red<->green<->blue<->red, True reverses
++        Alt_Hue_Path    : Boolean_Array_1D);   -- True means use alternative hue interpolation path which always includes the point hue = 0.  False reverses.
+     
+     
+     -- Overloaded version of plscmap1la which allows simplified (non-)reversal of 
+@@ -1506,7 +1506,7 @@
+         L_Or_G         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         S_Or_B         : Real_Vector; -- range 0.0 .. 1.0; not checked here
+         Alpha          : Real_Vector; -- range 0.0 .. 1.0; not checked here
+-        Reverse_Hue    : Reverse_Hue_Type);
++        Alt_Hue_Path    : Alt_Hue_Path_Type);
+ 
+ 
+     -- Set number of colors in cmap 1
 diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/CMakeLists.txt plplot-trunk/bindings/c++/CMakeLists.txt
 --- plplot-5.9.9/bindings/c++/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/c++/CMakeLists.txt	2011-11-28 16:54:36.411438139 -0700
++++ plplot-trunk/bindings/c++/CMakeLists.txt	2011-11-28 16:54:36.000000000 -0700
 @@ -44,6 +44,16 @@
    endif(BUILD_SHARED_LIBS)
  
@@ -87,11 +822,11 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/CMakeLists.txt plplot-trunk/b
      get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH)
 diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bindings/c++/plstream.cc
 --- plplot-5.9.9/bindings/c++/plstream.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/c++/plstream.cc	2012-01-04 08:45:32.511659860 -0700
++++ plplot-trunk/bindings/c++/plstream.cc	2012-12-14 08:51:04.754315797 -0700
 @@ -1,5 +1,5 @@
  //----------------------------------*-C++-*----------------------------------//
 -// $Id: plstream.cc 11935 2011-09-25 16:09:38Z airwin $
-+// $Id: plstream.cc 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: plstream.cc 12281 2012-11-23 21:27:51Z andrewross $
  // Geoffrey Furnish
  // Sep 21 1994
  //
@@ -113,7 +848,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          pltr, pltr_data );
  }
  
-@@ -1013,10 +1013,10 @@
+@@ -1013,18 +1013,24 @@
          symbol_colors, symbol_scales, symbol_numbers, symbols );
  }
  
@@ -121,14 +856,33 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
 -                         PLFLT ticks, PLINT sub_ticks,
 -                         const char *axis_opts, const char *label,
 -                         PLINT n_colors, const PLFLT *colors, const PLFLT *values )
-+void plstream::colorbar( PLINT /*position*/, PLINT /*opt*/, PLFLT /*x*/, PLFLT /*y*/, PLFLT /*length*/, PLFLT /*width*/, PLINT /*cont_color*/, PLINT /*cont_width*/,
-+                         PLFLT /*ticks*/, PLINT /*sub_ticks*/,
-+                         const char * /*axis_opts*/, const char * /*label*/,
-+                         PLINT /*n_colors*/, const PLFLT * /*colors*/, const PLFLT * /*values*/ )
++void plstream::colorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
++                         PLINT opt, PLINT position, PLFLT x, PLFLT y,
++                         PLFLT x_length, PLFLT y_length,
++                         PLINT bg_color, PLINT bb_color, PLINT bb_style,
++                         PLFLT low_cap_color, PLFLT high_cap_color,
++                         PLINT cont_color, PLINT cont_width,
++                         PLINT n_labels, PLINT *label_opts, const char *label[],
++                         PLINT n_axes, const char *axis_opts[],
++                         PLFLT *ticks, PLINT *sub_ticks,
++                         PLINT *n_values, const PLFLT * const *values )
  {
      set_stream();
  
-@@ -1095,7 +1095,7 @@
+-#if 0
+-    plcolorbar( position, opt, x, y, length, width,
+-        cont_color, cont_width, ticks, sub_ticks, axis_opts,
+-        label, n_colors, colors, values );
+-#endif
++    plcolorbar( p_colorbar_width, p_colorbar_height, opt, position, x, y,
++        x_length, y_length, bg_color, bb_color, bb_style,
++        low_cap_color, high_cap_color, cont_color, cont_width,
++        n_labels, label_opts, label, n_axes, axis_opts,
++        ticks, sub_ticks, n_values, values );
+ }
+ 
+ 
+@@ -1095,7 +1101,7 @@
  {
      set_stream();
  
@@ -137,7 +891,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  // Plots a mesh representation of the function z[x][y] with contour.
-@@ -1105,7 +1105,7 @@
+@@ -1105,7 +1111,7 @@
  {
      set_stream();
  
@@ -146,7 +900,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  //  Creates a new stream and makes it the default.
-@@ -1145,7 +1145,7 @@
+@@ -1145,7 +1151,7 @@
  {
      set_stream();
  
@@ -155,7 +909,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  // Plots a 3-d shaded representation of the function z[x][y] with
-@@ -1159,7 +1159,7 @@
+@@ -1159,7 +1165,7 @@
  {
      set_stream();
  
@@ -164,7 +918,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          indexymin, indexymax );
  }
  
-@@ -1170,7 +1170,7 @@
+@@ -1170,7 +1176,7 @@
  {
      set_stream();
  
@@ -173,7 +927,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  // Deprecated version using PLINT not bool
-@@ -1179,7 +1179,7 @@
+@@ -1179,7 +1185,7 @@
  {
      set_stream();
  
@@ -182,7 +936,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  // Plots a 3-d representation of the function z[x][y] with contour.
-@@ -1190,7 +1190,7 @@
+@@ -1190,7 +1196,7 @@
  {
      set_stream();
  
@@ -191,7 +945,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  }
  
  // Plots a 3-d representation of the function z[x][y] with contour
-@@ -1204,7 +1204,7 @@
+@@ -1204,7 +1210,7 @@
  {
      set_stream();
  
@@ -200,7 +954,107 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          indexymin, indexymax );
  }
  
-@@ -1698,7 +1698,7 @@
+@@ -1418,24 +1424,24 @@
+ 
+ void plstream::scmap1l( bool itype, PLINT npts, const PLFLT *intensity,
+                         const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
+-                        const bool *rev )
++                        const bool *alt_hue_path )
+ {
+-    PLBOOL *loc_rev = NULL;
+-    if ( rev != NULL )
++    PLBOOL *loc_alt_hue_path = NULL;
++    if ( alt_hue_path != NULL )
+     {
+-        loc_rev = new PLBOOL[npts - 1];
++        loc_alt_hue_path = new PLBOOL[npts - 1];
+         for ( int i = 0; i < npts - 1; i++ )
+         {
+-            loc_rev[i] = (PLBOOL) rev[i];
++            loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
+         }
+     }
+ 
+     set_stream();
+ 
+-    plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_rev );
++    plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path );
+ 
+-    if ( loc_rev != NULL )
+-        delete [] loc_rev;
++    if ( loc_alt_hue_path != NULL )
++        delete [] loc_alt_hue_path;
+ }
+ 
+ // Set color map 1 colors using a piece-wise linear relationship between
+@@ -1444,25 +1450,25 @@
+ 
+ void plstream::scmap1la( bool itype, PLINT npts, const PLFLT *intensity,
+                          const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
+-                         const PLFLT *a, const bool *rev )
++                         const PLFLT *a, const bool *alt_hue_path )
+ {
+-    PLBOOL *loc_rev = NULL;
+-    if ( rev != NULL )
++    PLBOOL *loc_alt_hue_path = NULL;
++    if ( alt_hue_path != NULL )
+     {
+-        loc_rev = new PLBOOL[npts - 1];
++        loc_alt_hue_path = new PLBOOL[npts - 1];
+         for ( int i = 0; i < npts - 1; i++ )
+         {
+-            loc_rev[i] = (PLBOOL) rev[i];
++            loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
+         }
+     }
+ 
+     set_stream();
+ 
+     plscmap1la( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3,
+-        a, loc_rev );
++        a, loc_alt_hue_path );
+ 
+-    if ( loc_rev != NULL )
+-        delete [] loc_rev;
++    if ( loc_alt_hue_path != NULL )
++        delete [] loc_alt_hue_path;
+ }
+ 
+ //
+@@ -1478,24 +1484,24 @@
+ // Deprecated version using PLINT instead of bool
+ void plstream::scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity,
+                         const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3,
+-                        const PLINT *rev )
++                        const PLINT *alt_hue_path )
+ {
+-    PLBOOL *loc_rev = NULL;
+-    if ( rev != NULL )
++    PLBOOL *loc_alt_hue_path = NULL;
++    if ( alt_hue_path != NULL )
+     {
+-        loc_rev = new PLBOOL[npts - 1];
++        loc_alt_hue_path = new PLBOOL[npts - 1];
+         for ( int i = 0; i < npts - 1; i++ )
+         {
+-            loc_rev[i] = (PLBOOL) rev[i];
++            loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i];
+         }
+     }
+ 
+     set_stream();
+ 
+-    plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_rev );
++    plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path );
+ 
+-    if ( loc_rev != NULL )
+-        delete [] loc_rev;
++    if ( loc_alt_hue_path != NULL )
++        delete [] loc_alt_hue_path;
+ }
+ 
+ // Set a given color from color map 0 by 8 bit RGB value
+@@ -1698,7 +1704,7 @@
  {
      set_stream();
  
@@ -209,7 +1063,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          shade_min, shade_max,
          sh_cmap, sh_color, sh_width,
          min_color, min_width, max_color, max_width,
-@@ -1720,7 +1720,7 @@
+@@ -1720,7 +1726,7 @@
  {
      set_stream();
  
@@ -218,7 +1072,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          shade_min, shade_max,
          sh_cmap, sh_color, sh_width,
          min_color, min_width, max_color, max_width,
-@@ -1739,7 +1739,7 @@
+@@ -1739,7 +1745,7 @@
  {
      set_stream();
  
@@ -227,7 +1081,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          clevel, nlevel, fill_width, cont_color, cont_width,
          fill, (PLBOOL) rectangular, pltr, pltr_data );
  }
-@@ -1757,7 +1757,7 @@
+@@ -1757,7 +1763,7 @@
  {
      set_stream();
  
@@ -236,7 +1090,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          clevel, nlevel, fill_width, cont_color, cont_width,
          fill, (PLBOOL) rectangular, pltr, pltr_data );
  }
-@@ -2161,7 +2161,7 @@
+@@ -2161,7 +2167,7 @@
  {
      set_stream();
  
@@ -245,7 +1099,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          Dxmin, Dxmax, Dymin, Dymax );
  }
  
-@@ -2175,7 +2175,7 @@
+@@ -2175,7 +2181,7 @@
  {
      set_stream();
  
@@ -254,7 +1108,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
          valuemin, valuemax, pltr, pltr_data );
  }
  
-@@ -2690,7 +2690,7 @@
+@@ -2690,7 +2696,7 @@
  {
      set_stream();
  
@@ -265,11 +1119,11 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.cc plplot-trunk/bind
  // Functions for converting between HLS and RGB color space
 diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindings/c++/plstream.h
 --- plplot-5.9.9/bindings/c++/plstream.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/c++/plstream.h	2011-11-02 09:43:05.742057086 -0600
++++ plplot-trunk/bindings/c++/plstream.h	2012-12-14 08:51:04.755315749 -0700
 @@ -1,5 +1,5 @@
  //----------------------------------*-C++-*----------------------------------//
 -// $Id: plstream.h 11915 2011-09-07 11:45:29Z andrewross $
-+// $Id: plstream.h 11967 2011-10-14 07:11:18Z andrewross $
++// $Id: plstream.h 12256 2012-10-25 17:36:06Z andrewross $
  // Geoffrey Furnish
  // Sep 21 1994
  //
@@ -358,7 +1212,29 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
  // Draws a line segment from (x1, y1) to (x2, y2).
  
-@@ -574,7 +574,7 @@
+@@ -442,11 +442,16 @@
+                  const PLINT *symbol_colors, const PLFLT *symbol_scales,
+                  const PLINT *symbol_numbers, const char **symbols );
+ 
+-    void colorbar( PLINT position, PLINT opt, PLFLT x, PLFLT y, PLFLT length, PLFLT width, PLINT cont_color, PLINT cont_width,
+-                   PLFLT ticks, PLINT sub_ticks,
+-                   const char *axis_opts, const char *label,
+-                   PLINT n_colors, const PLFLT *colors, const PLFLT *values );
+-
++    void colorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
++                   PLINT opt, PLINT position, PLFLT x, PLFLT y,
++                   PLFLT x_length, PLFLT y_length,
++                   PLINT bg_color, PLINT bb_color, PLINT bb_style,
++                   PLFLT low_cap_color, PLFLT high_cap_color,
++                   PLINT cont_color, PLINT cont_width,
++                   PLINT n_labels, PLINT *label_opts, const char *label[],
++                   PLINT n_axes, const char *axis_opts[],
++                   PLFLT *ticks, PLINT *sub_ticks,
++                   PLINT *n_values, const PLFLT * const *values );
+ 
+ // Sets position of the light source
+ 
+@@ -574,7 +579,7 @@
  
  // Replays contents of plot buffer to current device/file.
  
@@ -367,7 +1243,25 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
  // Set line color by red, green, blue from  0. to 1.
  
-@@ -921,7 +921,7 @@
+@@ -620,7 +625,7 @@
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ 
+     void scmap1l( bool itype, PLINT npts, const PLFLT *intensity,
+-                  const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *rev = NULL );
++                  const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *alt_hue_path = NULL );
+ 
+ //    void scmap1l( bool itype, PLINT npts, PLFLT *intensity,
+ //                PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 );
+@@ -631,7 +636,7 @@
+ 
+     void scmap1la( bool itype, PLINT npts, const PLFLT *intensity,
+                    const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a,
+-                   const bool *rev = NULL );
++                   const bool *alt_hue_path = NULL );
+ 
+ // Set a given color from color map 0 by 8 bit RGB value
+ 
+@@ -921,7 +926,7 @@
  
  // Switches to text screen.
  
@@ -376,7 +1270,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
  // Set the format for date / time labels
  
-@@ -944,7 +944,7 @@
+@@ -944,7 +949,7 @@
  // Defines a "standard" viewport with seven character heights for
  // the left margin and four character heights everywhere else.
  
@@ -385,7 +1279,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
  // Set up a window for three-dimensional plotting.
  
-@@ -1055,11 +1055,11 @@
+@@ -1055,11 +1060,11 @@
  
  // Clear internal option table info structure.
  
@@ -399,7 +1293,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
  // Merge user option table into internal info structure.
  
-@@ -1083,7 +1083,7 @@
+@@ -1083,7 +1088,7 @@
  
  // Print usage & syntax message.
  
@@ -408,9 +1302,18 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/c++/plstream.h plplot-trunk/bindi
  
      // Miscellaneous
  
+@@ -1156,7 +1161,7 @@
+                  PLINT nx, PLINT ny, PLINT opt, PLINT side );
+     void poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const PLINT *draw, PLINT ifcc );
+     void scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity,
+-                  const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *rev );
++                  const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *alt_hue_path );
+ 
+     void shade( const PLFLT * const *a, PLINT nx, PLINT ny,
+                 PLINT ( *defined )( PLFLT, PLFLT ),
 diff -ruN --exclude .svn plplot-5.9.9/bindings/d/CMakeLists.txt plplot-trunk/bindings/d/CMakeLists.txt
 --- plplot-5.9.9/bindings/d/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/d/CMakeLists.txt	2011-11-30 09:19:44.022836396 -0700
++++ plplot-trunk/bindings/d/CMakeLists.txt	2011-11-30 09:19:44.000000000 -0700
 @@ -29,11 +29,7 @@
    set(plplotdmd${LIB_TAG}_LIB_SRCS
      plplot.d
@@ -454,7 +1357,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/d/CMakeLists.txt plplot-trunk/bin
      set(PC_CONFIGURED_FILE
 diff -ruN --exclude .svn plplot-5.9.9/bindings/d/plplot.d plplot-trunk/bindings/d/plplot.d
 --- plplot-5.9.9/bindings/d/plplot.d	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/d/plplot.d	2012-01-28 07:51:42.225840945 -0700
++++ plplot-trunk/bindings/d/plplot.d	2012-12-14 08:51:02.980325921 -0700
 @@ -12,6 +12,7 @@
  alias void function( PLINT, PLFLT*, PLFLT* ) fill_func;
  alias void function( PLFLT, PLFLT, PLFLT*, PLFLT*, PLPointer ) pltr_func;
@@ -463,6 +1366,73 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/d/plplot.d plplot-trunk/bindings/
  }
  
  // D definition of PLcGrid and PLcGrid2
+@@ -581,16 +582,16 @@
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ void plscmap1l( PLBOOL itype, PLFLT[] intensity, PLFLT[] coord1,
+-                PLFLT[] coord2, PLFLT[] coord3, PLBOOL[] rev = null )
++                PLFLT[] coord2, PLFLT[] coord3, PLBOOL[] alt_hue_path = null )
+ {
+     PLINT npts = intensity.length;
+     assert( npts == coord1.length, "plscmap1l(): Arrays must be of same length!" );
+     assert( npts == coord2.length, "plscmap1l(): Arrays must be of same length!" );
+     assert( npts == coord3.length, "plscmap1l(): Arrays must be of same length!" );
+-    if ( rev != null )
++    if ( alt_hue_path != null )
+     {
+-        assert( npts - 1 == rev.length, "plscmap1l(): Array rev must be of same length then other arrays minus 1!" );
+-        c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, rev.ptr );
++        assert( npts - 1 == alt_hue_path.length, "plscmap1l(): Array alt_hue_path must be of same length then other arrays minus 1!" );
++        c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, alt_hue_path.ptr );
+     }
+     else
+         c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, null );
+@@ -601,17 +602,17 @@
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ // Will also linear interpolate alpha values.
+ void plscmap1la( PLBOOL itype, PLFLT[] intensity, PLFLT[] coord1,
+-                 PLFLT[] coord2, PLFLT[] coord3, PLFLT[] a, PLBOOL[] rev = null )
++                 PLFLT[] coord2, PLFLT[] coord3, PLFLT[] a, PLBOOL[] alt_hue_path = null )
+ {
+     PLINT npts = intensity.length;
+     assert( npts == coord1.length, "plscmap1la(): Arrays must be of same length!" );
+     assert( npts == coord2.length, "plscmap1la(): Arrays must be of same length!" );
+     assert( npts == coord3.length, "plscmap1la(): Arrays must be of same length!" );
+     assert( npts == a.length, "plscmap1la(): Arrays must be of same length!" );
+-    if ( rev != null )
++    if ( alt_hue_path != null )
+     {
+-        assert( npts - 1 == rev.length, "plscmap1la(): Array rev must be of same length then other arrays minus 1!" );
+-        c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, rev.ptr );
++        assert( npts - 1 == alt_hue_path.length, "plscmap1la(): Array alt_hue_path must be of same length then other arrays minus 1!" );
++        c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, alt_hue_path.ptr );
+     }
+     else
+         c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, null );
+@@ -1239,7 +1240,7 @@
+     PLFLT s;
+     PLFLT p;
+     PLFLT a;
+-    int   rev;
++    int   alt_hue_path;
+ }
+ alias _N10 PLControlPt;
+ 
+@@ -1947,12 +1948,12 @@
+ 
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+-void c_plscmap1l( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev );
++void c_plscmap1l( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path );
+ 
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ // Will also linear interpolate alpha values.
+-void c_plscmap1la( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev );
++void c_plscmap1la( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path );
+ 
+ // Set number of colors in cmap 1
+ void c_plscmap1n( PLINT ncol1 );
 @@ -2082,7 +2083,7 @@
  void c_plstart( char *devname, PLINT nx, PLINT ny );
  
@@ -474,7 +1444,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/d/plplot.d plplot-trunk/bindings/
  void c_plstripa( PLINT id, PLINT pen, PLFLT x, PLFLT y );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/CMakeLists.txt plplot-trunk/bindings/f77/CMakeLists.txt
 --- plplot-5.9.9/bindings/f77/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f77/CMakeLists.txt	2012-01-28 07:51:42.552828921 -0700
++++ plplot-trunk/bindings/f77/CMakeLists.txt	2012-01-28 07:51:42.000000000 -0700
 @@ -179,23 +179,11 @@
      )
  
@@ -549,7 +1519,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/CMakeLists.txt plplot-trunk/b
      if(LIB_TAG)
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/sc3d.c plplot-trunk/bindings/f77/sc3d.c
 --- plplot-5.9.9/bindings/f77/sc3d.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f77/sc3d.c	2012-01-04 08:45:32.349665692 -0700
++++ plplot-trunk/bindings/f77/sc3d.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: sc3d.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: sc3d.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -576,7 +1546,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/sc3d.c plplot-trunk/bindings/
          free( (void *) temp[i] );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/sccont.c plplot-trunk/bindings/f77/sccont.c
 --- plplot-5.9.9/bindings/f77/sccont.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f77/sccont.c	2012-01-04 08:45:32.347665764 -0700
++++ plplot-trunk/bindings/f77/sccont.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: sccont.c 11759 2011-06-01 17:41:34Z airwin $
 +// $Id: sccont.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -621,10 +1591,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/sccont.c plplot-trunk/binding
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/scstubs.c plplot-trunk/bindings/f77/scstubs.c
 --- plplot-5.9.9/bindings/f77/scstubs.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f77/scstubs.c	2012-01-04 08:45:32.344665872 -0700
++++ plplot-trunk/bindings/f77/scstubs.c	2012-12-14 08:51:04.121319070 -0700
 @@ -1,4 +1,4 @@
 -// $Id: scstubs.c 11915 2011-09-07 11:45:29Z andrewross $
-+// $Id: scstubs.c 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: scstubs.c 12212 2012-08-13 23:17:31Z airwin $
  //
  //      C stub routines.
  //
@@ -653,9 +1623,30 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f77/scstubs.c plplot-trunk/bindin
  
      free( *pllegend_text );
      free( pllegend_text );
+@@ -802,16 +802,16 @@
+ 
+ void
+ PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
+-           PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev )
++           PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path )
+ {
+-    c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, rev );
++    c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path );
+ }
+ 
+ void
+ PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
+-            PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev )
++            PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path )
+ {
+-    c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, rev );
++    c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path );
+ }
+ 
+ void
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/CMakeLists.txt plplot-trunk/bindings/f95/CMakeLists.txt
 --- plplot-5.9.9/bindings/f95/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/CMakeLists.txt	2012-01-28 07:51:42.573828430 -0700
++++ plplot-trunk/bindings/f95/CMakeLists.txt	2012-01-28 07:51:42.000000000 -0700
 @@ -125,21 +125,11 @@
      ${CMAKE_CURRENT_BINARY_DIR}/plplot_parameters.h_compare
      )
@@ -728,7 +1719,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/CMakeLists.txt plplot-trunk/b
    install(
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/configurable.f90 plplot-trunk/bindings/f95/configurable.f90
 --- plplot-5.9.9/bindings/f95/configurable.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/configurable.f90	2012-01-28 07:51:42.571828499 -0700
++++ plplot-trunk/bindings/f95/configurable.f90	2012-01-28 07:51:42.000000000 -0700
 @@ -1,4 +1,4 @@
 -!      $Id: configurable.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: configurable.f90 12160 2012-01-27 22:29:16Z airwin $
@@ -775,7 +1766,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/configurable.f90 plplot-trunk
            iargsarr(index, iargs+1) = s1(index)
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/global_defines.sed plplot-trunk/bindings/f95/global_defines.sed
 --- plplot-5.9.9/bindings/f95/global_defines.sed	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/global_defines.sed	2011-11-02 09:43:05.653060349 -0600
++++ plplot-trunk/bindings/f95/global_defines.sed	2011-11-02 09:43:05.000000000 -0600
 @@ -40,4 +40,5 @@
  
  /^#define/ s?^#define *\(PL_NOTSET\)[ (]*\([^ ]*\)[ )]*\(.*\)$?      real(kind=plflt), parameter :: \1 = \2.0_plflt\3\n      real(kind=plflt), parameter :: PL_PI = 3.1415926535897932384_plflt\n      real(kind=plflt), parameter :: PL_TWOPI = 2.0_plflt*PL_PI?
@@ -784,7 +1775,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/global_defines.sed plplot-tru
  /^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$?      integer, parameter :: \1 = \2 \3?
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/plplotf95_ifort.def plplot-trunk/bindings/f95/plplotf95_ifort.def
 --- plplot-5.9.9/bindings/f95/plplotf95_ifort.def	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/plplotf95_ifort.def	2012-06-08 08:56:05.126655987 -0600
++++ plplot-trunk/bindings/f95/plplotf95_ifort.def	2012-06-08 08:56:05.000000000 -0600
 @@ -1,5 +1,51 @@
  LIBRARY plplotf95d.dll
  EXPORTS
@@ -839,7 +1830,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/plplotf95_ifort.def plplot-tr
      PLPLOTP_mp_PLSDEV
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/plplot_parameters.h plplot-trunk/bindings/f95/plplot_parameters.h
 --- plplot-5.9.9/bindings/f95/plplot_parameters.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/plplot_parameters.h	2011-11-02 09:43:05.642060751 -0600
++++ plplot-trunk/bindings/f95/plplot_parameters.h	2011-11-02 09:43:05.000000000 -0600
 @@ -29,16 +29,26 @@
        integer, parameter :: PLESC_HAS_TEXT = 20 ! driver draws text
        integer, parameter :: PLESC_IMAGE = 21 ! handle image
@@ -995,7 +1986,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/plplot_parameters.h plplot-tr
        real(kind=plflt), parameter :: PL_NOTSET = -42.0_plflt
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sc3d.c plplot-trunk/bindings/f95/sc3d.c
 --- plplot-5.9.9/bindings/f95/sc3d.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/sc3d.c	2012-01-04 08:45:32.468661408 -0700
++++ plplot-trunk/bindings/f95/sc3d.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: sc3d.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: sc3d.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1047,7 +2038,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sc3d.c plplot-trunk/bindings/
          free( (void *) temp[i] );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sccont.c plplot-trunk/bindings/f95/sccont.c
 --- plplot-5.9.9/bindings/f95/sccont.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/sccont.c	2012-01-04 08:45:32.463661588 -0700
++++ plplot-trunk/bindings/f95/sccont.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: sccont.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: sccont.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1339,10 +2330,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sccont.c plplot-trunk/binding
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/scstubs.c plplot-trunk/bindings/f95/scstubs.c
 --- plplot-5.9.9/bindings/f95/scstubs.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/scstubs.c	2012-01-04 08:45:32.461661660 -0700
++++ plplot-trunk/bindings/f95/scstubs.c	2012-12-14 08:51:04.128319034 -0700
 @@ -1,4 +1,4 @@
 -// $Id: scstubs.c 11915 2011-09-07 11:45:29Z andrewross $
-+// $Id: scstubs.c 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: scstubs.c 12212 2012-08-13 23:17:31Z airwin $
  //
  //      C stub routines.
  //
@@ -1480,11 +2471,11 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/scstubs.c plplot-trunk/bindin
 +void PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 );
 +void PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 );
 +void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
-+                PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev );
++                PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path );
 +void PLSCMAP1L2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
 +                 PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 );
 +void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
-+                 PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev );
++                 PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path );
 +void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
 +                  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a );
 +void PLSCMAP1N( PLINT *n );
@@ -1650,6 +2641,30 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/scstubs.c plplot-trunk/bindin
  
      free( *pllegend_text );
      free( pllegend_text );
+@@ -841,9 +1057,9 @@
+ 
+ void
+ PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
+-           PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev )
++           PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path )
+ {
+-    c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, rev );
++    c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path );
+ }
+ 
+ void
+@@ -855,9 +1071,9 @@
+ 
+ void
+ PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
+-            PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev )
++            PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path )
+ {
+-    c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, rev );
++    c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path );
+ }
+ 
+ void
 @@ -963,21 +1179,24 @@
  //
  #define    PLSETMAPFORMC      FNAME( PLSETMAPFORMC, plsetmapformc )
@@ -1718,7 +2733,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/scstubs.c plplot-trunk/bindin
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubs.f90 plplot-trunk/bindings/f95/sfstubs.f90
 --- plplot-5.9.9/bindings/f95/sfstubs.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/sfstubs.f90	2012-01-04 08:45:32.456661840 -0700
++++ plplot-trunk/bindings/f95/sfstubs.f90	2012-01-04 08:45:32.000000000 -0700
 @@ -1,5 +1,5 @@
  !***********************************************************************
 -!  $Id: sfstubs.f90 11680 2011-03-27 17:57:51Z airwin $
@@ -2103,11 +3118,11 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubs.f90 plplot-trunk/bind
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubsf95.f90 plplot-trunk/bindings/f95/sfstubsf95.f90
 --- plplot-5.9.9/bindings/f95/sfstubsf95.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/sfstubsf95.f90	2012-06-08 08:56:05.129655776 -0600
++++ plplot-trunk/bindings/f95/sfstubsf95.f90	2012-12-14 08:51:04.129319029 -0700
 @@ -1,5 +1,5 @@
  !***********************************************************************
 -!  $Id: sfstubsf95.f90 11915 2011-09-07 11:45:29Z andrewross $
-+!  $Id: sfstubsf95.f90 12163 2012-02-01 05:43:09Z arjenmarkus $
++!  $Id: sfstubsf95.f90 12212 2012-08-13 23:17:31Z airwin $
  !  sfstubsf95.f
  !
  !  Copyright (C) 2005, 2006  Arjen Markus
@@ -4411,24 +5426,24 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubsf95.f90 plplot-trunk/b
 -         enddo
 -         call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, irev )
 -      end subroutine plscmap1la
-+    subroutine plscmap1l( rgbtype, intensity, coord1, coord2, coord3, rev)
++    subroutine plscmap1l( rgbtype, intensity, coord1, coord2, coord3, alt_hue_path)
 +          logical                        :: rgbtype
 +          real(kind=plflt), dimension(:) :: intensity, coord1, coord2, coord3
-+          logical, dimension(:)          :: rev
++          logical, dimension(:)          :: alt_hue_path
  
 -      subroutine plscmap1la2( rgbtype, intensity, coord1, coord2, coord3, a)
 -            logical                        :: rgbtype
 -            real(kind=plflt), dimension(:) :: intensity, coord1, coord2, coord3, a
-+          integer, dimension(size(rev))  :: irev
++          integer, dimension(size(alt_hue_path))  :: ialt_hue_path
 +          integer                        :: i
 +          integer                        :: type
  
 -            integer                        :: type
 +       type = convert_to_int( rgbtype )
-+       do i = 1,size(rev)
-+          irev(i) = convert_to_int( rev(i) )
++       do i = 1,size(alt_hue_path)
++          ialt_hue_path(i) = convert_to_int( alt_hue_path(i) )
 +       enddo
-+       call plscmap1lf77( type, size(intensity), intensity, coord1, coord2, coord3, irev )
++       call plscmap1lf77( type, size(intensity), intensity, coord1, coord2, coord3, ialt_hue_path )
 +    end subroutine plscmap1l
  
 -         type = convert_to_int( rgbtype )
@@ -4469,10 +5484,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubsf95.f90 plplot-trunk/b
  
 -      iy_ascl = convert_to_int( y_ascl )
 -      iacc = convert_to_int( acc )
-+    subroutine plscmap1la( rgbtype, intensity, coord1, coord2, coord3, a, rev)
++    subroutine plscmap1la( rgbtype, intensity, coord1, coord2, coord3, a, alt_hue_path)
 +          logical                        :: rgbtype
 +          real(kind=plflt), dimension(:) :: intensity, coord1, coord2, coord3, a
-+          logical, dimension(:)          :: rev
++          logical, dimension(:)          :: alt_hue_path
  
 -      s1 = transfer( string1, s1 )
 -      s2 = transfer( string2, s2 )
@@ -4515,15 +5530,15 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubsf95.f90 plplot-trunk/b
 -         status = convert_to_log(istatus)
 -      end subroutine plxormod
 -      end module plplot
-+          integer, dimension(size(rev))  :: irev
++          integer, dimension(size(alt_hue_path))  :: ialt_hue_path
 +          integer                        :: i
 +          integer                        :: type
 +
 +       type = convert_to_int( rgbtype )
-+       do i = 1,size(rev)
-+          irev(i) = convert_to_int( rev(i) )
++       do i = 1,size(alt_hue_path)
++          ialt_hue_path(i) = convert_to_int( alt_hue_path(i) )
 +       enddo
-+       call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, irev )
++       call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, ialt_hue_path )
 +    end subroutine plscmap1la
 +
 +    subroutine plscmap1la2( rgbtype, intensity, coord1, coord2, coord3, a)
@@ -4651,7 +5666,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/sfstubs.h plplot-trunk/bindin
 -!     common /zzplstr9/ string9
 diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/strutil.f90 plplot-trunk/bindings/f95/strutil.f90
 --- plplot-5.9.9/bindings/f95/strutil.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/f95/strutil.f90	2012-01-28 07:51:42.572828464 -0700
++++ plplot-trunk/bindings/f95/strutil.f90	2012-01-28 07:51:42.000000000 -0700
 @@ -1,4 +1,4 @@
 -! $Id: strutil.f90 11680 2011-03-27 17:57:51Z airwin $
 +! $Id: strutil.f90 12159 2012-01-27 22:17:33Z airwin $
@@ -4767,9 +5782,25 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/f95/strutil.f90 plplot-trunk/bind
 +end subroutine plstrc2f
 +
 +end module plplot_strutils
+diff -ruN --exclude .svn plplot-5.9.9/bindings/gnome2/lib/plplotcanvas.c plplot-trunk/bindings/gnome2/lib/plplotcanvas.c
+--- plplot-5.9.9/bindings/gnome2/lib/plplotcanvas.c	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/gnome2/lib/plplotcanvas.c	2012-12-14 08:51:04.083319274 -0700
+@@ -872,10 +872,10 @@
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ 
+-void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev )
++void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *alt_hue_path )
+ {
+     plsstrm( self->Nstream );
+-    plscmap1l( itype, npts, intensity, coord1, coord2, coord3, rev );
++    plscmap1l( itype, npts, intensity, coord1, coord2, coord3, alt_hue_path );
+ }
+ 
+ // Set number of colors in cmap 1
 diff -ruN --exclude .svn plplot-5.9.9/bindings/java/plplotjavac.i plplot-trunk/bindings/java/plplotjavac.i
 --- plplot-5.9.9/bindings/java/plplotjavac.i	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/java/plplotjavac.i	2012-01-28 07:51:42.039847633 -0700
++++ plplot-trunk/bindings/java/plplotjavac.i	2012-01-28 07:51:42.000000000 -0700
 @@ -326,10 +326,11 @@
  // I hate global variables but this is the best way I can think of to manage consistency
  //   checking among function arguments.
@@ -4870,9 +5901,65 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/java/plplotjavac.i plplot-trunk/b
  }
  %typemap( jni ) PLPointer OBJECT_DATA_img "jobjectArray"
  %typemap( jtype ) PLPointer OBJECT_DATA_img jPLFLTbracket2
+diff -ruN --exclude .svn plplot-5.9.9/bindings/java/PLStream.java plplot-trunk/bindings/java/PLStream.java
+--- plplot-5.9.9/bindings/java/PLStream.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/java/PLStream.java	2012-12-14 08:51:01.744332733 -0700
+@@ -773,10 +773,10 @@
+     }
+ 
+     public void scmap1l( boolean itype, double[] intensity, double[] coord1,
+-                         double[] coord2, double[] coord3, boolean[] rev )
++                         double[] coord2, double[] coord3, boolean[] alt_hue_path )
+     {
+         if ( set_stream() == -1 ) return;
+-        plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, rev );
++        plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, alt_hue_path );
+     }
+ 
+     public void scmap1l( boolean itype, double[] intensity, double[] coord1,
+@@ -787,10 +787,10 @@
+     }
+ 
+     public void scmap1la( boolean itype, double[] intensity, double[] coord1,
+-                          double[] coord2, double[] coord3, double[] a, boolean[] rev )
++                          double[] coord2, double[] coord3, double[] a, boolean[] alt_hue_path )
+     {
+         if ( set_stream() == -1 ) return;
+-        plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, rev );
++        plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, alt_hue_path );
+     }
+ 
+     public void scmap1la( boolean itype, double[] intensity, double[] coord1,
+@@ -1243,19 +1243,19 @@
+     }
+ 
+     public void scmap1l( int itype, double[] intensity, double[] coord1,
+-                         double[] coord2, double[] coord3, int[] rev )
++                         double[] coord2, double[] coord3, int[] alt_hue_path )
+     {
+         if ( set_stream() == -1 ) return;
+-        boolean [] loc_rev = null;
+-        if ( rev != null )
++        boolean [] loc_alt_hue_path = null;
++        if ( alt_hue_path != null )
+         {
+-            loc_rev = new boolean[rev.length];
+-            for ( int i = 0; i < rev.length; i++ )
++            loc_alt_hue_path = new boolean[alt_hue_path.length];
++            for ( int i = 0; i < alt_hue_path.length; i++ )
+             {
+-                loc_rev[i] = ( rev[i] != 0 );
++                loc_alt_hue_path[i] = ( alt_hue_path[i] != 0 );
+             }
+         }
+-        plplotjavac.plscmap1l( itype != 0, intensity, coord1, coord2, coord3, loc_rev );
++        plplotjavac.plscmap1l( itype != 0, intensity, coord1, coord2, coord3, loc_alt_hue_path );
+     }
+ 
+     public void shades( double[][] a, double xmin, double xmax, double ymin,
 diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/CMakeLists.txt plplot-trunk/bindings/ocaml/CMakeLists.txt
 --- plplot-5.9.9/bindings/ocaml/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/ocaml/CMakeLists.txt	2011-11-28 16:54:36.028451826 -0700
++++ plplot-trunk/bindings/ocaml/CMakeLists.txt	2011-11-28 16:54:36.000000000 -0700
 @@ -101,7 +101,7 @@
      ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so
      ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a
@@ -4896,7 +5983,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/CMakeLists.txt plplot-trunk
      else(LIB_TAG)
 diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plcairo/CMakeLists.txt plplot-trunk/bindings/ocaml/plcairo/CMakeLists.txt
 --- plplot-5.9.9/bindings/ocaml/plcairo/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/ocaml/plcairo/CMakeLists.txt	2011-11-02 09:43:05.440068156 -0600
++++ plplot-trunk/bindings/ocaml/plcairo/CMakeLists.txt	2011-11-02 09:43:05.000000000 -0600
 @@ -36,7 +36,7 @@
      ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
      ${CMAKE_CURRENT_BINARY_DIR}/dllplcairo_stubs.so
@@ -4906,9 +5993,122 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plcairo/CMakeLists.txt plpl
      COMMAND ${OCAMLMKLIB} -o plcairo_stubs ${CAIRO_LINK_FLAGS_LIST} -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
      DEPENDS
      ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plplot_h plplot-trunk/bindings/ocaml/plplot_h
+--- plplot-5.9.9/bindings/ocaml/plplot_h	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ocaml/plplot_h	2012-12-14 08:51:04.116319097 -0700
+@@ -411,11 +411,11 @@
+ 
+  void
+ c_plscmap1l(PLBOOL itype, PLINT npts, PLFLT *intensity,
+-     PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev);
++     PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path);
+ 
+  void
+ c_plscmap1la(PLBOOL itype, PLINT npts, PLFLT *intensity,
+-      PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev);
++      PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path);
+ 
+  void
+ c_plscmap1n(PLINT ncol1);
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plplot_h.inc plplot-trunk/bindings/ocaml/plplot_h.inc
+--- plplot-5.9.9/bindings/ocaml/plplot_h.inc	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ocaml/plplot_h.inc	2012-12-14 08:51:04.117319092 -0700
+@@ -90,8 +90,8 @@
+ [mlname(plscmap0n)] void c_plscmap0n ( int ncol0 );
+ [mlname(plscmap1)] void c_plscmap1 ( [size_is(ncol1), in] int * r, [size_is(ncol1), in] int * g, [size_is(ncol1), in] int * b, int ncol1 );
+ [mlname(plscmap1a)] void c_plscmap1a ( [size_is(ncol1), in] int * r, [size_is(ncol1), in] int * g, [size_is(ncol1), in] int * b, [size_is(ncol1), in] double * a, int ncol1 );
+-[mlname(plscmap1l)] void c_plscmap1l ( boolean itype, int npts, [size_is(npts), in, size_is(npts)] double * intensity, [size_is(npts), in, size_is(npts)] double * coord1, [size_is(npts), in, size_is(npts)] double * coord2, [size_is(npts), in, size_is(npts)] double * coord3, [in, size_is(npts), in, size_is(npts), unique] boolean * rev );
+-[mlname(plscmap1la)] void c_plscmap1la ( boolean itype, int npts, [size_is(npts), in, size_is(npts)] double * intensity, [size_is(npts), in, size_is(npts)] double * coord1, [size_is(npts), in, size_is(npts)] double * coord2, [size_is(npts), in, size_is(npts)] double * coord3, [size_is(npts), in, size_is(npts)] double * a, [in, size_is(npts), in, size_is(npts), unique] boolean * rev );
++[mlname(plscmap1l)] void c_plscmap1l ( boolean itype, int npts, [size_is(npts), in, size_is(npts)] double * intensity, [size_is(npts), in, size_is(npts)] double * coord1, [size_is(npts), in, size_is(npts)] double * coord2, [size_is(npts), in, size_is(npts)] double * coord3, [in, size_is(npts), in, size_is(npts), unique] boolean * alt_hue_path );
++[mlname(plscmap1la)] void c_plscmap1la ( boolean itype, int npts, [size_is(npts), in, size_is(npts)] double * intensity, [size_is(npts), in, size_is(npts)] double * coord1, [size_is(npts), in, size_is(npts)] double * coord2, [size_is(npts), in, size_is(npts)] double * coord3, [size_is(npts), in, size_is(npts)] double * a, [in, size_is(npts), in, size_is(npts), unique] boolean * alt_hue_path );
+ [mlname(plscmap1n)] void c_plscmap1n ( int ncol1 );
+ [mlname(plscmap1_range)] void c_plscmap1_range ( double min_color, double max_color );
+ [mlname(plscol0)] void c_plscol0 ( int icol0, int r, int g, int b );
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plplot.ml plplot-trunk/bindings/ocaml/plplot.ml
+--- plplot-5.9.9/bindings/ocaml/plplot.ml	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ocaml/plplot.ml	2012-12-14 08:51:04.116319097 -0700
+@@ -399,10 +399,11 @@
+   let set_color ?stream c =
+     with_stream ?stream (fun () -> plcol0 (int_of_color c))
+ 
+-  (** [set_color_scale ?stream ?pos ?rev colors] sets the color scale 1 (images
++  (** [set_color_scale ?stream ?pos ?alt_hue_path colors] sets the color scale 1 (images
+       and shade plots) using a linear interpolation between the given list of
+-      colors.  If [rev] is true then the scale goes in the reverse order. *)
+-  let set_color_scale ?stream ?pos ?rev colors =
++      colors.  If [alt_hue_path] is true then the interpolation of any segment 
++      uses the alternative hue path which always includes the hue = 0 point. *)
++  let set_color_scale ?stream ?pos ?alt_hue_path colors =
+     let cs = Array.map rgb_of_color colors in
+     let r, g, b =
+       Array.map (fun (r, _, _) -> float_of_int r /. 255.0) cs,
+@@ -410,7 +411,7 @@
+       Array.map (fun (_, _, b) -> float_of_int b /. 255.0) cs
+     in
+     let positions = pos |? Array_ext.range ~n:(Array.length cs) 0.0 1.0 in
+-    with_stream ?stream (fun () -> plscmap1l true positions r g b rev);
++    with_stream ?stream (fun () -> plscmap1l true positions r g b alt_hue_path);
+     ()
+ 
+   (** Start a new page *)
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/plplot.mli plplot-trunk/bindings/ocaml/plplot.mli
+--- plplot-5.9.9/bindings/ocaml/plplot.mli	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ocaml/plplot.mli	2012-12-14 08:51:04.117319092 -0700
+@@ -214,18 +214,19 @@
+         [color]. *)
+     val set_color : ?stream:stream_t -> color_t -> unit
+ 
+-    (** [set_color_scale ?stream ?pos ?rev colors] sets the continuous color map
++    (** [set_color_scale ?stream ?pos ?alt_hue_path colors] sets the continuous color map
+         (color map 1) to a scale determined by interpolating between [colors].
+         [pos] can be used to specify where in the color scale ([0.0 - 1.0]) the
+         a color interpolation point should fall.  [pos] defaults to even
+         spacing.
+-        [rev] can be used to specify that a given segment should be
+-        interpolated backwards.
++        [alt_hue_path] can be used to specify that a given segment should be
++        interpolated using the alternative hue path which always includes the
++        hue=0 point.
+         {!Plplot.plscmap1l} is used internally to set the color scale. *)
+     val set_color_scale :
+       ?stream:stream_t ->
+       ?pos:float array ->
+-      ?rev:bool array ->
++      ?alt_hue_path:bool array ->
+       color_t array -> unit
+ 
+     (** PLplot has two color palettes - indexed (color map 0) and
+diff -ruN --exclude .svn plplot-5.9.9/bindings/ocaml/touchup.ml plplot-trunk/bindings/ocaml/touchup.ml
+--- plplot-5.9.9/bindings/ocaml/touchup.ml	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/ocaml/touchup.ml	2012-12-14 08:51:04.118319087 -0700
+@@ -35,12 +35,12 @@
+     {
+       function_name = "c_plscmap1l";
+       function_attrs = None;
+-      parameter_attrs = Some ["rev", ["in"; "size_is(npts)"; "unique"]];
++      parameter_attrs = Some ["alt_hue_path", ["in"; "size_is(npts)"; "unique"]];
+     };
+     {
+       function_name = "c_plscmap1la";
+       function_attrs = None;
+-      parameter_attrs = Some ["rev", ["in"; "size_is(npts)"; "unique"]];
++      parameter_attrs = Some ["alt_hue_path", ["in"; "size_is(npts)"; "unique"]];
+     };
+     {
+       function_name = "c_plxormod";
+diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/octaverc.in plplot-trunk/bindings/octave/octaverc.in
+--- plplot-5.9.9/bindings/octave/octaverc.in	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/octave/octaverc.in	2012-12-14 08:51:02.314329763 -0700
+@@ -1,3 +1,6 @@
++# Disable warnings about shadowed functions - PLplot is _supposed_ to shadow the core functions
++warning("off","Octave:shadowed-function");
++
+ addpath("@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/","@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/support/","@CMAKE_SOURCE_DIR@/examples/octave/","@CMAKE_SOURCE_DIR@/bindings/octave/misc/","@CMAKE_BINARY_DIR@/bindings/octave/","@CMAKE_BINARY_DIR@/bindings/octave/PLplot");
+ putenv("PLPLOT_LIB","@CMAKE_SOURCE_DIR@/data/");
+ global pl_automatic_replot
 diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/figure.m plplot-trunk/bindings/octave/PLplot/figure.m
 --- plplot-5.9.9/bindings/octave/PLplot/figure.m	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/octave/PLplot/figure.m	2012-01-28 07:51:42.120844738 -0700
++++ plplot-trunk/bindings/octave/PLplot/figure.m	2012-12-14 08:51:02.311329778 -0700
 @@ -49,12 +49,11 @@
    global pl_automatic_replot
  
@@ -4926,9 +6126,27 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/figure.m plplot-tru
      endif
  
      plplot_stub;
+@@ -183,7 +182,7 @@
+       endif
+ 
+       ## the tk stuff
+-      if (0 & strcmp("tk", sprintf("%s",plgdev')))
++      if (0 && strcmp("tk", sprintf("%s",plgdev')))
+ 	if (! exist("tk_start") && nargin == 6)
+ 	  error("Can't use this Tk feature of PLplot until tk_octave \
+                  is installed!\n")
+@@ -234,7 +233,7 @@
+       #pladv(0);
+       #plflush;pleop;
+       
+-      if ( 0 & exist("__tk_name") & (strcmp("tk", sprintf("%s",plgdev'))))
++      if ( 0 && exist("__tk_name") && (strcmp("tk", sprintf("%s",plgdev'))))
+ 	eval(tk_receive(1));
+ 	__pl.intp = __pl_matstr(__pl.intp, intp, strm);	# tk interpreter name					
+ 	unlink(init_file);
 diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/struct_contains.m plplot-trunk/bindings/octave/PLplot/struct_contains.m
 --- plplot-5.9.9/bindings/octave/PLplot/struct_contains.m	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/octave/PLplot/struct_contains.m	2012-01-04 08:45:31.845683835 -0700
++++ plplot-trunk/bindings/octave/PLplot/struct_contains.m	2012-01-04 08:45:31.000000000 -0700
 @@ -13,9 +13,8 @@
  ## General Public License for more details.
  ##
@@ -4941,10 +6159,36 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/struct_contains.m p
  
  ## -*- texinfo -*-
  ## @deftypefn {Function File} {} struct_contains (@var{expr}, @var{name})
+diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/support/__pl_matstr.m plplot-trunk/bindings/octave/PLplot/support/__pl_matstr.m
+--- plplot-5.9.9/bindings/octave/PLplot/support/__pl_matstr.m	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/octave/PLplot/support/__pl_matstr.m	2012-12-14 08:51:02.311329778 -0700
+@@ -20,7 +20,7 @@
+ function out = __pl_matstr(mat, str, n)
+ 
+   ## Octave damned string arrays are defective!
+-  if (ischar(str) & ischar(mat) & rows(str) == 1)
++  if (ischar(str) && ischar(mat) && rows(str) == 1)
+     if (isempty(mat))
+       out(n,:) = str;
+     else
 diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m plplot-trunk/bindings/octave/PLplot/toggle_plplot_use.m
 --- plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/octave/PLplot/toggle_plplot_use.m	2012-01-28 07:51:42.118844822 -0700
-@@ -32,7 +32,7 @@
++++ plplot-trunk/bindings/octave/PLplot/toggle_plplot_use.m	2012-12-14 08:51:02.310329783 -0700
+@@ -23,16 +23,21 @@
+ if ! exist ("use_plplot_state")
+   global use_plplot_state
+   use_plplot_state = "on";
++  global default_shadow_warning
++  default_shadow_warning = warning("query","Octave:shadowed-function");
++  warning("off","Octave:shadowed-function");
+ else
+   if strcmp (use_plplot_state, "on")
+     use_plplot_state = "off";
++    warning(default_shadow_warning.state,"Octave:shadowed-function");
+   else
+     use_plplot_state = "on";
++    warning("off","Octave:shadowed-function");
+   endif
  endif
  
  use_plplot_path = plplot_octave_path;
@@ -4953,9 +6197,78 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m
  for use_plplot_i=1:size(plplot_path_to_remove)(1)
    if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
      rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
+diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/plplot_octave.h.in plplot-trunk/bindings/octave/plplot_octave.h.in
+--- plplot-5.9.9/bindings/octave/plplot_octave.h.in	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/octave/plplot_octave.h.in	2012-12-14 08:51:02.310329783 -0700
+@@ -1,4 +1,4 @@
+-// $Id: plplot_octave.h.in 11919 2011-09-13 12:06:24Z andrewross $
++// $Id: plplot_octave.h.in 12212 2012-08-13 23:17:31Z airwin $
+ // jc: this is a massaged plplot.h
+ //
+ // Copyright (C) 2004  Joao Cardoso
+@@ -361,7 +361,7 @@
+     PLFLT l;                    // lightness
+     PLFLT s;                    // saturation
+     PLFLT p;                    // position
+-    int   rev;                  // if set, interpolate through h=0
++    int   alt_hue_path;         // if set, interpolate through h=0
+ } PLControlPt;
+ 
+ // A PLBufferingCB is a control block for interacting with devices
+@@ -1188,8 +1188,8 @@
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ 
+ void c_plscmap1l( PLINT itype, PLINT npts, PLFLT *intensity,
+-                  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev );
+-//%name plscmap1l //%input intensity(npts), coord1(npts), coord2(npts), coord3(npts), rev(npts)
++                  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *alt_hue_path );
++//%name plscmap1l //%input intensity(npts), coord1(npts), coord2(npts), coord3(npts), alt_hue_path(npts)
+ 
+ // Set a given color from color map 0 by 8 bit RGB value
+ 
+@@ -1212,8 +1212,8 @@
+ // and alpha transparency value.
+ 
+ void c_plscmap1la( PLINT itype, PLINT npts, PLFLT *intensity,
+-                   PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLINT *rev );
+-//%name plscmap1la //%input intensity(npts), coord1(npts), coord2(npts), coord3(npts), a(npts), rev(npts)
++                   PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLINT *alt_hue_path );
++//%name plscmap1la //%input intensity(npts), coord1(npts), coord2(npts), coord3(npts), a(npts), alt_hue_path(npts)
+ 
+ // Set a given color from color map 0 by 8 bit RGB + alpha value
+ 
+diff -ruN --exclude .svn plplot-5.9.9/bindings/octave/plplot_octave.i plplot-trunk/bindings/octave/plplot_octave.i
+--- plplot-5.9.9/bindings/octave/plplot_octave.i	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/octave/plplot_octave.i	2012-12-14 08:51:02.309329789 -0700
+@@ -34,6 +34,10 @@
+ %module plplot_octave
+ 
+ %{
++// #undef PACKAGE and VERSION macros which are leaked out by the octave headers
++#undef PACKAGE
++#undef VERSION
++
+ #include "plplotP.h"
+ 
+ // Temporary fix for problems with -fvisibility=hidden and octave headers.
+@@ -665,8 +669,13 @@
+ // charMatrix, etc.
+ %typemap( in, numinputs = 0 ) char *OUTPUT( octave_value_list retval )
+ {
++// Check if version >= 3.4.0
++%# if OCTAVE_API_VERSION_NUMBER < 45
+     retval( 0 ) = octave_value( charMatrix( 80, 1 ), true );
+-    $1          = (char *) retval( 0 ).char_matrix_value().data();
++%# else
++        retval( 0 ) = octave_value( charMatrix( 80, 1 ) );
++%# endif
++    $1 = (char *) retval( 0 ).char_matrix_value().data();
+ }
+ %typemap( argout ) char *OUTPUT {
+     $result = SWIG_Octave_AppendOutput( $result, retval$argnum( 0 ) );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplotcmodule.i plplot-trunk/bindings/python/plplotcmodule.i
 --- plplot-5.9.9/bindings/python/plplotcmodule.i	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/python/plplotcmodule.i	2012-01-28 07:51:42.199841903 -0700
++++ plplot-trunk/bindings/python/plplotcmodule.i	2012-01-28 07:51:42.000000000 -0700
 @@ -555,7 +555,8 @@
      free( $1 );
  }
@@ -5008,9 +6321,65 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplotcmodule.i plplot-tru
  //**************************
  //        special for pllegend, char ** ArrayCk
  //***************************
+diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplot.py.Numeric plplot-trunk/bindings/python/plplot.py.Numeric
+--- plplot-5.9.9/bindings/python/plplot.py.Numeric	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/python/plplot.py.Numeric	2012-12-14 08:51:02.319329737 -0700
+@@ -631,7 +631,7 @@
+ # Redefine plscmap1l to have the user-friendly interface
+ # Allowable syntaxes:
+ 
+-# plscmap1l(itype, pos, coord1, coord2, coord3[, rev])
++# plscmap1l(itype, pos, coord1, coord2, coord3[, alt_hue_path])
+  
+ _plscmap1l = plscmap1l
+ def plscmap1l(itype, pos, coord1, coord2, coord3, *args):
+@@ -641,11 +641,11 @@
+ 	raise ValueError, "Expected 1D pos array"
+ 		
+     if len(args) == 0:
+-	# Default rev
+-	rev = Numeric.zeros(pos.shape[0]-1)
++	# Default alt_hue_path
++	alt_hue_path = Numeric.zeros(pos.shape[0]-1)
+     elif len(args) == 1:
+-	rev = Numeric.asarray(args[0])
++	alt_hue_path = Numeric.asarray(args[0])
+     else:
+ 	raise ValueError, "Too many arguments to plscmap1l"
+-    _plscmap1l(itype, pos, coord1, coord2, coord3, rev)
++    _plscmap1l(itype, pos, coord1, coord2, coord3, alt_hue_path)
+ plscmap1l.__doc__ = _plscmap1l.__doc__
+diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplot.py.numpy plplot-trunk/bindings/python/plplot.py.numpy
+--- plplot-5.9.9/bindings/python/plplot.py.numpy	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/python/plplot.py.numpy	2012-12-14 08:51:02.319329737 -0700
+@@ -633,7 +633,7 @@
+ # Redefine plscmap1l to have the user-friendly interface
+ # Allowable syntaxes:
+ 
+-# plscmap1l(itype, pos, coord1, coord2, coord3[, rev])
++# plscmap1l(itype, pos, coord1, coord2, coord3[, alt_hue_path])
+  
+ _plscmap1l = plscmap1l
+ def plscmap1l(itype, pos, coord1, coord2, coord3, *args):
+@@ -643,11 +643,11 @@
+ 	raise ValueError, "Expected 1D pos array"
+ 		
+     if len(args) == 0:
+-	# Default rev
+-	rev = numpy.zeros(pos.shape[0]-1,dtype="int")
++	# Default alt_hue_path
++	alt_hue_path = numpy.zeros(pos.shape[0]-1,dtype="int")
+     elif len(args) == 1:
+-	rev = numpy.asarray(args[0])
++	alt_hue_path = numpy.asarray(args[0])
+     else:
+ 	raise ValueError, "Too many arguments to plscmap1l"
+-    _plscmap1l(itype, pos, coord1, coord2, coord3, rev)
++    _plscmap1l(itype, pos, coord1, coord2, coord3, alt_hue_path)
+ plscmap1l.__doc__ = _plscmap1l.__doc__
 diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplot_widgetmodule.c plplot-trunk/bindings/python/plplot_widgetmodule.c
 --- plplot-5.9.9/bindings/python/plplot_widgetmodule.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/python/plplot_widgetmodule.c	2012-01-04 08:45:31.876682719 -0700
++++ plplot-trunk/bindings/python/plplot_widgetmodule.c	2012-01-04 08:45:31.000000000 -0700
 @@ -23,7 +23,7 @@
  // the Tcl interpreter into which the Pltk extension is to be injected.
  //--------------------------------------------------------------------------
@@ -5022,15 +6391,19 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/python/plplot_widgetmodule.c plpl
      long x = 0;
 diff -ruN --exclude .svn plplot-5.9.9/bindings/qt_gui/CMakeLists.txt plplot-trunk/bindings/qt_gui/CMakeLists.txt
 --- plplot-5.9.9/bindings/qt_gui/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/qt_gui/CMakeLists.txt	2011-11-28 16:54:36.006452613 -0700
-@@ -57,6 +57,16 @@
++++ plplot-trunk/bindings/qt_gui/CMakeLists.txt	2012-12-14 08:51:04.085319263 -0700
+@@ -57,6 +57,20 @@
      ${MATH_LIB}
      ${QT_LIBRARIES}
      )
 +  if(NON_TRANSITIVE)
++    # Note that there are implicit references to classes in QtCore, QtGui and QtSvg 
++    # so we need to add all three to the list of libraries to link to plplotqtd.
++    # This is just equivalent to adding QT_LIBRARIES.
++    # 
 +    # empty list ==> non-transitive linking for everything that links to
 +    # libplplotqtd in the shared libraries case.
-+    target_link_libraries(plplotqt${LIB_TAG} LINK_INTERFACE_LIBRARIES)
++    target_link_libraries(plplotqt${LIB_TAG} LINK_INTERFACE_LIBRARIES ${QT_LIBRARIES})
 +    # This configures the pkg-config method to use non-transitive linking.
 +    set(PC_REQUIRES_TAG "Requires.private")
 +  else(NON_TRANSITIVE)
@@ -5042,7 +6415,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/qt_gui/CMakeLists.txt plplot-trun
    # automatically (so long as full pathnames to libraries are used).
 diff -ruN --exclude .svn plplot-5.9.9/bindings/qt_gui/plqt.cpp plplot-trunk/bindings/qt_gui/plqt.cpp
 --- plplot-5.9.9/bindings/qt_gui/plqt.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/qt_gui/plqt.cpp	2012-01-04 08:45:32.276668320 -0700
++++ plplot-trunk/bindings/qt_gui/plqt.cpp	2012-01-04 08:45:32.000000000 -0700
 @@ -1046,6 +1046,8 @@
      case Qt::RightButton:
          gin.button = 3;
@@ -5081,8 +6454,16 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/qt_gui/plqt.cpp plplot-trunk/bind
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/CMakeLists.txt plplot-trunk/bindings/tcl/CMakeLists.txt
 --- plplot-5.9.9/bindings/tcl/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/CMakeLists.txt	2011-11-30 09:19:43.959838653 -0700
-@@ -219,6 +219,18 @@
++++ plplot-trunk/bindings/tcl/CMakeLists.txt	2012-12-14 08:51:02.976325949 -0700
+@@ -138,6 +138,7 @@
+ tclmatrix${LIB_TAG}
+ plplot${LIB_TAG}
+ ${TCL_LIBRARY}
++${X11_LIBRARIES}
+ )
+ set(
+ libplplottcltk${LIB_TAG}_LINK_FLAGS
+@@ -219,6 +220,18 @@
  
  add_library(plplottcltk${LIB_TAG} ${plplottcltk${LIB_TAG}_LIB_SRCS})
  
@@ -5101,7 +6482,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/CMakeLists.txt plplot-trunk/b
  #message(STATUS
  #"plplottcltk${LIB_TAG}_link_libraries =
  #${plplottcltk${LIB_TAG}_link_libraries}"
-@@ -380,6 +392,9 @@
+@@ -380,6 +393,9 @@
    string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA})
    set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}")
    set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}")
@@ -5113,7 +6494,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/CMakeLists.txt plplot-trunk/b
    ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/global_defines.sed plplot-trunk/bindings/tcl/global_defines.sed
 --- plplot-5.9.9/bindings/tcl/global_defines.sed	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/global_defines.sed	2011-11-02 09:43:05.279074057 -0600
++++ plplot-trunk/bindings/tcl/global_defines.sed	2011-11-02 09:43:05.000000000 -0600
 @@ -16,14 +16,13 @@
  //  This file contains a function to set the various global variables\
  //  used by PLplot\
@@ -5136,9 +6517,37 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/global_defines.sed plplot-tru
  \\n\\\
  variable PL_PI 3.1415926535897932384\\n\\
 -
+diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/plapi.tpl plplot-trunk/bindings/tcl/plapi.tpl
+--- plplot-5.9.9/bindings/tcl/plapi.tpl	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/tcl/plapi.tpl	2012-12-14 08:51:02.975325957 -0700
+@@ -1,5 +1,5 @@
+ # --*-perl-*--
+-# $Id: plapi.tpl 11919 2011-09-13 12:06:24Z andrewross $
++# $Id: plapi.tpl 12212 2012-08-13 23:17:31Z airwin $
+ #
+ # PLplot API template specification file.
+ # Geoffrey Furnish
+@@ -708,7 +708,7 @@
+ coord1		PLFLT *
+ coord2		PLFLT *
+ coord3		PLFLT *
+-rev		PLINT *
++alt_hue_path		PLINT *
+ 
+ # Set color map 1 colors using a piece-wise linear relationship between
+ # intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+@@ -722,7 +722,7 @@
+ coord2		PLFLT *
+ coord3		PLFLT *
+ a		PLFLT *
+-rev		PLINT *
++alt_hue_path		PLINT *
+ 
+ # Set number of colors in cmap 1.
+ 
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/pltclgen.tcl plplot-trunk/bindings/tcl/pltclgen.tcl
 --- plplot-5.9.9/bindings/tcl/pltclgen.tcl	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/pltclgen.tcl	2011-11-02 09:43:05.259074790 -0600
++++ plplot-trunk/bindings/tcl/pltclgen.tcl	2011-11-02 09:43:05.000000000 -0600
 @@ -1,5 +1,5 @@
  #!/usr/local/bin/tclsh
 -# $Id: pltclgen.tcl 10774 2010-01-29 09:10:37Z arjenmarkus $
@@ -5157,7 +6566,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/pltclgen.tcl plplot-trunk/bin
                              puts $GENFILE "    $argname($i) = (unsigned int) strtoul(argv\[1+$i\],NULL,10);"
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclAPI.c plplot-trunk/bindings/tcl/tclAPI.c
 --- plplot-5.9.9/bindings/tcl/tclAPI.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/tclAPI.c	2012-01-04 08:45:32.249669292 -0700
++++ plplot-trunk/bindings/tcl/tclAPI.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tclAPI.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: tclAPI.c 12093 2011-12-03 08:33:04Z andrewross $
@@ -5877,7 +7286,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclAPI.c plplot-trunk/binding
          free( opt_array );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclcmd.tpl plplot-trunk/bindings/tcl/tclcmd.tpl
 --- plplot-5.9.9/bindings/tcl/tclcmd.tpl	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/tclcmd.tpl	2011-11-02 09:43:05.277074130 -0600
++++ plplot-trunk/bindings/tcl/tclcmd.tpl	2011-11-02 09:43:05.000000000 -0600
 @@ -5,7 +5,7 @@
  \*--------------------------------------------------------------------------*/
  
@@ -5889,7 +7298,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclcmd.tpl plplot-trunk/bindi
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMain.c plplot-trunk/bindings/tcl/tclMain.c
 --- plplot-5.9.9/bindings/tcl/tclMain.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/tclMain.c	2012-01-04 08:45:32.252669184 -0700
++++ plplot-trunk/bindings/tcl/tclMain.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tclMain.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: tclMain.c 12093 2011-12-03 08:33:04Z andrewross $
@@ -5952,10 +7361,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMain.c plplot-trunk/bindin
  }
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bindings/tcl/tclMatrix.c
 --- plplot-5.9.9/bindings/tcl/tclMatrix.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/tclMatrix.c	2012-01-04 08:45:32.240669613 -0700
++++ plplot-trunk/bindings/tcl/tclMatrix.c	2012-12-14 08:51:02.975325957 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tclMatrix.c 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: tclMatrix.c 12078 2011-11-30 22:09:07Z andrewross $
++// $Id: tclMatrix.c 12227 2012-08-27 18:52:02Z arjenmarkus $
  //
  //  Copyright 1994, 1995
  //  Maurice LeBrun			mjl at dino.ph.utexas.edu
@@ -6062,7 +7471,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
          int       ifilt, nfilt;
  
          if ( argc != 2 )
-@@ -610,36 +610,36 @@
+@@ -610,46 +610,61 @@
              return TCL_ERROR;
          }
  
@@ -6106,8 +7515,26 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
 +    else if ( ( c == 'h' ) && ( strncmp( argv[0], "help", (size_t) length ) == 0 ) )
      {
          Tcl_AppendResult( interp,
-             "So you really thought there'd be help, eh?  Sucker.",
-@@ -649,7 +649,7 @@
+-            "So you really thought there'd be help, eh?  Sucker.",
++            "Available subcommands:\n\
++dump   - return the values in the matrix as a string\n\
++delete - delete the matrix (including the matrix command)\n\
++filter - apply a three-point averaging (with a number of passes; ome-dimensional only)\n\
++help   - this information\n\
++info   - return the dimensions\n\
++max    - return the maximum value for the entire matrix or for the first N entries\n\
++min    - return the minimum value for the entire matrix or for the first N entries\n\
++redim  - resize the matrix (for one-dimensional matrices only)\n\
++scale  - scale the values by a given factor (for one-dimensional matrices only)\n\
++\n\
++Set and get values:\n\
++matrix m f 3 3 3 - define matrix command \"m\", three-dimensional, floating-point data\n\
++m 1 2 3          - return the value of matrix element [1,2,3]\n\
++m 1 2 3 = 2.0    - set the value of matrix element [1,2,3] to 2.0 (do not return the value)\n\
++m * 2 3 = 2.0    - set a slice consisting of all elements with second index 2 and third index 3 to 2.0",
+             (char *) NULL );
+         return TCL_OK;
+     }
  
  // info
  
@@ -6116,7 +7543,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      {
          for ( i = 0; i < matPtr->dim; i++ )
          {
-@@ -665,7 +665,7 @@
+@@ -665,7 +680,7 @@
  
  // max
  
@@ -6125,7 +7552,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      {
          int len;
          if ( argc < 1 || argc > 2 )
-@@ -706,7 +706,7 @@
+@@ -706,7 +721,7 @@
  
  // min
  
@@ -6134,7 +7561,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      {
          int len;
          if ( argc < 1 || argc > 2 )
-@@ -748,7 +748,7 @@
+@@ -748,7 +763,7 @@
  // redim
  // Only works on 1d matrices
  
@@ -6143,7 +7570,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      {
          int  newlen;
          void *data;
-@@ -772,7 +772,7 @@
+@@ -772,7 +787,7 @@
          switch ( matPtr->type )
          {
          case TYPE_FLOAT:
@@ -6152,7 +7579,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
              if ( data == NULL )
              {
                  Tcl_AppendResult( interp, "redim failed!",
-@@ -785,7 +785,7 @@
+@@ -785,7 +800,7 @@
              break;
  
          case TYPE_INT:
@@ -6161,7 +7588,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
              if ( data == NULL )
              {
                  Tcl_AppendResult( interp, "redim failed!",
-@@ -804,7 +804,7 @@
+@@ -804,7 +819,7 @@
  // scale
  // Only works on 1d matrices
  
@@ -6170,7 +7597,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      {
          Mat_float scale;
  
-@@ -833,7 +833,7 @@
+@@ -833,7 +848,7 @@
  
          case TYPE_INT:
              for ( i = 0; i < matPtr->len; i++ )
@@ -6179,7 +7606,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
              break;
          }
          return TCL_OK;
-@@ -845,7 +845,7 @@
+@@ -845,7 +860,7 @@
          tclMatrixXtnsnDescr *p = head;
          for (; p; p = p->next )
          {
@@ -6188,7 +7615,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
              {
  #ifdef DEBUG
                  printf( "found a match, invoking %s\n", p->cmd );
-@@ -956,7 +956,7 @@
+@@ -956,7 +971,7 @@
  //--------------------------------------------------------------------------
  
  static void
@@ -6197,7 +7624,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
  {
      tclMatrix *matPtr = (tclMatrix *) clientData;
  
-@@ -974,20 +974,20 @@
+@@ -974,20 +989,20 @@
  }
  
  static void
@@ -6221,7 +7648,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
  {
      tclMatrix *matPtr = (tclMatrix *) clientData;
  
-@@ -1011,7 +1011,7 @@
+@@ -1011,7 +1026,7 @@
  
  static char *
  DeleteMatrixVar( ClientData clientData,
@@ -6232,7 +7659,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.c plplot-trunk/bind
      Tcl_CmdInfo infoPtr;
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.h plplot-trunk/bindings/tcl/tclMatrix.h
 --- plplot-5.9.9/bindings/tcl/tclMatrix.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tcl/tclMatrix.h	2012-01-04 08:45:32.251669220 -0700
++++ plplot-trunk/bindings/tcl/tclMatrix.h	2012-01-04 08:45:32.000000000 -0700
 @@ -1,5 +1,5 @@
  // -*-C++-*-
 -// $Id: tclMatrix.h 11295 2010-11-01 22:19:45Z airwin $
@@ -6251,7 +7678,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tcl/tclMatrix.h plplot-trunk/bind
  }
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/CMakeLists.txt plplot-trunk/bindings/tk/CMakeLists.txt
 --- plplot-5.9.9/bindings/tk/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/CMakeLists.txt	2011-11-30 09:19:44.465820531 -0700
++++ plplot-trunk/bindings/tk/CMakeLists.txt	2011-11-30 09:19:44.000000000 -0700
 @@ -103,7 +103,7 @@
    endif(BUILD_SHARED_LIBS)
  
@@ -6263,10 +7690,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/CMakeLists.txt plplot-trunk/bi
      get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH)
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plframe.c plplot-trunk/bindings/tk/plframe.c
 --- plplot-5.9.9/bindings/tk/plframe.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/plframe.c	2012-01-28 07:51:42.615826923 -0700
++++ plplot-trunk/bindings/tk/plframe.c	2012-12-14 08:51:04.764315434 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plframe.c 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: plframe.c 12128 2012-01-14 23:17:53Z airwin $
++// $Id: plframe.c 12210 2012-08-13 22:14:23Z andrewross $
  //
  //  Copyright 1993, 1994, 1995
  //  Maurice LeBrun			mjl at dino.ph.utexas.edu
@@ -6675,6 +8102,28 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plframe.c plplot-trunk/binding
          *p_changed      = 1;
      }
  
+@@ -1895,14 +1897,14 @@
+          ( pls->cmap1cp[i].l != l ) ||
+          ( pls->cmap1cp[i].s != s ) ||
+          ( pls->cmap1cp[i].p != p ) ||
+-         ( pls->cmap1cp[i].rev != reverse ) )
++         ( pls->cmap1cp[i].alt_hue_path != reverse ) )
+     {
+-        pls->cmap1cp[i].h   = h;
+-        pls->cmap1cp[i].l   = l;
+-        pls->cmap1cp[i].s   = s;
+-        pls->cmap1cp[i].p   = p;
+-        pls->cmap1cp[i].rev = reverse;
+-        *p_changed          = 1;
++        pls->cmap1cp[i].h            = h;
++        pls->cmap1cp[i].l            = l;
++        pls->cmap1cp[i].s            = s;
++        pls->cmap1cp[i].p            = p;
++        pls->cmap1cp[i].alt_hue_path = reverse;
++        *p_changed = 1;
+     }
+     return TCL_OK;
+ }
 @@ -1946,6 +1948,8 @@
          }
          fprintf( stderr, "\n" );
@@ -6730,6 +8179,15 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plframe.c plplot-trunk/binding
  
              sprintf( str, "#%06lx", ( plcolor & 0xFFFFFF ) );
              Tcl_AppendElement( interp, str );
+@@ -2019,7 +2023,7 @@
+             sprintf( str, "%02d", (int) ( 100 * pls->cmap1cp[i].p ) );
+             Tcl_AppendElement( interp, str );
+ 
+-            sprintf( str, "%01d", (int) ( pls->cmap1cp[i].rev ) );
++            sprintf( str, "%01d", (int) ( pls->cmap1cp[i].alt_hue_path ) );
+             Tcl_AppendElement( interp, str );
+         }
+         result = TCL_OK;
 @@ -2028,7 +2032,7 @@
  // scmap0 -- set color map 0
  // first arg is number of colors, the rest are hex number specifications
@@ -7096,10 +8554,10 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plframe.c plplot-trunk/binding
          totalUnits, windowUnits, firstUnit, lastUnit );
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plr.c plplot-trunk/bindings/tk/plr.c
 --- plplot-5.9.9/bindings/tk/plr.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/plr.c	2011-11-02 09:43:05.862052687 -0600
++++ plplot-trunk/bindings/tk/plr.c	2012-12-14 08:51:04.764315434 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plr.c 11682 2011-03-31 02:55:49Z airwin $
-+// $Id: plr.c 12008 2011-10-28 12:50:46Z andrewross $
++// $Id: plr.c 12210 2012-08-13 22:14:23Z andrewross $
  //
  //  Copyright 1993, 1994, 1995
  //  Maurice LeBrun
@@ -7213,9 +8671,24 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plr.c plplot-trunk/bindings/tk
  
          if ( icol0 == PL_RGB_COLOR )
          {
+@@ -501,10 +505,10 @@
+             plr_rd( pdf_rd_ieeef( plr->pdfs, &s ) );
+             plr_rd( pdf_rd_1byte( plr->pdfs, &rev ) );
+ 
+-            plsc->cmap1cp[i].h   = h;
+-            plsc->cmap1cp[i].l   = l;
+-            plsc->cmap1cp[i].s   = s;
+-            plsc->cmap1cp[i].rev = rev;
++            plsc->cmap1cp[i].h            = h;
++            plsc->cmap1cp[i].l            = l;
++            plsc->cmap1cp[i].s            = s;
++            plsc->cmap1cp[i].alt_hue_path = rev;
+         }
+         plP_state( PLSTATE_CMAP1 );
+         break;
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plserver.c plplot-trunk/bindings/tk/plserver.c
 --- plplot-5.9.9/bindings/tk/plserver.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/plserver.c	2012-01-28 07:51:42.611827050 -0700
++++ plplot-trunk/bindings/tk/plserver.c	2012-01-28 07:51:42.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plserver.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: plserver.c 12128 2012-01-14 23:17:53Z airwin $
@@ -7295,7 +8768,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plserver.c plplot-trunk/bindin
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plserver.h plplot-trunk/bindings/tk/plserver.h
 --- plplot-5.9.9/bindings/tk/plserver.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/plserver.h	2011-11-02 09:43:05.838053567 -0600
++++ plplot-trunk/bindings/tk/plserver.h	2011-11-02 09:43:05.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plserver.h 11656 2011-03-19 21:56:35Z airwin $
 +// $Id: plserver.h 12007 2011-10-28 12:02:58Z andrewross $
@@ -7312,7 +8785,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/plserver.h plplot-trunk/bindin
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/pltkd.h plplot-trunk/bindings/tk/pltkd.h
 --- plplot-5.9.9/bindings/tk/pltkd.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/pltkd.h	2011-11-02 09:43:05.840053493 -0600
++++ plplot-trunk/bindings/tk/pltkd.h	2011-11-02 09:43:05.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: pltkd.h 11295 2010-11-01 22:19:45Z airwin $
 +// $Id: pltkd.h 11975 2011-10-19 11:05:10Z andrewross $
@@ -7333,7 +8806,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/pltkd.h plplot-trunk/bindings/
      int          max_instr;             // Limit before issuing an update
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tcpip.c plplot-trunk/bindings/tk/tcpip.c
 --- plplot-5.9.9/bindings/tk/tcpip.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/tcpip.c	2011-11-02 09:43:05.865052578 -0600
++++ plplot-trunk/bindings/tk/tcpip.c	2011-11-02 09:43:05.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: tcpip.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: tcpip.c 11975 2011-10-19 11:05:10Z andrewross $
@@ -7635,7 +9108,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tcpip.c plplot-trunk/bindings/
  
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tcpip.h plplot-trunk/bindings/tk/tcpip.h
 --- plplot-5.9.9/bindings/tk/tcpip.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/tcpip.h	2011-11-02 09:43:05.875052211 -0600
++++ plplot-trunk/bindings/tk/tcpip.h	2011-11-02 09:43:05.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: tcpip.h 11295 2010-11-01 22:19:45Z airwin $
 +// $Id: tcpip.h 11975 2011-10-19 11:05:10Z andrewross $
@@ -7660,7 +9133,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tcpip.h plplot-trunk/bindings/
  #endif  // __TCPIP_H__
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tkMain.c plplot-trunk/bindings/tk/tkMain.c
 --- plplot-5.9.9/bindings/tk/tkMain.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/tkMain.c	2012-01-04 08:45:32.570657736 -0700
++++ plplot-trunk/bindings/tk/tkMain.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tkMain.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: tkMain.c 12084 2011-12-01 20:27:18Z andrewross $
@@ -7815,7 +9288,7 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tkMain.c plplot-trunk/bindings
      }
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tkshell.c plplot-trunk/bindings/tk/tkshell.c
 --- plplot-5.9.9/bindings/tk/tkshell.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk/tkshell.c	2012-01-04 08:45:32.567657844 -0700
++++ plplot-trunk/bindings/tk/tkshell.c	2012-01-04 08:45:32.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tkshell.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: tkshell.c 12084 2011-12-01 20:27:18Z andrewross $
@@ -7831,12 +9304,30 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk/tkshell.c plplot-trunk/binding
              break;
          }
          if ( result )
+diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/pkgIndex.tcl.in plplot-trunk/bindings/tk-x-plat/pkgIndex.tcl.in
+--- plplot-5.9.9/bindings/tk-x-plat/pkgIndex.tcl.in	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/tk-x-plat/pkgIndex.tcl.in	2012-12-14 08:51:01.739332759 -0700
+@@ -1,4 +1,4 @@
+-# $Id: pkgIndex.tcl.in 11680 2011-03-27 17:57:51Z airwin $
++# $Id: pkgIndex.tcl.in 12223 2012-08-23 18:44:52Z airwin $
+ 
+ # Load PLplot tkwin extension
+ 
+@@ -38,7 +38,7 @@
+ 	set buildDir "@BUILD_DIR@"
+ 	set bLen [string length $buildDir]
+ 	if {![string compare -length $bLen $buildDir $thisDir]}	then {
+-		set searchdirs "../../drivers/.libs"} else {
++		set searchdirs "../../drivers"} else {
+ 		set searchdirs [list "@DRV_HARDDIR@"]}
+ 	#puts $searchdirs
+ 	set suf [info sharedlibextension]
 diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/plplotter.c plplot-trunk/bindings/tk-x-plat/plplotter.c
 --- plplot-5.9.9/bindings/tk-x-plat/plplotter.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/tk-x-plat/plplotter.c	2012-01-04 08:45:31.797685563 -0700
++++ plplot-trunk/bindings/tk-x-plat/plplotter.c	2012-12-14 08:51:01.740332752 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plplotter.c 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: plplotter.c 12084 2011-12-01 20:27:18Z andrewross $
++// $Id: plplotter.c 12210 2012-08-13 22:14:23Z andrewross $
  // Copyright (C) 2004  Joao Cardoso
  //
  // This file is part of PLplot.
@@ -8151,6 +9642,28 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/plplotter.c plplot-trun
          *p_changed      = 1;
      }
  
+@@ -1692,14 +1692,14 @@
+          ( pls->cmap1cp[i].l != l ) ||
+          ( pls->cmap1cp[i].s != s ) ||
+          ( pls->cmap1cp[i].p != p ) ||
+-         ( pls->cmap1cp[i].rev != reverse ) )
++         ( pls->cmap1cp[i].alt_hue_path != reverse ) )
+     {
+-        pls->cmap1cp[i].h   = h;
+-        pls->cmap1cp[i].l   = l;
+-        pls->cmap1cp[i].s   = s;
+-        pls->cmap1cp[i].p   = p;
+-        pls->cmap1cp[i].rev = reverse;
+-        *p_changed          = 1;
++        pls->cmap1cp[i].h            = h;
++        pls->cmap1cp[i].l            = l;
++        pls->cmap1cp[i].s            = s;
++        pls->cmap1cp[i].p            = p;
++        pls->cmap1cp[i].alt_hue_path = reverse;
++        *p_changed = 1;
+     }
+     return TCL_OK;
+ }
 @@ -1721,6 +1721,7 @@
      char     c3;
      int      result    = TCL_OK;
@@ -8205,6 +9718,15 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/plplotter.c plplot-trun
  
              sprintf( str, "#%06lx", ( plcolor & 0xFFFFFF ) );
              Tcl_AppendElement( interp, str );
+@@ -1811,7 +1812,7 @@
+             sprintf( str, "%02d", (int) ( 100 * pls->cmap1cp[i].p ) );
+             Tcl_AppendElement( interp, str );
+ 
+-            sprintf( str, "%01d", (int) ( pls->cmap1cp[i].rev ) );
++            sprintf( str, "%01d", (int) ( pls->cmap1cp[i].alt_hue_path ) );
+             Tcl_AppendElement( interp, str );
+         }
+         result = TCL_OK;
 @@ -1820,7 +1821,7 @@
  // plscmap0 -- set color map 0
  // first arg is number of colors, the rest are hex number specifications
@@ -8589,9 +10111,27 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/plplotter.c plplot-trun
      return TCL_ERROR;
  }
  
+diff -ruN --exclude .svn plplot-5.9.9/bindings/tk-x-plat/Plplotter_Init.c plplot-trunk/bindings/tk-x-plat/Plplotter_Init.c
+--- plplot-5.9.9/bindings/tk-x-plat/Plplotter_Init.c	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/bindings/tk-x-plat/Plplotter_Init.c	2012-12-14 08:51:01.740332752 -0700
+@@ -1,4 +1,4 @@
+-// $Id: Plplotter_Init.c 11760 2011-06-01 19:29:11Z airwin $
++// $Id: Plplotter_Init.c 12222 2012-08-23 18:40:38Z airwin $
+ //
+ // Copyright (C) 2004  Joao Cardoso
+ //
+@@ -52,7 +52,7 @@
+ // the Plbasicinit function called from here.
+ //--------------------------------------------------------------------------
+ 
+-EXTERN int
++PLDLLIMPEXP_DRIVER EXTERN int
+ Plplotter_Init( Tcl_Interp *interp )
+ {
+ #ifdef USE_TCL_STUBS
 diff -ruN --exclude .svn plplot-5.9.9/bindings/wxwidgets/CMakeLists.txt plplot-trunk/bindings/wxwidgets/CMakeLists.txt
 --- plplot-5.9.9/bindings/wxwidgets/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/bindings/wxwidgets/CMakeLists.txt	2011-11-30 09:19:44.290826819 -0700
++++ plplot-trunk/bindings/wxwidgets/CMakeLists.txt	2011-11-30 09:19:44.000000000 -0700
 @@ -49,6 +49,17 @@
    # Create plplotwxwidgets[d] library
    add_library(plplotwxwidgets${LIB_TAG} ${plplotwxwidgets${LIB_TAG}_LIB_SRCS})
@@ -8620,9 +10160,591 @@ diff -ruN --exclude .svn plplot-5.9.9/bindings/wxwidgets/CMakeLists.txt plplot-t
      set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}")
      set(PC_CONFIGURED_FILE
        ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc
+diff -ruN --exclude .svn plplot-5.9.9/cmake/external/ndiff/CMakeLists.txt plplot-trunk/cmake/external/ndiff/CMakeLists.txt
+--- plplot-5.9.9/cmake/external/ndiff/CMakeLists.txt	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/external/ndiff/CMakeLists.txt	2012-12-14 08:50:52.102391296 -0700
+@@ -0,0 +1,206 @@
++# Top-level CMakeLists.txt file to help (along with config.h.cmake) to
++# implement a complete CMake-based build system for ndiff.
++
++project(ndiff C)
++cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
++
++# Set paths for installation
++set(
++  CMAKE_INSTALL_EXEC_PREFIX
++  ${CMAKE_INSTALL_PREFIX}
++  CACHE PATH "install location for architecture-dependent files"
++  )
++
++set(
++  CMAKE_INSTALL_BINDIR
++  ${CMAKE_INSTALL_EXEC_PREFIX}/bin
++  CACHE PATH "install location for user executables"
++  )
++
++set(
++  CMAKE_INSTALL_DATADIR
++  ${CMAKE_INSTALL_PREFIX}/share
++  CACHE PATH "install location for read-only architecture-independent data"
++  )
++
++set(
++  CMAKE_INSTALL_MANDIR
++  ${CMAKE_INSTALL_DATADIR}/man
++  CACHE PATH "install location for man documentation"
++  )
++
++# Configure everything in config.h which must have
++# specific values of 1 or 0
++
++set(HAVE_LONG_DOUBLE 0)
++find_file(HAVE_CTYPE_H ctype.h)
++if(HAVE_CTYPE_H)
++  set(HAVE_CTYPE_H 1)
++else(HAVE_CTYPE_H)
++  set(HAVE_CTYPE_H 0)
++endif(HAVE_CTYPE_H)
++
++find_file(HAVE_LIMITS_H limits.h)
++if(HAVE_LIMITS_H)
++  set(HAVE_LIMITS_H 1)
++else(HAVE_LIMITS_H)
++  set(HAVE_LIMITS_H 0)
++endif(HAVE_LIMITS_H)
++
++find_file(HAVE_STDDEF_H stddef.h)
++if(HAVE_STDDEF_H)
++  set(HAVE_STDDEF_H 1)
++else(HAVE_STDDEF_H)
++  set(HAVE_STDDEF_H 0)
++endif(HAVE_STDDEF_H)
++
++find_file(HAVE_STDIO_H stdio.h)
++if(HAVE_STDIO_H)
++  set(HAVE_STDIO_H 1)
++else(HAVE_STDIO_H)
++  set(HAVE_STDIO_H 0)
++endif(HAVE_STDIO_H)
++
++find_file(HAVE_STDLIB_H stdlib.h)
++if(HAVE_STDLIB_H)
++  set(HAVE_STDLIB_H 1)
++else(HAVE_STDLIB_H)
++  set(HAVE_STDLIB_H 0)
++endif(HAVE_STDLIB_H)
++
++find_file(HAVE_STRING_H string.h)
++if(HAVE_STRING_H)
++  set(HAVE_STRING_H 1)
++else(HAVE_STRING_H)
++  set(HAVE_STRING_H 0)
++endif(HAVE_STRING_H)
++
++# Code uses HAVE_GMP rather than the expected HAVE_GMP_H
++find_file(HAVE_GMP gmp.h)
++if(HAVE_GMP)
++  set(HAVE_GMP 1)
++else(HAVE_GMP)
++  set(HAVE_GMP 0)
++endif(HAVE_GMP)
++
++configure_file(
++  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
++  ${CMAKE_CURRENT_BINARY_DIR}/config.h
++  @ONLY
++  )
++
++if(HAVE_GMP)
++  set(ndiff_LINK_LIBRARIES
++    ${ndiff_LINK_LIBRARIES}
++    gmp
++    )
++endif(HAVE_GMP)
++
++# Build the ndiff executable:
++include_directories(
++  ${CMAKE_CURRENT_SOURCE_DIR}
++  ${CMAKE_CURRENT_BINARY_DIR}
++  )
++
++set(ndiff_SRC
++  ndiff.c 
++  store.c 
++  awklib.c
++  regexp/regexp.c
++  regexp/regerror.c
++  )
++
++add_executable(ndiff ${ndiff_SRC}) 
++
++target_link_libraries(
++  ndiff
++  ${ndiff_LINK_LIBRARIES}
++  )
++
++install(TARGETS ndiff DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(FILES ndiff.man DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ndiff.1)
++
++# Implement test system.
++find_program(BASH_EXECUTABLE bash)
++find_program(CAT_EXECUTABLE cat)
++find_program(CMP_EXECUTABLE cmp)
++find_program(DIFF_EXECUTABLE diff)
++if(BASH_EXECUTABLE AND CAT_EXECUTABLE AND CMP_EXECUTABLE AND DIFF_EXECUTABLE)
++  set(BUILD_TEST ON)
++else(BASH_EXECUTABLE AND CAT_EXECUTABLE AND CMP_EXECUTABLE AND DIFF_EXECUTABLE)
++  message(STATUS "WARNING: bash, cat, cmp, or diff not available so disabling testing")
++  set(BUILD_TEST OFF CACHE BOOL "Enable testing" FORCE)
++endif(BASH_EXECUTABLE AND CAT_EXECUTABLE AND CMP_EXECUTABLE AND DIFF_EXECUTABLE)
++
++if(BUILD_TEST)
++  if(WIN32)
++    find_program(TR_EXECUTABLE tr)
++    find_program(SED_EXECUTABLE sed)
++    if(TR_EXECUTABLE AND SED_EXECUTABLE)
++      set(FILTER "| ${TR_EXECUTABLE} -d $'\\r' | sed -e's?\\([0-9]e[+-]*\\)0\\([0-9][0-9]\\)?\\1\\2?'")
++      #message(STATUS "DEBUG: FILTER = ${FILTER}")
++    else(TR_EXECUTABLE AND SED_EXECUTABLE)
++      message(STATUS "WARNING: tr or sed not available so disabling testing on a Windows platform")
++      set(BUILD_TEST OFF CACHE BOOL "Enable testing" FORCE)
++    endif(TR_EXECUTABLE AND SED_EXECUTABLE)
++  else(WIN32)
++    set(FILTER)
++  endif(WIN32)
++endif(BUILD_TEST)
++
++if(BUILD_TEST)
++  enable_testing()
++  set(check_LIST)
++  foreach(index RANGE 1 26)
++    if(index LESS "10")
++      list(APPEND check_LIST "check00${index}")
++    else(index LESS "10")
++      list(APPEND check_LIST "check0${index}")
++    endif(index LESS "10")
++  endforeach(index RANGE 1 26)
++  #message(STATUS "DEBUG: check_LIST = ${check_LIST}")
++
++  set(TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test)
++  if(HAVE_GMP)
++    message(STATUS "Configuring tests using gmp precision")
++    set(CHECK_DIR ${TEST_DIR}/okay-gmp)
++  elseif(HAVE_LONG_DOUBLE)
++    message(STATUS 
++      "Configuring tests using long double precision. For this case, many tests\n   will fail on platforms where long double corresponds to 80-bit (rather than\n   128-bit) floating point."
++      )
++    set(CHECK_DIR ${TEST_DIR}/okay-ldb)
++  else(HAVE_GMP)
++    message(STATUS "Configuring tests using double precision")
++    set(CHECK_DIR ${TEST_DIR}/okay-dbl)
++  endif(HAVE_GMP)
++
++  file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test_area)
++
++  get_target_property(ndiff_LOC ndiff LOCATION)
++  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_area/ndiff_check.sh
++    "${ndiff_LOC} --quick --logfile \$1.err --outfile \$1.out \$(${CAT_EXECUTABLE} ${TEST_DIR}/\$1.opt) ${TEST_DIR}/\$1.in1 ${TEST_DIR}/\$1.in2\n"
++    )
++  file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/test_area/ndiff_check.sh
++# Use diff instead of cmp to give more details about the differences.
++#    "${CAT_EXECUTABLE} < \$1.err ${FILTER} | ${CMP_EXECUTABLE} -s - ${CHECK_DIR}/\$1.err && ${CAT_EXECUTABLE} < \$1.out ${FILTER} | ${CMP_EXECUTABLE} -s - ${CHECK_DIR}/\$1.out\n"
++    "${CAT_EXECUTABLE} < \$1.err ${FILTER} | ${DIFF_EXECUTABLE} - ${CHECK_DIR}/\$1.err && ${CAT_EXECUTABLE} < \$1.out ${FILTER} | ${DIFF_EXECUTABLE} - ${CHECK_DIR}/\$1.out\n"
++    )
++
++  foreach(check ${check_LIST})
++    add_test(
++      NAME ${check}
++      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test_area
++      COMMAND ${BASH_EXECUTABLE} ndiff_check.sh ${check}
++      )
++  endforeach(check ${check_LIST})
++
++  # N.B. AWI briefly considered testing ndiff.awk as well, but that is
++  # not done in the original build system.  Furthermore, it would take
++  # considerable effort to translate from the C version option list to
++  # the form of option list acceptable to awk and ndiff.awk. But the
++  # dealbreaker is the C version has some extra options (such as
++  # -author, -copyright, -copyleft, -www) which the awk version
++  # doesn't know about so the first 6 tests and the 26th test that
++  # test these "extra" options would fail unless you faked it.
++
++endif(BUILD_TEST)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/external/ndiff/config.h.cmake plplot-trunk/cmake/external/ndiff/config.h.cmake
+--- plplot-5.9.9/cmake/external/ndiff/config.h.cmake	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/external/ndiff/config.h.cmake	2012-12-14 08:50:52.102391296 -0700
+@@ -0,0 +1,38 @@
++// These macros must be set to these specific values in order to
++// pass all tests for ndiff-2.0.0.
++#define VERSION "2.00"
++#define DATE "10-Dec-2000"
++
++// Note that ndiff code uses #if style rather than #ifdef style to
++// test the macros below which therefore must be #defined
++// to be either true or false.
++
++// Define if the `long double' type works.
++#define HAVE_LONG_DOUBLE @HAVE_LONG_DOUBLE@
++
++// Define to `unsigned' if <sys/types.h> doesn't define.
++// #define size_t
++
++// Define if you have the ANSI C header files.
++//#define STDC_HEADERS @STDC_HEADERS@
++
++// Define if you have the <ctype.h> header file.
++#define HAVE_CTYPE_H @HAVE_CTYPE_H@
++
++// Define if you have the <limits.h> header file.
++#define HAVE_LIMITS_H @HAVE_LIMITS_H@
++
++// Define if you have the <stddef.h> header file.
++#define HAVE_STDDEF_H @HAVE_STDDEF_H@
++
++// Define if you have the <stdio.h> header file.
++#define HAVE_STDIO_H @HAVE_STDIO_H@
++
++// Define if you have the <stdlib.h> header file.
++#define HAVE_STDLIB_H @HAVE_STDLIB_H@
++
++// Define if you have the <string.h> header file.
++#define HAVE_STRING_H @HAVE_STRING_H@
++
++// Define if have the <gmp.h> header file.
++#define HAVE_GMP @HAVE_GMP@
+diff -ruN --exclude .svn plplot-5.9.9/cmake/external/ndiff/README.ndiff plplot-trunk/cmake/external/ndiff/README.ndiff
+--- plplot-5.9.9/cmake/external/ndiff/README.ndiff	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/external/ndiff/README.ndiff	2012-12-14 08:50:52.101391301 -0700
+@@ -0,0 +1,46 @@
++The ndiff application is a useful fuzzy diff that can be used to
++analyze, for example, the most significant differences between the C
++and Python PostScript results without having those important
++differences obscured by minor numerical differences.
++
++ndiff was last released in 2000, and its build system is beginning to
++show the signs of bit-rot.  For example, building from a separate
++build tree does not work, and you must create _all_ the required
++subdirectories of the install tree using repeated runs of mkdir before
++"make install" will work.
++
++AWI got tired of dealing with those issues so he implemented (with
++help from Andrew Ross) a comprehensive CMake-based build system for
++ndiff consisting of the two other files in this directory whose names
++are CMakeLists.txt and config.h.cmake.
++
++Here is the recommended way to use the ndiff build and test system
++that is implemented with these files:
++
++download, verify, and signature check
++the last (2000) release of ndiff using
++
++wget ftp://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz
++wget ftp://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz.sig
++gpg --verify ndiff-2.00.tar.gz.sig
++
++Copy CMakeLists.txt and config.h.cmake into the top
++of the ndiff-2.0.0 source tree then build, test, and install ndiff using
++
++mkdir build_dir
++cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
++../ndiff-2.0.0
++make
++make test
++make install
++
++where $INSTALL_PREFIX stands for the top-level directory of
++the install tree that the user decides to use, e.g., /usr/local/ndiff.
++
++Note AWI has recently been in touch with the ndiff author, and he
++has absolutely no use for CMake because it is difficult to debug (!)
++the resulting Makefiles.  So this CMake-based build system will likely
++always be external to the ndiff project.  Nevertheless, ndiff is
++extremely useful to PLplot developers who are all fairly expert with
++CMake so this new build system should save some time and effort for
++PLplot developers.
+diff -ruN --exclude .svn plplot-5.9.9/cmake/external/shapelib/CMakeLists.txt plplot-trunk/cmake/external/shapelib/CMakeLists.txt
+--- plplot-5.9.9/cmake/external/shapelib/CMakeLists.txt	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/external/shapelib/CMakeLists.txt	2012-12-14 08:50:52.107391251 -0700
+@@ -0,0 +1,218 @@
++# Top-level CMakeLists.txt for the CMake-based build and test system
++# of the shapelib software.
++
++# Copyright (C) 2012 Alan W. Irwin
++
++# This file is free software; you can redistribute it and/or modify
++# it under the terms of the GNU Library General Public License as published
++# by the Free Software Foundation; version 2 of the License.
++#
++# This file is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU Library General Public License for more details.
++#
++# You should have received a copy of the GNU Library General Public License
++# along with this file; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
++
++# It is a fatal error if no working C compiler is available to build
++# the shapelib library and utilities
++project(shapelib C)
++
++message(STATUS "CMake version = ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
++
++# Version 2.8.5 or above of cmake is currently required for all platforms.
++cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
++
++# libraries are all shared by default.
++option(BUILD_SHARED_LIBS "Build shared libraries" ON)
++
++# Use rpath?
++if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++  # No rpath on Darwin. Setting it will only cause trouble.
++else(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++  option(USE_RPATH "Use -rpath when linking libraries, executables" ON)
++endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++
++# In windows all created dlls are gathered in the dll directory
++# if you add this directory to your PATH all shared libraries are available
++if(BUILD_SHARED_LIBS AND WIN32 AND NOT CYGWIN)
++  set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dll)
++endif(BUILD_SHARED_LIBS AND WIN32 AND NOT CYGWIN)
++
++set(PACKAGE shp)
++
++# Set up install locations.
++set(
++  CMAKE_INSTALL_BINDIR
++  ${CMAKE_INSTALL_PREFIX}/bin
++  CACHE PATH "install location for user executables"
++  )
++
++set(
++  CMAKE_INSTALL_LIBDIR
++  ${CMAKE_INSTALL_PREFIX}/lib
++  CACHE PATH "install location for object code libraries"
++  )
++
++set(
++  CMAKE_INSTALL_INCLUDEDIR
++  ${CMAKE_INSTALL_PREFIX}/include
++  CACHE PATH "install location for C header files"
++  )
++
++set(
++  CMAKE_INSTALL_SHP_DATADIR
++  ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE}
++  CACHE PATH "install location for read-only architecture-independent shp data"
++  )
++
++# Export build information to help other projects link installed
++# shapelib software.  Only one of these signatures is required
++# for the export_shp name.
++install(EXPORT export_shp DESTINATION ${CMAKE_INSTALL_SHP_DATADIR})
++
++# Initial boilerplate done, now build library and executables.
++
++set(lib_SRC
++  shpopen.c
++  dbfopen.c
++  safileio.c
++  shptree.c
++  )
++
++add_library(shp ${lib_SRC})
++
++if(WIN32)
++  set_target_properties(shp
++    PROPERTIES
++    COMPILE_DEFINITIONS SHAPELIB_DLLEXPORT
++    )
++endif(WIN32)
++
++set(shp_SOVERSION 1)
++set(shp_VERSION ${shp_SOVERSION}.0.1)
++set_target_properties(shp
++  PROPERTIES 
++  SOVERSION ${shp_SOVERSION}
++  VERSION ${shp_VERSION}
++  INSTALL_NAME_DIR "${CMAKE_INSTALL_LIBDIR}"
++  )
++
++if(USE_RPATH)
++  set_target_properties(shp
++    PROPERTIES 
++    INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
++    )
++endif(USE_RPATH)
++
++install(TARGETS shp
++  EXPORT export_shp
++  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++  )
++
++# executables to be built and installed.
++set(executables
++  shpcreate
++  shpadd
++  shpdump
++  shprewind 
++  dbfcreate
++  dbfadd
++  dbfdump
++  shptreedump
++  )
++
++find_program(BASH_EXECUTABLE bash)
++find_program(SED_EXECUTABLE sed)
++if(BASH_EXECUTABLE AND SED_EXECUTABLE)
++  set(BUILD_TEST ON)
++else(BASH_EXECUTABLE AND SED_EXECUTABLE)
++  message(STATUS "WARNING: sed or bash not available so disabling testing")
++endif(BASH_EXECUTABLE AND SED_EXECUTABLE)
++
++# For the first series of tests, the user needs to have downloaded
++# from http://dl.maptools.org/dl/shapelib/shape_eg_data.zip, unpacked
++# that file, and specified the location of that directory with
++# the cmake option, -DEG_DATA:PATH=whatever
++if(BUILD_TEST)
++  if(EG_DATA)
++    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/script.sed "s?/u/www/projects/shapelib/eg_data?${EG_DATA}?\n")
++  else(EG_DATA)
++    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/script.sed "")
++    message(STATUS "WARNING: EG_DATA:PATH not set to point to downloaded eg_data directory so the eg_data part of testing will be ignored.")
++  endif(EG_DATA)
++endif(BUILD_TEST)
++
++foreach(executable ${executables})
++  add_executable(${executable} ${executable}.c)
++  target_link_libraries(${executable} shp)
++  if(USE_RPATH)
++    set_target_properties(${executable}
++      PROPERTIES
++      INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
++      )
++  endif(USE_RPATH)
++  if(BUILD_TEST)
++    get_target_property(${executable}_LOC ${executable} LOCATION)
++    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/script.sed "s?\\./${executable}?${${executable}_LOC}?\n")
++  endif(BUILD_TEST)
++  install(TARGETS ${executable} DESTINATION ${CMAKE_INSTALL_BINDIR})
++endforeach(executable ${executables})
++
++# Install header
++install(FILES shapefil.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++
++if(BUILD_TEST)
++  # Set up tests:
++
++  enable_testing()
++
++  # Other executables to be built to facilitate tests.
++  foreach(executable shptest shputils)
++    add_executable(${executable} ${executable}.c)
++    target_link_libraries(${executable} shp)
++    get_target_property(${executable}_LOC ${executable} LOCATION)
++    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/script.sed "s?\\./${executable}?${${executable}_LOC}?\n")
++  endforeach(executable shptest shputils)
++
++  # Write this as a shell script since execute_process cannot handle
++  # anything like redirection.
++  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/script.sh "${SED_EXECUTABLE} -f script.sed < $1 >| $2")
++  execute_process(
++    COMMAND
++    ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/script.sh ${CMAKE_CURRENT_SOURCE_DIR}/stream1.sh ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_stream1.sh
++    )
++
++  execute_process(
++    COMMAND
++    ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/script.sh ${CMAKE_CURRENT_SOURCE_DIR}/stream2.sh ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_stream2.sh
++    )
++
++  execute_process(
++    COMMAND
++    ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/script.sh ${CMAKE_CURRENT_SOURCE_DIR}/makeshape.sh ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_makeshape.sh
++    )
++
++  if(EG_DATA)
++    # These tests correspond to everything in stream1.sh
++    add_test(
++      NAME stream1
++      COMMAND ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_stream1.sh
++      )
++  endif(EG_DATA)
++  # These tests correspond to everything in stream1.sh
++  add_test(
++    NAME stream2
++    COMMAND ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_stream2.sh
++    )
++
++  # These tests correspond to everything in makeshape.sh
++  add_test(
++    NAME makeshape
++    COMMAND ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/sed_scripted_makeshape.sh
++    )
++endif(BUILD_TEST)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/external/shapelib/README plplot-trunk/cmake/external/shapelib/README
+--- plplot-5.9.9/cmake/external/shapelib/README	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/external/shapelib/README	2012-12-14 08:50:52.108391252 -0700
+@@ -0,0 +1,54 @@
++The CMakeLists.txt file in the current directory is a complete build
++system for shapelib which does everything that the shapelib Makefile
++does and Linux and the shapelib makefile.vc file does on Windows with
++a lot more flexibility.  For example, full testing can be done with
++the present CMake-based approach because an optional and configurable
++location is used for the downloadable (for example, wget
++http://dl.maptools.org/dl/shapelib/shape_eg_data.zip) eg_data tree
++that is used for all the "stream1" tests.
++
++To use this build system on Unix or MinGW/MSYS/Windows:
++
++(1) (Optional) Download eg_data from the location above.
++
++(2) Download shapelib-1.3.0.tar.gz from http://download.osgeo.org/shapelib
++and unpack it
++
++(3) Copy the CMakeLists.txt file into the top-level of the unpacked
++shapelib-1.3.0 source tree.
++
++(4) Create a separate empty build tree and use it to configure, build,
++install and test shapelib.  For example (you will need to tailor the
++install prefix, eg_data location, and source tree location to your own
++needs):
++
++mkdir build_dir
++cd build_dir
++
++# Configure
++cmake \
++-G "Unix Makefiles" \
++-DCMAKE_INSTALL_PREFIX=/home/software/shapelib/install \
++-DEG_DATA:PATH=/home/software/shapefile/eg_data/ \
++../shapelib-1.3.0 >& cmake.out
++
++# Build and install
++make install >& install.out
++
++# Test
++ctest
++
++The -DEG_DATA:PATH option is optional, but if you don't specify
++the eg_data directory that way the stream1 tests will be dropped.
++
++Note the above procedure is what you should do on a Unix platform like
++Linux where the generator -G "Unix Makefiles" works well.  On
++MINGW/MSYS the procedure is essentially the same except you should use
++the -G "MSYS Makefiles" cmake option instead to specify a good generator
++for that platform.
++
++I have used variants of the above procedure to create, test, and
++install shapelib on both the Linux and MinGW/MSYS/Wine platforms.
++Furthermore, on both platforms I have built and tested PLplot using
++the installed versions created by the above procedure.  No issues were
++discovered with example 19 for these two separate platform tests.
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/ada.cmake plplot-trunk/cmake/modules/ada.cmake
 --- plplot-5.9.9/cmake/modules/ada.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/ada.cmake	2012-06-08 08:56:03.844746223 -0600
++++ plplot-trunk/cmake/modules/ada.cmake	2012-12-14 08:50:51.694393517 -0700
 @@ -43,7 +43,12 @@
  endif(ENABLE_ada)
  
@@ -8630,7 +10752,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/ada.cmake plplot-trunk/cmake
 -  find_library(GNAT_LIB NAMES gnat gnat-4.5 gnat-4.4 gnat-4.3 gnat-4.2 gnat-4.1)
 +  # Find the gnat version used in order to search for the right version of libgnat 
 +  execute_process(COMMAND ${CMAKE_Ada_COMPILER} --version OUTPUT_VARIABLE ADA_OUTPUT)
-+  string(REGEX MATCH "gcc [(][^)]*[)] ([0-9]*[.][0-9]*)[.][0-9]" ADA_OUTPUT_TRIM ${ADA_OUTPUT})
++  string(REGEX MATCH "gcc.* [(][^)]*[)] ([0-9]*[.][0-9]*)[.][0-9]" ADA_OUTPUT_TRIM ${ADA_OUTPUT})
 +  set(GNATVERSION ${CMAKE_MATCH_1})
 +  message(STATUS "gnat version = ${GNATVERSION}")
 +  find_library(GNAT_LIB NAMES gnat gnat-${GNATVERSION})
@@ -8639,8 +10761,16 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/ada.cmake plplot-trunk/cmake
        "gnat library not found. Disabling ada bindings")
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cmake/modules/cairo.cmake
 --- plplot-5.9.9/cmake/modules/cairo.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/cairo.cmake	2011-11-28 16:54:34.710498927 -0700
-@@ -49,19 +49,19 @@
++++ plplot-trunk/cmake/modules/cairo.cmake	2012-12-14 08:50:51.695393512 -0700
+@@ -27,6 +27,7 @@
+ # PLD_pdfcairo		  - ON means the pdfcairo device is enabled.
+ # PLD_pngcairo		  - ON means the pngcairo device is enabled.
+ # PLD_pscairo		  - ON means the pscairo device is enabled.
++# PLD_epscairo		  - ON means the epscairo device is enabled.
+ # PLD_svgcairo		  - ON means the svgcairo device is enabled.
+ # PLD_xcairo		  - ON means the xcairo device is enabled.
+ # PLD_wincairo            - ON means the wincairo device is enabled.
+@@ -49,58 +50,62 @@
  
  # Look for cairo headers and libraries with pkg-config
  if(
@@ -8657,6 +10787,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
 +    OR PLD_pdfcairo
 +    OR PLD_pngcairo
 +    OR PLD_pscairo
++    OR PLD_epscairo
 +    OR PLD_svgcairo 
 +    OR PLD_xcairo
 +    OR PLD_extcairo
@@ -8671,7 +10802,11 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
      set(PLD_memcairo OFF CACHE BOOL "Enable memcairo device" FORCE)
      set(PLD_pdfcairo OFF CACHE BOOL "Enable pdfcairo device" FORCE)
      set(PLD_pngcairo OFF CACHE BOOL "Enable pngcairo device" FORCE)
-@@ -72,35 +72,35 @@
+     set(PLD_pscairo OFF CACHE BOOL "Enable pscairo device" FORCE)
++    set(PLD_epscairo OFF CACHE BOOL "Enable epscairo device" FORCE)
+     set(PLD_svgcairo OFF CACHE BOOL "Enable svgcairo device" FORCE)
+     set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
+     set(PLD_extcairo OFF CACHE BOOL "Enable extcairo device" FORCE)
      set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
    endif(NOT PKG_CONFIG_EXECUTABLE)
  endif(
@@ -8688,6 +10823,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
 +  OR PLD_pdfcairo
 +  OR PLD_pngcairo
 +  OR PLD_pscairo
++  OR PLD_epscairo
 +  OR PLD_svgcairo 
 +  OR PLD_xcairo
 +  OR PLD_extcairo
@@ -8708,6 +10844,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
 +    OR PLD_pdfcairo
 +    OR PLD_pngcairo
 +    OR PLD_pscairo
++    OR PLD_epscairo
 +    OR PLD_svgcairo 
 +    OR PLD_xcairo
 +    OR PLD_extcairo
@@ -8733,7 +10870,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
    if(linkflags)
      # Check that the pangocairo library version is recent 
      # enough to efficiently handle text clipping.
-@@ -115,13 +115,13 @@
+@@ -115,13 +120,13 @@
      if(PLD_xcairo AND X11_COMPILE_FLAGS)
        # Blank-delimited required.
        string(REGEX REPLACE ";" " " 
@@ -8751,7 +10888,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
        # Blank-delimited required.
        set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
        # now deal with remaining cairo devices.
-@@ -139,11 +139,11 @@
+@@ -139,30 +144,32 @@
      message("linkflags = ${linkflags}")
      message("cflags = ${cflags}")
      message(STATUS
@@ -8768,7 +10905,11 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
      set(PLD_memcairo OFF CACHE BOOL "Enable memcairo device" FORCE)
      set(PLD_pdfcairo OFF CACHE BOOL "Enable pdfcairo device" FORCE)
      set(PLD_pngcairo OFF CACHE BOOL "Enable pngcairo device" FORCE)
-@@ -154,15 +154,15 @@
+     set(PLD_pscairo OFF CACHE BOOL "Enable pscairo device" FORCE)
++    set(PLD_epscairo OFF CACHE BOOL "Enable epscairo device" FORCE)
+     set(PLD_svgcairo OFF CACHE BOOL "Enable svgcairo device" FORCE)
+     set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
+     set(PLD_extcairo OFF CACHE BOOL "Enable extcairo device" FORCE)
      set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
    endif(linkflags)
  endif(
@@ -8785,6 +10926,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
 +  OR PLD_pdfcairo
 +  OR PLD_pngcairo
 +  OR PLD_pscairo
++  OR PLD_epscairo
 +  OR PLD_svgcairo 
 +  OR PLD_xcairo
 +  OR PLD_extcairo
@@ -8795,7 +10937,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/cairo.cmake plplot-trunk/cma
    set(extXdrawable_true "#")
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/d.cmake plplot-trunk/cmake/modules/d.cmake
 --- plplot-5.9.9/cmake/modules/d.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/d.cmake	2011-11-28 16:54:34.708499004 -0700
++++ plplot-trunk/cmake/modules/d.cmake	2011-11-28 16:54:34.000000000 -0700
 @@ -46,3 +46,10 @@
    endif(NOT CMAKE_D_COMPILER_WORKS)
  endif(ENABLE_d)
@@ -8807,23 +10949,71 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/d.cmake plplot-trunk/cmake/m
 +  option(plplotdmd_SHARED "Treat libplplotdmd as a shared library" OFF)
 +endif(ENABLE_d)
 +  
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/docbook.cmake plplot-trunk/cmake/modules/docbook.cmake
+--- plplot-5.9.9/cmake/modules/docbook.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/docbook.cmake	2012-12-14 08:50:51.693393523 -0700
+@@ -74,10 +74,6 @@
+     set(EC_PDFTEX ec)
+   endif(EC_ENC_NAME)
+     
+-  if(PERL_FOUND)
+-    check_perl_modules(PERL_XML_PARSER XML::Parser)
+-    check_perl_modules(PERL_XML_DOM XML::DOM)
+-  endif(PERL_FOUND)
+   find_program(DB2X_TEXIXML db2x_texixml)
+   if(NOT DB2X_TEXIXML)
+     message(STATUS "WARNING: db2x_texixml not found")
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/drivers-init.cmake plplot-trunk/cmake/modules/drivers-init.cmake
 --- plplot-5.9.9/cmake/modules/drivers-init.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/drivers-init.cmake	2012-01-04 08:45:30.207742799 -0700
-@@ -260,4 +260,10 @@
++++ plplot-trunk/cmake/modules/drivers-init.cmake	2012-12-14 08:50:51.492394569 -0700
+@@ -132,6 +132,7 @@
+   "pdfcairo:cairo:ON:F:OFF"
+   "pngcairo:cairo:ON:F:ON"
+   "pscairo:cairo:ON:F:OFF"
++  "epscairo:cairo:ON:F:ON"
+   "svgcairo:cairo:ON:F:ON"
+   "xcairo:cairo:ON:I:OFF"
+   "wincairo:cairo:ON:I:OFF"
+@@ -228,6 +229,9 @@
+   "xwin:xwin:ON:I:OFF"
+   )
+ 
++# PRESET_DEFAULT keeps track of whether the DEFAULT value has been
++# preset.
++
+ if(DEFAULT_ALL_DEVICES)
+   set(DEFAULT ON)
+   set(PRESET_DEFAULT ON)
+@@ -248,16 +252,26 @@
+     message(FATAL_ERROR "Invalid combination of REQUIRE_FAMILYING = ${REQUIRE_FAMILYING} AND KIND = ${KIND} for DEVICE = ${DEVICE}")
+   endif(REQUIRE_FAMILYING AND NOT KIND STREQUAL "F")
+ 
++  # DRIVERS_DEVICE only used in one case below:
++  set(USED_DRIVERS_DEVICE OFF)
+   if(NOT PRESET_DEFAULT)
++    # must set DEFAULT value since it hasn't been preset.
+     if(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+       set(DEFAULT OFF)
+     elseif(DEFAULT_NO_CAIRO_DEVICES AND DEVICE MATCHES ".*cairo.*")
+       set(DEFAULT OFF)
+     else(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+       string(REGEX REPLACE "^.*:.*:(.*):.*:.*$" "\\1" DEFAULT ${DRIVERS_DEVICE})
++      set(USED_DRIVERS_DEVICE ON)
+     endif(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt")
+   endif(NOT PRESET_DEFAULT)
    #message(STATUS "DEBUG: DEVICE = ${DEVICE}")
    #message(STATUS "DEBUG: DEFAULT= ${DEFAULT}")
    option(PLD_${DEVICE} "Enable ${DEVICE} device" ${DEFAULT})
-+  if(PLD_${DEVICE} AND NOT ${DEFAULT})
++  if(PLD_${DEVICE} AND USED_DRIVERS_DEVICE AND NOT ${DEFAULT})
 +    message(STATUS 
 +      "WARNING: You have enabled the PLD_${DEVICE} device which is disabled by "
-+      "default either because it is deprecated, or because there are know issues "
++      "default either because it is deprecated or because there are know issues "
 +      "with it. Please check the documentation / release notes for details.") 
-+  endif(PLD_${DEVICE} AND NOT ${DEFAULT})
++  endif(PLD_${DEVICE} AND USED_DRIVERS_DEVICE AND NOT ${DEFAULT})
  endforeach(DRIVERS_DEVICE)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindAGG.cmake plplot-trunk/cmake/modules/FindAGG.cmake
 --- plplot-5.9.9/cmake/modules/FindAGG.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/FindAGG.cmake	2011-11-28 16:54:34.711498890 -0700
++++ plplot-trunk/cmake/modules/FindAGG.cmake	2011-11-28 16:54:34.000000000 -0700
 @@ -17,48 +17,46 @@
    #message(STATUS "_AGGCflags = ${_AGGCflags}")
  endif(PKG_CONFIG_EXECUTABLE)
@@ -8911,7 +11101,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindAGG.cmake plplot-trunk/c
    # Set additional uncached variables that users of this module should use.
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindLTDL.cmake plplot-trunk/cmake/modules/FindLTDL.cmake
 --- plplot-5.9.9/cmake/modules/FindLTDL.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/FindLTDL.cmake	2012-01-05 11:22:59.678110042 -0700
++++ plplot-trunk/cmake/modules/FindLTDL.cmake	2012-01-05 11:22:59.000000000 -0700
 @@ -40,40 +40,44 @@
        endif(${_lib})
      endmacro(_find_check_libs)
@@ -8988,7 +11178,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindLTDL.cmake plplot-trunk/
  endif(LTDL_INCLUDE_DIR)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindLua.cmake plplot-trunk/cmake/modules/FindLua.cmake
 --- plplot-5.9.9/cmake/modules/FindLua.cmake	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/cmake/modules/FindLua.cmake	2012-06-08 08:56:03.838746646 -0600
++++ plplot-trunk/cmake/modules/FindLua.cmake	2012-06-08 08:56:03.000000000 -0600
 @@ -0,0 +1,171 @@
 +# Locate Lua executable, library, and headers.
 +# This module supersedes FindLua50 and FindLua51 (and also supports
@@ -9524,6 +11714,55 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindPkgConfig.cmake plplot-t
 -### Local Variables:
 -### mode: cmake
 -### End:
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindQHULL.cmake plplot-trunk/cmake/modules/FindQHULL.cmake
+--- plplot-5.9.9/cmake/modules/FindQHULL.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/FindQHULL.cmake	2012-12-14 08:50:51.694393517 -0700
+@@ -21,7 +21,6 @@
+     PATHS /usr/local/lib /usr/lib
+   )
+   if( QHULL_LIBRARY )
+-    set(QHULL_LIBRARY_DIR "")
+     get_filename_component(QHULL_LIBRARY_DIRS ${QHULL_LIBRARY} PATH)
+     # Set uncached variables as per standard.
+     set(QHULL_FOUND ON)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindShapelib.cmake plplot-trunk/cmake/modules/FindShapelib.cmake
+--- plplot-5.9.9/cmake/modules/FindShapelib.cmake	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/modules/FindShapelib.cmake	2012-12-14 08:50:51.695393512 -0700
+@@ -0,0 +1,34 @@
++# Find shapelib header and library.
++#
++
++# This module defines the following uncached variables:
++#  SHAPELIB_FOUND, if false, do not try to use shapelib.
++#  SHAPELIB_INCLUDE_DIR, where to find shapefil.h.
++#  SHAPELIB_LIBRARIES, the libraries to link against to use the shapelib
++#  library.
++#  SHAPELIB_LIBRARY_DIRS, the directory where the shapelib library is found.
++
++find_path(SHAPELIB_INCLUDE_DIR shapefil.h /usr/local/include /usr/include)
++
++if(SHAPELIB_INCLUDE_DIR)
++  find_library(SHAPELIB_LIBRARY
++  NAMES shp
++  PATHS /usr/local/lib /usr/lib
++  )
++  if(SHAPELIB_LIBRARY)
++    # Set uncached variables as per standard.
++    set(SHAPELIB_FOUND ON)
++    set(SHAPELIB_LIBRARIES ${SHAPELIB_LIBRARY})
++    get_filename_component(SHAPELIB_LIBRARY_DIRS ${SHAPELIB_LIBRARY} PATH)
++  endif(SHAPELIB_LIBRARY)
++endif(SHAPELIB_INCLUDE_DIR)
++	    
++if(SHAPELIB_FOUND)
++  if(NOT SHAPELIB_FIND_QUIETLY)
++    message(STATUS "FindShapelib: Found shapelib header directory, ${SHAPELIB_INCLUDE_DIR}, and library, ${SHAPELIB_LIBRARIES}.")
++  endif(NOT SHAPELIB_FIND_QUIETLY)
++else(SHAPELIB_FOUND)
++  if(SHAPELIB_FIND_REQUIRED)
++    message(FATAL_ERROR "FindShapelib: Could not find shapelib header and/or library.")
++  endif(SHAPELIB_FIND_REQUIRED)
++endif(SHAPELIB_FOUND)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindwxWidgets.cmake plplot-trunk/cmake/modules/FindwxWidgets.cmake
 --- plplot-5.9.9/cmake/modules/FindwxWidgets.cmake	2011-10-12 18:43:01.000000000 -0600
 +++ plplot-trunk/cmake/modules/FindwxWidgets.cmake	1969-12-31 17:00:00.000000000 -0700
@@ -10550,7 +12789,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/FindwxWidgets.cmake plplot-t
 -ENDFUNCTION(WXWIDGETS_ADD_RESOURCES)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/fortran.cmake plplot-trunk/cmake/modules/fortran.cmake
 --- plplot-5.9.9/cmake/modules/fortran.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/fortran.cmake	2012-01-28 07:51:41.628862413 -0700
++++ plplot-trunk/cmake/modules/fortran.cmake	2012-01-28 07:51:41.000000000 -0700
 @@ -26,7 +26,7 @@
    option(ENABLE_f77 "Enable f77 bindings" OFF)
    option(ENABLE_f95 "Enable f95 bindings" OFF)
@@ -10562,7 +12801,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/fortran.cmake plplot-trunk/c
  
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake plplot-trunk/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake
 --- plplot-5.9.9/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake	2012-08-03 15:40:23.737810064 -0600
++++ plplot-trunk/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake	2012-08-03 15:40:23.000000000 -0600
 @@ -29,6 +29,18 @@
    SET(CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
  ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Ada_FLAGS)
@@ -10582,6 +12821,54 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake/CMake
  IF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS)
    SET(CMAKE_SHARED_LIBRARY_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
  ENDIF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake plplot-trunk/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake
+--- plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake	2012-12-14 08:50:51.495394554 -0700
+@@ -55,8 +55,11 @@
+ 
+ # configure variables set in this file for fast reload later on
+ #CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeAdaCompiler.cmake.in 
++#message(STATUS "DEBUG: CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}")
++#message(STATUS "DEBUG: CMAKE_FILES_DIRECTORY = ${CMAKE_FILES_DIRECTORY}")
++#message(STATUS "DEBUG: CMAKE_PLATFORM_INFO_DIR = ${CMAKE_PLATFORM_INFO_DIR}")
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeAdaCompiler.cmake.in 
+-               "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeAdaCompiler.cmake" IMMEDIATE)
++               "${CMAKE_PLATFORM_INFO_DIR}/CMakeAdaCompiler.cmake" IMMEDIATE)
+ MARK_AS_ADVANCED(CMAKE_AR)
+ 
+ SET(CMAKE_Ada_COMPILER_ENV_VAR "ADA")
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake plplot-trunk/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake
+--- plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake	2012-12-14 08:50:51.494394559 -0700
+@@ -99,10 +99,10 @@
+ # a different location.
+ IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ 	CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in 
+-               "${CMAKE_PLATFORM_ROOT_BIN}/CMakeDCompiler.cmake" IMMEDIATE)
++               "${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake" IMMEDIATE)
+ ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ 	CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeDCompiler.cmake.in 
+-               "${CMAKE_PLATFORM_ROOT_BIN}/CMakeDCompiler.cmake" IMMEDIATE)
++               "${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake" IMMEDIATE)
+ ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ 
+ MARK_AS_ADVANCED(CMAKE_AR)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake plplot-trunk/cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake
+--- plplot-5.9.9/cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake	2012-12-14 08:50:51.495394554 -0700
+@@ -68,10 +68,10 @@
+   # a different location.
+   IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+   	CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in 
+-  	  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDCompiler.cmake IMMEDIATE)
++  	  ${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake IMMEDIATE)
+   ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+   	CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeDCompiler.cmake.in 
+-	  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDCompiler.cmake IMMEDIATE)
++	  ${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake IMMEDIATE)
+   ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ ENDIF(NOT CMAKE_D_COMPILER_WORKS)
+ 
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake plplot-trunk/cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake
 --- plplot-5.9.9/cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake	2011-10-12 18:43:01.000000000 -0600
 +++ plplot-trunk/cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake	1969-12-31 17:00:00.000000000 -0700
@@ -10989,8 +13276,8 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support/cmake-2.6/P
 -ENDIF(MSYS OR MINGW)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support.cmake plplot-trunk/cmake/modules/language_support.cmake
 --- plplot-5.9.9/cmake/modules/language_support.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/language_support.cmake	2011-11-29 20:50:49.736033958 -0700
-@@ -14,20 +14,27 @@
++++ plplot-trunk/cmake/modules/language_support.cmake	2012-12-14 08:50:51.493394564 -0700
+@@ -14,20 +14,34 @@
      set(text
        "project(test C)
  # Locations where PLplot cmake build system first looks for cmake modules.
@@ -11012,6 +13299,13 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support.cmake plplo
 -  )
 -endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6)
 -cmake_minimum_required(VERSION 2.6.0)
++
++# Need to define CMAKE_PLATFORM_INFO_DIR for all CMake versions less than 2.8.10
++if(NOT CMAKE_PLATFORM_INFO_DIR)
++  set(CMAKE_PLATFORM_INFO_DIR \${CMAKE_BINARY_DIR}\${CMAKE_FILES_DIRECTORY})
++  message(STATUS 'CMAKE_PLATFORM_INFO_DIR = \${CMAKE_PLATFORM_INFO_DIR}')
++endif(NOT CMAKE_PLATFORM_INFO_DIR)
++
 +if(CMAKE_SYSTEM_NAME STREQUAL \"Linux\")
 +  # We prefer to support only the latest CMake version because it
 +  # tends to be more free of issues and more consistent with recent
@@ -11031,7 +13325,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support.cmake plplo
  message(STATUS \"CMAKE_GENERATOR = ${CMAKE_GENERATOR}\")
  #enable_language(${language} OPTIONAL)
  enable_language(${language})
-@@ -62,18 +69,7 @@
+@@ -62,18 +76,7 @@
  	language_support/cmake/Platform/Windows-gdc.cmake
  	)
      elseif(language STREQUAL "Fortran")
@@ -11051,7 +13345,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support.cmake plplo
      else(language STREQUAL "Ada")
        set(language_special OFF)
      endif(language STREQUAL "Ada")
-@@ -129,5 +125,3 @@
+@@ -129,5 +132,3 @@
  #message("Java_language_works = ${Java_language_works}")
  # Just to terminate temporary test for convenience.
  #message(FATAL_ERROR "")
@@ -11059,7 +13353,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/language_support.cmake plplo
 -
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/lua.cmake plplot-trunk/cmake/modules/lua.cmake
 --- plplot-5.9.9/cmake/modules/lua.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/lua.cmake	2012-06-08 08:56:03.843746294 -0600
++++ plplot-trunk/cmake/modules/lua.cmake	2012-06-08 08:56:03.000000000 -0600
 @@ -59,16 +59,13 @@
    # Check for Lua libraries which defines
    #  LUA_LIBRARIES    = path to the Lua library
@@ -11128,7 +13422,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/lua.cmake plplot-trunk/cmake
  endif(ENABLE_lua)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/octave.cmake plplot-trunk/cmake/modules/octave.cmake
 --- plplot-5.9.9/cmake/modules/octave.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/octave.cmake	2012-01-28 07:51:41.627862448 -0700
++++ plplot-trunk/cmake/modules/octave.cmake	2012-12-14 08:50:51.693393523 -0700
 @@ -103,7 +103,7 @@
  if(ENABLE_octave)
    message(STATUS "OCTAVE_VERSION = ${OCTAVE_VERSION}")
@@ -11147,9 +13441,18 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/octave.cmake plplot-trunk/cm
      set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE)
    endif(
     NUMERICAL_OCTAVE_VERSION
+@@ -208,8 +208,6 @@
+ endif(ENABLE_octave)
+ 
+ if(ENABLE_octave)
+-  check_perl_modules(PERL_XML_PARSER XML::Parser)
+-  check_perl_modules(PERL_XML_DOM XML::DOM)
+   #MATWRAP is the path+filename of the matwrap script.
+   set(MATWRAP "${CMAKE_CURRENT_SOURCE_DIR}/bindings/octave/matwrap/matwrap")
+   message(STATUS "MATWRAP = ${MATWRAP}")
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/octave.cmake.orig plplot-trunk/cmake/modules/octave.cmake.orig
 --- plplot-5.9.9/cmake/modules/octave.cmake.orig	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/cmake/modules/octave.cmake.orig	2011-04-06 14:28:52.716482471 -0600
++++ plplot-trunk/cmake/modules/octave.cmake.orig	2011-04-06 14:28:52.000000000 -0600
 @@ -0,0 +1,281 @@
 +# cmake/modules/octave.cmake
 +#
@@ -11434,7 +13737,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/octave.cmake.orig plplot-tru
 +endif(ENABLE_octave)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/pkg-config.cmake plplot-trunk/cmake/modules/pkg-config.cmake
 --- plplot-5.9.9/cmake/modules/pkg-config.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/pkg-config.cmake	2012-01-05 11:22:59.679110002 -0700
++++ plplot-trunk/cmake/modules/pkg-config.cmake	2012-01-05 11:22:59.000000000 -0700
 @@ -30,12 +30,6 @@
  # PKG_CONFIG_EXECUTABLE	  - name of pkg-config executable, but can also be
  # 			    used for logical control with, e.g.,
@@ -11561,7 +13864,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/pkg-config.cmake plplot-trun
  
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot.cmake plplot-trunk/cmake/modules/plplot.cmake
 --- plplot-5.9.9/cmake/modules/plplot.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/plplot.cmake	2012-06-08 08:56:03.841746436 -0600
++++ plplot-trunk/cmake/modules/plplot.cmake	2012-12-14 08:50:51.492394569 -0700
 @@ -22,6 +22,35 @@
  # libraries are all shared by default
  option(BUILD_SHARED_LIBS "Build shared libraries" ON)
@@ -11740,10 +14043,49 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot.cmake plplot-trunk/cm
  endif(PL__HAVE_FINITE)
  
  check_symbol_exists(isnan "math.h" HAVE_ISNAN_SYMBOL)
+@@ -395,12 +380,15 @@
+ endif(SWIG_FOUND)
+ 
+ # Find Perl.  Required in several places in the build system (e.g.,
+-# tcl and docbook).
++# tcl and docbook).  Also check for XML::Parser and XML::DOM which
++# are also used several places in the build system.
+ find_package(Perl)
+ if(PERL_FOUND)
+     include(CheckPerlModules)
++    check_perl_modules(PERL_XML_PARSER XML::Parser)
++    check_perl_modules(PERL_XML_DOM XML::DOM)
+ endif(PERL_FOUND)
+-
++	    
+ # =======================================================================
+ # pkg-config support as well as macros to put link flags in standard
+ # *.pc (pkg-config) form as well as standard fullpath form used by cmake.
+@@ -453,10 +441,20 @@
+ message(STATUS "X11_COMPILE_FLAGS = ${X11_COMPILE_FLAGS}")
+ message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
+ 
++# Support for shapelib library for reading shapefile map data
++include(shapelib)
++
+ option(DEFAULT_NO_BINDINGS
+ "All language bindings are disabled by default"
+ OFF
+ )
++
++# Need to define CMAKE_PLATFORM_INFO_DIR for all CMake versions less than 2.8.10
++if(NOT CMAKE_PLATFORM_INFO_DIR)
++  set(CMAKE_PLATFORM_INFO_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
++  message(STATUS "CMAKE_PLATFORM_INFO_DIR = ${CMAKE_PLATFORM_INFO_DIR}")
++endif(NOT CMAKE_PLATFORM_INFO_DIR)
++
+ # Temporary workaround for language support that is required.
+ include(language_support)
+ 
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot_functions.cmake plplot-trunk/cmake/modules/plplot_functions.cmake
 --- plplot-5.9.9/cmake/modules/plplot_functions.cmake	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/cmake/modules/plplot_functions.cmake	2011-11-02 09:42:41.052962137 -0600
-@@ -0,0 +1,199 @@
++++ plplot-trunk/cmake/modules/plplot_functions.cmake	2012-12-14 08:50:51.491394574 -0700
+@@ -0,0 +1,202 @@
 +# Collection of useful functions that are required by PLplot.
 +
 +function(list_example_files path device suffix output_list)
@@ -11800,6 +14142,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot_functions.cmake plplo
 +  if(
 +      ${device} STREQUAL "png" OR
 +      ${device} STREQUAL "pngcairo" OR
++      ${device} STREQUAL "epscairo" OR
 +      ${device} STREQUAL "jpeg" OR
 +      ${device} STREQUAL "xfig" OR
 +      ${device} STREQUAL "svg" OR
@@ -11818,6 +14161,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot_functions.cmake plplo
 +  else(
 +      ${device} STREQUAL "png" OR
 +      ${device} STREQUAL "pngcairo" OR
++      ${device} STREQUAL "epscairo" OR
 +      ${device} STREQUAL "jpeg" OR
 +      ${device} STREQUAL "xfig" OR
 +      ${device} STREQUAL "svg" OR
@@ -11836,6 +14180,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot_functions.cmake plplo
 +  endif(
 +      ${device} STREQUAL "png" OR
 +      ${device} STREQUAL "pngcairo" OR
++      ${device} STREQUAL "epscairo" OR
 +      ${device} STREQUAL "jpeg" OR
 +      ${device} STREQUAL "xfig" OR
 +      ${device} STREQUAL "svg" OR
@@ -11943,9 +14288,81 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/plplot_functions.cmake plplo
 +  #message("DEBUG: (filtered) ${rpath} = ${internal_rpath}")
 +  set(${rpath} ${internal_rpath} PARENT_SCOPE)
 +endfunction(filter_rpath)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/qt.cmake plplot-trunk/cmake/modules/qt.cmake
+--- plplot-5.9.9/cmake/modules/qt.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/qt.cmake	2012-12-14 08:50:51.493394564 -0700
+@@ -90,7 +90,7 @@
+       set(qt_COMPILE_FLAGS "${qt_COMPILE_FLAGS} -I${DIR}")
+     endforeach(DIR ${QT_INCLUDES})
+     
+-    set(qt_LINK_FLAGS)
++    set(qt_LINK_FLAGS ${QT_LIBRARIES})
+     set(qt_RPATH ${QT_LIBRARY_DIR})
+     filter_rpath(qt_RPATH)
+     #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/shapelib.cmake plplot-trunk/cmake/modules/shapelib.cmake
+--- plplot-5.9.9/cmake/modules/shapelib.cmake	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/cmake/modules/shapelib.cmake	2012-12-14 08:50:51.695393512 -0700
+@@ -0,0 +1,44 @@
++# cmake/modules/shapefil.cmake
++#
++# Copyright (C) 2012  Andrew Ross
++# Copyright (C) 2012  Alan W. Irwin
++#
++# This file is part of PLplot.
++#
++# PLplot is free software; you can redistribute it and/or modify
++# it under the terms of the GNU Library General Public License as published
++# by the Free Software Foundation; version 2 of the License.
++#
++# PLplot is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU Library General Public License for more details.
++#
++# You should have received a copy of the GNU Library General Public License
++# along with the file PLplot; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
++#
++# Configuration for SHAPELIB support in plplot.
++
++option(
++HAVE_SHAPELIB
++"Enable driver options for using shapelib library for reading shapefile map data"
++ON
++)
++
++# Look for shapelib libraries
++if (HAVE_SHAPELIB)
++  find_package(Shapelib)
++  if(SHAPELIB_FOUND)
++    set(SHAPELIB_RPATH ${SHAPELIB_LIBRARY_DIRS})
++    filter_rpath(SHAPELIB_RPATH)
++  else(SHAPELIB_FOUND)
++    message(STATUS 
++    "WARNING: SHAPELIB not found.  Setting HAVE_SHAPELIB to OFF."
++    )
++    set(HAVE_SHAPELIB OFF
++    CACHE BOOL "Enable driver options for using SHAPELIB library for reading shapefile map data"
++    FORCE
++    )
++  endif(SHAPELIB_FOUND)
++endif (HAVE_SHAPELIB)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/summary.cmake plplot-trunk/cmake/modules/summary.cmake
+--- plplot-5.9.9/cmake/modules/summary.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/summary.cmake	2012-12-14 08:50:51.494394559 -0700
+@@ -107,7 +107,7 @@
+ Optional libraries:
+ PL_HAVE_QHULL:		${PL_HAVE_QHULL}		WITH_CSA:	${WITH_CSA}
+ HAVE_FREETYPE:		${HAVE_FREETYPE}		PL_HAVE_PTHREAD:	${PL_HAVE_PTHREAD}
+-HAVE_AGG:		${HAVE_AGG}
++HAVE_AGG:		${HAVE_AGG}		HAVE_SHAPELIB:	${HAVE_SHAPELIB}
+ 
+ Language Bindings:
+ ENABLE_f77:		${ENABLE_f77}		ENABLE_f95:		${ENABLE_f95}
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/tcl-related.cmake plplot-trunk/cmake/modules/tcl-related.cmake
 --- plplot-5.9.9/cmake/modules/tcl-related.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/tcl-related.cmake	2012-01-05 11:22:59.681109921 -0700
++++ plplot-trunk/cmake/modules/tcl-related.cmake	2012-01-05 11:22:59.000000000 -0700
 @@ -138,7 +138,7 @@
      endif(ENABLE_tk AND NOT X11_FOUND)
      if(ENABLE_tk)
@@ -11957,7 +14374,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/tcl-related.cmake plplot-tru
      else(ENABLE_tk)
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/TestF77CmdLine.cmake plplot-trunk/cmake/modules/TestF77CmdLine.cmake
 --- plplot-5.9.9/cmake/modules/TestF77CmdLine.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/TestF77CmdLine.cmake	2012-01-28 07:51:41.626862482 -0700
++++ plplot-trunk/cmake/modules/TestF77CmdLine.cmake	2012-01-28 07:51:41.000000000 -0700
 @@ -51,20 +51,3 @@
        "the following output:\n${OUTPUT}\n\n")
    ENDIF (CMAKE_F77_CMD_LINE)
@@ -11979,9 +14396,21 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/TestF77CmdLine.cmake plplot-
 -ELSE(STATIC)
 -  SET(STATIC_OPTS OFF CACHE BOOL "Command-line parsing in static library")
 -ENDIF(STATIC)
+diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/tk.cmake plplot-trunk/cmake/modules/tk.cmake
+--- plplot-5.9.9/cmake/modules/tk.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/cmake/modules/tk.cmake	2012-12-14 08:50:51.491394574 -0700
+@@ -107,7 +107,7 @@
+   set(tkwin_COMPILE_FLAGS 
+   "-I${TCL_INCLUDE_PATH} ${TKLIB_COMPILE_FLAGS} -I\"${CMAKE_SOURCE_DIR}\"/bindings/tcl -I\"${CMAKE_BINARY_DIR}\"/bindings/tcl -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk-x-plat -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk"
+   )
+-  set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY})
++  set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES})
+   set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${TCL_LIBRARY} ${TK_LIBRARY})
+   set(
+   tkwin_SOURCE
 diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/wxwidgets.cmake plplot-trunk/cmake/modules/wxwidgets.cmake
 --- plplot-5.9.9/cmake/modules/wxwidgets.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/cmake/modules/wxwidgets.cmake	2012-06-08 08:56:03.840746506 -0600
++++ plplot-trunk/cmake/modules/wxwidgets.cmake	2012-06-08 08:56:03.000000000 -0600
 @@ -41,18 +41,23 @@
  endif(PLD_wxwidgets OR PLD_wxpng)
  
@@ -12038,7 +14467,7 @@ diff -ruN --exclude .svn plplot-5.9.9/cmake/modules/wxwidgets.cmake plplot-trunk
    message(STATUS "wxwidgets_LINK_FLAGS = ${wxwidgets_LINK_FLAGS}")
 diff -ruN --exclude .svn plplot-5.9.9/CMakeLists.txt plplot-trunk/CMakeLists.txt
 --- plplot-5.9.9/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/CMakeLists.txt	2011-11-29 20:50:51.037987379 -0700
++++ plplot-trunk/CMakeLists.txt	2011-11-29 20:50:51.000000000 -0700
 @@ -38,12 +38,24 @@
  project(plplot C)
  
@@ -12096,8 +14525,8 @@ diff -ruN --exclude .svn plplot-5.9.9/CMakeLists.txt plplot-trunk/CMakeLists.txt
  # the import libraries for system libraries.
 diff -ruN --exclude .svn plplot-5.9.9/config.h.cmake plplot-trunk/config.h.cmake
 --- plplot-5.9.9/config.h.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/config.h.cmake	2011-11-02 09:43:11.140859190 -0600
-@@ -51,12 +51,6 @@
++++ plplot-trunk/config.h.cmake	2012-12-14 08:50:57.826356526 -0700
+@@ -51,15 +51,12 @@
  // Define to 1 if you have the <dlfcn.h> header file.
  #cmakedefine HAVE_DLFCN_H 1
  
@@ -12110,9 +14539,15 @@ diff -ruN --exclude .svn plplot-5.9.9/config.h.cmake plplot-trunk/config.h.cmake
  // Define if [freetype] is available
  #cmakedefine HAVE_FREETYPE
  
++// Define if [shapelib] is available
++#cmakedefine HAVE_SHAPELIB
++
+ // Define if [agg] is available
+ #cmakedefine HAVE_AGG
+ 
 diff -ruN --exclude .svn plplot-5.9.9/COPYING.LIB plplot-trunk/COPYING.LIB
 --- plplot-5.9.9/COPYING.LIB	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/COPYING.LIB	2012-01-04 08:45:36.448518124 -0700
++++ plplot-trunk/COPYING.LIB	2012-01-04 08:45:36.000000000 -0700
 @@ -2,7 +2,7 @@
  		       Version 2, June 1991
  
@@ -12142,10 +14577,87 @@ diff -ruN --exclude .svn plplot-5.9.9/COPYING.LIB plplot-trunk/COPYING.LIB
  
  Also add information on how to contact you by electronic and paper mail.
  
+Binary files plplot-5.9.9/data/cglobe.shp and plplot-trunk/data/cglobe.shp differ
+Binary files plplot-5.9.9/data/cglobe.shx and plplot-trunk/data/cglobe.shx differ
+diff -ruN --exclude .svn plplot-5.9.9/data/CMakeLists.txt plplot-trunk/data/CMakeLists.txt
+--- plplot-5.9.9/data/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/data/CMakeLists.txt	2012-12-14 08:51:05.424311369 -0700
+@@ -20,12 +20,8 @@
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ 
+ set(data_DATAFILES
+-cglobe.map
+-globe.map
+ plstnd5.fnt
+ plxtnd5.fnt
+-usa.map
+-usaglobe.map
+ cmap0_default.pal
+ cmap0_alternate.pal
+ cmap0_white_bg.pal
+@@ -39,4 +35,33 @@
+ cmap1_lowfreq.pal
+ )
+ 
++if(HAVE_SHAPELIB)
++  set(data_DATAFILES
++  ${data_DATAFILES}
++  cglobe.shx
++  cglobe.shp
++  globe.shx
++  globe.shp
++  usa.shx
++  usa.shp
++  usaglobe.shx
++  usaglobe.shp
++  )
++  set(data_DOCFILES
++  README.shapefiles
++  )
++else(HAVE_SHAPELIB)
++  set(data_DATAFILES
++  ${data_DATAFILES}
++  cglobe.map
++  globe.map
++  usa.map
++  usaglobe.map
++  )
++endif(HAVE_SHAPELIB)
++
+ install(FILES ${data_DATAFILES} DESTINATION ${DATA_DIR})
++
++if(HAVE_SHAPELIB)
++  install(FILES ${data_DOCFILES} DESTINATION ${DOC_DIR})
++endif(HAVE_SHAPELIB)
+Binary files plplot-5.9.9/data/globe.shp and plplot-trunk/data/globe.shp differ
+Binary files plplot-5.9.9/data/globe.shx and plplot-trunk/data/globe.shx differ
+diff -ruN --exclude .svn plplot-5.9.9/data/README.shapefiles plplot-trunk/data/README.shapefiles
+--- plplot-5.9.9/data/README.shapefiles	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/data/README.shapefiles	2012-12-14 08:51:05.418311363 -0700
+@@ -0,0 +1,5 @@
++The shapefiles (.shx and .shp files) supplied with PLplot are in the 
++public domain. The data is downloaded from the free resource Natural 
++Earth (www.naturalearthdata.com). This site may also be of use for users 
++looking for higher resolution / additional data for specific 
++applications. 
+Binary files plplot-5.9.9/data/usaglobe.shp and plplot-trunk/data/usaglobe.shp differ
+Binary files plplot-5.9.9/data/usaglobe.shx and plplot-trunk/data/usaglobe.shx differ
+Binary files plplot-5.9.9/data/usa.shp and plplot-trunk/data/usa.shp differ
+Binary files plplot-5.9.9/data/usa.shx and plplot-trunk/data/usa.shx differ
 diff -ruN --exclude .svn plplot-5.9.9/debian/changelog plplot-trunk/debian/changelog
 --- plplot-5.9.9/debian/changelog	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/changelog	2012-08-03 15:40:24.479810029 -0600
-@@ -0,0 +1,2168 @@
++++ plplot-trunk/debian/changelog	2012-12-14 08:51:01.692332602 -0700
+@@ -0,0 +1,2179 @@
++plplot (5.9.9-6) unstable; urgency=low
++
++  * debian/control.in: Remove build dependency on quilt since this is 
++    not required for 3.0 (quilt) source packages. Fixes lintian warning.
++  * debian/rules: Get CPPFLAGS using dpkg-buildflags to use fortified libc 
++    functions. NB needs to work around cmake "feature" which ignores CPPFLAGS
++    at present. Fixes lintian warning.
++
++ -- Andrew Ross <andrewross at users.sourceforge.net>  Mon, 13 Aug 2012 21:05:25 +0100
++
 +plplot (5.9.9-5) unstable; urgency=low
 +
 +  * debian/patches/series, debian/patches/fix-cmake-ada-support.diff:
@@ -12155,8 +14667,9 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/changelog plplot-trunk/debian/chang
 +    Add patch to work around problem with lua cmake support. Debian now requires 
 +    multiple include paths which were not found correctly. This prevents a FTBFS 
 +    with recent versions of lua5.1.
++  * Recompile with latest version of gfortran (closes: #683878). 
 +
-+ -- Andrew Ross <andrewross at users.sourceforge.net>  Fri, 20 Jul 2012 00:05:51 +0100
++ -- Andrew Ross <andrewross at users.sourceforge.net>  Wed, 08 Aug 2012 09:34:10 +0100
 +
 +plplot (5.9.9-4) unstable; urgency=low
 +
@@ -14316,12 +16829,12 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/changelog plplot-trunk/debian/chang
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/compat plplot-trunk/debian/compat
 --- plplot-5.9.9/debian/compat	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/compat	2011-04-06 14:28:53.593407477 -0600
++++ plplot-trunk/debian/compat	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1 @@
 +7
 diff -ruN --exclude .svn plplot-5.9.9/debian/control plplot-trunk/debian/control
 --- plplot-5.9.9/debian/control	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/control	2012-06-08 08:56:03.975736962 -0600
++++ plplot-trunk/debian/control	2012-08-10 08:54:51.000000000 -0600
 @@ -0,0 +1,453 @@
 +Source: plplot
 +Section: math
@@ -14333,7 +16846,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/control plplot-trunk/debian/control
 + libxi-dev, gfortran, itk3-dev, liboctave-dev,
 + libgd2-noxpm-dev | libgd2-xpm-dev, m4, libqhull-dev (>= 2003.1-8), 
 + libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config, 
-+ quilt, slice, python-gtk2-dev, libwxgtk2.8-dev, 
++ slice, python-gtk2-dev, libwxgtk2.8-dev, 
 + python-all-dev (>= 2.6.6-3~),
 + python-numpy (>= 1:1.4.1-4~), ttf-freefont, default-jdk,
 + fastjar, swig, gnat [!sh4], libqt4-dev, python-sip-dev, 
@@ -14778,7 +17291,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/control plplot-trunk/debian/control
 + This package provides the D language bindings for PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/debian/control.in plplot-trunk/debian/control.in
 --- plplot-5.9.9/debian/control.in	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/control.in	2012-06-08 08:56:03.976736892 -0600
++++ plplot-trunk/debian/control.in	2012-08-10 08:54:51.000000000 -0600
 @@ -0,0 +1,453 @@
 +Source: plplot
 +Section: math
@@ -14790,7 +17303,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/control.in plplot-trunk/debian/cont
 + libxi-dev, gfortran, itk3-dev, liboctave-dev,
 + libgd2-noxpm-dev | libgd2-xpm-dev, m4, libqhull-dev (>= 2003.1-8), 
 + libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config, 
-+ quilt, slice, python-gtk2-dev, libwxgtk2.8-dev, 
++ slice, python-gtk2-dev, libwxgtk2.8-dev, 
 + python-all-dev (>= 2.6.6-3~),
 + python-numpy (>= 1:1.4.1-4~), ttf-freefont, default-jdk,
 + fastjar, swig, gnat [!sh4], libqt4-dev, python-sip-dev, 
@@ -15235,7 +17748,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/control.in plplot-trunk/debian/cont
 + This package provides the D language bindings for PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/debian/copyright plplot-trunk/debian/copyright
 --- plplot-5.9.9/debian/copyright	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/copyright	2011-11-02 09:43:03.916124017 -0600
++++ plplot-trunk/debian/copyright	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,132 @@
 +This package was debianized by Rafael Laboissiere rafael at debian.org on
 +Sun Feb 16 18:44:55 CET 2003. It is currently maintained by Andrew Ross 
@@ -15371,7 +17884,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/copyright plplot-trunk/debian/copyr
 +copyright.
 diff -ruN --exclude .svn plplot-5.9.9/debian/get-upstream-version.pl plplot-trunk/debian/get-upstream-version.pl
 --- plplot-5.9.9/debian/get-upstream-version.pl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/get-upstream-version.pl	2011-04-06 14:28:53.618405340 -0600
++++ plplot-trunk/debian/get-upstream-version.pl	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,8 @@
 +#!/usr/bin/perl -w
 +
@@ -15383,7 +17896,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/get-upstream-version.pl plplot-trun
 +}
 diff -ruN --exclude .svn plplot-5.9.9/debian/index.html.in plplot-trunk/debian/index.html.in
 --- plplot-5.9.9/debian/index.html.in	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/index.html.in	2011-04-06 14:28:53.574409102 -0600
++++ plplot-trunk/debian/index.html.in	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,48 @@
 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 +<html>
@@ -15435,7 +17948,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/index.html.in plplot-trunk/debian/i
 +</html>
 diff -ruN --exclude .svn plplot-5.9.9/debian/install-www.sh plplot-trunk/debian/install-www.sh
 --- plplot-5.9.9/debian/install-www.sh	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/install-www.sh	2011-04-06 14:28:53.586408076 -0600
++++ plplot-trunk/debian/install-www.sh	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,90 @@
 +#! /bin/bash
 +
@@ -15529,13 +18042,13 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/install-www.sh plplot-trunk/debian/
 +$rsh_command rm -f $www_dir/$tarball
 diff -ruN --exclude .svn plplot-5.9.9/debian/libcsiro0.files plplot-trunk/debian/libcsiro0.files
 --- plplot-5.9.9/debian/libcsiro0.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libcsiro0.files	2011-04-06 14:28:53.580408589 -0600
++++ plplot-trunk/debian/libcsiro0.files	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/libcsiro*.so.*
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot11.files plplot-trunk/debian/libplplot11.files
 --- plplot-5.9.9/debian/libplplot11.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot11.files	2011-11-02 09:43:03.894124824 -0600
++++ plplot-trunk/debian/libplplot11.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,7 @@
 +usr/lib
 +usr/share/plplot*/*.map
@@ -15546,7 +18059,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot11.files plplot-trunk/debi
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-ada0-dev.files plplot-trunk/debian/libplplot-ada0-dev.files
 --- plplot-5.9.9/debian/libplplot-ada0-dev.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-ada0-dev.files	2011-11-02 09:43:03.883125228 -0600
++++ plplot-trunk/debian/libplplot-ada0-dev.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,5 @@
 +usr/lib/ada
 +usr/share/ada
@@ -15555,19 +18068,19 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-ada0-dev.files plplot-tru
 +usr/share/doc/libplplot-ada0-dev
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-ada0.files plplot-trunk/debian/libplplot-ada0.files
 --- plplot-5.9.9/debian/libplplot-ada0.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-ada0.files	2011-11-02 09:43:03.895124787 -0600
++++ plplot-trunk/debian/libplplot-ada0.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/libplplotada*.so.*
 +usr/share/doc/libplplot-ada0
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-c++10.files plplot-trunk/debian/libplplot-c++10.files
 --- plplot-5.9.9/debian/libplplot-c++10.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-c++10.files	2011-11-02 09:43:03.917123981 -0600
++++ plplot-trunk/debian/libplplot-c++10.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/libplplotcxxd.so.*
 +usr/share/doc/libplplot-c++10
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-dev.files plplot-trunk/debian/libplplot-dev.files
 --- plplot-5.9.9/debian/libplplot-dev.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-dev.files	2011-11-02 09:43:03.919123909 -0600
++++ plplot-trunk/debian/libplplot-dev.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,9 @@
 +usr/include
 +usr/lib/lib*.a
@@ -15580,20 +18093,20 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-dev.files plplot-trunk/de
 +usr/share/doc/libplplot-dev
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-d.files plplot-trunk/debian/libplplot-d.files
 --- plplot-5.9.9/debian/libplplot-d.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-d.files	2011-11-02 09:43:03.884125191 -0600
++++ plplot-trunk/debian/libplplot-d.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,3 @@
 +usr/lib/libplplotdmdd.a
 +usr/share/doc/libplplot-d
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-fortran9.files plplot-trunk/debian/libplplot-fortran9.files
 --- plplot-5.9.9/debian/libplplot-fortran9.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-fortran9.files	2011-11-02 09:43:03.914124091 -0600
++++ plplot-trunk/debian/libplplot-fortran9.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/libplplotf*.so.*
 +usr/share/doc/libplplot-fortran9
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-java.files plplot-trunk/debian/libplplot-java.files
 --- plplot-5.9.9/debian/libplplot-java.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-java.files	2011-11-02 09:43:03.900124605 -0600
++++ plplot-trunk/debian/libplplot-java.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,4 @@
 +usr/lib/jni
 +usr/share/java
@@ -15601,14 +18114,14 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-java.files plplot-trunk/d
 +usr/share/doc/libplplot-java
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-lua.files plplot-trunk/debian/libplplot-lua.files
 --- plplot-5.9.9/debian/libplplot-lua.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-lua.files	2011-11-02 09:43:03.883125228 -0600
++++ plplot-trunk/debian/libplplot-lua.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,3 @@
 +usr/lib/lua/5.1/plplot/*.so
 +usr/share/doc/libplplot-lua
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-ocaml.files plplot-trunk/debian/libplplot-ocaml.files
 --- plplot-5.9.9/debian/libplplot-ocaml.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libplplot-ocaml.files	2011-11-02 09:43:03.911124202 -0600
++++ plplot-trunk/debian/libplplot-ocaml.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,10 @@
 +usr/lib/ocaml/stublibs/*.so
 +usr/lib/ocaml/plplot/META
@@ -15622,19 +18135,19 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/libplplot-ocaml.files plplot-trunk/
 +usr/share/doc/libplplot-ocaml
 diff -ruN --exclude .svn plplot-5.9.9/debian/libqsastime0.files plplot-trunk/debian/libqsastime0.files
 --- plplot-5.9.9/debian/libqsastime0.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libqsastime0.files	2011-11-02 09:43:03.892124898 -0600
++++ plplot-trunk/debian/libqsastime0.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1 @@
 +/usr/lib/libqsastime*.so.*
 diff -ruN --exclude .svn plplot-5.9.9/debian/libqsastime-dev.files plplot-trunk/debian/libqsastime-dev.files
 --- plplot-5.9.9/debian/libqsastime-dev.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/libqsastime-dev.files	2011-11-02 09:43:03.891124935 -0600
++++ plplot-trunk/debian/libqsastime-dev.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,3 @@
 +usr/lib/libqsastime*.so
 +usr/include/plplot/qsas*.h
 +usr/share/doc/libqsastime-dev
 diff -ruN --exclude .svn plplot-5.9.9/debian/make-cvs-release.sh plplot-trunk/debian/make-cvs-release.sh
 --- plplot-5.9.9/debian/make-cvs-release.sh	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/make-cvs-release.sh	2011-04-06 14:28:53.585408161 -0600
++++ plplot-trunk/debian/make-cvs-release.sh	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,21 @@
 +#!/bin/bash
 +
@@ -15659,7 +18172,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/make-cvs-release.sh plplot-trunk/de
 +mv plplot-$version.tar.gz ../plplot_$version.orig.tar.gz
 diff -ruN --exclude .svn plplot-5.9.9/debian/NEWS plplot-trunk/debian/NEWS
 --- plplot-5.9.9/debian/NEWS	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/NEWS	2011-11-02 09:43:03.898124678 -0600
++++ plplot-trunk/debian/NEWS	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,28 @@
 +plplot (5.9.8-1) unstable; urgency=low
 +
@@ -15691,7 +18204,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/NEWS plplot-trunk/debian/NEWS
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/octave-plplot.files plplot-trunk/debian/octave-plplot.files
 --- plplot-5.9.9/debian/octave-plplot.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/octave-plplot.files	2012-06-08 08:56:05.097658019 -0600
++++ plplot-trunk/debian/octave-plplot.files	2012-06-08 08:56:05.000000000 -0600
 @@ -0,0 +1,6 @@
 +usr/share/plplot_octave
 +usr/share/octave/site/m/PLplot
@@ -15701,7 +18214,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/octave-plplot.files plplot-trunk/de
 +usr/share/doc/octave-plplot
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/02_unset-python-path.diff plplot-trunk/debian/patches/02_unset-python-path.diff
 --- plplot-5.9.9/debian/patches/02_unset-python-path.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/02_unset-python-path.diff	2012-06-08 08:56:03.978736751 -0600
++++ plplot-trunk/debian/patches/02_unset-python-path.diff	2012-06-08 08:56:03.000000000 -0600
 @@ -0,0 +1,22 @@
 +#! /bin/sh /usr/share/dpatch/dpatch-run
 +## 02_unset-python-path.dpatch by  <andrewross at users.sourceforge.net>
@@ -15727,7 +18240,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/02_unset-python-path.diff p
 +   set(python_location4)
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/04_use-mkoctfile.diff plplot-trunk/debian/patches/04_use-mkoctfile.diff
 --- plplot-5.9.9/debian/patches/04_use-mkoctfile.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/04_use-mkoctfile.diff	2011-04-06 14:28:53.108448950 -0600
++++ plplot-trunk/debian/patches/04_use-mkoctfile.diff	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,85 @@
 +#! /bin/sh /usr/share/dpatch/dpatch-run
 +## 04_use-mkoctfile.dpatch by Rafael Laboissiere <rafael at debian.org>
@@ -15816,7 +18329,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/04_use-mkoctfile.diff plplo
 +     )
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/07_octave_prune_examples.diff plplot-trunk/debian/patches/07_octave_prune_examples.diff
 --- plplot-5.9.9/debian/patches/07_octave_prune_examples.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/07_octave_prune_examples.diff	2011-04-06 14:28:53.108448950 -0600
++++ plplot-trunk/debian/patches/07_octave_prune_examples.diff	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,19 @@
 +#! /bin/sh /usr/share/dpatch/dpatch-run
 +## 07_octave_prune_examples.dpatch by Andrew Ross <andrewross at users.sourceforge.net>
@@ -15839,7 +18352,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/07_octave_prune_examples.di
 + 		endif
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/08_nn_link_libm.diff plplot-trunk/debian/patches/08_nn_link_libm.diff
 --- plplot-5.9.9/debian/patches/08_nn_link_libm.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/08_nn_link_libm.diff	2012-06-08 08:56:03.990735903 -0600
++++ plplot-trunk/debian/patches/08_nn_link_libm.diff	2012-06-08 08:56:03.000000000 -0600
 @@ -0,0 +1,39 @@
 +#
 +# Patch from upstream to ensure nn library is linked against the maths library.
@@ -15880,9 +18393,226 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/08_nn_link_libm.diff plplot
 +   install(TARGETS csironn
 +     EXPORT export_plplot
 +     ARCHIVE DESTINATION ${LIB_DIR}
+diff -ruN --exclude .svn plplot-5.9.9/debian/patches/fix-boolean-operators.diff plplot-trunk/debian/patches/fix-boolean-operators.diff
+--- plplot-5.9.9/debian/patches/fix-boolean-operators.diff	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/debian/patches/fix-boolean-operators.diff	2012-12-14 08:51:01.681332178 -0700
+@@ -0,0 +1,213 @@
++Description: Fix the short-circuit boolean operators
++Author: Rafael Laboissiere <rafael at laboissiere.net>
++Last-Update: 2012-03-31
++
++--- plplot-5.9.9.orig/bindings/octave/PLplot/figure.m
+++++ plplot-5.9.9/bindings/octave/PLplot/figure.m
++@@ -183,7 +183,7 @@ function [n, driver, intp]= figure (n, d
++       endif
++ 
++       ## the tk stuff
++-      if (0 & strcmp("tk", sprintf("%s",plgdev')))
+++      if (0 && strcmp("tk", sprintf("%s",plgdev')))
++ 	if (! exist("tk_start") && nargin == 6)
++ 	  error("Can't use this Tk feature of PLplot until tk_octave \
++                  is installed!\n")
++@@ -234,7 +234,7 @@ function [n, driver, intp]= figure (n, d
++       #pladv(0);
++       #plflush;pleop;
++       
++-      if ( 0 & exist("__tk_name") & (strcmp("tk", sprintf("%s",plgdev'))))
+++      if ( 0 && exist("__tk_name") && (strcmp("tk", sprintf("%s",plgdev'))))
++ 	eval(tk_receive(1));
++ 	__pl.intp = __pl_matstr(__pl.intp, intp, strm);	# tk interpreter name					
++ 	unlink(init_file);
++--- plplot-5.9.9.orig/bindings/octave/PLplot/shade.m
+++++ plplot-5.9.9/bindings/octave/PLplot/shade.m
++@@ -52,7 +52,7 @@ function shade(x, y, z, levels, cont )
++     levels = 2;
++   endif
++ 
++-  if (rows(x) > 1 & columns(x) > 1 & rows(y) > 1 & columns(y) > 1)
+++  if (rows(x) > 1 && columns(x) > 1 && rows(y) > 1 && columns(y) > 1)
++     xymat = 1;
++   else
++     xymat = 0;
++@@ -76,7 +76,7 @@ function shade(x, y, z, levels, cont )
++     if (__pl.axis_st(strm))
++       xm = __pl.axis(strm,1); xM = __pl.axis(strm,2);
++       if (xymat == 0)
++-        ix = find(x >= xm & x <= xM); 
+++        ix = find(x >= xm && x <= xM); 
++         x=x(ix); z=z(:,ix);
++         xmm = min(x); 
++       endif
++@@ -84,7 +84,7 @@ function shade(x, y, z, levels, cont )
++       if (length(__pl.axis(strm,:)) >= 4)	
++ 	ym = __pl.axis(strm,3); yM = __pl.axis(strm,4);
++         if (xymat == 0)
++-	  iy = find(y >= ym & y <= yM);
+++	  iy = find(y >= ym && y <= yM);
++ 	  y=y(iy); z=z(iy,:);
++ 	  ymm = min(y);
++         endif
++@@ -113,8 +113,8 @@ function shade(x, y, z, levels, cont )
++     ymm = ym = __pl.axis(strm,3); yM = __pl.axis(strm,4);
++     zm = __pl.axis(strm,5); zM = __pl.axis(strm,6);
++     if (xymat == 0)
++-      ix = find(x >= xm & x <= xM);
++-      iy = find(y >= ym & y <= yM);
+++      ix = find(x >= xm && x <= xM);
+++      iy = find(y >= ym && y <= yM);
++       z = z( iy, ix );
++       x = x( ix );
++       y = y( iy );
++@@ -122,10 +122,10 @@ function shade(x, y, z, levels, cont )
++   endif
++ 
++   maxx = max(max(x)); maxy = max(max(y)); minx = min(min(x)); miny = min(min(y));
++-  if (columns(x)>1 & rows(x) == 1)
+++  if (columns(x)>1 && rows(x) == 1)
++     x = x';
++   endif
++-  if (columns(y)>1 & rows(y) == 1)
+++  if (columns(y)>1 && rows(y) == 1)
++     y = y';
++   endif
++     
++@@ -154,7 +154,7 @@ function shade(x, y, z, levels, cont )
++ 	      cont_color, cont_width, max_color, max_width, 1, x, y);
++     endfor
++   else
++-    if (columns(x) == 1 & columns(y) == 1)
+++    if (columns(x) == 1 && columns(y) == 1)
++       plshades1(z', minx, maxx, miny, maxy, 
++ 	     clevel', 1, cont_color, cont_width, 1, x, y);
++     else
++--- plplot-5.9.9.orig/bindings/octave/PLplot/plot3.m
+++++ plplot-5.9.9/bindings/octave/PLplot/plot3.m
++@@ -32,11 +32,11 @@ function plot3 (x, y, z, fmt)
++   global __pl
++   strm = __pl_init;
++ 
++-  if (nargin != 4 & nargin != 3)
+++  if (nargin != 4 && nargin != 3)
++     error("plot3: not yet.\n");
++   endif
++ 
++-  if (isvector(x) & isvector(y) & isvector(y))
+++  if (isvector(x) && isvector(y) && isvector(y))
++     
++     if (nargin == 3)
++       fmt = "-r";
++@@ -44,7 +44,7 @@ function plot3 (x, y, z, fmt)
++ 
++     __pl_plot3(x, y, z, fmt);
++     
++-  elseif (ismatrix(x) & ismatrix(y) & ismatrix(z))
+++  elseif (ismatrix(x) && ismatrix(y) && ismatrix(z))
++     
++     if (!common_size(x,y,z))
++ 
++--- plplot-5.9.9.orig/bindings/octave/PLplot/fill.m
+++++ plplot-5.9.9/bindings/octave/PLplot/fill.m
++@@ -45,10 +45,10 @@ function fill(x, y, c)
++     error("fill: not yet.\n");
++   endif
++ 
++-  if (isvector(x) & isvector(y))
+++  if (isvector(x) && isvector(y))
++     __pl_fill(x, y, c);
++     
++-  elseif (ismatrix(x) | ismatrix(y))
+++  elseif (ismatrix(x) || ismatrix(y))
++ 
++     if (rows(x) == rows(y))
++       if (isvector(x))
++--- plplot-5.9.9.orig/bindings/octave/PLplot/save_fig.m
+++++ plplot-5.9.9/bindings/octave/PLplot/save_fig.m
++@@ -88,7 +88,7 @@ function save_fig(file, device, rev)
++ 
++   device = dev;
++ 
++-  if (nargin >= 1 && ischar(device) & ischar(file))
+++  if (nargin >= 1 && ischar(device) && ischar(file))
++     
++     to_prt = 0;
++     if (strcmp(file,"|lp"))	# special output file, printer!
++@@ -97,7 +97,7 @@ function save_fig(file, device, rev)
++       fclose(fp);
++     elseif (file(1) == '~')
++       file = tilde_expand(file);
++-    elseif (exist("FIGDIR") & file(1) != '/' & file(1) != '.')
+++    elseif (exist("FIGDIR") && file(1) != '/' && file(1) != '.')
++       file = [FIGDIR, '/', file];
++     endif
++ 
++--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_logplotit.m
+++++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_logplotit.m
++@@ -39,7 +39,7 @@ function __pl_logplotit
++       endif
++     elseif (__pl.type(strm) == 30)
++       if (any(y <= 0) || any(x <= 0))
++-	expr = "ix = find(y > 0 & x > 0);";
+++	expr = "ix = find(y > 0 && x > 0);";
++       else
++ 	break;
++       endif
++--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_fill.m
+++++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_fill.m
++@@ -31,7 +31,7 @@ function __pl_fill(x, y, c)
++ 
++   strm = plgstrm+1;
++ 
++-  if (isvector(x) & isvector(y))
+++  if (isvector(x) && isvector(y))
++     if (columns(x) != 1)
++       x = x';
++       y = y';
++@@ -55,7 +55,7 @@ function __pl_fill(x, y, c)
++       __pl_plenv(min(x), max(x), min(y), max(y), 0, -1);
++     endif
++     
++-    if (ischar(c) & length(c) == 1)
+++    if (ischar(c) && length(c) == 1)
++       ## map to plplot color
++       coln = ['r','g','b','c','m','y','w','k'];
++       coli = [2, 4, 10, 12, 14, 3, 16, 1];
++@@ -67,11 +67,11 @@ function __pl_fill(x, y, c)
++       else
++ 	plcol1(c);
++       endif
++-    elseif (isvector(c) & length(c) == 3)
+++    elseif (isvector(c) && length(c) == 3)
++       ## FIXME -- color 15 became permanently set!
++       plscol0(15, c(1), c(2), c(3));
++       plcol0(15);
++-    elseif (isvector(c) & length(x) == length(x))
+++    elseif (isvector(c) && length(x) == length(x))
++       
++       ## If C is a vector the same length as X and Y, its elements are
++       ## scaled by CAXIS and used as indices into the current COLORMAP to
++--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_plot3.m
+++++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_plot3.m
++@@ -20,7 +20,7 @@ function __pl_plot3(x, y, z, c)
++ 
++   strm = plgstrm+1;
++ 
++-  if (isvector(x) & isvector(y) & isvector(z))
+++  if (isvector(x) && isvector(y) && isvector(z))
++ 
++     if (columns(x) != 1)
++       x = x';
++--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_matstr.m
+++++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_matstr.m
++@@ -20,7 +20,7 @@
++ function out = __pl_matstr(mat, str, n)
++ 
++   ## Octave damned string arrays are defective!
++-  if (ischar(str) & ischar(mat) & rows(str) == 1)
+++  if (ischar(str) && ischar(mat) && rows(str) == 1)
++     if (isempty(mat))
++       out(n,:) = str;
++     else
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/fix-cmake-ada-support.diff plplot-trunk/debian/patches/fix-cmake-ada-support.diff
 --- plplot-5.9.9/debian/patches/fix-cmake-ada-support.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/fix-cmake-ada-support.diff	2012-08-03 15:40:23.818810058 -0600
++++ plplot-trunk/debian/patches/fix-cmake-ada-support.diff	2012-08-03 15:40:23.000000000 -0600
 @@ -0,0 +1,25 @@
 +Description: Fix up cmake Ada support for compatibility with cmake 2.8.9 
 +Author: Andrew Ross <andrewross at users.sourceforge.net>
@@ -15911,7 +18641,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/fix-cmake-ada-support.diff
 + ENDIF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS)
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/fix-lua-includes.diff plplot-trunk/debian/patches/fix-lua-includes.diff
 --- plplot-5.9.9/debian/patches/fix-lua-includes.diff	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/fix-lua-includes.diff	2012-08-03 15:40:23.817810058 -0600
++++ plplot-trunk/debian/patches/fix-lua-includes.diff	2012-08-03 15:40:23.000000000 -0600
 @@ -0,0 +1,21 @@
 +Description: Fix for cmake lua support to work around problem that lua needs multiple include directories on Debian
 +Author: Andrew Ross <andrewross at users.sourceforge.net>
@@ -15934,9 +18664,80 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/fix-lua-includes.diff plplo
 ++  endif(linkflags1)
 ++endif(ENABLE_lua AND LUA51_FOUND)
 ++
+diff -ruN --exclude .svn plplot-5.9.9/debian/patches/proper-path-handling.diff plplot-trunk/debian/patches/proper-path-handling.diff
+--- plplot-5.9.9/debian/patches/proper-path-handling.diff	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/debian/patches/proper-path-handling.diff	2012-12-14 08:51:01.682332231 -0700
+@@ -0,0 +1,17 @@
++Description: Proper use of the rmpath function
++Author: Rafael Laboissiere <rafael at laboissiere.net>
++Last-Update: 2012-03-31
++
++--- plplot-5.9.9.orig/bindings/octave/PLplot/toggle_plplot_use.m
+++++ plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m
++@@ -34,9 +34,7 @@ endif
++ use_plplot_path = plplot_octave_path;
++ plplot_path_to_remove = strsplit(genpath(use_plplot_path),pathsep);
++ for use_plplot_i=1:size(plplot_path_to_remove)(1)
++-  if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
++-    rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
++-  endif
+++  rmpath(plplot_path_to_remove{use_plplot_i});
++ endfor
++ 
++ if (strcmp (use_plplot_state, "on"))
+diff -ruN --exclude .svn plplot-5.9.9/debian/patches/replace-deprecated-split.diff plplot-trunk/debian/patches/replace-deprecated-split.diff
+--- plplot-5.9.9/debian/patches/replace-deprecated-split.diff	1969-12-31 17:00:00.000000000 -0700
++++ plplot-trunk/debian/patches/replace-deprecated-split.diff	2012-12-14 08:51:01.681332178 -0700
+@@ -0,0 +1,46 @@
++Description: Replace the calls to the deprecated split function
++Author: Rafael Laboissiere <rafael at laboissiere.net>
++Last-Update: 2012-03-31
++
++--- plplot-5.9.9.orig/bindings/octave/PLplot/figure.m
+++++ plplot-5.9.9/bindings/octave/PLplot/figure.m
++@@ -49,7 +49,7 @@ function [n, driver, intp]= figure (n, d
++   global pl_automatic_replot
++ 
++   if (!exist("__pl") || !struct_contains (__pl,"inited"))
++-    v = split(version ,'.');
+++    v = char(strsplit(version ,'.'));
++     if (! ((str2num(v(1,:)) > 2) ||
++            (str2num(v(1,:)) == 2 && str2num(v(2,:)) == 9 &&
++             str2num(v(3,:)) >= 0)))
++--- plplot-5.9.9.orig/bindings/octave/PLplot/toggle_plplot_use.m
+++++ plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m
++@@ -32,7 +32,7 @@ else
++ endif
++ 
++ use_plplot_path = plplot_octave_path;
++-plplot_path_to_remove = split(genpath(use_plplot_path),pathsep);
+++plplot_path_to_remove = strsplit(genpath(use_plplot_path),pathsep);
++ for use_plplot_i=1:size(plplot_path_to_remove)(1)
++   if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
++     rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
++--- plplot-5.9.9.orig/plplot_test/test_octave.sh.in
+++++ plplot-5.9.9/plplot_test/test_octave.sh.in
++@@ -45,7 +45,7 @@
++ endif
++ 
++ plplot_stub;
++-t = split("$options", "-"); 
+++t = char(strsplit("$options", "-")); 
++ if (t); t(1,:)=""; endif;
++ for i=1:rows(t)
++     tt = deblank (t(i,:)); len = length(tt);
++@@ -83,7 +83,7 @@
++     if (verbose_test)
++ 	printf("%s\n",cmd);
++     endif
++-    t = split("$options", "-"); 
+++    t = char(strsplit("$options", "-")); 
++     if (t) ; t(1,:)=""; endif
++     for j=1:rows(t)
++         tt = deblank (t(j,:)); len = length(tt);
 diff -ruN --exclude .svn plplot-5.9.9/debian/patches/series plplot-trunk/debian/patches/series
 --- plplot-5.9.9/debian/patches/series	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/patches/series	2012-08-03 15:40:23.827810060 -0600
++++ plplot-trunk/debian/patches/series	2012-08-03 15:40:23.000000000 -0600
 @@ -0,0 +1,9 @@
 +02_unset-python-path.diff
 +#04_use-mkoctfile.diff
@@ -15949,13 +18750,13 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/patches/series plplot-trunk/debian/
 +fix-lua-includes.diff
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-cairo.files plplot-trunk/debian/plplot11-driver-cairo.files
 --- plplot-5.9.9/debian/plplot11-driver-cairo.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot11-driver-cairo.files	2011-11-02 09:43:03.892124898 -0600
++++ plplot-trunk/debian/plplot11-driver-cairo.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/plplot*/driversd/cairo.*
 +usr/share/doc/plplot11-driver-cairo
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-gd.files plplot-trunk/debian/plplot11-driver-gd.files
 --- plplot-5.9.9/debian/plplot11-driver-gd.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot11-driver-gd.files	2011-11-02 09:43:03.912124165 -0600
++++ plplot-trunk/debian/plplot11-driver-gd.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,4 @@
 +usr/lib/plplot*/driversd/gd.*
 +usr/share/doc/plplot11-driver-gd
@@ -15963,7 +18764,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-gd.files plplot-tru
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-qt.files plplot-trunk/debian/plplot11-driver-qt.files
 --- plplot-5.9.9/debian/plplot11-driver-qt.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot11-driver-qt.files	2011-11-02 09:43:03.888125044 -0600
++++ plplot-trunk/debian/plplot11-driver-qt.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,4 @@
 +usr/lib/plplot*/driversd/qt.*
 +usr/lib/libplplotqtd.so.*
@@ -15971,7 +18772,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-qt.files plplot-tru
 +usr/lib/python*/plplot_pyqt4.so
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-wxwidgets.files plplot-trunk/debian/plplot11-driver-wxwidgets.files
 --- plplot-5.9.9/debian/plplot11-driver-wxwidgets.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot11-driver-wxwidgets.files	2011-11-02 09:43:03.889125008 -0600
++++ plplot-trunk/debian/plplot11-driver-wxwidgets.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,5 @@
 +usr/lib/plplot*/driversd/wxwidgets.*
 +usr/lib/libplplotwxwidgetsd.so.*
@@ -15980,7 +18781,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-wxwidgets.files plp
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-xwin.files plplot-trunk/debian/plplot11-driver-xwin.files
 --- plplot-5.9.9/debian/plplot11-driver-xwin.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot11-driver-xwin.files	2011-11-02 09:43:03.907124349 -0600
++++ plplot-trunk/debian/plplot11-driver-xwin.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,4 @@
 +usr/lib/plplot*/driversd/xwin.*
 +usr/share/doc/plplot11-driver-xwin
@@ -15988,7 +18789,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot11-driver-xwin.files plplot-t
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-doc.doc-base plplot-trunk/debian/plplot-doc.doc-base
 --- plplot-5.9.9/debian/plplot-doc.doc-base	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot-doc.doc-base	2011-04-06 14:28:53.581408504 -0600
++++ plplot-trunk/debian/plplot-doc.doc-base	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,14 @@
 +Document: plplot-manual
 +Title: The PLplot Plotting Library: Programmer's Reference Manual
@@ -16006,7 +18807,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-doc.doc-base plplot-trunk/de
 +Files: /usr/share/doc/plplot-doc/html/*
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-doc.files plplot-trunk/debian/plplot-doc.files
 --- plplot-5.9.9/debian/plplot-doc.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot-doc.files	2011-04-06 14:28:53.591407648 -0600
++++ plplot-trunk/debian/plplot-doc.files	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,4 @@
 +usr/share/doc/plplot-doc
 +usr/share/man/man3
@@ -16014,7 +18815,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-doc.files plplot-trunk/debia
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl-dev.files plplot-trunk/debian/plplot-tcl-dev.files
 --- plplot-5.9.9/debian/plplot-tcl-dev.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot-tcl-dev.files	2011-11-02 09:43:03.896124750 -0600
++++ plplot-trunk/debian/plplot-tcl-dev.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,7 @@
 +usr/lib/lib*tcl*
 +usr/include/plplot/pltcl.h
@@ -16025,7 +18826,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl-dev.files plplot-trunk/d
 +usr/share/doc/libplplot11/examples/tk
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl-dev.lintian-overrides plplot-trunk/debian/plplot-tcl-dev.lintian-overrides
 --- plplot-5.9.9/debian/plplot-tcl-dev.lintian-overrides	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot-tcl-dev.lintian-overrides	2011-11-02 09:43:03.893124861 -0600
++++ plplot-trunk/debian/plplot-tcl-dev.lintian-overrides	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,7 @@
 +# The .in files are templates for the example scripts which are configured 
 +# by CMake and so the interpreter is replaced before the script is 
@@ -16036,7 +18837,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl-dev.lintian-overrides pl
 +plplot-tcl-dev binary: example-interpreter-not-absolute usr/share/doc/libplplot11/examples/tk/tk04.in #!@xtk04_LOCATION@
 diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl.files plplot-trunk/debian/plplot-tcl.files
 --- plplot-5.9.9/debian/plplot-tcl.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/plplot-tcl.files	2011-04-06 14:28:53.611405938 -0600
++++ plplot-trunk/debian/plplot-tcl.files	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,9 @@
 +usr/lib/lib*tcl*.so.*
 +usr/bin/plserver
@@ -16049,20 +18850,20 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/plplot-tcl.files plplot-trunk/debia
 +usr/share/doc/plplot-tcl
 diff -ruN --exclude .svn plplot-5.9.9/debian/python-plplot.files plplot-trunk/debian/python-plplot.files
 --- plplot-5.9.9/debian/python-plplot.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/python-plplot.files	2011-11-02 09:43:03.908124312 -0600
++++ plplot-trunk/debian/python-plplot.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,3 @@
 +usr/lib/python*
 +usr/share/doc/libplplot11/examples/*python*
 +usr/share/doc/python-plplot
 diff -ruN --exclude .svn plplot-5.9.9/debian/python-plplot-qt.files plplot-trunk/debian/python-plplot-qt.files
 --- plplot-5.9.9/debian/python-plplot-qt.files	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/python-plplot-qt.files	2011-11-02 09:43:03.898124678 -0600
++++ plplot-trunk/debian/python-plplot-qt.files	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,2 @@
 +usr/lib/python*/dist-packages/plplot_pyqt4.so
 +usr/share/doc/python-plplot-qt
 diff -ruN --exclude .svn plplot-5.9.9/debian/README.Debian plplot-trunk/debian/README.Debian
 --- plplot-5.9.9/debian/README.Debian	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/README.Debian	2011-11-02 09:43:03.921123835 -0600
++++ plplot-trunk/debian/README.Debian	2011-11-02 09:43:03.000000000 -0600
 @@ -0,0 +1,105 @@
 +plplot for Debian
 +-----------------
@@ -16171,7 +18972,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/README.Debian plplot-trunk/debian/R
 + -- Rafael Laboissiere <rafael at debian.org>, Tue Mar  4 17:05:31 2003
 diff -ruN --exclude .svn plplot-5.9.9/debian/README.source plplot-trunk/debian/README.source
 --- plplot-5.9.9/debian/README.source	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/README.source	2011-04-06 14:28:53.583408332 -0600
++++ plplot-trunk/debian/README.source	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,8 @@
 +README.source for plplot
 +========================
@@ -16183,7 +18984,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/README.source plplot-trunk/debian/R
 + -- Rafael Laboissiere <rafael at debian.org>  Thu, 23 Apr 2009 09:13:07 +0100
 diff -ruN --exclude .svn plplot-5.9.9/debian/Release plplot-trunk/debian/Release
 --- plplot-5.9.9/debian/Release	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/Release	2011-04-06 14:28:53.592407563 -0600
++++ plplot-trunk/debian/Release	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,5 @@
 +Archive: unstable
 +Component: main
@@ -16192,7 +18993,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/Release plplot-trunk/debian/Release
 +Architecture: i386
 diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 --- plplot-5.9.9/debian/rules	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/rules	2012-06-08 08:56:05.101657738 -0600
++++ plplot-trunk/debian/rules	2012-12-14 08:51:01.693332625 -0700
 @@ -0,0 +1,256 @@
 +#!/usr/bin/make -f
 +# -*- gmake -*-
@@ -16211,8 +19012,6 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 +MDIR = $(shell octave-config --print LOCALAPIFCNFILEDIR)
 +OCTDIR = $(shell octave-config --print LOCALAPIOCTFILEDIR)
 +
-+#include /usr/share/quilt/quilt.make
-+
 +version		:= $(shell perl debian/get-upstream-version.pl < cmake/modules/plplot_version.cmake)
 +libpkg          := libplplot11
 +docpkg          := plplot-doc
@@ -16226,10 +19025,12 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 +debex		:= $(debshr)/plplot$(version)/examples
 +octver		:= $(shell octave-config -v)
 +
-+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
++# Note cmake ignores CPPFLAGS so add them to CFLAGS and CXXFLAGS as a work around
++CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
++CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
 +CFLAGS += -fvisibility=hidden
 +#Don't add -fvisibility=hidden to CXXFLAGS for now as this breaks the octave bindings.
-+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
++CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
 +#CXXFLAGS += -fvisibility=hidden
 +FFLAGS = $(shell dpkg-buildflags --get FFLAGS)
 +FFLAGS += -fvisibility=hidden
@@ -16247,9 +19048,9 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 +
 +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 +
-+# Disable Ada build on armhf and sh4 - gnat not available on these at the moment.
++# Disable Ada build on sh4 - gnat not available at the moment.
 +
-+ifneq (,$(findstring :$(DEB_BUILD_ARCH):,:armhf:sh4:))
++ifneq (,$(findstring :$(DEB_BUILD_ARCH):,:sh4:))
 +BUILD_ADA = no
 +else
 +BUILD_ADA = yes
@@ -16293,7 +19094,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 +	PKG_CONFIG_ENV=" " F77=gfortran FC=gfortran \
 +	JAVA_HOME=$(JAVA_HOME) DC=$(DC) \
 +        CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" \
-+        LDFLAGS="$(LDFLAGS)" \
++        LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 +	cmake $(SRC_DIR) $(CONFIGURE_OPTIONS) )
 +	touch config-stamp
 +
@@ -16452,12 +19253,12 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/rules plplot-trunk/debian/rules
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/source/format plplot-trunk/debian/source/format
 --- plplot-5.9.9/debian/source/format	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/source/format	2011-11-02 09:43:01.412215772 -0600
++++ plplot-trunk/debian/source/format	2011-11-02 09:43:01.000000000 -0600
 @@ -0,0 +1 @@
 +3.0 (quilt)
 diff -ruN --exclude .svn plplot-5.9.9/debian/TODO plplot-trunk/debian/TODO
 --- plplot-5.9.9/debian/TODO	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/TODO	2011-04-06 14:28:53.614405682 -0600
++++ plplot-trunk/debian/TODO	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,29 @@
 +-*- text -*-
 +
@@ -16490,7 +19291,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/TODO plplot-trunk/debian/TODO
 +  -> DONE
 diff -ruN --exclude .svn plplot-5.9.9/debian/upload-debs.pl plplot-trunk/debian/upload-debs.pl
 --- plplot-5.9.9/debian/upload-debs.pl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/upload-debs.pl	2011-04-06 14:28:53.617405425 -0600
++++ plplot-trunk/debian/upload-debs.pl	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,206 @@
 +#!/usr/bin/perl -w
 +#
@@ -16700,7 +19501,7 @@ diff -ruN --exclude .svn plplot-5.9.9/debian/upload-debs.pl plplot-trunk/debian/
 +
 diff -ruN --exclude .svn plplot-5.9.9/debian/watch plplot-trunk/debian/watch
 --- plplot-5.9.9/debian/watch	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/debian/watch	2011-04-06 14:28:53.588407905 -0600
++++ plplot-trunk/debian/watch	2011-04-06 14:28:53.000000000 -0600
 @@ -0,0 +1,3 @@
 +version=3
 +opts="uversionmangle=s/-/~/" \
@@ -20151,6 +22952,20 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/ada_unique.html plplot-tru
 -></HTML
 ->
 \ No newline at end of file
+diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/ada.xml plplot-trunk/doc/docbook/src/ada.xml
+--- plplot-5.9.9/doc/docbook/src/ada.xml	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/doc/docbook/src/ada.xml	2012-12-14 08:50:54.825376048 -0700
+@@ -874,8 +874,8 @@
+       behavior is as though a proper-length array of all
+       <literal>False</literal> values was passed. In Ada, these procedures are
+       overloaded to allow a last argument that can be either an array of
+-      Boolean or a value of the enumerated type <literal>(Reverse_Hue_None,
+-      Reverse_Hue_All)</literal>.</para>
++      Boolean or a value of the enumerated type <literal>type Alt_Hue_Path_Type is (Alt_Hue_Path_None,
++      Alt_Hue_Path_All)</literal>.</para>
+     </sect2>
+   </sect1>
+ 
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/advanced.html plplot-trunk/doc/docbook/src/advanced.html
 --- plplot-5.9.9/doc/docbook/src/advanced.html	2011-10-12 18:43:01.000000000 -0600
 +++ plplot-trunk/doc/docbook/src/advanced.html	1969-12-31 17:00:00.000000000 -0700
@@ -20484,7 +23299,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/advanced.html plplot-trunk
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/advanced.xml plplot-trunk/doc/docbook/src/advanced.xml
 --- plplot-5.9.9/doc/docbook/src/advanced.xml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/advanced.xml	2012-08-03 15:40:24.600810024 -0600
++++ plplot-trunk/doc/docbook/src/advanced.xml	2012-08-03 15:40:24.000000000 -0600
 @@ -1403,14 +1403,22 @@
      of globally turning off the color (and subsequently turning it on again
      if so desired) using &plscolor;. </para>
@@ -21477,7 +24292,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api-compat.html plplot-tru
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api-compat.xml plplot-trunk/doc/docbook/src/api-compat.xml
 --- plplot-5.9.9/doc/docbook/src/api-compat.xml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/api-compat.xml	2012-08-03 15:40:24.603810024 -0600
++++ plplot-trunk/doc/docbook/src/api-compat.xml	2012-08-03 15:40:24.000000000 -0600
 @@ -106,11 +106,9 @@
  	    <filename>plplot.h</filename>.  If no prototype is changed,
  	    then the chances are high that no backwards compatibilities
@@ -25088,7 +27903,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api_regression_tests.html
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api.xml plplot-trunk/doc/docbook/src/api.xml
 --- plplot-5.9.9/doc/docbook/src/api.xml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/api.xml	2012-01-28 07:51:43.364799986 -0700
++++ plplot-trunk/doc/docbook/src/api.xml	2012-12-14 08:50:54.827375951 -0700
 @@ -1838,7 +1838,7 @@
      </para>
  
@@ -25098,7 +27913,17 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api.xml plplot-trunk/doc/d
      </para>
  
    </sect1>
-@@ -5017,6 +5017,11 @@
+@@ -3180,7 +3180,8 @@
+       <literal><parameter>n</parameter></literal> points
+       <literal>(<parameter>x</parameter>[i],
+       <parameter>y</parameter>[i])</literal> using the pattern defined by
+-      &plpsty; or &plpat;.  The routine will automatically close the
++      &plpsty; or &plpat;.  The default fill style is a solid fill. 
++      The routine will automatically close the
+       polygon between the last and first vertices.  If multiple closed
+       polygons are passed in <literal><parameter>x</parameter></literal>
+       and <literal><parameter>y</parameter></literal> then &plfill; will
+@@ -5017,6 +5018,11 @@
  	    Perl/PDL: Not available?
  	  </para>
  	</listitem>
@@ -25110,7 +27935,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api.xml plplot-trunk/doc/d
        </itemizedlist>
      </para>
  
-@@ -8810,7 +8815,7 @@
+@@ -8810,7 +8816,7 @@
      </para>
  
      <para>
@@ -25119,7 +27944,131 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/api.xml plplot-trunk/doc/d
      </para>
  
    </sect1>
-@@ -14030,7 +14035,7 @@
+@@ -9143,7 +9149,7 @@
+ 
+     <para>
+       Select one of eight predefined area fill patterns to use (also see
+-      &plpat;).
++      &plpat;). Setting the fill style to 0 gives a solid fill.
+     </para>
+ 
+     <variablelist>
+@@ -10194,7 +10200,7 @@
+ 	  <paramdef><parameter>coord1</parameter></paramdef>
+ 	  <paramdef><parameter>coord2</parameter></paramdef>
+ 	  <paramdef><parameter>coord3</parameter></paramdef>
+-	  <paramdef><parameter>rev</parameter></paramdef>
++	  <paramdef><parameter>alt_hue_path</parameter></paramdef>
+ 	</funcprototype>
+       </funcsynopsis>
+     </para>
+@@ -10206,7 +10212,8 @@
+ 
+     <para>
+       The idea here is to specify a number of control points that define
+-      the mapping between palette 1 input positions (intensities) and HLS (or RGB).  Between
++      the mapping between palette 1 input positions (intensities) and 
++      HLS (or RGB).  Between
+       these points, linear interpolation is used which
+       gives a smooth variation of
+       color with input position.  Any number of control points may be specified,
+@@ -10229,12 +10236,37 @@
+       position = 1.
+     </para>
+ 
+-    <para> The hue is interpolated around the "front" of the color wheel
+-    (red&lt;->green&lt;->blue&lt;->red) unless the "rev" flag is set to true,
+-    in which case interpolation (between the <literal>i</literal> and
+-    <literal>i + 1</literal> control point for <literal>rev[i]</literal>)
+-    proceeds around the back (reverse) side.  Specifying rev=NULL is
+-    equivalent to setting rev[]= false for every control point. </para>
++    <para> 
++    The default behaviour is for the hue to be linearly interpolated 
++    between the control points. Since the hue lies in the range [0, 360] this
++    corresponds to interpolation around the "front" of the color wheel
++    (red&lt;->green&lt;->blue&lt;->red). If <literal>alt_hue_path[i]</literal> 
++    is true, then an alternative interpolation is used between control points
++    <literal>i</literal> and <literal>i+1</literal>. If 
++    <literal>hue[i+1]-hue[i] > 0</literal> then interpolation is between 
++    <literal>hue[i]</literal> and <literal>hue[i+1] - 360</literal>, otherwise 
++    between <literal>hue[i]</literal> and <literal>hue[i+1] + 360</literal>. 
++    You can consider this as interpolation around the "back" or "reverse" of 
++    the color wheel. Specifying <literal>alt_hue_path=NULL</literal> is
++    equivalent to setting <literal>alt_hue_path[] = false</literal> for 
++    every control point. 
++    </para>
++
++    <para>
++      <table frame="none"><title> Examples of interpolation </title>
++      <tgroup cols="3" align="center" colsep="0" rowsep="0">
++        <thead>
++          <row><entry>Hue</entry><entry>alt_hue_path</entry><entry>color scheme</entry></row>
++        </thead>
++	<tbody>
++	  <row><entry>[120 240]</entry><entry>false</entry><entry>green-cyan-blue</entry> </row>
++	  <row><entry>[240 120]</entry><entry>false</entry><entry>blue-cyan-green</entry> </row>
++	  <row><entry>[120 240]</entry><entry>true</entry><entry>green-yellow-red-magenta-blue</entry> </row>
++	  <row><entry>[240 120]</entry><entry>true</entry><entry>blue-magenta-red-yellow-green</entry> </row>
++	</tbody>
++      </tgroup>
++      </table>
++    </para>
+ 
+     <para>
+       <table frame="none"><title> Bounds on coordinates</title>
+@@ -10321,13 +10353,13 @@
+       </varlistentry>
+       <varlistentry>
+ 	<term>
+-	  <parameter>rev</parameter>
++	  <parameter>alt_hue_path</parameter>
+ 	  (<literal>PLBOOL: *</literal>, input)
+ 	</term>
+ 	<listitem>
+ 	  <para>
+-	    reverse flag for each control point. (<literal>rev[i]</literal> 
+-	    refers
++	    alternative interpolation method flag for each control point. 
++            (<literal>alt_hue_path[i]</literal> refers
+ 	    to the interpolation interval between the <literal>i</literal> and
+ 	    <literal>i + 1</literal> control points).
+ 	  </para>
+@@ -10336,7 +10368,7 @@
+     </variablelist>
+ 
+     <para>
+-      Redacted form: <function>plscmap1l(itype, pos, coord1, coord2, coord3, rev)</function>
++      Redacted form: <function>plscmap1l(itype, pos, coord1, coord2, coord3, alt_hue_path)</function>
+     </para>
+ 
+     <para>
+@@ -10364,7 +10396,7 @@
+ 	  <paramdef><parameter>coord2</parameter></paramdef>
+ 	  <paramdef><parameter>coord3</parameter></paramdef>
+ 	  <paramdef><parameter>coord4</parameter></paramdef>	
+-	  <paramdef><parameter>rev</parameter></paramdef>
++	  <paramdef><parameter>alt_hue_path</parameter></paramdef>
+ 	</funcprototype>
+       </funcsynopsis>
+     </para>
+@@ -10458,13 +10490,13 @@
+       </varlistentry>
+       <varlistentry>
+ 	<term>
+-	  <parameter>rev</parameter>
++	  <parameter>alt_hue_path</parameter>
+ 	  (<literal>PLBOOL: *</literal>, input)
+ 	</term>
+ 	<listitem>
+ 	  <para>
+-	    reverse flag for each control point. (<literal>rev[i]</literal> 
+-	    refers
++	    alternative interpolation method flag for each control point. 
++            (<literal>alt_hue_path[i]</literal> refers
+ 	    to the interpolation interval between the <literal>i</literal> and
+ 	    <literal>i + 1</literal> control points).
+ 	  </para>
+@@ -14030,7 +14062,7 @@
      </para>
  
      <para>
@@ -31335,7 +34284,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/deploying.html plplot-trun
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/deploying.xml plplot-trunk/doc/docbook/src/deploying.xml
 --- plplot-5.9.9/doc/docbook/src/deploying.xml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/deploying.xml	2012-08-03 15:40:24.601810024 -0600
++++ plplot-trunk/doc/docbook/src/deploying.xml	2012-08-03 15:40:24.000000000 -0600
 @@ -91,7 +91,7 @@
      url="http://plplot.sourceforge.net/resources/index.html">Resources
      area</ulink> of the PLplot web site for locations of debs and rpms.)
@@ -39851,7 +42800,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/intro.html plplot-trunk/do
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/intro.xml plplot-trunk/doc/docbook/src/intro.xml
 --- plplot-5.9.9/doc/docbook/src/intro.xml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/intro.xml	2012-01-04 08:45:34.422591067 -0700
++++ plplot-trunk/doc/docbook/src/intro.xml	2012-01-04 08:45:34.000000000 -0700
 @@ -276,8 +276,8 @@
        Library General Public License for more details.
  
@@ -389495,7 +392444,7 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/plplotdoc.txml plplot-trun
 -    </para></texinfo></texinfoset>
 diff -ruN --exclude .svn plplot-5.9.9/doc/docbook/src/plplotdoc.xml.in plplot-trunk/doc/docbook/src/plplotdoc.xml.in
 --- plplot-5.9.9/doc/docbook/src/plplotdoc.xml.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/doc/docbook/src/plplotdoc.xml.in	2011-04-06 14:29:08.469135320 -0600
++++ plplot-trunk/doc/docbook/src/plplotdoc.xml.in	2011-04-06 14:29:08.000000000 -0600
 @@ -43,7 +43,7 @@
  <!DOCTYPE book PUBLIC "@DOCBOOK_DTD_PUBID@" [
  
@@ -1071033,8 +1073982,37 @@ diff -ruN --exclude .svn plplot-5.9.9/doc/doxygen/html/xwin_8c_source.html plplo
 -</html>
 diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo.c
 --- plplot-5.9.9/drivers/cairo.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/cairo.c	2012-01-28 07:51:44.726751010 -0700
-@@ -259,12 +259,17 @@
++++ plplot-trunk/drivers/cairo.c	2012-12-14 08:50:51.453394772 -0700
+@@ -152,20 +152,23 @@
+ #if defined ( PLD_pscairo )
+     "pscairo:Cairo PS Driver:0:cairo:102:pscairo\n"
+ #endif
++#if defined ( PLD_epscairo )
++    "epscairo:Cairo EPS Driver:0:cairo:103:epscairo\n"
++#endif
+ #if defined ( PLD_svgcairo )
+-    "svgcairo:Cairo SVG Driver:0:cairo:103:svgcairo\n"
++    "svgcairo:Cairo SVG Driver:0:cairo:104:svgcairo\n"
+ #endif
+ #if defined ( PLD_pngcairo )
+-    "pngcairo:Cairo PNG Driver:0:cairo:104:pngcairo\n"
++    "pngcairo:Cairo PNG Driver:0:cairo:105:pngcairo\n"
+ #endif
+ #if defined ( PLD_memcairo )
+-    "memcairo:Cairo Memory Driver:0:cairo:105:memcairo\n"
++    "memcairo:Cairo Memory Driver:0:cairo:106:memcairo\n"
+ #endif
+ #if defined ( PLD_extcairo )
+-    "extcairo:Cairo External Context Driver:0:cairo:106:extcairo\n"
++    "extcairo:Cairo External Context Driver:0:cairo:107:extcairo\n"
+ #endif
+ #if defined ( PLD_wincairo )
+-    "wincairo:Cairo Microscoft Windows Driver:0:cairo:107:wincairo\n"
++    "wincairo:Cairo Microscoft Windows Driver:0:cairo:108:wincairo\n"
+ #endif
+ ;
+ 
+@@ -259,12 +262,17 @@
  static void gradient( PLStream *pls, short *xa, short *ya, PLINT npts );
  static void arc( PLStream *, arc_struct * );
  static void rotate_cairo_surface( PLStream *, float, float, float, float, float, float, PLBOOL );
@@ -1071052,7 +1074030,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
  // PLplot interface functions
  
-@@ -505,7 +510,7 @@
+@@ -505,7 +513,7 @@
  // PLStream for each element that is drawn.
  //--------------------------------------------------------------------------
  
@@ -1071061,7 +1074039,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  {
  }
  
-@@ -517,10 +522,6 @@
+@@ -517,10 +525,6 @@
  
  void plD_esc_cairo( PLStream *pls, PLINT op, void *ptr )
  {
@@ -1071072,7 +1074050,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
      switch ( op )
      {
      case PLESC_FILL:     // filled polygon
-@@ -641,7 +642,7 @@
+@@ -641,7 +645,7 @@
      aStream->level             = 0;
      aStream->pangoMarkupString = (char *) malloc( sizeof ( char ) * MAX_MARKUP_LEN );
      // Calculate the font size (in points since DPI = 72).
@@ -1071081,7 +1074059,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
      for ( i = 0; i < MAX_MARKUP_LEN; i++ )
      {
          aStream->pangoMarkupString[i] = 0;
-@@ -711,7 +712,7 @@
+@@ -711,7 +715,7 @@
              plP_script_scale( TRUE, &aStream->level,
                  &aStream->old_sscale, &aStream->sscale, &aStream->old_soffset, &aStream->soffset );
              strncat( aStream->pangoMarkupString,
@@ -1071090,7 +1074068,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
                  MAX_MARKUP_LEN - 1 - strlen( aStream->pangoMarkupString ) );
          }
          aStream->upDown++;
-@@ -727,7 +728,7 @@
+@@ -727,7 +731,7 @@
              plP_script_scale( FALSE, &aStream->level,
                  &aStream->old_sscale, &aStream->sscale, &aStream->old_soffset, &aStream->soffset );
              strncat( aStream->pangoMarkupString,
@@ -1071099,7 +1074077,130 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
                  MAX_MARKUP_LEN - 1 - strlen( aStream->pangoMarkupString ) );
          }
          aStream->upDown--;
-@@ -871,7 +872,7 @@
+@@ -770,66 +774,67 @@
+     if ( pls->get_string_length )
+     {
+         pls->string_length = (PLFLT) textXExtent * 25.4 / DPI;
+-        return;
+     }
+-
+-    // Set font aliasing
+-    context          = pango_layout_get_context( layout );
+-    cairoFontOptions = cairo_font_options_create();
+-    cairo_font_options_set_antialias( cairoFontOptions, aStream->text_anti_aliasing );
+-    pango_cairo_context_set_font_options( context, cairoFontOptions );
+-    pango_layout_context_changed( layout );
+-    cairo_font_options_destroy( cairoFontOptions );
+-
+-    // Save current transform matrix & clipping region
+-    cairo_save( aStream->cairoContext );
+-
+-    // Set up the clipping region if we are doing text clipping
+-    if ( aStream->text_clipping )
++    else
+     {
+-        set_clip( pls );
+-    }
+-
+-    // Move to the string reference point
+-    cairo_move_to( aStream->cairoContext, aStream->downscale * (double) args->x, aStream->downscale * (double) args->y );
+-
+-    // Invert the coordinate system so that the text is drawn right side up
+-    cairoTransformMatrix = (cairo_matrix_t *) malloc( sizeof ( cairo_matrix_t ) );
+-    cairo_matrix_init( cairoTransformMatrix, 1.0, 0.0, 0.0, -1.0, 0.0, 0.0 );
+-    cairo_transform( aStream->cairoContext, cairoTransformMatrix );
+-
+-    // Extract rotation angle and shear from the PLplot tranformation matrix.
+-    // Compute sines and cosines of the angles as an optimization.
+-    plRotationShear( args->xform, &rotation, &shear, &stride );
+-    rotation -= pls->diorot * PI / 2.0;
+-    cos_rot   = cos( rotation );
+-    sin_rot   = sin( rotation );
+-    cos_shear = cos( shear );
+-    sin_shear = sin( shear );
+-
+-    // Apply the transform matrix
+-    cairo_matrix_init( cairoTransformMatrix,
+-        cos_rot * stride,
+-        -sin_rot * stride,
+-        cos_rot * sin_shear + sin_rot * cos_shear,
+-        -sin_rot * sin_shear + cos_rot * cos_shear,
+-        0, 0 );
+-    cairo_transform( aStream->cairoContext, cairoTransformMatrix );
+-    free( cairoTransformMatrix );
+-
+-    // Move to the text starting point
+-    // printf("baseline %d %d\n", baseline, textYExtent);
+-    cairo_rel_move_to( aStream->cairoContext,
+-        (double) ( -1.0 * args->just * (double) textXExtent ),
+-        (double) 0.5 * aStream->fontSize - baseline / 1024.0 );
++        // Set font aliasing
++        context          = pango_layout_get_context( layout );
++        cairoFontOptions = cairo_font_options_create();
++        cairo_font_options_set_antialias( cairoFontOptions, aStream->text_anti_aliasing );
++        pango_cairo_context_set_font_options( context, cairoFontOptions );
++        pango_layout_context_changed( layout );
++        cairo_font_options_destroy( cairoFontOptions );
++
++        // Save current transform matrix & clipping region
++        cairo_save( aStream->cairoContext );
++
++        // Set up the clipping region if we are doing text clipping
++        if ( aStream->text_clipping )
++        {
++            set_clip( pls );
++        }
++
++        // Move to the string reference point
++        cairo_move_to( aStream->cairoContext, aStream->downscale * (double) args->x, aStream->downscale * (double) args->y );
++
++        // Invert the coordinate system so that the text is drawn right side up
++        cairoTransformMatrix = (cairo_matrix_t *) malloc( sizeof ( cairo_matrix_t ) );
++        cairo_matrix_init( cairoTransformMatrix, 1.0, 0.0, 0.0, -1.0, 0.0, 0.0 );
++        cairo_transform( aStream->cairoContext, cairoTransformMatrix );
++
++        // Extract rotation angle and shear from the PLplot tranformation matrix.
++        // Compute sines and cosines of the angles as an optimization.
++        plRotationShear( args->xform, &rotation, &shear, &stride );
++        rotation -= pls->diorot * PI / 2.0;
++        cos_rot   = cos( rotation );
++        sin_rot   = sin( rotation );
++        cos_shear = cos( shear );
++        sin_shear = sin( shear );
++
++        // Apply the transform matrix
++        cairo_matrix_init( cairoTransformMatrix,
++            cos_rot * stride,
++            -sin_rot * stride,
++            cos_rot * sin_shear + sin_rot * cos_shear,
++            -sin_rot * sin_shear + cos_rot * cos_shear,
++            0, 0 );
++        cairo_transform( aStream->cairoContext, cairoTransformMatrix );
++        free( cairoTransformMatrix );
++
++        // Move to the text starting point
++        // printf("baseline %d %d\n", baseline, textYExtent);
++        cairo_rel_move_to( aStream->cairoContext,
++            (double) ( -1.0 * args->just * (double) textXExtent ),
++            (double) 0.5 * aStream->fontSize - baseline / 1024.0 );
+ 
+-    // Render the text
+-    pango_cairo_show_layout( aStream->cairoContext, layout );
++        // Render the text
++        pango_cairo_show_layout( aStream->cairoContext, layout );
+ 
+-    // Restore the transform matrix to its state prior to the text transform.
+-    cairo_restore( aStream->cairoContext );
++        // Restore the transform matrix to its state prior to the text transform.
++        cairo_restore( aStream->cairoContext );
++    }
+ 
+-    // Free the layout object and the markup string.
++    // Free the layout object and the markup string
+     g_object_unref( layout );
+     free( aStream->pangoMarkupString );
+ }
+@@ -871,7 +876,7 @@
      }
  
      // Calculate the font size (in points since DPI = 72).
@@ -1071108,7 +1074209,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Convert the escape characters into the appropriate Pango markup
      textWithPangoMarkup = ucs4_to_pango_markup_format( args->unicode_array, args->unicode_array_len, fontSize );
-@@ -1038,7 +1039,7 @@
+@@ -1038,7 +1043,7 @@
                          plP_script_scale( TRUE, &level,
                              &old_sscale, &sscale, &old_soffset, &soffset );
                          strncat( pangoMarkupString,
@@ -1071117,7 +1074218,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
                              MAX_MARKUP_LEN - 1 - strlen( pangoMarkupString ) );
                      }
                      upDown++;
-@@ -1055,7 +1056,7 @@
+@@ -1055,7 +1060,7 @@
                          plP_script_scale( FALSE, &level,
                              &old_sscale, &sscale, &old_soffset, &soffset );
                          strncat( pangoMarkupString,
@@ -1071126,7 +1074227,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
                              MAX_MARKUP_LEN - 1 - strlen( pangoMarkupString ) );
                      }
                      upDown--;
-@@ -1119,7 +1120,7 @@
+@@ -1119,7 +1124,7 @@
          plP_script_scale( TRUE, &level,
              &old_sscale, &sscale, &old_soffset, &soffset );
          strncat( pangoMarkupString,
@@ -1071135,7 +1074236,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
              MAX_MARKUP_LEN - 1 - strlen( pangoMarkupString ) );
      }
      for ( upDown_level = 0; upDown_level > upDown; upDown_level-- )
-@@ -1127,7 +1128,7 @@
+@@ -1127,7 +1132,7 @@
          plP_script_scale( FALSE, &level,
              &old_sscale, &sscale, &old_soffset, &soffset );
          strncat( pangoMarkupString,
@@ -1071144,7 +1074245,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
              MAX_MARKUP_LEN - 1 - strlen( pangoMarkupString ) );
      }
  }
-@@ -1184,16 +1185,16 @@
+@@ -1184,16 +1189,16 @@
      static char tag[100];
  
      // http://developer.gnome.org/pango/unstable/PangoMarkupFormat.html says
@@ -1071164,7 +1074265,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      if ( ifsuperscript )
      {
-@@ -1218,9 +1219,9 @@
+@@ -1218,9 +1223,9 @@
  
  cairo_status_t write_to_stream( void *filePointer, unsigned char *data, unsigned int length )
  {
@@ -1071176,7 +1074277,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
      if ( bytes_written == length )
      {
          return CAIRO_STATUS_SUCCESS;
-@@ -1298,7 +1299,7 @@
+@@ -1298,7 +1303,7 @@
      aStream = malloc( sizeof ( PLCairo ) );
  #if defined ( PLD_xcairo )
      aStream->XDisplay = NULL;
@@ -1071185,7 +1074286,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  #endif
      aStream->cairoSurface = NULL;
      aStream->cairoContext = NULL;
-@@ -1324,11 +1325,11 @@
+@@ -1324,11 +1329,11 @@
      }
  
      // Record users desired text and graphics aliasing and rasterization
@@ -1071202,7 +1074303,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      return aStream;
  }
-@@ -1393,7 +1394,6 @@
+@@ -1393,7 +1398,6 @@
  
  void filled_polygon( PLStream *pls, short *xa, short *ya, PLINT npts )
  {
@@ -1071210,7 +1074311,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
      PLCairo *aStream;
  
      aStream = (PLCairo *) pls->dev;
-@@ -1723,7 +1723,7 @@
+@@ -1723,7 +1727,7 @@
      }
  
      // Invert the surface so that the graphs are drawn right side up.
@@ -1071219,7 +1074320,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Set graphics aliasing
      cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
-@@ -1784,7 +1784,7 @@
+@@ -1784,7 +1788,7 @@
          XScreen    = DefaultScreen( aStream->XDisplay );
          rootWindow = RootWindow( aStream->XDisplay, XScreen );
  
@@ -1071228,7 +1074329,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
              1, BlackPixel( aStream->XDisplay, XScreen ), BlackPixel( aStream->XDisplay, XScreen ) );
          XStoreName( aStream->XDisplay, aStream->XWindow, pls->plwindow );
          XSelectInput( aStream->XDisplay, aStream->XWindow, NoEventMask );
-@@ -1872,8 +1872,6 @@
+@@ -1872,8 +1876,6 @@
      XEvent         event;
      XExposeEvent   *expose;
      PLCairo        *aStream;
@@ -1071237,7 +1074338,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      aStream = (PLCairo *) pls->dev;
  
-@@ -2001,8 +1999,8 @@
+@@ -2001,8 +2003,8 @@
          // Ensure plplot knows the real dimensions of the drawable
          XGetGeometry( aStream->XDisplay, aStream->XWindow, &rootwin,
              &x, &y, &w, &h, &b, &d );
@@ -1071248,7 +1074349,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
          plP_setphy( (PLINT) 0, (PLINT) ( pls->xlength / aStream->downscale ), (PLINT) 0,
              (PLINT) ( pls->ylength / aStream->downscale ) );
  
-@@ -2028,15 +2026,13 @@
+@@ -2028,15 +2030,13 @@
  
  void xcairo_get_cursor( PLStream *pls, PLGraphicsIn *gin )
  {
@@ -1071271,7 +1074372,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      aStream = (PLCairo *) pls->dev;
  
-@@ -2064,7 +2060,7 @@
+@@ -2064,7 +2064,7 @@
      // Get key pressed (if any)
      if ( event.type == KeyPress || event.type == KeyRelease )
      {
@@ -1071280,7 +1074381,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
          if ( keysym == NoSymbol )
              ksname = "NoSymbol";
          else if ( !( ksname = XKeysymToString( keysym ) ) )
-@@ -2082,7 +2078,7 @@
+@@ -2082,7 +2082,7 @@
              gin->keysym = 0xFF & keysym;
              break;
          default:
@@ -1071289,7 +1074390,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
          }
      }
      else // button press
-@@ -2162,7 +2158,7 @@
+@@ -2162,7 +2162,7 @@
      pls->dev = aStream;
  
      // Invert the surface so that the graphs are drawn right side up.
@@ -1071298,16 +1074399,120 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Set graphics aliasing
      cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
-@@ -2245,7 +2241,7 @@
+@@ -2245,7 +2245,111 @@
          plsdiori( 1 );
          pls->freeaspect = 1;
      }
 -    rotate_cairo_surface( pls, 0.0, -1.0, -1.0, 0.0, pls->ylength, pls->xlength, FALSE );
 +    rotate_cairo_surface( pls, 0.0, -1.0, -1.0, 0.0, (float) pls->ylength, (float) pls->xlength, FALSE );
++
++    // Set fill rule for the case of self-intersecting boundaries.
++    if ( pls->dev_eofill )
++        cairo_set_fill_rule( aStream->cairoContext, CAIRO_FILL_RULE_EVEN_ODD );
++    else
++        cairo_set_fill_rule( aStream->cairoContext, CAIRO_FILL_RULE_WINDING );
++}
++
++#endif
++
++
++//--------------------------------------------------------------------------
++//--------------------------------------------------------------------------
++//
++// That which is specific to the cairo EPS driver.
++//
++//--------------------------------------------------------------------------
++//--------------------------------------------------------------------------
++
++#if defined ( PLD_epscairo )
++
++void plD_dispatch_init_epscairo( PLDispatchTable *pdt );
++void plD_init_epscairo( PLStream * );
++
++//--------------------------------------------------------------------------
++// dispatch_init_init()
++//
++// Initialize device dispatch table
++//--------------------------------------------------------------------------
++
++// epscairo
++void plD_dispatch_init_epscairo( PLDispatchTable *pdt )
++{
++#ifndef ENABLE_DYNDRIVERS
++    pdt->pl_MenuStr = "Cairo EPS Driver";
++    pdt->pl_DevName = "epscairo";
++#endif
++    pdt->pl_type     = plDevType_FileOriented;
++    pdt->pl_seq      = 102;
++    pdt->pl_init     = (plD_init_fp) plD_init_epscairo;
++    pdt->pl_line     = (plD_line_fp) plD_line_cairo;
++    pdt->pl_polyline = (plD_polyline_fp) plD_polyline_cairo;
++    pdt->pl_eop      = (plD_eop_fp) plD_eop_cairo;
++    pdt->pl_bop      = (plD_bop_fp) plD_bop_famcairo;
++    pdt->pl_tidy     = (plD_tidy_fp) plD_tidy_cairo;
++    pdt->pl_state    = (plD_state_fp) plD_state_cairo;
++    pdt->pl_esc      = (plD_esc_fp) plD_esc_cairo;
++}
++
++//--------------------------------------------------------------------------
++// plD_init_epscairo()
++//
++// Initialize Cairo EPS device
++//--------------------------------------------------------------------------
++
++void plD_init_epscairo( PLStream *pls )
++{
++    PLCairo *aStream;
++
++    // Setup the PLStream and the font lookup table and allocate a cairo
++    // stream structure.
++    //
++    // NOTE: The check below is necessary since, in family mode, this function
++    //  will be called multiple times. While you might think that it is
++    //  sufficient to update what *should* be the only pointer to the contents
++    //  of pls->dev, i.e. the pointer pls->dev itself, it appears that
++    //  something else somewhere else is also pointing to pls->dev. If you
++    //  change what pls->dev points to then you will get a "bus error", from
++    //  which I infer the existence of said bad stale pointer.
++    //
++    if ( pls->dev == NULL )
++    {
++        aStream = stream_and_font_setup( pls, 0 );
++    }
++    else
++    {
++        stream_and_font_setup( pls, 0 );
++        aStream = pls->dev;
++    }
++
++    // Initialize family file info
++    plFamInit( pls );
++
++    // Prompt for a file name if not already set.
++    plOpenFile( pls );
++
++    // Create an cairo surface & context for EPS file.
++    // Dimension units are pts = 1/72 inches from cairo documentation.
++    aStream->cairoSurface = cairo_ps_surface_create_for_stream( (cairo_write_func_t) write_to_stream, pls->OutFile, (double) pls->ylength, (double) pls->xlength );
++    aStream->cairoContext = cairo_create( aStream->cairoSurface );
++
++    // Set the PS surface to be EPS.
++    cairo_ps_surface_set_eps( aStream->cairoSurface, 1 );
++
++    // Save the pointer to the structure in the PLplot stream
++    pls->dev = aStream;
++
++    // Handle portrait or landscape
++    if ( pls->portrait )
++    {
++        plsdiori( 1 );
++        pls->freeaspect = 1;
++    }
++    rotate_cairo_surface( pls, 0.0, -1.0, -1.0, 0.0, (float) pls->ylength, (float) pls->xlength, FALSE );
  
      // Set fill rule for the case of self-intersecting boundaries.
      if ( pls->dev_eofill )
-@@ -2341,7 +2337,7 @@
+@@ -2341,7 +2445,7 @@
      aStream->cairoContext = cairo_create( aStream->cairoSurface );
  
      // Invert the surface so that the graphs are drawn right side up.
@@ -1071316,7 +1074521,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Set graphics aliasing
      cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
-@@ -2437,11 +2433,11 @@
+@@ -2437,11 +2541,11 @@
  
      // Create a new cairo surface & context for PNG file.
      // Dimension units are pixels from cairo documentation.
@@ -1071330,7 +1074535,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Set graphics aliasing
      cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
-@@ -2516,7 +2512,7 @@
+@@ -2516,7 +2620,7 @@
  // Set up for the next page.
  //--------------------------------------------------------------------------
  
@@ -1071339,7 +1074544,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  {
      // nothing to do here (we want to preserve the memory as it is)
  }
-@@ -2574,7 +2570,7 @@
+@@ -2574,7 +2678,7 @@
      // Red, Green, and Blue are stored in the remaining 24 bits in that order
      stride = pls->xlength * 4;
      // stride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, pls->xlength);  This function missing from version 1.4 :-(
@@ -1071348,7 +1074553,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Copy the input data into the Cairo data format
      cairo_mem = aStream->cairo_format_memory;
-@@ -2635,7 +2631,7 @@
+@@ -2635,7 +2739,7 @@
      pls->dev = aStream;
  
      // Invert the surface so that the graphs are drawn right side up.
@@ -1071357,7 +1074562,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
      // Set graphics aliasing
      cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
-@@ -2822,7 +2818,7 @@
+@@ -2822,7 +2926,7 @@
  // End of page.
  //--------------------------------------------------------------------------
  
@@ -1071366,7 +1074571,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  {
      // nothing to do here, we leave it to the calling program to display
      // (or not) the update cairo context.
-@@ -2849,7 +2845,7 @@
+@@ -2849,7 +2953,7 @@
          cairo_set_antialias( aStream->cairoContext, aStream->graphics_anti_aliasing );
  
          // Invert the surface so that the graphs are drawn right side up.
@@ -1071375,7 +1074580,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  
          // Should adjust plot size to fit in the given cairo context?
          // Cairo does not provide a way to query the dimensions of a context?
-@@ -2879,7 +2875,7 @@
+@@ -2879,7 +2983,7 @@
  // context, etc...
  //--------------------------------------------------------------------------
  
@@ -1071384,9 +1074589,38 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.c plplot-trunk/drivers/cairo
  {
  }
  
+diff -ruN --exclude .svn plplot-5.9.9/drivers/cairo.driver_info.in plplot-trunk/drivers/cairo.driver_info.in
+--- plplot-5.9.9/drivers/cairo.driver_info.in	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/drivers/cairo.driver_info.in	2012-12-14 08:50:51.454394767 -0700
+@@ -1,8 +1,9 @@
+ xcairo:Cairo X Windows Driver:1:cairo:100:xcairo
+ pdfcairo:Cairo PDF Driver:0:cairo:101:pdfcairo
+ pscairo:Cairo PS Driver:0:cairo:102:pscairo
+-svgcairo:Cairo SVG Driver:0:cairo:103:svgcairo
+-pngcairo:Cairo PNG Driver:0:cairo:104:pngcairo
+-memcairo:Cairo Memory Driver:0:cairo:105:memcairo
+-extcairo:Cairo External Context Driver:0:cairo:106:extcairo
+-wincairo:Cairo Microscoft Windows Driver:0:cairo:107:wincairo
++epscairo:Cairo EPS Driver:0:cairo:103:epscairo
++svgcairo:Cairo SVG Driver:0:cairo:104:svgcairo
++pngcairo:Cairo PNG Driver:0:cairo:105:pngcairo
++memcairo:Cairo Memory Driver:0:cairo:106:memcairo
++extcairo:Cairo External Context Driver:0:cairo:107:extcairo
++wincairo:Cairo Microscoft Windows Driver:0:cairo:108:wincairo
+diff -ruN --exclude .svn plplot-5.9.9/drivers/CMakeLists.txt plplot-trunk/drivers/CMakeLists.txt
+--- plplot-5.9.9/drivers/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/drivers/CMakeLists.txt	2012-12-14 08:50:51.455394762 -0700
+@@ -119,7 +119,6 @@
+ 	  ${MATH_LIB}
+ 	  ${${SOURCE_ROOT_NAME}_LINK_FLAGS}
+ 	  ${${SOURCE_ROOT_NAME}_TARGETS}
+-	  ${QT_LIBRARIES}
+ 	  )
+       else(ANY_QT_DEVICE)
+ 	message(FATAL_ERROR "Internal build system inconsistency.  Attempt to build dynamic qt device when ANY_QT_DEVICE is false.")
 diff -ruN --exclude .svn plplot-5.9.9/drivers/mem.c plplot-trunk/drivers/mem.c
 --- plplot-5.9.9/drivers/mem.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/mem.c	2011-11-02 09:43:10.951866115 -0600
++++ plplot-trunk/drivers/mem.c	2011-11-02 09:43:10.000000000 -0600
 @@ -1,5 +1,5 @@
  //
 -// $Id: mem.c 11282 2010-10-28 16:26:09Z airwin $
@@ -1071426,7 +1074660,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/mem.c plplot-trunk/drivers/mem.c
  }
 diff -ruN --exclude .svn plplot-5.9.9/drivers/null.c plplot-trunk/drivers/null.c
 --- plplot-5.9.9/drivers/null.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/null.c	2011-11-02 09:43:10.968865492 -0600
++++ plplot-trunk/drivers/null.c	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: null.c 11282 2010-10-28 16:26:09Z airwin $
 +// $Id: null.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1071489,7 +1074723,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/null.c plplot-trunk/drivers/null.c
  
 diff -ruN --exclude .svn plplot-5.9.9/drivers/plmeta.c plplot-trunk/drivers/plmeta.c
 --- plplot-5.9.9/drivers/plmeta.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/plmeta.c	2012-01-04 08:45:36.376520727 -0700
++++ plplot-trunk/drivers/plmeta.c	2012-01-04 08:45:36.000000000 -0700
 @@ -1,23 +1,21 @@
 -// $Id: plmeta.c 11283 2010-10-28 22:38:29Z airwin $
 +// $Id: plmeta.c 12081 2011-12-01 11:52:28Z andrewross $
@@ -1071533,7 +1074767,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/plmeta.c plplot-trunk/drivers/plme
  //
 diff -ruN --exclude .svn plplot-5.9.9/drivers/plplotcanvas-hacktext.c plplot-trunk/drivers/plplotcanvas-hacktext.c
 --- plplot-5.9.9/drivers/plplotcanvas-hacktext.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/plplotcanvas-hacktext.c	2012-01-04 08:45:36.367521051 -0700
++++ plplot-trunk/drivers/plplotcanvas-hacktext.c	2012-01-04 08:45:36.000000000 -0700
 @@ -15,7 +15,7 @@
  //
  //  You should have received a copy of the GNU Library General Public
@@ -1071545,7 +1074779,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/plplotcanvas-hacktext.c plplot-tru
  //    Federico Mena <federico at nuclecu.unam.mx>
 diff -ruN --exclude .svn plplot-5.9.9/drivers/ps.c plplot-trunk/drivers/ps.c
 --- plplot-5.9.9/drivers/ps.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/ps.c	2012-01-04 08:45:36.391520187 -0700
++++ plplot-trunk/drivers/ps.c	2012-01-04 08:45:36.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: ps.c 11935 2011-09-25 16:09:38Z airwin $
 +// $Id: ps.c 12088 2011-12-02 10:31:07Z andrewross $
@@ -1071716,7 +1074950,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/ps.c plplot-trunk/drivers/ps.c
      // because it doesn't have the PL_FCI_MARK.
 diff -ruN --exclude .svn plplot-5.9.9/drivers/psttf.cc plplot-trunk/drivers/psttf.cc
 --- plplot-5.9.9/drivers/psttf.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/psttf.cc	2012-01-28 07:51:44.716751370 -0700
++++ plplot-trunk/drivers/psttf.cc	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: psttf.cc 11795 2011-07-06 02:28:50Z airwin $
 +// $Id: psttf.cc 12146 2012-01-22 00:21:26Z airwin $
@@ -1071879,8 +1075113,19 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/psttf.cc plplot-trunk/drivers/pstt
  int
 diff -ruN --exclude .svn plplot-5.9.9/drivers/qt.cpp plplot-trunk/drivers/qt.cpp
 --- plplot-5.9.9/drivers/qt.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/qt.cpp	2011-11-02 09:43:10.984864907 -0600
-@@ -1041,8 +1041,6 @@
++++ plplot-trunk/drivers/qt.cpp	2012-12-14 08:50:51.456394757 -0700
+@@ -755,6 +755,10 @@
+     double downscale;
+     QSize  s;
+ 
++    if ( qt_family_check( pls ) )
++    {
++        return;
++    }
+     ( (QtSVGDevice *) pls->dev )->savePlot();
+     // Once saved, we have to create a new device with the same properties
+     // to be able to plot another page.
+@@ -1041,8 +1045,6 @@
  {
      double downscale;
  
@@ -1071889,7 +1075134,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/qt.cpp plplot-trunk/drivers/qt.cpp
      if ( qt_family_check( pls ) )
      {
          return;
-@@ -1677,7 +1675,7 @@
+@@ -1677,7 +1679,7 @@
      closeQtApp();
  }
  
@@ -1071898,7 +1075143,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/qt.cpp plplot-trunk/drivers/qt.cpp
  {
  }
  
-@@ -1802,7 +1800,7 @@
+@@ -1802,7 +1804,7 @@
      pls->family = true;
  }
  
@@ -1071907,9 +1075152,21 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/qt.cpp plplot-trunk/drivers/qt.cpp
  {
      // Do nothing to preserve user data
  }
+diff -ruN --exclude .svn plplot-5.9.9/drivers/README.drivers plplot-trunk/drivers/README.drivers
+--- plplot-5.9.9/drivers/README.drivers	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/drivers/README.drivers	2012-12-14 08:50:51.454394767 -0700
+@@ -29,7 +29,7 @@
+ This should be the exact duplicate of the corresponding entry in the
+ driver source code for plD_DEVICE_INFO_<driver>.
+ 
+-2. Add the following line to plplot_cmake/modules/drivers-init.cmake in
++2. Add the following line to plplot/cmake/modules/drivers-init.cmake in
+ set(DRIVERS_DEVICE_LIST... 
+ 
+ "<dev>:<driver>:ON:<kind>:<familied>"
 diff -ruN --exclude .svn plplot-5.9.9/drivers/svg.c plplot-trunk/drivers/svg.c
 --- plplot-5.9.9/drivers/svg.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/svg.c	2012-01-04 08:45:36.372520871 -0700
++++ plplot-trunk/drivers/svg.c	2012-01-04 08:45:36.000000000 -0700
 @@ -81,12 +81,12 @@
  
  // Functions for writing XML SVG tags to a file
@@ -1072083,7 +1075340,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/svg.c plplot-trunk/drivers/svg.c
      fprintf( aStream->svgFile, "%s", text );
 diff -ruN --exclude .svn plplot-5.9.9/drivers/test-drv-info.c plplot-trunk/drivers/test-drv-info.c
 --- plplot-5.9.9/drivers/test-drv-info.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/test-drv-info.c	2012-01-28 07:51:44.727750974 -0700
++++ plplot-trunk/drivers/test-drv-info.c	2012-01-28 07:51:44.000000000 -0700
 @@ -17,7 +17,7 @@
  //
  // You should have received a copy of the GNU Library General Public License
@@ -1072117,10 +1075374,10 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/test-drv-info.c plplot-trunk/drive
      char        sym[SYM_LEN];
 diff -ruN --exclude .svn plplot-5.9.9/drivers/tk.c plplot-trunk/drivers/tk.c
 --- plplot-5.9.9/drivers/tk.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/tk.c	2012-01-04 08:45:36.388520295 -0700
++++ plplot-trunk/drivers/tk.c	2012-12-14 08:50:51.456394757 -0700
 @@ -1,4 +1,4 @@
 -// $Id: tk.c 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: tk.c 12104 2011-12-08 20:53:37Z andrewross $
++// $Id: tk.c 12207 2012-08-13 21:02:37Z airwin $
  //
  //	PLplot Tcl/Tk and Tcl-DP device drivers.
  //	Should be broken up somewhat better to allow use of DP w/o X.
@@ -1072243,7 +1075500,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/tk.c plplot-trunk/drivers/tk.c
 +            tk_wr( pdf_wr_ieeef( pls->pdfs, (float) pls->cmap1cp[i].h ) );
 +            tk_wr( pdf_wr_ieeef( pls->pdfs, (float) pls->cmap1cp[i].l ) );
 +            tk_wr( pdf_wr_ieeef( pls->pdfs, (float) pls->cmap1cp[i].s ) );
-+            tk_wr( pdf_wr_1byte( pls->pdfs, (U_CHAR) pls->cmap1cp[i].rev ) );
++            tk_wr( pdf_wr_1byte( pls->pdfs, (U_CHAR) pls->cmap1cp[i].alt_hue_path ) );
          }
          break;
      }
@@ -1072616,7 +1075873,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/tk.c plplot-trunk/drivers/tk.c
          dev->cmdbuf_len = strlen( cmd ) + 20;
 diff -ruN --exclude .svn plplot-5.9.9/drivers/tkwin.c plplot-trunk/drivers/tkwin.c
 --- plplot-5.9.9/drivers/tkwin.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/tkwin.c	2011-11-02 09:43:10.958865857 -0600
++++ plplot-trunk/drivers/tkwin.c	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: tkwin.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: tkwin.c 11975 2011-10-19 11:05:10Z andrewross $
@@ -1072842,9 +1076099,174 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/tkwin.c plplot-trunk/drivers/tkwin
      }
      return changed;
  }
+diff -ruN --exclude .svn plplot-5.9.9/drivers/wingcc.c plplot-trunk/drivers/wingcc.c
+--- plplot-5.9.9/drivers/wingcc.c	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/drivers/wingcc.c	2012-12-14 08:50:51.454394767 -0700
+@@ -1,4 +1,4 @@
+-// $Id: wingcc.c 11760 2011-06-01 19:29:11Z airwin $
++// $Id: wingcc.c 12242 2012-10-05 21:31:41Z andrewross $
+ //
+ //      PLplot WIN32 under GCC device driver.
+ //
+@@ -27,6 +27,7 @@
+ 
+ #include <string.h>
+ #include <windows.h>
++#include <tchar.h>
+ #ifdef _WIN64
+ #define GWL_USERDATA    GWLP_USERDATA
+ #define GCL_HCURSOR     GCLP_HCURSOR
+@@ -145,8 +146,8 @@
+ //  Local Function definitions and function-like defines
+ //--------------------------------------------------------------------------
+ 
+-static int GetRegValue( char *key_name, char *key_word, char *buffer, int size );
+-static int SetRegValue( char *key_name, char *key_word, char *buffer, int dwType, int size );
++static int GetRegValue( TCHAR *key_name, TCHAR *key_word, char *buffer, int size );
++static int SetRegValue( TCHAR *key_name, TCHAR *key_word, char *buffer, int dwType, int size );
+ static void Resize( PLStream *pls );
+ static void plD_fill_polygon_wingcc( PLStream *pls );
+ static void CopySCRtoBMP( PLStream *pls );
+@@ -226,7 +227,7 @@
+     pdt->pl_esc      = (plD_esc_fp) plD_esc_wingcc;
+ }
+ 
+-static char* szWndClass = "PlplotWin";
++static TCHAR* szWndClass = _T( "PlplotWin" );
+ 
+ 
+ //--------------------------------------------------------------------------
+@@ -257,6 +258,7 @@
+     else
+     {
+ #ifndef _WIN64
++#undef GetWindowLongPtr
+ #define GetWindowLongPtr    GetWindowLong
+ #endif
+         pls = (PLStream *) GetWindowLongPtr( hwnd, GWL_USERDATA ); // Try to get the address to pls for this window
+@@ -301,7 +303,7 @@
+                     if ( dev->ps.fErase )
+                     {
+                         dev->oldcolour = SetBkColor( dev->hdc, RGB( pls->cmap0[0].r, pls->cmap0[0].g, pls->cmap0[0].b ) );
+-                        ExtTextOut( dev->hdc, 0, 0, ETO_OPAQUE, &dev->rect, "", 0, 0 );
++                        ExtTextOut( dev->hdc, 0, 0, ETO_OPAQUE, &dev->rect, _T( "" ), 0, 0 );
+                         SetBkColor( dev->hdc, dev->oldcolour );
+                     }
+ 
+@@ -372,7 +374,7 @@
+                 //
+ 
+                 dev->oldcolour = SetBkColor( dev->hdc, RGB( pls->cmap0[0].r, pls->cmap0[0].g, pls->cmap0[0].b ) );
+-                ExtTextOut( dev->hdc, 0, 0, ETO_OPAQUE, &dev->rect, "", 0, 0 );
++                ExtTextOut( dev->hdc, 0, 0, ETO_OPAQUE, &dev->rect, _T( "" ), 0, 0 );
+                 SetBkColor( dev->hdc, dev->oldcolour );
+ 
+                 dev->already_erased = 1;
+@@ -416,9 +418,9 @@
+ //  Variables used for reading the registary keys
+ //  might eventually add a user defined pallette here, but for now it just does freetype
+ //
+-    char key_name[]       = "Software\\PLplot\\wingcc";
+-    char Keyword_text[]   = "freetype";
+-    char Keyword_smooth[] = "smooth";
++    TCHAR key_name[]       = _T( "Software\\PLplot\\wingcc" );
++    TCHAR Keyword_text[]   = _T( "freetype" );
++    TCHAR Keyword_smooth[] = _T( "smooth" );
+ #endif
+ 
+     DrvOpt wingcc_options[] = {
+@@ -431,6 +433,12 @@
+         { NULL,     DRV_INT, NULL,         NULL                                    }
+     };
+ 
++//
++// Variable for storing the program name
++//
++    TCHAR *program;
++    int   programlength;
++
+ // Allocate and initialize device-specific data
+ 
+     if ( pls->dev != NULL )
+@@ -539,13 +547,24 @@
+ 
+     RegisterClassEx( &dev->wndclass );
+ 
++    //
++    //convert the program name to wide char if needed
++    //
+ 
++#ifdef UNICODE
++    printf( pls->program );
++    programlength = strlen( pls->program ) + 1;
++    program       = malloc( programlength * sizeof ( TCHAR ) );
++    MultiByteToWideChar( CP_UTF8, 0, pls->program, programlength, program, programlength );
++#else
++    program = pls->program;
++#endif
+     //
+     // Create our main window using that window class.
+     //
+     dev->hwnd = CreateWindowEx( WS_EX_WINDOWEDGE + WS_EX_LEFT,
+         szWndClass,                                         // Class name
+-        pls->program,                                       // Caption
++        program,                                            // Caption
+         WS_OVERLAPPEDWINDOW,                                // Style
+         pls->xoffset,                                       // Initial x (use default)
+         pls->yoffset,                                       // Initial y (use default)
+@@ -557,6 +576,9 @@
+         NULL                                                // Creation parameters
+         );
+ 
++#ifdef UNICODE
++    free( program );
++#endif
+ 
+ //
+ // Attach a pointer to the stream to the window's user area
+@@ -577,9 +599,9 @@
+ //
+ 
+     dev->PopupMenu = CreatePopupMenu();
+-    AppendMenu( dev->PopupMenu, MF_STRING, PopupPrint, "Print" );
+-    AppendMenu( dev->PopupMenu, MF_STRING, PopupNextPage, "Next Page" );
+-    AppendMenu( dev->PopupMenu, MF_STRING, PopupQuit, "Quit" );
++    AppendMenu( dev->PopupMenu, MF_STRING, PopupPrint, _T( "Print" ) );
++    AppendMenu( dev->PopupMenu, MF_STRING, PopupNextPage, _T( "Next Page" ) );
++    AppendMenu( dev->PopupMenu, MF_STRING, PopupQuit, _T( "Quit" ) );
+ 
+ #ifdef HAVE_FREETYPE
+ 
+@@ -1070,7 +1092,7 @@
+ //  that is is there !
+ //--------------------------------------------------------------------------
+ 
+-static int SetRegValue( char *key_name, char *key_word, char *buffer, int dwType, int size )
++static int SetRegValue( TCHAR *key_name, TCHAR *key_word, char *buffer, int dwType, int size )
+ {
+     int   j = 0;
+ 
+@@ -1106,7 +1128,7 @@
+ //  Return code is 1 for success, and 0 for failure.
+ //--------------------------------------------------------------------------
+ 
+-static int GetRegValue( char *key_name, char *key_word, char *buffer, int size )
++static int GetRegValue( TCHAR *key_name, TCHAR *key_word, char *buffer, int size )
+ {
+     int  ret = 0;
+     HKEY hKey;
+@@ -1375,7 +1397,7 @@
+ 
+     ZeroMemory( &docinfo, sizeof ( docinfo ) );
+     docinfo.cbSize      = sizeof ( docinfo );
+-    docinfo.lpszDocName = "Plplot Page";
++    docinfo.lpszDocName = _T( "Plplot Page" );
+ 
+     //
+     //   Reset out printer structure to zero and initialise it
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_agg.cpp plplot-trunk/drivers/wxwidgets_agg.cpp
 --- plplot-5.9.9/drivers/wxwidgets_agg.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets_agg.cpp	2012-08-03 15:40:25.079810002 -0600
++++ plplot-trunk/drivers/wxwidgets_agg.cpp	2012-08-03 15:40:25.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets_agg.cpp 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: wxwidgets_agg.cpp 12197 2012-07-06 20:54:41Z airwin $
@@ -1072877,7 +1076299,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_agg.cpp plplot-trunk/dri
      if ( !drawText )
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_app.cpp plplot-trunk/drivers/wxwidgets_app.cpp
 --- plplot-5.9.9/drivers/wxwidgets_app.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets_app.cpp	2011-11-02 09:43:10.931866851 -0600
++++ plplot-trunk/drivers/wxwidgets_app.cpp	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets_app.cpp 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: wxwidgets_app.cpp 12009 2011-10-28 13:06:27Z andrewross $
@@ -1072926,10 +1076348,10 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_app.cpp plplot-trunk/dri
          {
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers/wxwidgets.cpp
 --- plplot-5.9.9/drivers/wxwidgets.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets.cpp	2012-08-03 15:40:25.077810002 -0600
++++ plplot-trunk/drivers/wxwidgets.cpp	2012-12-14 08:50:51.450394788 -0700
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets.cpp 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: wxwidgets.cpp 12197 2012-07-06 20:54:41Z airwin $
++// $Id: wxwidgets.cpp 12281 2012-11-23 21:27:51Z andrewross $
  //
  // Copyright (C) 2005  Werner Smekal, Sjaak Verdoold
  // Copyright (C) 2005  Germain Carrera Corraleche
@@ -1072973,7 +1076395,36 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
  #endif
  }
  
-@@ -231,7 +250,8 @@
+@@ -157,6 +176,8 @@
+     devDesc = (const char **) malloc( NDEV * sizeof ( char** ) );
+     memset( devDesc, '\0', NDEV * sizeof ( char** ) );
+     ndev = NDEV;
++
++    lineSpacing = 1.0;
+ }
+ 
+ 
+@@ -215,14 +236,11 @@
+     char plplotEsc;
+     plgesc( &plplotEsc );
+ 
+-    // Get the curent font
+-    fontScale = 1.0;
+-    yOffset   = 0.0;
+-    PLUNICODE fci;
+-    plgfci( &fci );
+-    PSSetFont( fci );
+-    textWidth  = 0;
+-    textHeight = 0;
++    //Reset the size metrics
++    textWidth         = 0;
++    textHeight        = 0;
++    superscriptHeight = 0;
++    subscriptDepth    = 0;
+ 
+     while ( i < ucs4Len )
+     {
+@@ -231,7 +249,8 @@
              if ( ucs4[i] != (PLUNICODE) plplotEsc ) // a character to display
              {
                  ucs4_to_utf8( ucs4[i], utf8 );
@@ -1072983,7 +1076434,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
                  i++;
                  continue;
              }
-@@ -239,7 +259,8 @@
+@@ -239,7 +258,8 @@
              if ( ucs4[i] == (PLUNICODE) plplotEsc ) // a escape character to display
              {
                  ucs4_to_utf8( ucs4[i], utf8 );
@@ -1072993,6 +1076444,14 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
                  i++;
                  continue;
              }
+@@ -311,6 +331,7 @@
+     // Log_Verbose( "common_init()" );
+ 
+     wxPLDevBase* dev;
++    PLFLT      downscale, downscale2;
+ 
+     // default options
+     static PLINT freetype    = -1;
 @@ -373,10 +394,12 @@
          dev = new wxPLDevDC;
          // by default the own text routines are used for wxDC
@@ -1073006,7 +1076465,22 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
          if ( freetype == -1 )
              freetype = 0;
          break;
-@@ -675,10 +698,12 @@
+@@ -458,8 +481,12 @@
+     plP_setpxl( (PLFLT) VIRTUAL_PIXELS_PER_MM, (PLFLT) VIRTUAL_PIXELS_PER_MM );
+ 
+     // Set up physical limits of plotting device (in drawing units)
+-    plP_setphy( (PLINT) 0, (PLINT) ( CANVAS_WIDTH * VIRTUAL_PIXELS_PER_IN ),
+-        (PLINT) 0, (PLINT) ( CANVAS_HEIGHT * VIRTUAL_PIXELS_PER_IN ) );
++    downscale  = (double) dev->width / (double) ( PIXELS_X - 1 );
++    downscale2 = (double) dev->height / (double) PIXELS_Y;
++    if ( downscale < downscale2 )
++        downscale = downscale2;
++    plP_setphy( (PLINT) 0, (PLINT) ( dev->width / downscale ),
++        (PLINT) 0, (PLINT) ( dev->height / downscale ) );
+ 
+     // get physical device limits coordinates
+     plP_gphy( &dev->xmin, &dev->xmax, &dev->ymin, &dev->ymax );
+@@ -675,10 +702,12 @@
      }
  
      if ( dev->ownGUI )
@@ -1073019,7 +1076493,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
  }
  
  
-@@ -1111,8 +1136,6 @@
+@@ -1111,8 +1140,6 @@
  {
      // Log_Verbose( "init_freetype_lv1" );
  
@@ -1073030,10 +1076504,10 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.cpp plplot-trunk/drivers
      FT_Data *FT = (FT_Data *) pls->FT;
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_dc.cpp plplot-trunk/drivers/wxwidgets_dc.cpp
 --- plplot-5.9.9/drivers/wxwidgets_dc.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets_dc.cpp	2012-06-08 08:56:07.411496400 -0600
++++ plplot-trunk/drivers/wxwidgets_dc.cpp	2012-12-14 08:50:51.452394777 -0700
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets_dc.cpp 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: wxwidgets_dc.cpp 12194 2012-05-08 01:37:27Z airwin $
++// $Id: wxwidgets_dc.cpp 12273 2012-11-16 21:29:14Z andrewross $
  //
  // Copyright (C) 2005  Werner Smekal, Sjaak Verdoold
  // Copyright (C) 2005  Germain Carrera Corraleche
@@ -1073053,23 +1076527,26 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_dc.cpp plplot-trunk/driv
  {
 -    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->cmap0[pls->icol0].r, pls->cmap0[pls->icol0].g,
 -                             pls->cmap0[pls->icol0].b ),
-+    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ),
++    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ),
                           pls->width > 0 ? pls->width : 1, wxSOLID ) ) );
 -    m_dc->SetBrush( wxBrush( wxColour( pls->cmap0[pls->icol0].r, pls->cmap0[pls->icol0].g, pls->cmap0[pls->icol0].b ) ) );
-+    m_dc->SetBrush( wxBrush( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ) ) );
++    m_dc->SetBrush( wxBrush( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ) ) );
  }
  
  
-@@ -254,8 +252,7 @@
+@@ -254,10 +252,9 @@
  //--------------------------------------------------------------------------
  void wxPLDevDC::SetColor1( PLStream *pls )
  {
 -    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->curcolor.r, pls->curcolor.g,
 -                             pls->curcolor.b ),
-+    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ),
++    m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ),
                           pls->width > 0 ? pls->width : 1, wxSOLID ) ) );
-     m_dc->SetBrush( wxBrush( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ) ) );
+-    m_dc->SetBrush( wxBrush( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ) ) );
++    m_dc->SetBrush( wxBrush( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b, pls->curcolor.a ) ) );
  }
+ 
+ 
 @@ -316,6 +313,7 @@
      // The GetPixel method is incredible slow for wxGTK. Therefore we set the colour
      // always to the background color, since this is the case anyway 99% of the time.
@@ -1073078,7 +1076555,78 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_dc.cpp plplot-trunk/driv
      plgcolbg( &bgr, &bgg, &bgb );  // get background color information
      return RGB( bgr, bgg, bgb );
  #else
-@@ -370,7 +368,7 @@
+@@ -339,15 +337,65 @@
+     wxCoord  w, h, d, l;
+ 
+     wxString str( wxConvUTF8.cMB2WC( utf8_string ), *wxConvCurrent );
++
+     m_dc->GetTextExtent( str, &w, &h, &d, &l );
++
+     if ( drawText )
+-        m_dc->DrawRotatedText( str, (wxCoord) ( posX / scalex - yOffset / scaley * sin_rot ),
+-            (wxCoord) ( height - ( posY + yOffset * cos_rot ) / scaley ),
++    {
++        m_dc->DrawRotatedText( str, (wxCoord) ( posX - yOffset / scaley * sin_rot ),
++            (wxCoord) ( height - (wxCoord) ( posY + yOffset * cos_rot / scaley ) ),
+             rotation * 180.0 / M_PI );
+-    posX      += (PLINT) ( w * scalex * cos_rot );
+-    posY      += (PLINT) ( w * scaley * sin_rot );
++        posX += (PLINT) ( w * cos_rot );
++        posY += (PLINT) ( w * sin_rot );
++    }
++
+     textWidth += w;
+-    textHeight = (wxCoord) ( textHeight > ( h + yOffset / scaley ) ? textHeight : ( h + yOffset / scaley ) );
++
++    //keep track of the height of superscript text, the depth of subscript
++    //text and the height of regular text
++    if ( yOffset > 0.0001 )
++    {
++        //determine the height the text would have if it were full size
++        double currentOffset = yOffset;
++        double currentHeight = h;
++        while ( currentOffset > 0.0001 )
++        {
++            currentOffset -= scaley * fontSize * fontScale / 2.;
++            currentHeight *= 1.25;
++        }
++        textHeight = (wxCoord) textHeight > ( currentHeight )
++                     ? textHeight
++                     : currentHeight;
++        //work out the height including superscript
++        superscriptHeight = superscriptHeight > ( currentHeight + yOffset / scaley )
++                            ? superscriptHeight
++                            : static_cast<int>( ( currentHeight + yOffset / scaley ) );
++    }
++    else if ( yOffset < -0.0001 )
++    {
++        //determine the height the text would have if it were full size
++        double currentOffset = yOffset;
++        double currentHeight = h;
++        double currentDepth  = d;
++        while ( currentOffset < -0.0001 )
++        {
++            currentOffset += scaley * fontSize * fontScale * 1.25 / 2.;
++            currentHeight *= 1.25;
++            currentDepth  *= 1.25;
++        }
++        textHeight = (wxCoord) textHeight > currentHeight ? textHeight : currentHeight;
++        //work out the additional depth for subscript note an assumption has been made
++        //that the font size of (non-superscript and non-subscript) text is the same
++        //along a line. Currently there is no escape to change font size mid string
++        //so this should be fine
++        subscriptDepth = (wxCoord) subscriptDepth > ( ( -yOffset / scaley + h + d ) - ( currentDepth + textHeight ) )
++                         ? subscriptDepth
++                         : ( ( -yOffset / scaley + h + d ) - ( currentDepth + textHeight ) );
++        subscriptDepth = subscriptDepth > 0 ? subscriptDepth : 0;
++    }
++    else
++        textHeight = (wxCoord) textHeight > ( h ) ? textHeight : h;
++
+     memset( utf8_string, '\0', max_string_length );
+ }
+ 
+@@ -370,7 +418,7 @@
  
      m_font = wxFont::New( (int) ( fontSize * fontScale < 4 ? 4 : fontSize * fontScale ),
          fontFamilyLookup[fontFamily],
@@ -1073087,7 +1076635,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_dc.cpp plplot-trunk/driv
      m_font->SetUnderlined( underlined );
      m_dc->SetFont( *m_font );
  }
-@@ -421,8 +419,7 @@
+@@ -421,17 +469,69 @@
      sin_rot   = sin( rotation );
  
      // Set font color
@@ -1073096,17 +1076644,96 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_dc.cpp plplot-trunk/driv
 +    m_dc->SetTextForeground( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ) );
      m_dc->SetTextBackground( wxColour( pls->curcolor.r, pls->curcolor.g, pls->curcolor.b ) );
  
-     posX = args->x;
+-    posX = args->x;
+-    posY = args->y;
+-    PSDrawText( args->unicode_array, args->unicode_array_len, false );
+-
+-    posX = (PLINT) ( args->x - ( ( args->just * textWidth ) * cos_rot + ( 0.5 * textHeight ) * sin_rot ) * scalex );
+-    posY = (PLINT) ( args->y - ( ( args->just * textWidth ) * sin_rot - ( 0.5 * textHeight ) * cos_rot ) * scaley );
+-    PSDrawText( args->unicode_array, args->unicode_array_len, true );
++    PLUNICODE *lineStart     = args->unicode_array;
++    int       lineLen        = 0;
++    bool      lineFeed       = false;
++    bool      carriageReturn = false;
++    wxCoord   paraHeight     = 0;
++    // Get the curent font
++    fontScale = 1.0;
++    yOffset   = 0.0;
++    plgfci( &fci );
++    PSSetFont( fci );
++    while ( lineStart != args->unicode_array + args->unicode_array_len )
++    {
++        while ( lineStart + lineLen != args->unicode_array + args->unicode_array_len
++                && *( lineStart + lineLen ) != (PLUNICODE) '\n' )
++        {
++            lineLen++;
++        }
++        //set line feed for the beginning of this line and
++        //carriage return for the end
++        lineFeed       = carriageReturn;
++        carriageReturn = lineStart + lineLen != args->unicode_array + args->unicode_array_len
++                         && *( lineStart + lineLen ) == (PLUNICODE) ( '\n' );
++        if ( lineFeed )
++            paraHeight += textHeight + subscriptDepth;
++
++        //remember the text parameters so they can be restored
++        double    startingFontScale = fontScale;
++        double    startingYOffset   = yOffset;
++        PLUNICODE startingFci       = fci;
++
++        // determine extent of text
++        posX = args->x / scalex;
++        posY = args->y / scaley;
++
++        PSDrawText( lineStart, lineLen, false );
++
++        if ( lineFeed && superscriptHeight > textHeight )
++            paraHeight += superscriptHeight - textHeight;
++
++        // actually draw text, resetting the font first
++        fontScale = startingFontScale;
++        yOffset   = startingYOffset;
++        fci       = startingFci;
++        PSSetFont( fci );
++        posX = (PLINT) ( args->x / scalex - ( args->just * textWidth ) * cos_rot - ( 0.5 * textHeight - paraHeight * lineSpacing ) * sin_rot ); //move to set alignment
++        posY = (PLINT) ( args->y / scaley - ( args->just * textWidth ) * sin_rot + ( 0.5 * textHeight - paraHeight * lineSpacing ) * cos_rot );
++        PSDrawText( lineStart, lineLen, true );                                                                                                 //draw text
++
++        lineStart += lineLen;
++        if ( carriageReturn )
++            lineStart++;
++        lineLen = 0;
++    }
++    //posX = args->x;
++    //posY = args->y;
++    //PSDrawText( args->unicode_array, args->unicode_array_len, false );
++
++    //posX = (PLINT) ( args->x - ( ( args->just * textWidth ) * cos_rot + ( 0.5 * textHeight ) * sin_rot ) * scalex );
++    //posY = (PLINT) ( args->y - ( ( args->just * textWidth ) * sin_rot - ( 0.5 * textHeight ) * cos_rot ) * scaley );
++    //PSDrawText( args->unicode_array, args->unicode_array_len, true );
+ 
+     AddtoClipRegion( 0, 0, width, height );
+ }
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_gc.cpp plplot-trunk/drivers/wxwidgets_gc.cpp
 --- plplot-5.9.9/drivers/wxwidgets_gc.cpp	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets_gc.cpp	2012-06-08 08:56:07.409496538 -0600
++++ plplot-trunk/drivers/wxwidgets_gc.cpp	2012-12-14 08:50:51.452394777 -0700
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets_gc.cpp 11935 2011-09-25 16:09:38Z airwin $
-+// $Id: wxwidgets_gc.cpp 12194 2012-05-08 01:37:27Z airwin $
++// $Id: wxwidgets_gc.cpp 12243 2012-10-10 22:17:10Z andrewross $
  //
  // Copyright (C) 2008  Werner Smekal
  //
-@@ -267,13 +267,13 @@
+@@ -36,6 +36,9 @@
+ // std and driver headers
+ #include "wxwidgets.h"
+ 
++#include <wx/string.h>
++#include <string>
++
+ // only compile code if wxGraphicsContext available
+ #if wxUSE_GRAPHICS_CONTEXT
+ 
+@@ -267,13 +270,13 @@
  {
      // Log_Verbose( "%s", __FUNCTION__ );
  
@@ -1073127,7 +1076754,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_gc.cpp plplot-trunk/driv
  
      m_context->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( mColorRedStroke, mColorGreenStroke,
                                    mColorBlueStroke, mStrokeOpacity ),
-@@ -345,6 +345,9 @@
+@@ -345,6 +348,9 @@
      // Log_Verbose( "%s", __FUNCTION__ );
  
    #ifdef __WXGTK__
@@ -1073137,7 +1076764,74 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_gc.cpp plplot-trunk/driv
      // The GetPixel method is incredible slow for wxGTK. Therefore we set the colour
      // always to the background color, since this is the case anyway 99% of the time.
      PLINT bgr, bgg, bgb;           // red, green, blue
-@@ -395,7 +398,7 @@
+@@ -367,7 +373,10 @@
+     wxDouble w, h, d, l;
+ 
+     wxString str( wxConvUTF8.cMB2WC( utf8_string ), *wxConvCurrent );
++
++    w = 0;
+     m_context->GetTextExtent( str, &w, &h, &d, &l );
++
+     if ( drawText )
+     {
+         m_context->DrawText( str, 0, -yOffset / scaley );
+@@ -375,9 +384,52 @@
+     }
+ 
+     textWidth += static_cast<int>( w );
+-    textHeight = textHeight > ( h + yOffset / scaley )
+-                 ? textHeight
+-                 : static_cast<int>( ( h + yOffset / scaley ) );
++
++    //keep track of the height of superscript text, the depth of subscript
++    //text and the height of regular text
++    if ( yOffset > 0.0001 )
++    {
++        //determine the height the text would have if it were full size
++        double currentOffset = yOffset;
++        double currentHeight = h;
++        while ( currentOffset > 0.0001 )
++        {
++            currentOffset -= scaley * fontSize * fontScale / 2.;
++            currentHeight *= 1.25;
++        }
++        textHeight = textHeight > ( currentHeight )
++                     ? textHeight
++                     : static_cast<int>( ( currentHeight ) );
++        //work out the height including superscript
++        superscriptHeight = superscriptHeight > ( currentHeight + yOffset / scaley )
++                            ? superscriptHeight
++                            : static_cast<int>( ( currentHeight + yOffset / scaley ) );
++    }
++    else if ( yOffset < -0.0001 )
++    {
++        //determine the height the text would have if it were full size
++        double currentOffset = yOffset;
++        double currentHeight = h;
++        double currentDepth  = d;
++        while ( currentOffset < -0.0001 )
++        {
++            currentOffset += scaley * fontSize * fontScale * 1.25 / 2.;
++            currentHeight *= 1.25;
++            currentDepth  *= 1.25;
++        }
++        textHeight = textHeight > currentHeight ? textHeight : static_cast<int>( ( currentHeight ) );
++        //work out the additional depth for subscript note an assumption has been made
++        //that the font size of (non-superscript and non-subscript) text is the same
++        //along a line. Currently there is no escape to change font size mid string
++        //so this should be fine
++        subscriptDepth = subscriptDepth > ( ( -yOffset / scaley + h + d ) - ( currentDepth + textHeight ) )
++                         ? subscriptDepth
++                         : static_cast<int>( ( -yOffset / scaley + h + d ) - ( currentDepth + textHeight ) );
++        subscriptDepth = subscriptDepth > 0 ? subscriptDepth : 0;
++    }
++    else
++        textHeight = textHeight > h ? textHeight : static_cast<int>( h );
++
+     memset( utf8_string, '\0', max_string_length );
+ }
+ 
+@@ -395,7 +447,7 @@
          delete m_font;
      m_font = wxFont::New( static_cast<int>( fontSize * fontScale ),
          fontFamilyLookup[fontFamily],
@@ -1073146,7 +1076840,19 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_gc.cpp plplot-trunk/driv
      m_font->SetUnderlined( underlined );
      m_context->SetFont( *m_font, wxColour( textRed, textGreen, textBlue ) );
  }
-@@ -449,9 +452,9 @@
+@@ -413,9 +465,9 @@
+     }
+ 
+     // Check that unicode string isn't longer then the max we allow
+-    if ( args->unicode_array_len >= 500 )
++    if ( args->unicode_array_len >= max_string_length )
+     {
+-        printf( "Sorry, the wxWidgets drivers only handles strings of length < %d\n", 500 );
++        printf( "Sorry, the wxWidgets drivers only handles strings of length < %d\n", max_string_length );
+         return;
+     }
+ 
+@@ -449,9 +501,9 @@
  #endif
  
      // text color
@@ -1073159,12 +1076865,93 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets_gc.cpp plplot-trunk/driv
  
      // calculate rotation of text
      plRotationShear( args->xform, &rotation, &shear, &stride );
+@@ -461,21 +513,66 @@
+     cos_shear = cos( shear );
+     sin_shear = sin( shear );
+ 
+-    // determine extend of text
+-    PSDrawText( args->unicode_array, args->unicode_array_len, false );
+ 
+-    // actually draw text
+-    m_context->PushState();
+-    m_context->Translate( args->x / scalex, height - args->y / scaley );
+-    wxGraphicsMatrix matrix = m_context->CreateMatrix(
+-        cos_rot * stride, -sin_rot * stride,
+-        cos_rot * sin_shear + sin_rot * cos_shear,
+-        -sin_rot * sin_shear + cos_rot * cos_shear,
+-        0.0, 0.0 );
+-    m_context->ConcatTransform( matrix );
+-    m_context->Translate( -args->just * textWidth, -0.5 * textHeight );
+-    PSDrawText( args->unicode_array, args->unicode_array_len, true );
+-    m_context->PopState();
++    PLUNICODE *lineStart     = args->unicode_array;
++    int       lineLen        = 0;
++    bool      lineFeed       = false;
++    bool      carriageReturn = false;
++    wxCoord   paraHeight     = 0;
++    // Get the curent font
++    fontScale = 1.0;
++    yOffset   = 0.0;
++    plgfci( &fci );
++    PSSetFont( fci );
++    while ( lineStart != args->unicode_array + args->unicode_array_len )
++    {
++        while ( lineStart + lineLen != args->unicode_array + args->unicode_array_len
++                && *( lineStart + lineLen ) != (PLUNICODE) '\n' )
++        {
++            lineLen++;
++        }
++        //set line feed for the beginning of this line and
++        //carriage return for the end
++        lineFeed       = carriageReturn;
++        carriageReturn = lineStart + lineLen != args->unicode_array + args->unicode_array_len
++                         && *( lineStart + lineLen ) == (PLUNICODE) ( '\n' );
++        if ( lineFeed )
++            paraHeight += textHeight + subscriptDepth;
++
++        //remember the text parameters so they can be restored
++        double    startingFontScale = fontScale;
++        double    startingYOffset   = yOffset;
++        PLUNICODE startingFci       = fci;
++
++        // determine extent of text
++        PSDrawText( lineStart, lineLen, false );
++
++        if ( lineFeed && superscriptHeight > textHeight )
++            paraHeight += superscriptHeight - textHeight;
++
++        // actually draw text, resetting the font first
++        fontScale = startingFontScale;
++        yOffset   = startingYOffset;
++        fci       = startingFci;
++        PSSetFont( fci );
++        m_context->PushState();                                              //save current position
++        m_context->Translate( args->x / scalex, height - args->y / scaley ); //move to text starting position
++        wxGraphicsMatrix matrix = m_context->CreateMatrix(
++            cos_rot * stride, -sin_rot * stride,
++            cos_rot * sin_shear + sin_rot * cos_shear,
++            -sin_rot * sin_shear + cos_rot * cos_shear,
++            0.0, 0.0 );                                                                                //create rotation transformation matrix
++        m_context->ConcatTransform( matrix );                                                          //rotate
++        m_context->Translate( -args->just * textWidth, -0.5 * textHeight + paraHeight * lineSpacing ); //move to set alignment
++        PSDrawText( lineStart, lineLen, true );                                                        //draw text
++        m_context->PopState();                                                                         //return to original position
++
++        lineStart += lineLen;
++        if ( carriageReturn )
++            lineStart++;
++        lineLen = 0;
++    }
++
+ 
+     AddtoClipRegion( 0, 0, width, height );
+ 
 diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.h plplot-trunk/drivers/wxwidgets.h
 --- plplot-5.9.9/drivers/wxwidgets.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/wxwidgets.h	2012-08-03 15:40:25.083810001 -0600
++++ plplot-trunk/drivers/wxwidgets.h	2012-12-14 08:50:51.457394752 -0700
 @@ -1,4 +1,4 @@
 -// $Id: wxwidgets.h 11680 2011-03-27 17:57:51Z airwin $
-+// $Id: wxwidgets.h 12202 2012-07-19 23:38:25Z andrewross $
++// $Id: wxwidgets.h 12243 2012-10-10 22:17:10Z andrewross $
  //
  // Copyright (C) 2008  Werner Smekal
  //
@@ -1073196,11 +1076983,11 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.h plplot-trunk/drivers/w
  // PLplot core.
  //
 -#define VSCALE                       ( 32. )
-+#define VSCALE                       ( 40. )
++#define VSCALE                   ( 40. )
 +
 +// pixels per inch
-+#define DEVICE_PIXELS_PER_IN         ( 80. )
-+#define VIRTUAL_PIXELS_PER_IN        ( DEVICE_PIXELS_PER_IN * VSCALE )
++#define DEVICE_PIXELS_PER_IN     ( 80. )
++#define VIRTUAL_PIXELS_PER_IN    ( DEVICE_PIXELS_PER_IN * VSCALE )
  
 -// pixels per mm
 -#define DEVICE_PIXELS_PER_MM         ( 3.14961 )
@@ -1073218,16 +1077005,45 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.h plplot-trunk/drivers/w
  
  // Default dimensions of the canvas (in inches)
  #define CANVAS_WIDTH                 ( 10.0 )
-@@ -479,7 +475,7 @@
-         return new appname;                                          \
-     }                                                                \
-     wxAppInitializer                                                 \
+@@ -169,6 +165,10 @@
+     double           fontSize;
+     double           fontScale;
+     wxCoord          textWidth, textHeight, textDescent, textLeading;
++    PLUNICODE        fci;
++    //the distance between the superscript top and subscript base from the baseline
++    wxCoord          superscriptHeight, subscriptDepth;
++    double           lineSpacing;
+     double           yOffset;
+     PLINT            posX, posY;
+     PLFLT            rotation, cos_rot, sin_rot;
+@@ -471,16 +471,16 @@
+ 
+ // Use this macro if you want to define your own main() or WinMain() function
+ // and call wxEntry() from there.
+-#define IMPLEMENT_PLAPP_NO_MAIN( appname )                           \
+-    wxAppConsole * wxPLCreateApp()                                   \
+-    {                                                                \
+-        wxAppConsole::CheckBuildOptions( WX_BUILD_OPTIONS_SIGNATURE, \
+-            "your program" );                                        \
+-        return new appname;                                          \
+-    }                                                                \
+-    wxAppInitializer                                                 \
 -    wxAppInitializer( (wxAppInitializerFunction) wxPLCreateApp );    \
-+    wxAppInitializer( (wxAppInitializerFunction) (wxApp::GetInitializerFunction()==NULL ? wxPLCreateApp : wxApp::GetInitializerFunction()) );    \
-     DECLARE_PLAPP( appname )                                         \
+-    DECLARE_PLAPP( appname )                                         \
++#define IMPLEMENT_PLAPP_NO_MAIN( appname )                                                                                                        \
++    wxAppConsole * wxPLCreateApp()                                                                                                                \
++    {                                                                                                                                             \
++        wxAppConsole::CheckBuildOptions( WX_BUILD_OPTIONS_SIGNATURE,                                                                              \
++            "your program" );                                                                                                                     \
++        return new appname;                                                                                                                       \
++    }                                                                                                                                             \
++    wxAppInitializer                                                                                                                              \
++    wxAppInitializer( (wxAppInitializerFunction) ( wxApp::GetInitializerFunction() == NULL ? wxPLCreateApp : wxApp::GetInitializerFunction() ) ); \
++    DECLARE_PLAPP( appname )                                                                                                                      \
      appname & wxPLGetApp() { return *wx_static_cast( appname *, wxApp::GetInstance() ); }
  
-@@ -491,11 +487,6 @@
+ #define DECLARE_PLAPP( appname )    extern appname &wxPLGetApp();
+@@ -491,11 +491,6 @@
  }
  #define WX_SUPPRESS_UNUSED_WARN( x )    Use( &x )
  
@@ -1073239,7 +1077055,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.h plplot-trunk/drivers/w
  
  //--------------------------------------------------------------------------
  //  Declarations for the device.
-@@ -511,7 +502,6 @@
+@@ -511,7 +506,6 @@
  void plD_state_wxwidgets( PLStream *, PLINT );
  void plD_esc_wxwidgets( PLStream *, PLINT, void * );
  
@@ -1073249,7 +1077065,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/wxwidgets.h plplot-trunk/drivers/w
  void wx_set_size( PLStream* pls, int width, int height );
 diff -ruN --exclude .svn plplot-5.9.9/drivers/xfig.c plplot-trunk/drivers/xfig.c
 --- plplot-5.9.9/drivers/xfig.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/xfig.c	2011-11-02 09:43:10.940866520 -0600
++++ plplot-trunk/drivers/xfig.c	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: xfig.c 11405 2010-12-30 08:41:03Z arjenmarkus $
 +// $Id: xfig.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1073276,7 +1077092,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/xfig.c plplot-trunk/drivers/xfig.c
                  free( (void *) dev->buffptr );
 diff -ruN --exclude .svn plplot-5.9.9/drivers/xwin.c plplot-trunk/drivers/xwin.c
 --- plplot-5.9.9/drivers/xwin.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/drivers/xwin.c	2011-11-02 09:43:10.995864504 -0600
++++ plplot-trunk/drivers/xwin.c	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: xwin.c 11749 2011-05-12 20:39:42Z airwin $
 +// $Id: xwin.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1073849,7 +1077665,7 @@ diff -ruN --exclude .svn plplot-5.9.9/drivers/xwin.c plplot-trunk/drivers/xwin.c
                      }
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/CMakeLists.txt plplot-trunk/examples/ada/CMakeLists.txt
 --- plplot-5.9.9/examples/ada/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ada/CMakeLists.txt	2012-06-08 08:56:06.408566268 -0600
++++ plplot-trunk/examples/ada/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -25,6 +25,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1073877,7 +1077693,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/CMakeLists.txt plplot-trunk/e
    endforeach(STRING_INDEX ${ada_STRING_INDICES})
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/Makefile.examples.in plplot-trunk/examples/ada/Makefile.examples.in
 --- plplot-5.9.9/examples/ada/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ada/Makefile.examples.in	2011-11-28 16:54:36.818423594 -0700
++++ plplot-trunk/examples/ada/Makefile.examples.in	2011-11-28 16:54:36.000000000 -0700
 @@ -104,6 +104,6 @@
  # anything after -cargs below.
  .adb$(EXEEXT):
@@ -1073888,7 +1077704,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/Makefile.examples.in plplot-t
  .SUFFIXES: .adb $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x00a.adb plplot-trunk/examples/ada/x00a.adb
 --- plplot-5.9.9/examples/ada/x00a.adb	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/ada/x00a.adb	2011-11-02 09:43:10.255891628 -0600
++++ plplot-trunk/examples/ada/x00a.adb	2011-11-02 09:43:10.000000000 -0600
 @@ -0,0 +1,63 @@
 +-- $Id: x00a.adb 12021 2011-11-01 08:35:52Z jbauck $
 +--
@@ -1073956,7 +1077772,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x00a.adb plplot-trunk/example
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x00_easy_a.adb plplot-trunk/examples/ada/x00_easy_a.adb
 --- plplot-5.9.9/examples/ada/x00_easy_a.adb	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/ada/x00_easy_a.adb	2011-11-02 09:43:10.256891592 -0600
++++ plplot-trunk/examples/ada/x00_easy_a.adb	2011-11-02 09:43:10.000000000 -0600
 @@ -0,0 +1,57 @@
 +-- $Id: x00_easy_a.adb 12021 2011-11-01 08:35:52Z jbauck $
 +--
@@ -1074016,15 +1077832,114 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x00_easy_a.adb plplot-trunk/e
 +    End_PLplot;
 +end x00_easy_a;
 \ No newline at end of file
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x08a.adb plplot-trunk/examples/ada/x08a.adb
+--- plplot-5.9.9/examples/ada/x08a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x08a.adb	2012-12-14 08:50:58.790350707 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x08a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x08a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- 3-d plot demo.
+ 
+@@ -91,7 +91,7 @@
+         end if;
+ 
+         plscmap1n(256);
+-        plscmap1l(HLS, i, h, l, s, Reverse_Hue_None);
++        plscmap1l(HLS, i, h, l, s, Alt_Hue_Path_None);
+ 
+     end cmap1_init;
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x11a.adb plplot-trunk/examples/ada/x11a.adb
+--- plplot-5.9.9/examples/ada/x11a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x11a.adb	2012-12-14 08:50:58.796350667 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x11a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x11a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Mesh plot demo.
+ 
+@@ -69,7 +69,7 @@
+         s(1) := 0.8;
+ 
+         plscmap1n(256);
+-        plscmap1l(HLS, i, h, l, s, Reverse_Hue_None);
++        plscmap1l(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init;
+ 
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x12a.adb plplot-trunk/examples/ada/x12a.adb
+--- plplot-5.9.9/examples/ada/x12a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x12a.adb	2012-12-14 08:50:58.789350705 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x12a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x12a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Bar chart demo.
+ 
+@@ -96,7 +96,7 @@
+     y0(8) := 12.0;
+     y0(9) :=  3.0;
+ 
+-    plscmap1l(RGB, pos, r, g, b, Reverse_Hue_None);
++    plscmap1l(RGB, pos, r, g, b, Alt_Hue_Path_None);
+ 
+     for i in y0'range loop
+         plcol1(Long_Float(i)/9.0);
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x15a.adb plplot-trunk/examples/ada/x15a.adb
+--- plplot-5.9.9/examples/ada/x15a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x15a.adb	2012-12-14 08:50:58.796350667 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x15a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x15a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ --  Shade plot demo.
+ 
+@@ -75,7 +75,7 @@
+         s(2) := 0.5;		-- center
+         s(3) := 1.0;		-- high
+ 
+-        plscmap1l(HLS, i, h, l, s, Reverse_Hue_None);
++        plscmap1l(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init2;
+ 
+     ----------------------------------------------------------------------------
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x20a.adb plplot-trunk/examples/ada/x20a.adb
+--- plplot-5.9.9/examples/ada/x20a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x20a.adb	2012-12-14 08:50:58.789350705 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x20a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x20a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- plimage demo
+ 
+@@ -227,7 +227,7 @@
+         pos(1) := 1.0;
+ 
+         plscmap1n(num_col);
+-        plscmap1l(RGB, pos, r, g, b, Reverse_Hue_None);
++        plscmap1l(RGB, pos, r, g, b, Alt_Hue_Path_None);
+     end gray_cmap;
+ 
+ 
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x21a.adb plplot-trunk/examples/ada/x21a.adb
 --- plplot-5.9.9/examples/ada/x21a.adb	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ada/x21a.adb	2012-01-28 07:51:44.113773053 -0700
++++ plplot-trunk/examples/ada/x21a.adb	2012-12-14 08:50:58.792350691 -0700
 @@ -1,4 +1,4 @@
 --- $Id: x21a.adb 11680 2011-03-27 17:57:51Z airwin $
-+-- $Id: x21a.adb 12157 2012-01-25 12:37:39Z andrewross $
++-- $Id: x21a.adb 12212 2012-08-13 23:17:31Z airwin $
  
  -- Grid data demo
  
+@@ -96,7 +96,7 @@
+         s(1) := 0.8;
+ 
+         plscmap1n(256);
+-        plscmap1l(HLS, i, h, l, s, Reverse_Hue_None);
++        plscmap1l(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init;
+ 
+ 
 @@ -164,6 +164,8 @@
      -- Initialize plplot
      plinit;
@@ -1074055,11 +1077970,29 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x21a.adb plplot-trunk/example
                  plvpor(0.0, 1.0, 0.0, 0.9);
                  plwind(-1.1, 0.75, -0.65, 1.20);
  
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/x30a.adb plplot-trunk/examples/ada/x30a.adb
+--- plplot-5.9.9/examples/ada/x30a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/x30a.adb	2012-12-14 08:50:58.793350683 -0700
+@@ -1,4 +1,4 @@
+--- $Id: x30a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: x30a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Alpha color values demonstration
+ 
+@@ -129,7 +129,7 @@
+     -- Create the color map with 128 colors and use plscmap1la to initialize
+     -- the color values with a linearly varying transparency (or alpha).
+     plscmap1n(128);
+-    plscmap1la(RGB, pos, rcoord, gcoord, bcoord, acoord, Reverse_Hue_None);
++    plscmap1la(RGB, pos, rcoord, gcoord, bcoord, acoord, Alt_Hue_Path_None);
+ 
+     -- Use that cmap1 to create a transparent red gradient for the whole window.
+     px(0) := 0.0;
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick00a.adb plplot-trunk/examples/ada/xthick00a.adb
 --- plplot-5.9.9/examples/ada/xthick00a.adb	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/ada/xthick00a.adb	2011-11-02 09:43:10.258891518 -0600
++++ plplot-trunk/examples/ada/xthick00a.adb	2012-12-14 08:50:58.794350676 -0700
 @@ -0,0 +1,68 @@
-+-- $Id: xthick00a.adb 12021 2011-11-01 08:35:52Z jbauck $
++-- $Id: xthick00a.adb 12205 2012-08-10 16:48:23Z airwin $
 +--
 +-- Simple demo of a 2D line plot.
 +--
@@ -1074094,7 +1078027,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick00a.adb plplot-trunk/ex
 +    PLplot_Auxiliary,
 +    PLplot;
 +
-+procedure x00thicka is
++procedure xthick00a is
 +    x, y : Real_Vector(0 .. 100);
 +    x_Min, y_Min : Long_Float := 0.0;
 +    x_Max : Long_Float := 1.0;
@@ -1074126,17 +1078059,115 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick00a.adb plplot-trunk/ex
 +
 +    -- Close PLplot library.
 +    End_PLplot;
-+end x00thicka;
-\ No newline at end of file
++end xthick00a;
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick08a.adb plplot-trunk/examples/ada/xthick08a.adb
+--- plplot-5.9.9/examples/ada/xthick08a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick08a.adb	2012-12-14 08:50:58.795350671 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick08a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick08a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- 3-d plot demo.
+ 
+@@ -91,7 +91,7 @@
+         end if;
+ 
+         Set_Number_Of_Colors_In_Color_Map_1(256);
+-        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None);
++        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Alt_Hue_Path_None);
+ 
+     end cmap1_init;
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick11a.adb plplot-trunk/examples/ada/xthick11a.adb
+--- plplot-5.9.9/examples/ada/xthick11a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick11a.adb	2012-12-14 08:50:58.792350691 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick11a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick11a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Mesh plot demo.
+ 
+@@ -69,7 +69,7 @@
+         s(1) := 0.8;
+ 
+         Set_Number_Of_Colors_In_Color_Map_1(256);
+-        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None);
++        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init;
+ 
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick12a.adb plplot-trunk/examples/ada/xthick12a.adb
+--- plplot-5.9.9/examples/ada/xthick12a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick12a.adb	2012-12-14 08:50:58.795350671 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick12a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick12a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Bar chart demo.
+ 
+@@ -95,7 +95,7 @@
+     y0(8) := 12.0;
+     y0(9) :=  3.0;
+ 
+-    Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Hue_None);
++    Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Alt_Hue_Path_None);
+     
+     for i in y0'range loop
+         Set_Color_Map_1(Long_Float(i)/9.0);
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick15a.adb plplot-trunk/examples/ada/xthick15a.adb
+--- plplot-5.9.9/examples/ada/xthick15a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick15a.adb	2012-12-14 08:50:58.793350683 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick15a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick15a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ --  Shade plot demo.
+ 
+@@ -75,7 +75,7 @@
+         s(2) := 0.5;		-- center
+         s(3) := 1.0;		-- high
+ 
+-        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None);
++        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init2;
+ 
+     ----------------------------------------------------------------------------
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick20a.adb plplot-trunk/examples/ada/xthick20a.adb
+--- plplot-5.9.9/examples/ada/xthick20a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick20a.adb	2012-12-14 08:50:58.794350676 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick20a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick20a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Draw_Image_Color_Map_1_Automatic demo
+ 
+@@ -227,7 +227,7 @@
+         pos(1) := 1.0;
+ 
+         Set_Number_Of_Colors_In_Color_Map_1(num_col);
+-        Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Hue_None);
++        Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Alt_Hue_Path_None);
+     end gray_cmap;
+ 
+ 
 diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick21a.adb plplot-trunk/examples/ada/xthick21a.adb
 --- plplot-5.9.9/examples/ada/xthick21a.adb	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ada/xthick21a.adb	2012-01-28 07:51:44.112773089 -0700
++++ plplot-trunk/examples/ada/xthick21a.adb	2012-12-14 08:50:58.788350698 -0700
 @@ -1,4 +1,4 @@
 --- $Id: xthick21a.adb 11680 2011-03-27 17:57:51Z airwin $
-+-- $Id: xthick21a.adb 12157 2012-01-25 12:37:39Z andrewross $
++-- $Id: xthick21a.adb 12212 2012-08-13 23:17:31Z airwin $
  
  -- Grid data demo
  
+@@ -96,7 +96,7 @@
+         s(1) := 0.8;
+ 
+         Set_Number_Of_Colors_In_Color_Map_1(256);
+-        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None);
++        Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Alt_Hue_Path_None);
+     end cmap1_init;
+ 
+ 
 @@ -164,6 +164,8 @@
      -- Initialize plplot
      Initialize_PLplot;
@@ -1074167,9 +1078198,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick21a.adb plplot-trunk/ex
                  Set_Viewport_Normalized(0.0, 1.0, 0.0, 0.9);
                  Set_Viewport_World(-1.1, 0.75, -0.65, 1.20);
  
+diff -ruN --exclude .svn plplot-5.9.9/examples/ada/xthick30a.adb plplot-trunk/examples/ada/xthick30a.adb
+--- plplot-5.9.9/examples/ada/xthick30a.adb	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/ada/xthick30a.adb	2012-12-14 08:50:58.790350707 -0700
+@@ -1,4 +1,4 @@
+--- $Id: xthick30a.adb 11680 2011-03-27 17:57:51Z airwin $
++-- $Id: xthick30a.adb 12212 2012-08-13 23:17:31Z airwin $
+ 
+ -- Alpha color values demonstration
+ 
+@@ -129,7 +129,7 @@
+     -- Create the color map with 128 colors and use Set_Color_Map_1_RGBla to initialize
+     -- the color values with a linearly varying transparency (or alpha).
+     Set_Number_Of_Colors_In_Color_Map_1(128);
+-    Set_Color_Map_1_Piecewise_And_Alpha(RGB, pos, rcoord, gcoord, bcoord, acoord, Reverse_Hue_None);
++    Set_Color_Map_1_Piecewise_And_Alpha(RGB, pos, rcoord, gcoord, bcoord, acoord, Alt_Hue_Path_None);
+ 
+     -- Use that cmap1 to create a transparent red gradient for the whole window.
+     px(0) := 0.0;
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/CMakeLists.txt plplot-trunk/examples/c/CMakeLists.txt
 --- plplot-5.9.9/examples/c/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/CMakeLists.txt	2011-11-02 09:43:08.581952986 -0600
++++ plplot-trunk/examples/c/CMakeLists.txt	2011-11-02 09:43:08.000000000 -0600
 @@ -25,6 +25,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1074180,7 +1078229,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/CMakeLists.txt plplot-trunk/exa
    "03"
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/extXdrawable_demo.c plplot-trunk/examples/c/extXdrawable_demo.c
 --- plplot-5.9.9/examples/c/extXdrawable_demo.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/extXdrawable_demo.c	2011-11-02 09:43:08.583952913 -0600
++++ plplot-trunk/examples/c/extXdrawable_demo.c	2011-11-02 09:43:08.000000000 -0600
 @@ -34,8 +34,8 @@
  
  // Main menu structure
@@ -1074335,7 +1078384,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/extXdrawable_demo.c plplot-trun
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/Makefile.examples.in plplot-trunk/examples/c/Makefile.examples.in
 --- plplot-5.9.9/examples/c/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/Makefile.examples.in	2012-01-05 11:23:00.158091646 -0700
++++ plplot-trunk/examples/c/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -24,21 +24,22 @@
  CC = @CC@
  EXEEXT = @EXEEXT@
@@ -1074412,7 +1078461,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/Makefile.examples.in plplot-tru
  .SUFFIXES: .c $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/plplotcanvas_animation.c plplot-trunk/examples/c/plplotcanvas_animation.c
 --- plplot-5.9.9/examples/c/plplotcanvas_animation.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/plplotcanvas_animation.c	2011-04-06 14:29:20.767083609 -0600
++++ plplot-trunk/examples/c/plplotcanvas_animation.c	2011-04-06 14:29:20.000000000 -0600
 @@ -10,7 +10,7 @@
  //
  //   $Author: airwin $
@@ -1074424,7 +1078473,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/plplotcanvas_animation.c plplot
  //
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/plplotcanvas_demo.c plplot-trunk/examples/c/plplotcanvas_demo.c
 --- plplot-5.9.9/examples/c/plplotcanvas_demo.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/plplotcanvas_demo.c	2011-04-06 14:29:20.769083441 -0600
++++ plplot-trunk/examples/c/plplotcanvas_demo.c	2011-04-06 14:29:20.000000000 -0600
 @@ -10,7 +10,7 @@
  //
  //  $Author: airwin $
@@ -1074436,7 +1078485,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/plplotcanvas_demo.c plplot-trun
  //
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x00c.c plplot-trunk/examples/c/x00c.c
 --- plplot-5.9.9/examples/c/x00c.c	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/c/x00c.c	2011-11-02 09:43:08.556953903 -0600
++++ plplot-trunk/examples/c/x00c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -0,0 +1,59 @@
 +// $Id: x00c.c 12001 2011-10-27 05:26:31Z airwin $
 +//
@@ -1074499,7 +1078548,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x00c.c plplot-trunk/examples/c/
 +}
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x02c.c plplot-trunk/examples/c/x02c.c
 --- plplot-5.9.9/examples/c/x02c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x02c.c	2011-11-02 09:43:08.558953831 -0600
++++ plplot-trunk/examples/c/x02c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: x02c.c 11289 2010-10-29 20:44:17Z airwin $
 +// $Id: x02c.c 11968 2011-10-14 07:12:16Z andrewross $
@@ -1074537,7 +1078586,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x02c.c plplot-trunk/examples/c/
  // Use 100 custom colors in addition to base 16
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x08c.c plplot-trunk/examples/c/x08c.c
 --- plplot-5.9.9/examples/c/x08c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x08c.c	2012-01-04 08:45:35.056568246 -0700
++++ plplot-trunk/examples/c/x08c.c	2012-01-04 08:45:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x08c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x08c.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1074564,7 +1078613,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x08c.c plplot-trunk/examples/c/
          clevel[i] = zmin + step + step * i;
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x09c.c plplot-trunk/examples/c/x09c.c
 --- plplot-5.9.9/examples/c/x09c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x09c.c	2012-01-04 08:45:35.066567886 -0700
++++ plplot-trunk/examples/c/x09c.c	2012-01-04 08:45:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x09c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x09c.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1074717,7 +1078766,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x09c.c plplot-trunk/examples/c/
      plcol0( 1 );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x11c.c plplot-trunk/examples/c/x11c.c
 --- plplot-5.9.9/examples/c/x11c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x11c.c	2012-01-28 07:51:44.046775469 -0700
++++ plplot-trunk/examples/c/x11c.c	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x11c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x11c.c 12129 2012-01-14 23:19:10Z airwin $
@@ -1074784,7 +1078833,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x11c.c plplot-trunk/examples/c/
              plcol0( 3 );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x13c.c plplot-trunk/examples/c/x13c.c
 --- plplot-5.9.9/examples/c/x13c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x13c.c	2011-11-02 09:43:08.594952509 -0600
++++ plplot-trunk/examples/c/x13c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,11 +1,11 @@
 -// $Id: x13c.c 11289 2010-10-29 20:44:17Z airwin $
 +// $Id: x13c.c 11968 2011-10-14 07:12:16Z andrewross $
@@ -1074801,7 +1078850,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x13c.c plplot-trunk/examples/c/
      "Geoffrey",
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x14c.c plplot-trunk/examples/c/x14c.c
 --- plplot-5.9.9/examples/c/x14c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x14c.c	2012-01-04 08:45:35.050568459 -0700
++++ plplot-trunk/examples/c/x14c.c	2012-01-04 08:45:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x14c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x14c.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1074900,7 +1078949,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x14c.c plplot-trunk/examples/c/
      plflush();
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x15c.c plplot-trunk/examples/c/x15c.c
 --- plplot-5.9.9/examples/c/x15c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x15c.c	2011-11-02 09:43:08.599952328 -0600
++++ plplot-trunk/examples/c/x15c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: x15c.c 11289 2010-10-29 20:44:17Z airwin $
 +// $Id: x15c.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1075018,13 +1079067,22 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x15c.c plplot-trunk/examples/c/
  }
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/x16c.c
 --- plplot-5.9.9/examples/c/x16c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x16c.c	2012-01-04 08:45:35.053568354 -0700
++++ plplot-trunk/examples/c/x16c.c	2012-12-14 08:50:57.857356364 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x16c.c 11767 2011-06-13 16:16:57Z airwin $
-+// $Id: x16c.c 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: x16c.c 12254 2012-10-25 01:33:29Z hezekiahcarty $
  //
  //      plshade demo, using color fill.
  //
+@@ -20,7 +20,7 @@
+                                 // front end other than the C one.
+ 
+ // For now, don't show the colorbars while we are working out the API.
+-static int colorbar = 0;
++static int colorbar = 1;
+ 
+ // polar plot data
+ #define PERIMETERPTS    100
 @@ -30,7 +30,7 @@
  PLFLT tr[6];
  
@@ -1075043,7 +1079101,36 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
  // Options data structure definition.
  
  static PLOptionTable options[] = {
-@@ -163,10 +165,10 @@
+@@ -138,6 +140,28 @@
+     PLINT    fill_width = 2, cont_color = 0, cont_width = 0;
+     PLFLT    colorbar_width, colorbar_height;
+ 
++#define NUM_AXES    1
++    PLINT      n_axis_opts  = NUM_AXES;
++    const char *axis_opts[] = {
++        "bcvtm",
++    };
++    PLINT      num_values[NUM_AXES];
++    PLFLT      *values[NUM_AXES];
++    PLFLT      axis_ticks[NUM_AXES] = {
++        0.0,
++    };
++    PLINT      axis_subticks[NUM_AXES] = {
++        0,
++    };
++#define NUM_LABELS    1
++    PLINT      n_labels     = NUM_LABELS;
++    PLINT      label_opts[] = {
++        PL_COLORBAR_LABEL_BOTTOM,
++    };
++    const char *labels[] = {
++        "Magnitude",
++    };
++
+ // Parse and process command line arguments
+ 
+     plMergeOpts( options, "x16c options", notes );
+@@ -163,10 +187,10 @@
  
  // Allocate data structures
  
@@ -1075058,7 +1079145,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
  
      plAlloc2dGrid( &z, nx, ny );
      plAlloc2dGrid( &w, nx, ny );
-@@ -229,7 +231,7 @@
+@@ -229,7 +253,7 @@
  
      plpsty( 0 );
  
@@ -1075067,7 +1079154,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
          shedge, ns + 1, fill_width,
          cont_color, cont_width,
          plfill, 1, NULL, NULL );
-@@ -276,7 +278,7 @@
+@@ -242,11 +266,16 @@
+         plsmaj( 0.0, 0.5 );
+         plsmin( 0.0, 0.5 );
+ 
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
+         plcolorbar( &colorbar_width, &colorbar_height,
+             PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
+-            0.026, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
+-            cont_color, cont_width, 0.0, 0, "bcvtm", "",
+-            ns + 1, shedge );
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -276,7 +305,7 @@
  
      plpsty( 0 );
  
@@ -1075076,7 +1079183,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
          shedge, ns + 1, fill_width,
          cont_color, cont_width,
          plfill, 1, pltr1, (void *) &cgrid1 );
-@@ -323,7 +325,7 @@
+@@ -289,11 +318,16 @@
+         plsmaj( 0.0, 0.5 );
+         plsmin( 0.0, 0.5 );
+ 
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
+         plcolorbar( &colorbar_width, &colorbar_height,
+             PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
+-            0.026, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
+-            cont_color, cont_width, 0.0, 0, "bcvtm", "",
+-            ns + 1, shedge );
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -323,7 +357,7 @@
  
      plpsty( 0 );
  
@@ -1075085,7 +1079212,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
          shedge, ns + 1, fill_width,
          cont_color, cont_width,
          plfill, 0, pltr2, (void *) &cgrid2 );
-@@ -351,7 +353,7 @@
+@@ -336,11 +370,16 @@
+         plsmaj( 0.0, 0.5 );
+         plsmin( 0.0, 0.5 );
+ 
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
+         plcolorbar( &colorbar_width, &colorbar_height,
+             PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
+-            0.026, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
+-            cont_color, cont_width, 0.0, 0, "bcvtm", "",
+-            ns + 1, shedge );
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -351,7 +390,7 @@
      plcol0( 1 );
      plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 );
      plcol0( 2 );
@@ -1075094,7 +1079241,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
  
      pllab( "distance", "altitude", "Bogon density, with streamlines" );
  
-@@ -369,7 +371,7 @@
+@@ -369,7 +408,7 @@
  
      plpsty( 0 );
  
@@ -1075103,7 +1079250,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
          shedge, ns + 1, fill_width,
          2, 3,
          plfill, 0, pltr2, (void *) &cgrid2 );
-@@ -419,7 +421,7 @@
+@@ -382,11 +421,16 @@
+         plsmaj( 0.0, 0.5 );
+         plsmin( 0.0, 0.5 );
+ 
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
+         plcolorbar( &colorbar_width, &colorbar_height,
+             PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
+-            0.026, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
+-            2, 3, 0.0, 0, "bcvxm", "",
+-            ns + 1, shedge );
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            2, 3,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -419,7 +463,7 @@
  
          plpsty( 0 );
  
@@ -1075112,7 +1079279,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
              shedge, ns + 1, fill_width,
              cont_color, cont_width,
              plfill, 0, pltr2, (void *) &cgrid2 );
-@@ -466,7 +468,7 @@
+@@ -466,7 +510,7 @@
          shedge[i] = zmin + ( zmax - zmin ) * (PLFLT) i / (PLFLT) ns;
  
      //  Now we can shade the interior region.
@@ -1075121,7 +1079288,27 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
          shedge, ns + 1, fill_width,
          cont_color, cont_width,
          plfill, 0, pltr2, (void *) &cgrid2 );
-@@ -530,19 +532,19 @@
+@@ -479,11 +523,16 @@
+         plsmaj( 0.0, 0.5 );
+         plsmin( 0.0, 0.5 );
+ 
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
+         plcolorbar( &colorbar_width, &colorbar_height,
+             PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
+-            0.026, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
+-            cont_color, cont_width, 0.0, 0, "bcvtm", "",
+-            ns + 1, shedge );
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -530,19 +579,19 @@
  //--------------------------------------------------------------------------
  
  static void
@@ -1075150,7 +1079337,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x16c.c plplot-trunk/examples/c/
  }
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x19c.c plplot-trunk/examples/c/x19c.c
 --- plplot-5.9.9/examples/c/x19c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x19c.c	2011-11-02 09:43:08.606952069 -0600
++++ plplot-trunk/examples/c/x19c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: x19c.c 11289 2010-10-29 20:44:17Z airwin $
 +// $Id: x19c.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1075212,7 +1079399,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x19c.c plplot-trunk/examples/c/
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x20c.c plplot-trunk/examples/c/x20c.c
 --- plplot-5.9.9/examples/c/x20c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x20c.c	2012-01-04 08:45:35.046568613 -0700
++++ plplot-trunk/examples/c/x20c.c	2012-01-04 08:45:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x20c.c 11623 2011-03-14 03:24:23Z airwin $
 +// $Id: x20c.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1075317,7 +1079504,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x20c.c plplot-trunk/examples/c/
          free( img );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x21c.c plplot-trunk/examples/c/x21c.c
 --- plplot-5.9.9/examples/c/x21c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x21c.c	2012-01-28 07:51:44.047775431 -0700
++++ plplot-trunk/examples/c/x21c.c	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x21c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x21c.c 12143 2012-01-21 21:52:54Z andrewross $
@@ -1075485,7 +1079672,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x21c.c plplot-trunk/examples/c/
          yt = ( yM - ym ) * plrandd();
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x22c.c plplot-trunk/examples/c/x22c.c
 --- plplot-5.9.9/examples/c/x22c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x22c.c	2012-06-08 08:56:06.386567804 -0600
++++ plplot-trunk/examples/c/x22c.c	2012-06-08 08:56:06.000000000 -0600
 @@ -1,7 +1,7 @@
 -// $Id: x22c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x22c.c 12176 2012-02-24 20:33:39Z andrewross $
@@ -1075598,7 +1079785,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x22c.c plplot-trunk/examples/c/
      // Plot the perimeter of the cylinder
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x23c.c plplot-trunk/examples/c/x23c.c
 --- plplot-5.9.9/examples/c/x23c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x23c.c	2011-11-02 09:43:08.597952401 -0600
++++ plplot-trunk/examples/c/x23c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -31,14 +31,14 @@
  // Displays Greek letters and mathematically interesting Unicode ranges
  //
@@ -1075663,7 +1079850,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x23c.c plplot-trunk/examples/c/
      8,
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x24c.c plplot-trunk/examples/c/x24c.c
 --- plplot-5.9.9/examples/c/x24c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x24c.c	2011-11-02 09:43:08.568953462 -0600
++++ plplot-trunk/examples/c/x24c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -76,7 +76,7 @@
  
  // Taken from http://www.columbia.edu/~fdc/pace/
@@ -1075675,7 +1079862,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x24c.c plplot-trunk/examples/c/
      // Hindi
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x26c.c plplot-trunk/examples/c/x26c.c
 --- plplot-5.9.9/examples/c/x26c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x26c.c	2011-11-02 09:43:08.576953171 -0600
++++ plplot-trunk/examples/c/x26c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,6 +1,6 @@
  // -*- coding: utf-8; -*-
  //
@@ -1075774,7 +1079961,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x26c.c plplot-trunk/examples/c/
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x27c.c plplot-trunk/examples/c/x27c.c
 --- plplot-5.9.9/examples/c/x27c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x27c.c	2011-11-02 09:43:08.605952106 -0600
++++ plplot-trunk/examples/c/x27c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: x27c.c 11935 2011-09-25 16:09:38Z airwin $
 +// $Id: x27c.c 11992 2011-10-20 22:54:16Z andrewross $
@@ -1075833,7 +1080020,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x27c.c plplot-trunk/examples/c/
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x28c.c plplot-trunk/examples/c/x28c.c
 --- plplot-5.9.9/examples/c/x28c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x28c.c	2012-01-04 08:45:35.059568138 -0700
++++ plplot-trunk/examples/c/x28c.c	2012-01-04 08:45:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x28c.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x28c.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1075907,10 +1080094,10 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x28c.c plplot-trunk/examples/c/
      free( (void *) x );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x29c.c plplot-trunk/examples/c/x29c.c
 --- plplot-5.9.9/examples/c/x29c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x29c.c	2011-11-02 09:43:08.608951997 -0600
++++ plplot-trunk/examples/c/x29c.c	2012-12-14 08:50:57.858356359 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x29c.c 11680 2011-03-27 17:57:51Z airwin $
-+// $Id: x29c.c 12008 2011-10-28 12:50:46Z andrewross $
++// $Id: x29c.c 12213 2012-08-14 07:03:04Z andrewross $
  //
  //     Sample plots using date / time formatting for axes
  //
@@ -1076005,7 +1080192,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x29c.c plplot-trunk/examples/c/
          plcol0( 3 );
          strncpy( title, "@frPLplot Example 29 - TAI-UTC ", 100 );
 -        strncat( title, title_suffix, 100 );
-+        strncat( title, title_suffix, 100 - strlen( title ) );
++        strncat( title, title_suffix, 100 - strlen( title ) - 1 );
          pllab( xtitle, "TAI-UTC (sec)", title );
  
          plcol0( 4 );
@@ -1076016,12 +1080203,12 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x29c.c plplot-trunk/examples/c/
  }
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/x33c.c
 --- plplot-5.9.9/examples/c/x33c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x33c.c	2012-01-04 08:45:35.065567922 -0700
++++ plplot-trunk/examples/c/x33c.c	2012-12-14 08:50:57.858356359 -0700
 @@ -1,6 +1,6 @@
  // -*- coding: utf-8; -*-
  //
 -// $Id: x33c.c 11816 2011-07-14 16:37:58Z airwin $
-+// $Id: x33c.c 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: x33c.c 12281 2012-11-23 21:27:51Z andrewross $
  //
  // Demonstrate most pllegend capability including unicode symbols.
  //
@@ -1076044,7 +1080231,86 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
      "✰",
      "✴",
      "✱",
-@@ -296,24 +299,25 @@
+@@ -153,17 +156,24 @@
+     // Parameters for the colorbars on this page
+     PLINT      position_i, position, opt;
+     PLFLT      x, y, x_length, y_length;
+-    PLFLT      ticks;
+-    PLINT      sub_ticks;
++    PLFLT      ticks[1]     = { 0.0 };
++    PLINT      sub_ticks[1] = { 0 };
+     PLFLT      low_cap_color, high_cap_color;
+     PLINT      vertical, ifn;
+-    const char *axis_opts;
+-    char       label[200];
++    PLINT      n_axes = 1;
++    const char *axis_opts[1];
++    PLINT      n_labels      = 1;
++    PLINT      label_opts[1] = { 0 };
++    char       *label;
+     char       title[200];
+     PLFLT      colorbar_width, colorbar_height;
++    PLINT      n_values_array[1];
++    PLFLT      *values_array[1];
++
++    label = (char *) malloc( sizeof ( char ) * 200 );
+ 
+-    ticks     = 0.0;
+-    sub_ticks = 0;
++    n_values_array[0] = n_values;
++    values_array[0]   = values;
+ 
+     low_cap_color  = 0.0;
+     high_cap_color = 1.0;
+@@ -204,26 +214,26 @@
+         {
+             if ( cont_color == 0 || cont_width == 0 )
+             {
+-                axis_opts = "uwtivn";
+-                //axis_opts = "uwtin";
++                axis_opts[0] = "uwtivn";
++                //axis_opts[0] = "uwtin";
+             }
+             else
+             {
+-                axis_opts = "uwxvn";
+-                //axis_opts = "uwxn";
++                axis_opts[0] = "uwxvn";
++                //axis_opts[0] = "uwxn";
+             }
+         }
+         else
+         {
+             if ( cont_color == 0 || cont_width == 0 )
+             {
+-                axis_opts = "uwtivm";
+-                //axis_opts = "uwtim";
++                axis_opts[0] = "uwtivm";
++                //axis_opts[0] = "uwtim";
+             }
+             else
+             {
+-                axis_opts = "uwxvm";
+-                //axis_opts = "uwxm";
++                axis_opts[0] = "uwxvm";
++                //axis_opts[0] = "uwxm";
+             }
+         }
+ 
+@@ -247,9 +257,10 @@
+             15, 1, 1,
+             low_cap_color, high_cap_color,
+             cont_color, cont_width,
++            n_labels, label_opts, (const char **) &label,
++            n_axes, axis_opts,
+             ticks, sub_ticks,
+-            axis_opts, label,
+-            n_values, values );
++            n_values_array, (const PLFLT * const *) values_array );
+ 
+         // Reset text and tick sizes
+         plschr( 0.0, 1.0 );
+@@ -296,24 +307,25 @@
  int
  main( int argc, const char *argv[] )
  {
@@ -1076088,7 +1080354,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      // Create space to contain legend text.
      for ( k = 0; k < MAX_NLEGEND; k++ )
-@@ -362,10 +366,10 @@
+@@ -362,10 +374,10 @@
          pllegend( &legend_width, &legend_height, opt, position, 0.05, 0.05,
              0.1, 15, 1, 1, 0, 0,
              nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076101,7 +1080367,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
      }
  
      // Second page illustrating effect of nrow, ncolumn for the same legend
-@@ -410,10 +414,10 @@
+@@ -410,10 +422,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076114,7 +1080380,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE;
      opt      = opt_base;
-@@ -424,10 +428,10 @@
+@@ -424,10 +436,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076127,7 +1080393,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_LEFT | PL_POSITION_OUTSIDE;
      opt      = opt_base;
-@@ -438,10 +442,10 @@
+@@ -438,10 +450,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076140,7 +1080406,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_RIGHT | PL_POSITION_OUTSIDE;
      opt      = opt_base;
-@@ -452,10 +456,10 @@
+@@ -452,10 +464,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076153,7 +1080419,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_INSIDE;
      opt      = opt_base;
-@@ -466,10 +470,10 @@
+@@ -466,10 +478,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076166,7 +1080432,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_INSIDE;
      opt      = opt_base | PL_LEGEND_ROW_MAJOR;
-@@ -480,10 +484,10 @@
+@@ -480,10 +492,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076179,7 +1080445,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      position = PL_POSITION_BOTTOM | PL_POSITION_INSIDE;
      opt      = opt_base | PL_LEGEND_ROW_MAJOR;
-@@ -494,10 +498,10 @@
+@@ -494,10 +506,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.05, 15, 1, 1, nrow, ncolumn,
          nlegend, opt_array, 1.0, 1.0, 2.0,
@@ -1076192,7 +1080458,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
      // Third page demonstrating legend alignment
      pladv( 0 );
-@@ -546,10 +550,10 @@
+@@ -546,10 +558,10 @@
          pllegend( &legend_width, &legend_height, opt, position, x, y,
              0.025, 15, 1, 1, nrow, ncolumn,
              nlegend, opt_array, 1.0, 1.0, 1.5,
@@ -1076205,7 +1080471,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
  
          if ( i == nturn )
          {
-@@ -630,10 +634,10 @@
+@@ -630,10 +642,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076218,7 +1080484,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
      max_height = MAX( max_height, legend_height );
  
      // Set up symbol legend entries with various symbols.
-@@ -655,10 +659,10 @@
+@@ -655,10 +667,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076231,7 +1080497,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
      max_height = MAX( max_height, legend_height );
  
      // Set up symbol legend entries with various numbers of symbols.
-@@ -680,10 +684,10 @@
+@@ -680,10 +692,10 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076244,7 +1080510,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
      max_height = MAX( max_height, legend_height );
  
      // Set up box legend entries with various colours.
-@@ -708,7 +712,7 @@
+@@ -708,7 +720,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076253,7 +1080519,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          box_colors, box_patterns, box_scales, box_line_widths,
          NULL, NULL, NULL,
          NULL, NULL, NULL, NULL );
-@@ -733,7 +737,7 @@
+@@ -733,7 +745,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076262,7 +1080528,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          box_colors, box_patterns, box_scales, box_line_widths,
          NULL, NULL, NULL,
          NULL, NULL, NULL, NULL );
-@@ -758,7 +762,7 @@
+@@ -758,7 +770,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076271,7 +1080537,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          box_colors, box_patterns, box_scales, box_line_widths,
          NULL, NULL, NULL,
          NULL, NULL, NULL, NULL );
-@@ -785,7 +789,7 @@
+@@ -785,7 +797,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076280,7 +1080546,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          NULL, NULL, NULL, NULL,
          line_colors, line_styles, line_widths,
          NULL, NULL, NULL, NULL );
-@@ -809,7 +813,7 @@
+@@ -809,7 +821,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076289,7 +1080555,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          NULL, NULL, NULL, NULL,
          line_colors, line_styles, line_widths,
          NULL, NULL, NULL, NULL );
-@@ -833,7 +837,7 @@
+@@ -833,7 +845,7 @@
      pllegend( &legend_width, &legend_height, opt, position, x, y,
          0.1, 15, 1, 1, 0, 0,
          nlegend, opt_array, 1.0, text_scale, 2.0,
@@ -1076300,7 +1080566,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x33c.c plplot-trunk/examples/c/
          NULL, NULL, NULL, NULL );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c/x34c.c plplot-trunk/examples/c/x34c.c
 --- plplot-5.9.9/examples/c/x34c.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c/x34c.c	2011-11-02 09:43:08.573953281 -0600
++++ plplot-trunk/examples/c/x34c.c	2011-11-02 09:43:08.000000000 -0600
 @@ -38,7 +38,7 @@
      "XOR drawing"
  };
@@ -1076325,7 +1080591,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c/x34c.c plplot-trunk/examples/c/
      plscol0( 1, 0, 0, 0 );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/CMakeLists.txt plplot-trunk/examples/c++/CMakeLists.txt
 --- plplot-5.9.9/examples/c++/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/CMakeLists.txt	2012-06-08 08:56:07.349500709 -0600
++++ plplot-trunk/examples/c++/CMakeLists.txt	2012-06-08 08:56:07.000000000 -0600
 @@ -27,6 +27,7 @@
  
  set(cxx_STRING_INDICES
@@ -1076345,7 +1080611,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/CMakeLists.txt plplot-trunk/e
    if(ENABLE_qt)
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/Makefile.examples.in plplot-trunk/examples/c++/Makefile.examples.in
 --- plplot-5.9.9/examples/c++/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/Makefile.examples.in	2012-01-05 11:23:00.389082794 -0700
++++ plplot-trunk/examples/c++/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -24,17 +24,17 @@
  CXX = @CXX@
  EXEEXT = @EXEEXT@
@@ -1076401,7 +1080667,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/Makefile.examples.in plplot-t
  .SUFFIXES: .cc $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/README.c++demos plplot-trunk/examples/c++/README.c++demos
 --- plplot-5.9.9/examples/c++/README.c++demos	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/README.c++demos	2012-06-08 08:56:07.353500430 -0600
++++ plplot-trunk/examples/c++/README.c++demos	2012-06-08 08:56:07.000000000 -0600
 @@ -14,5 +14,5 @@
  
  If you encounter any other problems please report them.
@@ -1076411,7 +1080677,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/README.c++demos plplot-trunk/
  March 2004.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/README.qt_example plplot-trunk/examples/c++/README.qt_example
 --- plplot-5.9.9/examples/c++/README.qt_example	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/README.qt_example	2012-01-28 07:51:44.601755505 -0700
++++ plplot-trunk/examples/c++/README.qt_example	2012-01-28 07:51:44.000000000 -0700
 @@ -2,13 +2,15 @@
  source code for a simple example demonstrating how to access the PLplot API
  from a Qt GUI application.
@@ -1076436,7 +1080702,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/README.qt_example plplot-trun
 +make test_qt_example
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x00.cc plplot-trunk/examples/c++/x00.cc
 --- plplot-5.9.9/examples/c++/x00.cc	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/c++/x00.cc	2012-08-03 15:40:25.007810005 -0600
++++ plplot-trunk/examples/c++/x00.cc	2012-08-03 15:40:25.000000000 -0600
 @@ -0,0 +1,88 @@
 +// $Id: x00.cc 12197 2012-07-06 20:54:41Z airwin $
 +//
@@ -1076528,7 +1080794,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x00.cc plplot-trunk/examples/
 +//--------------------------------------------------------------------------
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x01.cc plplot-trunk/examples/c++/x01.cc
 --- plplot-5.9.9/examples/c++/x01.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x01.cc	2012-06-08 08:56:07.328502167 -0600
++++ plplot-trunk/examples/c++/x01.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x01.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076543,7 +1080809,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x01.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x03.cc plplot-trunk/examples/c++/x03.cc
 --- plplot-5.9.9/examples/c++/x03.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x03.cc	2012-06-08 08:56:07.333501820 -0600
++++ plplot-trunk/examples/c++/x03.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x03.cc 11665 2011-03-20 23:09:33Z hezekiahcarty $
@@ -1076558,7 +1080824,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x03.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x05.cc plplot-trunk/examples/c++/x05.cc
 --- plplot-5.9.9/examples/c++/x05.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x05.cc	2012-06-08 08:56:07.335501680 -0600
++++ plplot-trunk/examples/c++/x05.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x05.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076573,7 +1080839,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x05.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x06.cc plplot-trunk/examples/c++/x06.cc
 --- plplot-5.9.9/examples/c++/x06.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x06.cc	2012-06-08 08:56:07.370499249 -0600
++++ plplot-trunk/examples/c++/x06.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x06.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076588,7 +1080854,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x06.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x07.cc plplot-trunk/examples/c++/x07.cc
 --- plplot-5.9.9/examples/c++/x07.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x07.cc	2012-06-08 08:56:07.340501335 -0600
++++ plplot-trunk/examples/c++/x07.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x07.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076603,7 +1080869,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x07.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x08.cc plplot-trunk/examples/c++/x08.cc
 --- plplot-5.9.9/examples/c++/x08.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x08.cc	2012-06-08 08:56:07.375498901 -0600
++++ plplot-trunk/examples/c++/x08.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x08.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076618,7 +1080884,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x08.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x09.cc plplot-trunk/examples/c++/x09.cc
 --- plplot-5.9.9/examples/c++/x09.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x09.cc	2012-06-08 08:56:07.344501055 -0600
++++ plplot-trunk/examples/c++/x09.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x09.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076660,7 +1080926,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x09.cc plplot-trunk/examples/
      int      i, j;
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x10.cc plplot-trunk/examples/c++/x10.cc
 --- plplot-5.9.9/examples/c++/x10.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x10.cc	2012-06-08 08:56:07.355500292 -0600
++++ plplot-trunk/examples/c++/x10.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x10.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076675,7 +1080941,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x10.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x11.cc plplot-trunk/examples/c++/x11.cc
 --- plplot-5.9.9/examples/c++/x11.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x11.cc	2012-06-08 08:56:07.329502098 -0600
++++ plplot-trunk/examples/c++/x11.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x11.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076690,7 +1080956,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x11.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x12.cc plplot-trunk/examples/c++/x12.cc
 --- plplot-5.9.9/examples/c++/x12.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x12.cc	2012-06-08 08:56:07.363499736 -0600
++++ plplot-trunk/examples/c++/x12.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x12.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076705,7 +1080971,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x12.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x13.cc plplot-trunk/examples/c++/x13.cc
 --- plplot-5.9.9/examples/c++/x13.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x13.cc	2012-06-08 08:56:07.334501750 -0600
++++ plplot-trunk/examples/c++/x13.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x13.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076720,7 +1080986,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x13.cc plplot-trunk/examples/
  // This file is part of PLplot.
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x14.cc plplot-trunk/examples/c++/x14.cc
 --- plplot-5.9.9/examples/c++/x14.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x14.cc	2012-06-08 08:56:07.368499387 -0600
++++ plplot-trunk/examples/c++/x14.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x14.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076744,7 +1081010,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x14.cc plplot-trunk/examples/
      *ty = tr[3] * x + tr[4] * y + tr[5];
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x15.cc plplot-trunk/examples/c++/x15.cc
 --- plplot-5.9.9/examples/c++/x15.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x15.cc	2012-06-08 08:56:07.337501542 -0600
++++ plplot-trunk/examples/c++/x15.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x15.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076805,11 +1081071,11 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x15.cc plplot-trunk/examples/
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x16.cc plplot-trunk/examples/c++/x16.cc
 --- plplot-5.9.9/examples/c++/x16.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x16.cc	2012-06-08 08:56:07.372499111 -0600
++++ plplot-trunk/examples/c++/x16.cc	2012-12-14 08:50:59.626345588 -0700
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x16.cc 11760 2011-06-01 19:29:11Z airwin $
-+// $Id: x16.cc 12176 2012-02-24 20:33:39Z andrewross $
++// $Id: x16.cc 12281 2012-11-23 21:27:51Z andrewross $
  //--------------------------------------------------------------------------
  //
  //--------------------------------------------------------------------------
@@ -1076818,7 +1081084,33 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x16.cc plplot-trunk/examples/
  // Copyright (C) 2004  Alan W. Irwin
  //
  // This file is part of PLplot.
-@@ -122,7 +122,7 @@
+@@ -46,6 +46,7 @@
+     static int           nx;
+     static int           ny;
+     static int           exclude;
++    static int           colorbar;
+     const static int     PERIMETERPTS;
+ public:
+     static PLFLT         tr[];
+@@ -54,11 +55,12 @@
+     static const char    *notes[];
+ };
+ 
+-int       x16::      ns      = 20;
+-int       x16::      nx      = 35;
+-int       x16::      ny      = 46;
+-int       x16::      exclude = 0;
+-const int x16::PERIMETERPTS  = 100;
++int       x16::      ns       = 20;
++int       x16::      nx       = 35;
++int       x16::      ny       = 46;
++int       x16::      exclude  = 0;
++int       x16::      colorbar = 1;
++const int x16::PERIMETERPTS   = 100;
+ 
+ PLFLT     x16::    tr[] = { 2. / ( nx - 1 ), 0.0, -1.0, 0.0, 2. / ( ny - 1 ), -1.0 };
+ 
+@@ -122,7 +124,7 @@
  
  // Transformation function
  
@@ -1076827,9 +1081119,200 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x16.cc plplot-trunk/examples/
  {
      *tx = x16::tr[0] * x + x16::tr[1] * y + x16::tr[2];
      *ty = x16::tr[3] * x + x16::tr[4] * y + x16::tr[5];
+@@ -150,7 +152,30 @@
+     PLFLT     *clevel    = new PLFLT[ns];
+     PLFLT     *shedge    = new PLFLT[ns + 1];
+     const int fill_width = 2, cont_color = 0, cont_width = 0;
++    PLFLT     colorbar_width, colorbar_height;
+ 
++#define NUM_AXES    1
++    PLINT      n_axis_opts  = NUM_AXES;
++    const char *axis_opts[] = {
++        "bcvtm",
++    };
++    PLINT      num_values[NUM_AXES];
++    PLFLT      *values[NUM_AXES];
++    PLFLT      axis_ticks[NUM_AXES] = {
++        0.0,
++    };
++    PLINT      axis_subticks[NUM_AXES] = {
++        0,
++    };
++    PLFLT      filler_values[2] = { 0.0, 1.0 };
++#define NUM_LABELS    1
++    PLINT      n_labels     = NUM_LABELS;
++    PLINT      label_opts[] = {
++        PL_COLORBAR_LABEL_BOTTOM,
++    };
++    const char *labels[] = {
++        "Magnitude",
++    };
+ 
+     // plplot initialization
+ 
+@@ -240,6 +265,31 @@
+         cont_color, cont_width,
+         plstream::fill, true, NULL, NULL );
+ 
++    if ( colorbar )
++    {
++        // Smaller text
++        pls->schr( 0.0, 0.75 );
++        // Small ticks on the vertical axis
++        pls->smaj( 0.0, 0.5 );
++        pls->smin( 0.0, 0.5 );
++
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
++        pls->colorbar( &colorbar_width, &colorbar_height,
++            PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
++
++        // Reset text and tick sizes
++        pls->schr( 0.0, 1.0 );
++        pls->smaj( 0.0, 1.0 );
++        pls->smin( 0.0, 1.0 );
++    }
++
+     pls->col0( 1 );
+     pls->box( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 );
+     pls->col0( 2 );
+@@ -262,6 +312,31 @@
+         cont_color, cont_width,
+         plstream::fill, true, plstream::tr1, (void *) &cgrid1 );
+ 
++    if ( colorbar )
++    {
++        // Smaller text
++        pls->schr( 0.0, 0.75 );
++        // Small ticks on the vertical axis
++        pls->smaj( 0.0, 0.5 );
++        pls->smin( 0.0, 0.5 );
++
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
++        pls->colorbar( &colorbar_width, &colorbar_height,
++            PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
++
++        // Reset text and tick sizes
++        pls->schr( 0.0, 1.0 );
++        pls->smaj( 0.0, 1.0 );
++        pls->smin( 0.0, 1.0 );
++    }
++
+     pls->col0( 1 );
+     pls->box( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 );
+     pls->col0( 2 );
+@@ -285,6 +360,31 @@
+         cont_color, cont_width,
+         plstream::fill, false, plstream::tr2, (void *) &cgrid2 );
+ 
++    if ( colorbar )
++    {
++        // Smaller text
++        pls->schr( 0.0, 0.75 );
++        // Small ticks on the vertical axis
++        pls->smaj( 0.0, 0.5 );
++        pls->smin( 0.0, 0.5 );
++
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
++        pls->colorbar( &colorbar_width, &colorbar_height,
++            PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
++
++        // Reset text and tick sizes
++        pls->schr( 0.0, 1.0 );
++        pls->smaj( 0.0, 1.0 );
++        pls->smin( 0.0, 1.0 );
++    }
++
+     pls->col0( 1 );
+     pls->box( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 );
+     pls->col0( 2 );
+@@ -309,6 +409,31 @@
+         2, 3,
+         plstream::fill, false, plstream::tr2, (void *) &cgrid2 );
+ 
++    if ( colorbar )
++    {
++        // Smaller text
++        pls->schr( 0.0, 0.75 );
++        // Small ticks on the vertical axis
++        pls->smaj( 0.0, 0.5 );
++        pls->smin( 0.0, 0.5 );
++
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
++        pls->colorbar( &colorbar_width, &colorbar_height,
++            PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            2, 3,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
++
++        // Reset text and tick sizes
++        pls->schr( 0.0, 1.0 );
++        pls->smaj( 0.0, 1.0 );
++        pls->smin( 0.0, 1.0 );
++    }
++
+     pls->col0( 1 );
+     pls->box( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 );
+     pls->col0( 2 );
+@@ -379,6 +504,31 @@
+         cont_color, cont_width,
+         plstream::fill, false, plstream::tr2, (void *) &cgrid2 );
+ 
++    if ( colorbar )
++    {
++        // Smaller text
++        pls->schr( 0.0, 0.75 );
++        // Small ticks on the vertical axis
++        pls->smaj( 0.0, 0.5 );
++        pls->smin( 0.0, 0.5 );
++
++        num_values[0] = ns + 1;
++        values[0]     = shedge;
++        pls->colorbar( &colorbar_width, &colorbar_height,
++            PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
++            0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
++            cont_color, cont_width,
++            n_labels, label_opts, labels,
++            n_axis_opts, axis_opts,
++            axis_ticks, axis_subticks,
++            num_values, (const PLFLT * const *) values );
++
++        // Reset text and tick sizes
++        pls->schr( 0.0, 1.0 );
++        pls->smaj( 0.0, 1.0 );
++        pls->smin( 0.0, 1.0 );
++    }
++
+     // Now we can draw the perimeter.  (If do before, shade stuff may overlap.)
+     for ( i = 0; i < PERIMETERPTS; i++ )
+     {
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x17.cc plplot-trunk/examples/c++/x17.cc
 --- plplot-5.9.9/examples/c++/x17.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x17.cc	2012-06-08 08:56:07.342501195 -0600
++++ plplot-trunk/examples/c++/x17.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x17.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076853,7 +1081336,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x17.cc plplot-trunk/examples/
          y3    = y2 * noise;
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x19.cc plplot-trunk/examples/c++/x19.cc
 --- plplot-5.9.9/examples/c++/x19.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x19.cc	2012-06-08 08:56:07.347500848 -0600
++++ plplot-trunk/examples/c++/x19.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x19.cc 11297 2010-11-02 03:31:14Z airwin $
@@ -1076891,7 +1081374,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x19.cc plplot-trunk/examples/
      {
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x20.cc plplot-trunk/examples/c++/x20.cc
 --- plplot-5.9.9/examples/c++/x20.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x20.cc	2012-06-08 08:56:07.360499943 -0600
++++ plplot-trunk/examples/c++/x20.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x20.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076915,7 +1081398,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x20.cc plplot-trunk/examples/
      pls->Free2dGrid( cgrid2.yg, width + 1, height + 1 );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x21.cc plplot-trunk/examples/c++/x21.cc
 --- plplot-5.9.9/examples/c++/x21.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x21.cc	2012-06-08 08:56:07.331501960 -0600
++++ plplot-trunk/examples/c++/x21.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x21.cc 11760 2011-06-01 19:29:11Z airwin $
@@ -1076981,7 +1081464,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x21.cc plplot-trunk/examples/
                  //
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x22.cc plplot-trunk/examples/c++/x22.cc
 --- plplot-5.9.9/examples/c++/x22.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x22.cc	2012-06-08 08:56:07.365499597 -0600
++++ plplot-trunk/examples/c++/x22.cc	2012-06-08 08:56:07.000000000 -0600
 @@ -1,10 +1,10 @@
  //--------------------------------------------------------------------------
 -// $Id: x22.cc 11629 2011-03-16 09:32:29Z andrewross $
@@ -1076997,7 +1081480,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x22.cc plplot-trunk/examples/
  //
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x27.cc plplot-trunk/examples/c++/x27.cc
 --- plplot-5.9.9/examples/c++/x27.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x27.cc	2011-11-02 09:43:10.614878468 -0600
++++ plplot-trunk/examples/c++/x27.cc	2011-11-02 09:43:10.000000000 -0600
 @@ -1,5 +1,5 @@
  //--------------------------------------------------------------------------
 -// $Id: x27.cc 11935 2011-09-25 16:09:38Z airwin $
@@ -1077048,10 +1081531,10 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x27.cc plplot-trunk/examples/
      // Fill the coordinates
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x29.cc plplot-trunk/examples/c++/x29.cc
 --- plplot-5.9.9/examples/c++/x29.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x29.cc	2011-11-02 09:43:10.628877953 -0600
++++ plplot-trunk/examples/c++/x29.cc	2012-12-14 08:50:59.625345592 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x29.cc 11680 2011-03-27 17:57:51Z airwin $
-+// $Id: x29.cc 11975 2011-10-19 11:05:10Z andrewross $
++// $Id: x29.cc 12209 2012-08-13 21:29:59Z andrewross $
  //
  //       Sample plots using date / time formatting for axes
  //
@@ -1077071,13 +1081554,13 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x29.cc plplot-trunk/examples/
          pls->col0( 3 );
          strncpy( title, "@frPLplot Example 29 - TAI-UTC ", 100 );
 -        strncat( title, title_suffix, 100 );
-+        strncat( title, title_suffix, 100 - strlen( title ) );
++        strncat( title, title_suffix, 100 - strlen( title ) - 1 );
          pls->lab( xtitle, "TAI-UTC (sec)", title );
  
          pls->col0( 4 );
 diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x30.cc plplot-trunk/examples/c++/x30.cc
 --- plplot-5.9.9/examples/c++/x30.cc	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/c++/x30.cc	2011-11-28 16:54:37.304406225 -0700
++++ plplot-trunk/examples/c++/x30.cc	2011-11-28 16:54:37.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: x30.cc 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: x30.cc 12037 2011-11-24 20:09:15Z andrewross $
@@ -1077095,8 +1081578,19 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/c++/x30.cc plplot-trunk/examples/
  }
 diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examples/CMakeLists.txt
 --- plplot-5.9.9/examples/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/CMakeLists.txt	2011-11-29 20:50:50.934991065 -0700
-@@ -181,6 +181,21 @@
++++ plplot-trunk/examples/CMakeLists.txt	2012-12-14 08:50:59.636345540 -0700
+@@ -107,6 +107,10 @@
+     set(PSCAIRO_COMMENT "#")
+   endif(NOT PLD_pscairo)
+ 
++  if(NOT PLD_epscairo)
++    set(EPSCAIRO_COMMENT "#")
++  endif(NOT PLD_epscairo)
++
+   if(NOT PLD_svgcairo)
+     set(SVGCAIRO_COMMENT "#")
+   endif(NOT PLD_svgcairo)
+@@ -181,6 +185,21 @@
      set(PDFQT_COMMENT "#")
    endif(NOT PLD_pdfqt)
  
@@ -1077118,7 +1081612,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
    configure_file(
      ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.examples.in
      ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples
-@@ -277,10 +292,15 @@
+@@ -277,10 +296,15 @@
      RENAME plplot_configure.cmake
      )
  
@@ -1077135,7 +1081629,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
      DESTINATION ${DATA_DIR}/examples/cmake/modules
      )
  
-@@ -320,18 +340,6 @@
+@@ -320,18 +344,6 @@
        )
    endif(ENABLE_d)
  
@@ -1077154,7 +1081648,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
    if(LANG_SUPPORT_FILES)
      foreach(LANG_SUPPORT_info ${LANG_SUPPORT_FILES})
        string(REGEX REPLACE "^(.*):.*$" "\\1" LANG_SUPPORT_DIR ${LANG_SUPPORT_info})
-@@ -346,21 +354,29 @@
+@@ -346,21 +358,29 @@
  else(CORE_BUILD)
    project(installed_plplot_examples NONE)
  
@@ -1077198,7 +1081692,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
  
    #Configure variables and enable languages as needed.
    include(plplot_configure)
-@@ -410,8 +426,6 @@
+@@ -410,8 +430,6 @@
      set(compare_command ${CMAKE_CURRENT_SOURCE_DIR}/test_diff.sh)
    endif(CORE_BUILD)
  
@@ -1077207,7 +1081701,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
    if(PLD_psc)
      set(compare_file_depends ${custom_test_command})
      if(ENABLE_DYNDRIVERS)
-@@ -466,18 +480,19 @@
+@@ -466,18 +484,19 @@
  	  set(environment ${custom_env})
  	endif(language STREQUAL "java")
  
@@ -1077230,7 +1081724,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
  	# If the subdirectory used an add_custom_target (as indicated
  	# by both files_examples_${language} and targets_examples_${language}
  	# being true), then for that special case must add a target-level
-@@ -537,16 +552,6 @@
+@@ -537,16 +556,6 @@
        string(REGEX REPLACE "^.*:(.*):.*$" "\\1" driver ${file_devices_info})
        string(REGEX REPLACE "^.*:.*:(.*)$" "\\1" familied ${file_devices_info})
        
@@ -1077247,7 +1081741,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
        set(file_device_depends_${device} ${device_depends})
        if(ENABLE_DYNDRIVERS)
  	get_property(FILE_DEPENDS_${driver} 
-@@ -556,10 +561,10 @@
+@@ -556,10 +565,10 @@
  	  ${FILE_DEPENDS_${driver}} ${driver}
  	  )
        endif(ENABLE_DYNDRIVERS)
@@ -1077260,7 +1081754,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
  	COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device"
  	COMMAND env ${custom_env} ${custom_test_command} --verbose --front-end=c --device=${device}
  	DEPENDS
-@@ -567,7 +572,7 @@
+@@ -567,7 +576,7 @@
  	VERBATIM
  	)
        add_custom_target(test_c_${device}
@@ -1077269,7 +1081763,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
  	)
        list(APPEND noninteractive_targets_LIST test_c_${device})
        # Follow what was done above.
-@@ -611,13 +616,13 @@
+@@ -611,13 +620,13 @@
  
      endif(ENABLE_DYNDRIVERS)
      if(PLD_extcairo)
@@ -1077290,7 +1081784,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
        add_custom_target(test_extcairo
  	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps
  	)
-@@ -890,7 +895,7 @@
+@@ -890,7 +899,7 @@
        add_dependencies(test_tk_01 test_xwin_dyndriver)
      endif(FILE_DEPENDS_xwin)
      list(APPEND targets_examples_tk test_tk_01)
@@ -1077299,7 +1081793,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
      add_custom_target(test_tk_03
        COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/tk03
        DEPENDS ${xwin_target}
-@@ -986,7 +991,7 @@
+@@ -986,7 +995,7 @@
        endif(FILE_DEPENDS_xwin)
        list(APPEND targets_examples_tk test_tk_04)
      endif(ENABLE_itk)
@@ -1077308,9 +1081802,25 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/CMakeLists.txt plplot-trunk/examp
    endif(ENABLE_tk AND PLD_tk)
  
    if(targets_examples_tk)
+@@ -1032,6 +1041,7 @@
+     test_c_pdfcairo
+     test_c_pngcairo
+     test_c_pscairo
++    test_c_epscairo
+     test_c_svgcairo
+     test_extcairo
+     test_c_xcairo
+@@ -1060,6 +1070,7 @@
+ PLD_pdfcairo:		${PLD_pdfcairo}
+ PLD_pngcairo:		${PLD_pngcairo}
+ PLD_pscairo:		${PLD_pscairo}
++PLD_epscairo:		${PLD_epscairo}
+ PLD_svgcairo:		${PLD_svgcairo}
+ PLD_cgm:		${PLD_cgm}
+ PLD_dg300:		${PLD_dg300}
 diff -ruN --exclude .svn plplot-5.9.9/examples/d/CMakeLists.txt plplot-trunk/examples/d/CMakeLists.txt
 --- plplot-5.9.9/examples/d/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/d/CMakeLists.txt	2012-06-08 08:56:06.399566896 -0600
++++ plplot-trunk/examples/d/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -26,6 +26,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1077329,7 +1081839,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/d/CMakeLists.txt plplot-trunk/exa
      ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples
 diff -ruN --exclude .svn plplot-5.9.9/examples/d/Makefile.examples.in plplot-trunk/examples/d/Makefile.examples.in
 --- plplot-5.9.9/examples/d/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/d/Makefile.examples.in	2012-01-05 11:23:00.216089423 -0700
++++ plplot-trunk/examples/d/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -22,9 +22,9 @@
  DC = @DC@
  EXEEXT = @EXEEXT@
@@ -1077353,7 +1081863,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/d/Makefile.examples.in plplot-tru
  .SUFFIXES: .d $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/d/x00d.d plplot-trunk/examples/d/x00d.d
 --- plplot-5.9.9/examples/d/x00d.d	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/d/x00d.d	2012-06-08 08:56:06.397567036 -0600
++++ plplot-trunk/examples/d/x00d.d	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,61 @@
 +// $Id: x00d.d 12179 2012-02-24 23:24:50Z andrewross $
 +//
@@ -1077418,7 +1081928,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/d/x00d.d plplot-trunk/examples/d/
 +}
 diff -ruN --exclude .svn plplot-5.9.9/examples/d/x21d.d plplot-trunk/examples/d/x21d.d
 --- plplot-5.9.9/examples/d/x21d.d	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/d/x21d.d	2012-08-03 15:40:24.989810006 -0600
++++ plplot-trunk/examples/d/x21d.d	2012-08-03 15:40:24.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: x21d.d 11684 2011-03-31 04:15:32Z airwin $
 +// $Id: x21d.d 12197 2012-07-06 20:54:41Z airwin $
@@ -1077467,7 +1081977,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/d/x21d.d plplot-trunk/examples/d/
                  //
 diff -ruN --exclude .svn plplot-5.9.9/examples/f77/CMakeLists.txt plplot-trunk/examples/f77/CMakeLists.txt
 --- plplot-5.9.9/examples/f77/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f77/CMakeLists.txt	2012-01-28 07:51:44.214769399 -0700
++++ plplot-trunk/examples/f77/CMakeLists.txt	2012-01-28 07:51:44.000000000 -0700
 @@ -145,11 +145,7 @@
    set_property(GLOBAL PROPERTY TARGETS_examples_f77)
    foreach(STRING_INDEX ${f77_STRING_INDICES})
@@ -1077483,7 +1081993,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f77/CMakeLists.txt plplot-trunk/e
    endforeach(STRING_INDEX ${f77_STRING_INDICES})
 diff -ruN --exclude .svn plplot-5.9.9/examples/f77/Makefile.examples.in plplot-trunk/examples/f77/Makefile.examples.in
 --- plplot-5.9.9/examples/f77/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f77/Makefile.examples.in	2012-01-05 11:23:00.347084413 -0700
++++ plplot-trunk/examples/f77/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -24,9 +24,9 @@
  F77 = @F77@
  EXEEXT = @EXEEXT@
@@ -1077508,7 +1082018,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f77/Makefile.examples.in plplot-t
  .SUFFIXES: .f $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/CMakeLists.txt plplot-trunk/examples/f95/CMakeLists.txt
 --- plplot-5.9.9/examples/f95/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/CMakeLists.txt	2012-06-08 08:56:06.961527681 -0600
++++ plplot-trunk/examples/f95/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -1,7 +1,7 @@
  # examples/f95/CMakeLists.txt
  ### Process this file with cmake to produce Makefile
@@ -1077588,7 +1082098,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/CMakeLists.txt plplot-trunk/e
 -
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/Makefile.examples.in plplot-trunk/examples/f95/Makefile.examples.in
 --- plplot-5.9.9/examples/f95/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/Makefile.examples.in	2012-06-08 08:56:06.954528169 -0600
++++ plplot-trunk/examples/f95/Makefile.examples.in	2012-06-08 08:56:06.000000000 -0600
 @@ -24,11 +24,12 @@
  F95 = @FC@
  EXEEXT = @EXEEXT@
@@ -1077616,7 +1082126,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/Makefile.examples.in plplot-t
  .SUFFIXES: .f90 $(EXEEXT)
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/plf95demolib.f90 plplot-trunk/examples/f95/plf95demolib.f90
 --- plplot-5.9.9/examples/f95/plf95demolib.f90	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/f95/plf95demolib.f90	2011-11-28 16:54:37.210409584 -0700
++++ plplot-trunk/examples/f95/plf95demolib.f90	2011-11-28 16:54:37.000000000 -0700
 @@ -0,0 +1,66 @@
 +!      $Id: x02f.f90 11984 2011-10-19 23:26:23Z andrewross $
 +!      Demonstrates multiple windows and color map 0
@@ -1077686,7 +1082196,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/plf95demolib.f90 plplot-trunk
 +end module plf95demolib
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/plf95demos.inc.cmake plplot-trunk/examples/f95/plf95demos.inc.cmake
 --- plplot-5.9.9/examples/f95/plf95demos.inc.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/plf95demos.inc.cmake	2011-11-02 09:43:10.543881071 -0600
++++ plplot-trunk/examples/f95/plf95demos.inc.cmake	2011-11-02 09:43:10.000000000 -0600
 @@ -1,8 +1,9 @@
        function myisnan(x)
  
@@ -1077701,7 +1082211,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/plf95demos.inc.cmake plplot-t
  @HAVE_F77_ISNAN_TRUE@      myisnan = isnan(x)
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/test_plf95demolib.f90 plplot-trunk/examples/f95/test_plf95demolib.f90
 --- plplot-5.9.9/examples/f95/test_plf95demolib.f90	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/f95/test_plf95demolib.f90	2011-11-02 09:43:10.532881475 -0600
++++ plplot-trunk/examples/f95/test_plf95demolib.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -0,0 +1,38 @@
 +! test_plf95demolib.f90 --
 +!     Test program for the auxiliary functions
@@ -1077743,7 +1082253,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/test_plf95demolib.f90 plplot-
 +end program
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x00f.f90 plplot-trunk/examples/f95/x00f.f90
 --- plplot-5.9.9/examples/f95/x00f.f90	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/f95/x00f.f90	2012-06-08 08:56:06.956528029 -0600
++++ plplot-trunk/examples/f95/x00f.f90	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,59 @@
 +!   $Id: x00f.f90 12172 2012-02-19 18:18:19Z airwin $
 +!
@@ -1077806,7 +1082316,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x00f.f90 plplot-trunk/example
 +end program x00f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x01f.f90 plplot-trunk/examples/f95/x01f.f90
 --- plplot-5.9.9/examples/f95/x01f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x01f.f90	2012-01-04 08:45:36.100530664 -0700
++++ plplot-trunk/examples/f95/x01f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,4 +1,4 @@
 -!   $Id: x01f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!   $Id: x01f.f90 12094 2011-12-03 08:35:52Z andrewross $
@@ -1077959,7 +1082469,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x01f.f90 plplot-trunk/example
 +end program x01f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x02f.f90 plplot-trunk/examples/f95/x02f.f90
 --- plplot-5.9.9/examples/f95/x02f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x02f.f90	2012-01-04 08:45:36.094530880 -0700
++++ plplot-trunk/examples/f95/x02f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,156 +1,147 @@
 -!      $Id: x02f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Demonstrates multiple windows and color map 0 
@@ -1078217,7 +1082727,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x02f.f90 plplot-trunk/example
 +end program x02f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x03f.f90 plplot-trunk/examples/f95/x03f.f90
 --- plplot-5.9.9/examples/f95/x03f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x03f.f90	2012-01-04 08:45:36.100530664 -0700
++++ plplot-trunk/examples/f95/x03f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,118 +1,99 @@
 -!      $Id: x03f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Generates polar plot with, 1-1 scaling
@@ -1078433,7 +1082943,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x03f.f90 plplot-trunk/example
 +end program x03f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x04f.f90 plplot-trunk/examples/f95/x04f.f90
 --- plplot-5.9.9/examples/f95/x04f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x04f.f90	2012-01-04 08:45:36.096530808 -0700
++++ plplot-trunk/examples/f95/x04f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,140 +1,148 @@
 -!      $Id: x04f.f90 11717 2011-04-21 00:47:06Z airwin $
 -!      Illustration of logarithmic axes, and redefinition of window
@@ -1078719,7 +1083229,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x04f.f90 plplot-trunk/example
 +end program x04f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x05f.f90 plplot-trunk/examples/f95/x05f.f90
 --- plplot-5.9.9/examples/f95/x05f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x05f.f90	2012-01-04 08:45:36.080531384 -0700
++++ plplot-trunk/examples/f95/x05f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,48 +1,47 @@
 -!      $Id: x05f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Draws a histogram from sample data
@@ -1078812,7 +1083322,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x05f.f90 plplot-trunk/example
 +end program x04f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x06f.f90 plplot-trunk/examples/f95/x06f.f90
 --- plplot-5.9.9/examples/f95/x06f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x06f.f90	2012-01-04 08:45:36.098530736 -0700
++++ plplot-trunk/examples/f95/x06f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,98 +1,97 @@
 -!      $Id: x06f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Displays the plotter symbols for PLPOIN
@@ -1078981,7 +1083491,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x06f.f90 plplot-trunk/example
 +end program x06f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x07f.f90 plplot-trunk/examples/f95/x07f.f90
 --- plplot-5.9.9/examples/f95/x07f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x07f.f90	2012-01-04 08:45:36.083531276 -0700
++++ plplot-trunk/examples/f95/x07f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,96 +1,98 @@
 -!      $Id: x07f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Displays the plotter symbols for PLSYM
@@ -1079143,7 +1083653,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x07f.f90 plplot-trunk/example
 +end program x07f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x08f.f90 plplot-trunk/examples/f95/x08f.f90
 --- plplot-5.9.9/examples/f95/x08f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x08f.f90	2012-01-04 08:45:36.099530700 -0700
++++ plplot-trunk/examples/f95/x08f.f90	2012-01-04 08:45:36.000000000 -0700
 @@ -1,198 +1,187 @@
 -!      $Id: x08f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      3-d plot demo
@@ -1079505,7 +1084015,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x08f.f90 plplot-trunk/example
 +end program x08f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x09f.f90 plplot-trunk/examples/f95/x09f.f90
 --- plplot-5.9.9/examples/f95/x09f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x09f.f90	2012-06-08 08:56:06.952528309 -0600
++++ plplot-trunk/examples/f95/x09f.f90	2012-06-08 08:56:06.000000000 -0600
 @@ -1,374 +1,356 @@
 -!      $Id: x09f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Contour plot demo.
@@ -1080186,7 +1084696,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x09f.f90 plplot-trunk/example
 +end program x09f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x10f.f90 plplot-trunk/examples/f95/x10f.f90
 --- plplot-5.9.9/examples/f95/x10f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x10f.f90	2012-01-28 07:51:44.528758131 -0700
++++ plplot-trunk/examples/f95/x10f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,45 +1,45 @@
 -!      $Id: x10f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Demonstration program for PLplot illustrating absolute positioning
@@ -1080268,7 +1084778,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x10f.f90 plplot-trunk/example
 +end program x10f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x11f.f90 plplot-trunk/examples/f95/x11f.f90
 --- plplot-5.9.9/examples/f95/x11f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x11f.f90	2012-01-28 07:51:44.533757950 -0700
++++ plplot-trunk/examples/f95/x11f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,181 +1,159 @@
 -!      $Id: x11f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Mesh plot demo
@@ -1080585,7 +1085095,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x11f.f90 plplot-trunk/example
 +end program x11f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x12f.f90 plplot-trunk/examples/f95/x12f.f90
 --- plplot-5.9.9/examples/f95/x12f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x12f.f90	2012-01-28 07:51:44.531758023 -0700
++++ plplot-trunk/examples/f95/x12f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,124 +1,81 @@
 -!      $Id: x12f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Demonstration program for PLplot: Bar chart example.
@@ -1080785,7 +1085295,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x12f.f90 plplot-trunk/example
 +end program x12f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x13f.f90 plplot-trunk/examples/f95/x13f.f90
 --- plplot-5.9.9/examples/f95/x13f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x13f.f90	2012-01-28 07:51:44.535757877 -0700
++++ plplot-trunk/examples/f95/x13f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,70 +1,66 @@
 -!      $Id: x13f.f90 11680 2011-03-27 17:57:51Z airwin $
 -!      Pie chart demo.
@@ -1080939,7 +1085449,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x13f.f90 plplot-trunk/example
 +end program x13f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x14f.f90 plplot-trunk/examples/f95/x14f.f90
 --- plplot-5.9.9/examples/f95/x14f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x14f.f90	2011-11-02 09:43:10.519881950 -0600
++++ plplot-trunk/examples/f95/x14f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x14f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x14f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1081068,7 +1085578,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x14f.f90 plplot-trunk/example
          -0.2_plflt, &
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x15f.f90 plplot-trunk/examples/f95/x15f.f90
 --- plplot-5.9.9/examples/f95/x15f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x15f.f90	2011-11-02 09:43:10.492882942 -0600
++++ plplot-trunk/examples/f95/x15f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x15f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x15f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1081095,7 +1085605,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x15f.f90 plplot-trunk/example
        integer min_color, min_width, max_color, max_width
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x16af.f90 plplot-trunk/examples/f95/x16af.f90
 --- plplot-5.9.9/examples/f95/x16af.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x16af.f90	2011-11-02 09:43:10.498882718 -0600
++++ plplot-trunk/examples/f95/x16af.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x16af.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x16af.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1081113,7 +1085623,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x16af.f90 plplot-trunk/exampl
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x16f.f90 plplot-trunk/examples/f95/x16f.f90
 --- plplot-5.9.9/examples/f95/x16f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x16f.f90	2011-11-02 09:43:10.525881731 -0600
++++ plplot-trunk/examples/f95/x16f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x16f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x16f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1081131,7 +1085641,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x16f.f90 plplot-trunk/example
  !      Process command-line arguments
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x17f.f90 plplot-trunk/examples/f95/x17f.f90
 --- plplot-5.9.9/examples/f95/x17f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x17f.f90	2012-01-28 07:51:44.526758202 -0700
++++ plplot-trunk/examples/f95/x17f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,118 +1,109 @@
 -!      $Id: x17f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!   $Id: x17f.f90 12149 2012-01-24 05:39:57Z arjenmarkus $
@@ -1081449,7 +1085959,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x17f.f90 plplot-trunk/example
 +end program x17f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x18f.f90 plplot-trunk/examples/f95/x18f.f90
 --- plplot-5.9.9/examples/f95/x18f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x18f.f90	2012-01-28 07:51:44.532757987 -0700
++++ plplot-trunk/examples/f95/x18f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,174 +1,164 @@
 -!      $Id: x18f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!   $Id: x18f.f90 12149 2012-01-24 05:39:57Z arjenmarkus $
@@ -1081741,7 +1086251,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x18f.f90 plplot-trunk/example
 +end program x18f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x19f.f90 plplot-trunk/examples/f95/x19f.f90
 --- plplot-5.9.9/examples/f95/x19f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x19f.f90	2011-11-02 09:43:10.502882576 -0600
++++ plplot-trunk/examples/f95/x19f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x19f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x19f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1081771,7 +1086281,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x19f.f90 plplot-trunk/example
        external geolocation_labeler
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x20f.f90 plplot-trunk/examples/f95/x20f.f90
 --- plplot-5.9.9/examples/f95/x20f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x20f.f90	2012-06-08 08:56:06.958527890 -0600
++++ plplot-trunk/examples/f95/x20f.f90	2012-06-08 08:56:06.000000000 -0600
 @@ -1,4 +1,4 @@
 -! $Id: x20f.f90 11680 2011-03-27 17:57:51Z airwin $
 +! $Id: x20f.f90 12163 2012-02-01 05:43:09Z arjenmarkus $
@@ -1081898,7 +1086408,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x20f.f90 plplot-trunk/example
 -      end
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x21f.f90 plplot-trunk/examples/f95/x21f.f90
 --- plplot-5.9.9/examples/f95/x21f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x21f.f90	2012-01-28 07:51:44.534757913 -0700
++++ plplot-trunk/examples/f95/x21f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -!      $Id: x21f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x21f.f90 12143 2012-01-21 21:52:54Z andrewross $
@@ -1081974,7 +1086484,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x21f.f90 plplot-trunk/example
  !     
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x22f.f90 plplot-trunk/examples/f95/x22f.f90
 --- plplot-5.9.9/examples/f95/x22f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x22f.f90	2011-11-02 09:43:10.516882060 -0600
++++ plplot-trunk/examples/f95/x22f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x22f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x22f.f90 11977 2011-10-19 14:43:26Z andrewross $
@@ -1082041,7 +1086551,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x22f.f90 plplot-trunk/example
        dz = abs(zmax - zmin)/dble (nlevel)
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x23f.f90 plplot-trunk/examples/f95/x23f.f90
 --- plplot-5.9.9/examples/f95/x23f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x23f.f90	2011-11-02 09:43:10.490883012 -0600
++++ plplot-trunk/examples/f95/x23f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x23f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x23f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1082245,7 +1086755,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x23f.f90 plplot-trunk/example
                   trim(style(style_index+1))//', '// &
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x24f.f90 plplot-trunk/examples/f95/x24f.f90
 --- plplot-5.9.9/examples/f95/x24f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x24f.f90	2011-11-02 09:43:10.523881806 -0600
++++ plplot-trunk/examples/f95/x24f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!     $Id: x24f.f90 11680 2011-03-27 17:57:51Z airwin $  
 +!     $Id: x24f.f90 11984 2011-10-19 23:26:23Z andrewross $  
@@ -1082263,7 +1086773,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x24f.f90 plplot-trunk/example
    data (green(i) ,i=1,7) / 240,   0, 125, 204, 204,  80,   0 /
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x25f.f90 plplot-trunk/examples/f95/x25f.f90
 --- plplot-5.9.9/examples/f95/x25f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x25f.f90	2012-01-28 07:51:44.525758236 -0700
++++ plplot-trunk/examples/f95/x25f.f90	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -! $Id: x25f.f90 11680 2011-03-27 17:57:51Z airwin $
 +! $Id: x25f.f90 12125 2012-01-11 05:31:09Z arjenmarkus $
@@ -1082539,7 +1087049,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x25f.f90 plplot-trunk/example
  end program x25f
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x26f.f90 plplot-trunk/examples/f95/x26f.f90
 --- plplot-5.9.9/examples/f95/x26f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x26f.f90	2011-11-02 09:43:10.528881620 -0600
++++ plplot-trunk/examples/f95/x26f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,6 +1,6 @@
  !  -*- coding: utf-8; -*-
  !
@@ -1082578,7 +1087088,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x26f.f90 plplot-trunk/example
      real(kind=plflt) legend_width, legend_height
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x28f.f90 plplot-trunk/examples/f95/x28f.f90
 --- plplot-5.9.9/examples/f95/x28f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x28f.f90	2012-06-08 08:56:06.963527541 -0600
++++ plplot-trunk/examples/f95/x28f.f90	2012-06-08 08:56:06.000000000 -0600
 @@ -1,4 +1,4 @@
 -!  $Id: x28f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!  $Id: x28f.f90 12164 2012-02-01 10:11:21Z andrewross $
@@ -1082607,7 +1087117,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x28f.f90 plplot-trunk/example
           x_inclination, y_inclination, z_inclination, &
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x29f.f90 plplot-trunk/examples/f95/x29f.f90
 --- plplot-5.9.9/examples/f95/x29f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x29f.f90	2011-11-02 09:43:10.505882464 -0600
++++ plplot-trunk/examples/f95/x29f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!  $Id: x29f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!  $Id: x29f.f90 11977 2011-10-19 14:43:26Z andrewross $
@@ -1082687,7 +1087197,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x29f.f90 plplot-trunk/example
           call pltimefmt(time_format)
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x30f.f90 plplot-trunk/examples/f95/x30f.f90
 --- plplot-5.9.9/examples/f95/x30f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x30f.f90	2011-11-02 09:43:10.512882210 -0600
++++ plplot-trunk/examples/f95/x30f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!  $Id: x30f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!  $Id: x30f.f90 11977 2011-10-19 14:43:26Z andrewross $
@@ -1082705,7 +1087215,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x30f.f90 plplot-trunk/example
    call plinit()
 diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x31f.f90 plplot-trunk/examples/f95/x31f.f90
 --- plplot-5.9.9/examples/f95/x31f.f90	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/f95/x31f.f90	2011-11-02 09:43:10.545880999 -0600
++++ plplot-trunk/examples/f95/x31f.f90	2011-11-02 09:43:10.000000000 -0600
 @@ -1,4 +1,4 @@
 -!      $Id: x31f.f90 11680 2011-03-27 17:57:51Z airwin $
 +!      $Id: x31f.f90 11984 2011-10-19 23:26:23Z andrewross $
@@ -1082734,7 +1087244,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/f95/x31f.f90 plplot-trunk/example
  end program x31f95
 diff -ruN --exclude .svn plplot-5.9.9/examples/java/CMakeLists.txt plplot-trunk/examples/java/CMakeLists.txt
 --- plplot-5.9.9/examples/java/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/java/CMakeLists.txt	2012-06-08 08:56:05.272645755 -0600
++++ plplot-trunk/examples/java/CMakeLists.txt	2012-12-14 08:50:57.837356469 -0700
 @@ -25,6 +25,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1082743,11 +1087253,41 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/CMakeLists.txt plplot-trunk/
    "01"
    "02"
    "03"
+@@ -100,7 +101,7 @@
+     add_custom_command(
+       OUTPUT ${out_file}
+       COMMAND ${CMAKE_Java_COMPILER}
+-      -classpath ${CMAKE_BINARY_DIR}/bindings/java ${in_file} -d ${CMAKE_CURRENT_BINARY_DIR} -encoding utf8
++      -classpath ${CMAKE_BINARY_DIR}/bindings/java -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
+       DEPENDS ${in_file} ${files_plplot_core}
+       )
+     add_custom_target(x${STRING_INDEX}j ALL DEPENDS ${out_file})
+@@ -159,7 +160,7 @@
+     add_custom_command(
+       OUTPUT ${out_file}
+       COMMAND ${CMAKE_Java_COMPILER}
+-      -classpath ${INSTALLED_JAR_FILE} ${in_file} -d ${CMAKE_CURRENT_BINARY_DIR} -encoding utf8
++      -classpath ${INSTALLED_JAR_FILE} -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
+       DEPENDS ${in_file} ${INSTALLED_JAR_FILE}
+       )
+     add_custom_target(x${STRING_INDEX}j ALL DEPENDS ${out_file})
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/Makefile.examples.in plplot-trunk/examples/java/Makefile.examples.in
+--- plplot-5.9.9/examples/java/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/Makefile.examples.in	2012-12-14 08:50:57.834356484 -0700
+@@ -61,7 +61,7 @@
+ 	rm -rf plplot $(example_classes)
+ 
+ .java.class:
+-	$(JAVAC) $(AM_JAVACFLAGS) $(JAVACFLAGS) $< -d . -classpath $(PLPLOT_CLASSPATH) -encoding utf8
++	$(JAVAC) $(AM_JAVACFLAGS) $(JAVACFLAGS) -d . -classpath $(PLPLOT_CLASSPATH) -encoding UTF-8 $<
+ 	cp plplot/examples/$@ .
+ 
+ .SUFFIXES: .java .class
 diff -ruN --exclude .svn plplot-5.9.9/examples/java/x00.java plplot-trunk/examples/java/x00.java
 --- plplot-5.9.9/examples/java/x00.java	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/java/x00.java	2012-08-03 15:40:24.977810006 -0600
-@@ -0,0 +1,74 @@
-+// $Id: x00.java 12197 2012-07-06 20:54:41Z airwin $
++++ plplot-trunk/examples/java/x00.java	2012-12-14 08:50:57.838356464 -0700
+@@ -0,0 +1,75 @@
++// $Id: x00.java 12240 2012-10-04 22:10:12Z andrewross $
 +//
 +// Simple demo of a 2D line plot.
 +//
@@ -1082775,6 +1087315,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x00.java plplot-trunk/exampl
 +package plplot.examples;
 +
 +import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
 +
 +class x00 {
 +    PLStream   pls = new PLStream();
@@ -1082801,7 +1087342,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x00.java plplot-trunk/exampl
 +        }
 +
 +        // Parse and process command line arguments
-+        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
 +        // Initialize plplot
 +        pls.init();
 +
@@ -1082821,13 +1087362,669 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x00.java plplot-trunk/exampl
 +//--------------------------------------------------------------------------
 +//                              End of x00.java
 +//--------------------------------------------------------------------------
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x01.java plplot-trunk/examples/java/x01.java
+--- plplot-5.9.9/examples/java/x01.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x01.java	2012-12-14 08:50:57.827356520 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x01.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x01.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -32,6 +32,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -58,7 +59,7 @@
+         // Parse and process command line arguments.
+ 
+ //         plMergeOpts(options, "x01c options", notes);
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+ // Print out version number.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x02.java plplot-trunk/examples/java/x02.java
+--- plplot-5.9.9/examples/java/x02.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x02.java	2012-12-14 08:50:57.839356458 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x02.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x02.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.text.*;
+ 
+@@ -47,7 +48,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x03.java plplot-trunk/examples/java/x03.java
+--- plplot-5.9.9/examples/java/x03.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x03.java	2012-12-14 08:50:57.828356515 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x03.java 11682 2011-03-31 02:55:49Z airwin $
++// $Id: x03.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ import java.text.*;
+@@ -45,7 +46,7 @@
+         PLStream     pls = new PLStream();
+         NumberFormat nf  = NumberFormat.getNumberInstance();
+ 
+-        int          i, j;
++        int          i;
+         double       dtr, theta, dx, dy, r, offset;
+ 
+         double[] x0 = new double[361];
+@@ -62,7 +63,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Set orientation to portrait - note not all device drivers
+         // support this, in particular most interactive drivers do not.
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x04.java plplot-trunk/examples/java/x04.java
+--- plplot-5.9.9/examples/java/x04.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x04.java	2012-12-14 08:50:57.841356447 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x04.java 11717 2011-04-21 00:47:06Z airwin $
++// $Id: x04.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -45,7 +46,7 @@
+     {
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+@@ -156,7 +157,7 @@
+ 
+         // Draw a legend
+         // First legend entry.
+-        opt_array[0]   = PLStream.PL_LEGEND_LINE;
++        opt_array[0]   = PL_LEGEND_LINE;
+         text_colors[0] = 2;
+         text[0]        = "Amplitude";
+         line_colors[0] = 2;
+@@ -171,7 +172,7 @@
+         // Second legend entry.
+         if ( nlegend == 2 )
+         {
+-            opt_array[1]      = PLStream.PL_LEGEND_LINE | PLStream.PL_LEGEND_SYMBOL;
++            opt_array[1]      = PL_LEGEND_LINE | PL_LEGEND_SYMBOL;
+             text_colors[1]    = 3;
+             text[1]           = "Phase shift";
+             line_colors[1]    = 3;
+@@ -188,7 +189,7 @@
+ 
+         pls.scol0a( 15, 32, 32, 32, 0.70 );
+         pls.legend( legend_width, legend_height,
+-            PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX, 0,
++            PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX, 0,
+             0.0, 0.0, 0.1, 15,
+             1, 1, 0, 0, opt_array,
+             1.0, 1.0, 2.0,
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x05.java plplot-trunk/examples/java/x05.java
+--- plplot-5.9.9/examples/java/x05.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x05.java	2012-12-14 08:50:57.831356500 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x05.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x05.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -51,7 +52,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+@@ -59,12 +60,12 @@
+ 
+         // Fill up data points.
+ 
+-        delta = 2.0 * Math.PI / (double) NPTS;
++        delta = 2.0 * Math.PI / NPTS;
+         for ( i = 0; i < NPTS; i++ )
+             data[i] = Math.sin( i * delta );
+ 
+         pls.col0( 1 );
+-        pls.hist( data, -1.1, 1.1, 44, PLStream.PL_HIST_DEFAULT );
++        pls.hist( data, -1.1, 1.1, 44, PL_HIST_DEFAULT );
+         pls.col0( 2 );
+         pls.lab( "#frValue", "#frFrequency",
+             "#frPLplot Example 5 - Probability function of Oscillator" );
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x06.java plplot-trunk/examples/java/x06.java
+--- plplot-5.9.9/examples/java/x06.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x06.java	2012-12-14 08:50:57.843356438 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x06.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x06.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.text.*;
+ 
+@@ -51,7 +52,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x07.java plplot-trunk/examples/java/x07.java
+--- plplot-5.9.9/examples/java/x07.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x07.java	2012-12-14 08:50:57.833356489 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x07.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x07.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.text.*;
+ 
+@@ -59,7 +60,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x08.java plplot-trunk/examples/java/x08.java
+--- plplot-5.9.9/examples/java/x08.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x08.java	2012-12-14 08:50:57.845356426 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x08.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x08.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -32,6 +32,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -124,7 +125,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+         boolean rosen = true;
+ 
+         // Initialize plplot.
+@@ -210,17 +211,17 @@
+                 else if ( ifshade == 1 )   // magnitude colored plot
+                 {
+                     cmap1_init( 0 );
+-                    pls.surf3d( x, y, z, PLStream.MAG_COLOR, clev_null );
++                    pls.surf3d( x, y, z, MAG_COLOR, clev_null );
+                 }
+                 else if ( ifshade == 2 )   //  magnitude colored plot with faceted squares
+                 {
+                     cmap1_init( 0 );
+-                    pls.surf3d( x, y, z, PLStream.MAG_COLOR | PLStream.FACETED, clev_null );
++                    pls.surf3d( x, y, z, MAG_COLOR | FACETED, clev_null );
+                 }
+                 else                     // magnitude colored plot with contours
+                 {
+                     cmap1_init( 0 );
+-                    pls.surf3d( x, y, z, PLStream.MAG_COLOR | PLStream.SURF_CONT | PLStream.BASE_CONT, clevel );
++                    pls.surf3d( x, y, z, MAG_COLOR | SURF_CONT | BASE_CONT, clevel );
+                 }
+             }
+         }
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x09.java plplot-trunk/examples/java/x09.java
+--- plplot-5.9.9/examples/java/x09.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x09.java	2012-12-14 08:50:57.835356479 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x09.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x09.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -87,7 +88,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+         // Initialize plplot
+ 
+         pls.init();
+@@ -238,7 +239,7 @@
+         // Perimeter
+         for ( i = 0; i < PERIMETERPTS; i++ )
+         {
+-            t     = ( 2. * Math.PI / ( PERIMETERPTS - 1 ) ) * (double) i;
++            t     = ( 2. * Math.PI / ( PERIMETERPTS - 1 ) ) * i;
+             px[i] = Math.cos( t );
+             py[i] = Math.sin( t );
+         }
+@@ -251,7 +252,7 @@
+             r = i / (double) ( RPTS - 1 );
+             for ( j = 0; j < THETAPTS; j++ )
+             {
+-                theta    = ( 2. * Math.PI / (double) ( THETAPTS - 1 ) ) * (double) j;
++                theta    = ( 2. * Math.PI / ( THETAPTS - 1 ) ) * j;
+                 xg[i][j] = r * Math.cos( theta );
+                 yg[i][j] = r * Math.sin( theta );
+                 z[i][j]  = r;
+@@ -260,7 +261,7 @@
+ 
+         for ( i = 0; i < 10; i++ )
+         {
+-            lev[i] = 0.05 + 0.10 * (double) i;
++            lev[i] = 0.05 + 0.10 * i;
+         }
+ 
+         pls.col0( 2 );
+@@ -311,10 +312,10 @@
+         r = 0.;
+         for ( i = 0; i < PRPTS; i++ )
+         {
+-            r = 0.5 + (double) i;
++            r = 0.5 + i;
+             for ( j = 0; j < PTHETAPTS; j++ )
+             {
+-                theta    = ( 2. * Math.PI / (double) ( PTHETAPTS - 1 ) ) * ( 0.5 + (double) j );
++                theta    = ( 2. * Math.PI / ( PTHETAPTS - 1 ) ) * ( 0.5 + j );
+                 xg[i][j] = r * Math.cos( theta );
+                 yg[i][j] = r * Math.sin( theta );
+             }
+@@ -385,12 +386,12 @@
+         //  System.out.println(zmax);
+ 
+         // Positive and negative contour levels.
+-        dz        = ( zmax - zmin ) / (double) PNLEVEL;
++        dz        = ( zmax - zmin ) / PNLEVEL;
+         nlevelneg = 0;
+         nlevelpos = 0;
+         for ( i = 0; i < PNLEVEL; i++ )
+         {
+-            clev = zmin + ( (double) i + 0.5 ) * dz;
++            clev = zmin + ( i + 0.5 ) * dz;
+             if ( clev <= 0. )
+                 clevelneg_store[nlevelneg++] = clev;
+             else
+@@ -435,7 +436,7 @@
+         // Draw outer boundary
+         for ( i = 0; i < PPERIMETERPTS; i++ )
+         {
+-            t     = ( 2. * Math.PI / ( PPERIMETERPTS - 1 ) ) * (double) i;
++            t     = ( 2. * Math.PI / ( PPERIMETERPTS - 1 ) ) * i;
+             px[i] = x0 + rmax*Math.cos( t );
+             py[i] = y0 + rmax*Math.sin( t );
+         }
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x10.java plplot-trunk/examples/java/x10.java
+--- plplot-5.9.9/examples/java/x10.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x10.java	2012-12-14 08:50:57.839356458 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x10.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x10.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ 
+ class x10 {
+@@ -44,7 +45,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x11.java plplot-trunk/examples/java/x11.java
+--- plplot-5.9.9/examples/java/x11.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x11.java	2012-12-14 08:50:57.827356520 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x11.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x11.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -102,17 +103,17 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+         pls.init();
+ 
+         for ( i = 0; i < XPTS; i++ )
+-            x[i] = 3. * (double) ( i - ( XPTS / 2 ) ) / (double) ( XPTS / 2 );
++            x[i] = 3. * ( i - ( XPTS / 2 ) ) / ( XPTS / 2 );
+ 
+         for ( j = 0; j < YPTS; j++ )
+-            y[j] = 3. * (double) ( j - ( YPTS / 2 ) ) / (double) ( YPTS / 2 );
++            y[j] = 3. * ( j - ( YPTS / 2 ) ) / ( YPTS / 2 );
+ 
+         for ( i = 0; i < XPTS; i++ )
+         {
+@@ -123,11 +124,11 @@
+                 z[i][j] = 3. * ( 1. - xx ) * ( 1. - xx ) * Math.exp( -( xx * xx ) - ( yy + 1. ) * ( yy + 1. ) ) -
+                           10. * ( xx / 5. - Math.pow( xx, 3. ) - Math.pow( yy, 5. ) ) * Math.exp( -xx * xx - yy * yy ) -
+                           1. / 3. * Math.exp( -( xx + 1 ) * ( xx + 1 ) - ( yy * yy ) );
+-                if ( false ) // Jungfraujoch/Interlaken
+-                {
+-                    if ( z[i][j] < -1. )
+-                        z[i][j] = -1.;
+-                }
++                //if ( false ) // Jungfraujoch/Interlaken
++                //{
++                //    if ( z[i][j] < -1. )
++                //        z[i][j] = -1.;
++                //}
+                 if ( zmin > z[i][j] )
+                     zmin = z[i][j];
+                 if ( zmax < z[i][j] )
+@@ -163,15 +164,15 @@
+ 
+                 // magnitude colored wireframe plot
+                 else if ( i == 1 )
+-                    pls.mesh( x, y, z, opt[k] | PLStream.MAG_COLOR );
++                    pls.mesh( x, y, z, opt[k] | MAG_COLOR );
+ 
+                 // magnitude colored wireframe plot with sides
+                 else if ( i == 2 )
+-                    pls.plot3d( x, y, z, opt[k] | PLStream.MAG_COLOR, true );
++                    pls.plot3d( x, y, z, opt[k] | MAG_COLOR, true );
+ 
+                 // magnitude colored wireframe plot with base contour
+                 else if ( i == 3 )
+-                    pls.meshc( x, y, z, opt[k] | PLStream.MAG_COLOR | PLStream.BASE_CONT,
++                    pls.meshc( x, y, z, opt[k] | MAG_COLOR | BASE_CONT,
+                         clevel );
+ 
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x12.java plplot-trunk/examples/java/x12.java
+--- plplot-5.9.9/examples/java/x12.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x12.java	2012-12-14 08:50:57.841356447 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x12.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x12.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.text.*;
+ 
+@@ -57,7 +58,7 @@
+         DecimalFormat nf4 = new DecimalFormat( "####" );
+         int           i;
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+ 
+@@ -73,7 +74,7 @@
+         for ( i = 0; i < 10; i++ )
+         {
+ //            pls.col0(i + 1);
+-            pls.col1( (double) i / 9.0 );
++            pls.col1( i / 9.0 );
+             pls.psty( 0 );
+             plfbox( ( 1980. + i ), y0[i] );
+ //	   sprintf(string, "%.0f", y0[i]);
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x13.java plplot-trunk/examples/java/x13.java
+--- plplot-5.9.9/examples/java/x13.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x13.java	2012-12-14 08:50:57.829356511 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x13.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x13.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -51,7 +52,7 @@
+         double[] x = new double[ 500 ];
+         double[] y = new double[ 500 ];
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x14.java plplot-trunk/examples/java/x14.java
+--- plplot-5.9.9/examples/java/x14.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x14.java	2012-12-14 08:50:57.842356443 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x14.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x14.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -31,6 +31,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ import java.text.*;
+@@ -61,7 +62,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls1.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls1.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         //      If valid geometry specified on command line, use it for both streams.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x15.java plplot-trunk/examples/java/x15.java
+--- plplot-5.9.9/examples/java/x15.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x15.java	2012-12-14 08:50:57.831356500 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x15.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x15.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ class x15 {
+     static final int    XPTS = 35;
+@@ -81,7 +82,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x16.java plplot-trunk/examples/java/x16.java
+--- plplot-5.9.9/examples/java/x16.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x16.java	2012-12-14 08:50:57.844356432 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x16.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x16.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -90,7 +91,7 @@
+         final int fill_width = 2, cont_color = 0, cont_width = 0;
+ 
+         // Parse and process command line arguments.
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Load colour palettes
+         pls.spal0( "cmap0_black_on_white.pal" );
+@@ -121,10 +122,10 @@
+         zmax = fmax;
+ 
+         for ( i = 0; i < NSHADES; i++ )
+-            clevel[i] = zmin + ( zmax - zmin ) * ( i + 0.5 ) / (double) NSHADES;
++            clevel[i] = zmin + ( zmax - zmin ) * ( i + 0.5 ) / NSHADES;
+ 
+         for ( i = 0; i < NSHADES + 1; i++ )
+-            shedge[i] = zmin + ( zmax - zmin ) * (double) i / (double) NSHADES;
++            shedge[i] = zmin + ( zmax - zmin ) * i / NSHADES;
+ 
+         for ( i = 0; i < XPTS; i++ )
+         {
+@@ -290,7 +291,7 @@
+         zmax = fmax;
+ 
+         for ( i = 0; i < NSHADES + 1; i++ )
+-            shedge[i] = zmin + ( zmax - zmin ) * (double) i / (double) NSHADES;
++            shedge[i] = zmin + ( zmax - zmin ) * i / NSHADES;
+ 
+         pls.shades( z, -1., 1., -1., 1.,
+             shedge, fill_width,
+@@ -300,7 +301,7 @@
+ // Now we can draw the perimeter.  (If do before, shade stuff may overlap.)
+         for ( i = 0; i < PERIMETERPTS; i++ )
+         {
+-            t     = ( 2. * Math.PI / ( PERIMETERPTS - 1 ) ) * (double) i;
++            t     = ( 2. * Math.PI / ( PERIMETERPTS - 1 ) ) * i;
+             px[i] = Math.cos( t );
+             py[i] = Math.sin( t );
+         }
 diff -ruN --exclude .svn plplot-5.9.9/examples/java/x17.java plplot-trunk/examples/java/x17.java
 --- plplot-5.9.9/examples/java/x17.java	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/java/x17.java	2012-06-08 08:56:05.268646036 -0600
++++ plplot-trunk/examples/java/x17.java	2012-12-14 08:50:57.833356489 -0700
 @@ -1,9 +1,9 @@
  //--------------------------------------------------------------------------
 -// $Id: x17.java 11301 2010-11-02 17:21:08Z airwin $
-+// $Id: x17.java 12176 2012-02-24 20:33:39Z andrewross $
++// $Id: x17.java 12240 2012-10-04 22:10:12Z andrewross $
  //--------------------------------------------------------------------------
  //
  //--------------------------------------------------------------------------
@@ -1082836,17 +1088033,265 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x17.java plplot-trunk/exampl
  // Copyright (C) 2004  Alan W. Irwin
  //
  // This file is part of PLplot.
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ class x17 {
+     // Class data
+@@ -53,7 +54,7 @@
+ 
+ 
+         // Parse and process command line arguments.
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // If db is used the plot is much more smooth. However, because of the
+         // async X behaviour, one does not have a real-time scripcharter.
+@@ -140,7 +141,7 @@
+             }
+             catch ( InterruptedException e ) {
+             }
+-            t     = (double) n * dt;
++            t     = n * dt;
+             noise = pls.randd() - 0.5;
+             y1    = y1 + noise;
+             y2    = Math.sin( t * Math.PI / 18. );
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x18.java plplot-trunk/examples/java/x18.java
+--- plplot-5.9.9/examples/java/x18.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x18.java	2012-12-14 08:50:57.845356426 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x18.java 11519 2011-01-28 20:20:13Z airwin $
++// $Id: x18.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ import java.text.*;
+@@ -42,11 +43,11 @@
+ 
+     double THETA( int a )
+     {
+-        return 2. * Math.PI * (double) a / 20.;
++        return 2. * Math.PI * a / 20.;
+     }
+     double PHI( int a )
+     {
+-        return Math.PI * (double) a / 20.1;
++        return Math.PI * a / 20.1;
+     }
+     void test_poly( int k )
+     {
+@@ -124,7 +125,7 @@
+         double       r;
+ 
+         // Parse and process command line arguments.
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+         pls.init();
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x19.java plplot-trunk/examples/java/x19.java
+--- plplot-5.9.9/examples/java/x19.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x19.java	2012-12-14 08:50:57.836356474 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x19.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x19.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ 
+ //--------------------------------------------------------------------------
+@@ -28,6 +28,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -66,7 +67,7 @@
+         String direction_label = "";
+         double label_val       = 0.0;
+ 
+-        if ( axis == PLStream.PL_Y_AXIS )
++        if ( axis == PL_Y_AXIS )
+         {
+             label_val = value;
+             if ( label_val > 0.0 )
+@@ -82,7 +83,7 @@
+                 direction_label = "Eq";
+             }
+         }
+-        else if ( axis == PLStream.PL_X_AXIS )
++        else if ( axis == PL_X_AXIS )
+         {
+             label_val = normalize_longitude( value );
+             if ( label_val > 0.0 )
+@@ -98,7 +99,7 @@
+                 direction_label = "";
+             }
+         }
+-        if ( axis == PLStream.PL_Y_AXIS && value == 0.0 )
++        if ( axis == PL_Y_AXIS && value == 0.0 )
+         {
+             // A special case for the equator
+             label = direction_label;
+@@ -156,7 +157,7 @@
+         double[] y = new double[1];
+ 
+         // Parse and process command line arguments.
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Longitude (x) and latitude (y)
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x20.java plplot-trunk/examples/java/x20.java
+--- plplot-5.9.9/examples/java/x20.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x20.java	2012-12-14 08:50:57.840356452 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x20.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x20.java 12240 2012-10-04 22:10:12Z andrewross $
+ //--------------------------------------------------------------------------
+ //
+ //--------------------------------------------------------------------------
+@@ -34,6 +34,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.io.*;
+ import java.util.*;
+@@ -129,7 +130,7 @@
+ 
+         // Parse and process command line arguments.
+         //pls.MergeOpts(options, "x20c options", NULL);
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize PLplot.
+         pls.init();
+@@ -137,7 +138,7 @@
+         // view image border pixels
+         if ( dbg )
+         {
+-            pls.env( 1., (double) XDIM, 1., (double) YDIM, 1, 1 ); // no plot box
++            pls.env( 1., XDIM, 1., YDIM, 1, 1 ); // no plot box
+ 
+             // build a one pixel square border, for diagnostics
+             for ( i = 0; i < XDIM; i++ )
+@@ -152,8 +153,8 @@
+ 
+             pls.lab( "...around a blue square.", " ", "A red border should appear..." );
+ 
+-            pls.image( z, 1., (double) XDIM, 1., (double) YDIM, 0., 0.,
+-                1., (double) XDIM, 1., (double) YDIM );
++            pls.image( z, 1., XDIM, 1., YDIM, 0., 0.,
++                1., XDIM, 1., YDIM );
+         }
+ 
+         // sombrero-like demo
+@@ -211,7 +212,7 @@
+         else
+             pls.lab( "", " ", "Lena..." );
+ 
+-        pls.image( img_f, 1., (double) width, 1., (double) height, 0., 0.,
++        pls.image( img_f, 1., width, 1., height, 0., 0.,
+             1., width, 1., height );
+ 
+         // selection/expansion demo
+@@ -250,13 +251,13 @@
+             pls.adv( 0 );
+ 
+             // display selection only
+-            pls.image( img_f, 1., (double) width, 1., (double) height, 0., 0., xi[0], xe[0], ye[0], yi[0] );
++            pls.image( img_f, 1., width, 1., height, 0., 0., xi[0], xe[0], ye[0], yi[0] );
+ 
+             pls.spause( true );
+ 
+             // zoom in selection
+             pls.env( xi[0], xe[0], ye[0], yi[0], 1, -1 );
+-            pls.image( img_f, 1., (double) width, 1., (double) height, 0., 0., xi[0], xe[0], ye[0], yi[0] );
++            pls.image( img_f, 1., width, 1., height, 0., 0., xi[0], xe[0], ye[0], yi[0] );
+         }
+ 
+         // Base the dynamic range on the image contents.
+@@ -273,8 +274,8 @@
+         {
+             for ( j = 0; j <= height; j++ )
+             {
+-                xg[i][j] = (double) i;
+-                yg[i][j] = (double) j;
++                xg[i][j] = i;
++                yg[i][j] = j;
+             }
+         }
+         // Draw a saturated version of the original image.  Only use
+@@ -282,7 +283,7 @@
+         pls.col0( 2 );
+         pls.env( 0, width, 0, height, 1, -1 );
+         pls.lab( "", "", "Reduced dynamic range image example" );
+-        pls.imagefr( img_f, 0., (double) width, 0., (double) height, 0., 0.,
++        pls.imagefr( img_f, 0., width, 0., height, 0., 0.,
+             img_min + img_max * 0.25,
+             img_max - img_max * 0.25,
+             xg, yg );
+@@ -312,7 +313,7 @@
+             }
+         }
+ 
+-        pls.imagefr( img_f, 0., (double) width, 0., (double) height, 0., 0., img_min, img_max, xg, yg );
++        pls.imagefr( img_f, 0., width, 0., height, 0., 0., img_min, img_max, xg, yg );
+         pls.end();
+     }
+ 
+@@ -368,7 +369,7 @@
+             {
+                 for ( i = 0; i < w; i++ )
+                 {
+-                    img[i][h - j - 1] = (double) in2.readUnsignedByte();
++                    img[i][h - j - 1] = in2.readUnsignedByte();
+                 }
+             }
+         }
+@@ -424,7 +425,7 @@
+                     sx[4] = xxi; sy[4] = yyi;
+                 }
+ 
+-                if ( ( gin.getState() & (long) 0x100 ) != 0 )
++                if ( ( gin.getState() & 0x100 ) != 0 )
+                 {
+                     xxe = gin.getWX(); yye = gin.getWY();
+                     if ( start )
 diff -ruN --exclude .svn plplot-5.9.9/examples/java/x21.java plplot-trunk/examples/java/x21.java
 --- plplot-5.9.9/examples/java/x21.java	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/java/x21.java	2012-08-03 15:40:24.976810006 -0600
++++ plplot-trunk/examples/java/x21.java	2012-12-14 08:50:57.828356515 -0700
 @@ -1,5 +1,5 @@
  //--------------------------------------------------------------------------
 -// $Id: x21.java 11301 2010-11-02 17:21:08Z airwin $
-+// $Id: x21.java 12197 2012-07-06 20:54:41Z airwin $
++// $Id: x21.java 12240 2012-10-04 22:10:12Z andrewross $
  //--------------------------------------------------------------------------
  //
  //--------------------------------------------------------------------------
-@@ -134,6 +134,7 @@
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -134,6 +135,7 @@
          double x[], y[], z[], clev[];
          double xg[], yg[], zg[][];
          double xg0[][], yg0[][];
@@ -1082854,7 +1088299,18 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x21.java plplot-trunk/exampl
          double zmin, zmax, lzm[], lzM[];
          int    i, j, k;
          int    alg;
-@@ -162,11 +163,15 @@
+@@ -153,20 +155,24 @@
+ 
+         // Parse and process command line arguments.
+         // pls.MergeOpts(options, "x22c options", NULL);
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         opt[2] = wmin;
+-        opt[3] = (double) knn_order;
++        opt[3] = knn_order;
+         opt[4] = threshold;
+ 
          // Initialize PLplot.
          pls.init();
  
@@ -1082873,7 +1088329,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x21.java plplot-trunk/exampl
  
          create_data( x, y, z ); // the sampled data
          zmin = z[0];
-@@ -203,8 +208,24 @@
+@@ -203,8 +209,24 @@
          pls.env( xm, xM, ym, yM, 2, 0 );
          pls.col0( 15 );
          pls.lab( "X", "Y", "The original data sampling" );
@@ -1082900,7 +1088356,18 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x21.java plplot-trunk/exampl
          pls.adv( 0 );
  
          pls.ssub( 3, 2 );
-@@ -291,7 +312,6 @@
+@@ -227,8 +249,8 @@
+                 // regions, a weighted average over the neighbors is done.
+                 //
+ 
+-                if ( alg == PLStream.GRID_CSA || alg == PLStream.GRID_DTLI ||
+-                     alg == PLStream.GRID_NNLI || alg == PLStream.GRID_NNI )
++                if ( alg == GRID_CSA || alg == GRID_DTLI ||
++                     alg == GRID_NNLI || alg == GRID_NNI )
+                 {
+                     int    ii, jj;
+                     double dist, d;
+@@ -291,7 +313,6 @@
                      for ( i = 0; i < nl; i++ )
                          clev[i] = lzm[0] + ( lzM[0] - lzm[0] ) / ( nl - 1 ) * i;
  
@@ -1082908,9 +1088375,1045 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/java/x21.java plplot-trunk/exampl
                      pls.vpor( 0.0, 1.0, 0.0, 0.9 );
                      pls.wind( -1.1, 0.75, -0.65, 1.20 );
                      //
+@@ -309,8 +330,8 @@
+                         "bcdfntu", "Z", 0.5, 0 );
+                     pls.col0( 15 );
+                     pls.lab( "", "", title[alg - 1] );
+-                    pls.plot3dc( xg, yg, zg, PLStream.DRAW_LINEXY |
+-                        PLStream.MAG_COLOR | PLStream.BASE_CONT,
++                    pls.plot3dc( xg, yg, zg, DRAW_LINEXY |
++                        MAG_COLOR | BASE_CONT,
+                         clev );
+                 }
+             }
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x22.java plplot-trunk/examples/java/x22.java
+--- plplot-5.9.9/examples/java/x22.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x22.java	2012-12-14 08:50:57.842356443 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x22.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x22.java 12240 2012-10-04 22:10:12Z andrewross $
+ //    Simple vector plot example
+ //--------------------------------------------------------------------------
+ //
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -159,7 +160,7 @@
+         // Charge 2 is placed at (d1, -d1), with image charge at (d2, -d2).
+         // Also put in smoothing term at small distances.
+ 
+-        rmax = (double) nr;
++        rmax = nr;
+ 
+         eps = 2.;
+ 
+@@ -177,10 +178,10 @@
+ 
+         for ( i = 0; i < nr; i++ )
+         {
+-            r = 0.5 + (double) i;
++            r = 0.5 + i;
+             for ( j = 0; j < ntheta; j++ )
+             {
+-                theta    = 2. * Math.PI / ( ntheta - 1 ) * ( 0.5 + (double) j );
++                theta    = 2. * Math.PI / ( ntheta - 1 ) * ( 0.5 + j );
+                 x        = r * Math.cos( theta );
+                 y        = r * Math.sin( theta );
+                 xg[i][j] = x;
+@@ -204,10 +205,10 @@
+         pls.env( xmaxmin[1], xmaxmin[0], ymaxmin[1], ymaxmin[0], 0, 0 );
+         pls.lab( "(x)", "(y)", "#frPLplot Example 22 - potential gradient vector plot" );
+         // Plot contours of the potential
+-        dz = ( zmaxmin[0] - zmaxmin[1] ) / (double) nlevel;
++        dz = ( zmaxmin[0] - zmaxmin[1] ) / nlevel;
+         for ( i = 0; i < nlevel; i++ )
+         {
+-            clevel[i] = zmaxmin[1] + ( (double) i + 0.5 ) * dz;
++            clevel[i] = zmaxmin[1] + ( i + 0.5 ) * dz;
+         }
+         pls.col0( 3 );
+         pls.lsty( 2 );
+@@ -223,7 +224,7 @@
+         // Plot the perimeter of the cylinder
+         for ( i = 0; i < nper; i++ )
+         {
+-            theta = ( 2. * Math.PI / ( nper - 1 ) ) * (double) i;
++            theta = ( 2. * Math.PI / ( nper - 1 ) ) * i;
+             px[i] = rmax * Math.cos( theta );
+             py[i] = rmax * Math.sin( theta );
+         }
+@@ -261,7 +262,7 @@
+ 
+         // Parse and process command line arguments
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x23.java plplot-trunk/examples/java/x23.java
+--- plplot-5.9.9/examples/java/x23.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x23.java	2012-12-14 08:50:57.830356506 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x23.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x23.java 12240 2012-10-04 22:10:12Z andrewross $
+ //    Displays Greek letters and mathematically interesting Unicode ranges
+ //--------------------------------------------------------------------------
+ //
+@@ -30,6 +30,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ //
+ // Displays Greek letters and mathematically interesting Unicode ranges
+@@ -228,7 +229,7 @@
+         int    i, j, page, length, slice;
+         String cmdString = null;
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+ 
+@@ -257,8 +258,8 @@
+             // Draw the grid using PLStream.box
+ 
+             pls.col0( 2 );
+-            deltax = 1.0 / ( (double) nxcells[page] );
+-            deltay = 1.0 / ( (double) nycells[page] );
++            deltax = 1.0 / ( nxcells[page] );
++            deltay = 1.0 / ( nycells[page] );
+             pls.box( "bcg", deltax, 0, "bcg", deltay, 0 );
+             pls.col0( 15 );
+             length = hi[page] - lo[page];
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x24.java plplot-trunk/examples/java/x24.java
+--- plplot-5.9.9/examples/java/x24.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x24.java	2012-12-14 08:50:57.843356438 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x24.java 11680 2011-03-27 17:57:51Z airwin $
++// $Id: x24.java 12240 2012-10-04 22:10:12Z andrewross $
+ //  Unicode Pace Flag
+ //--------------------------------------------------------------------------
+ //
+@@ -39,6 +39,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ class x24 {
+     PLStream pls = new PLStream();
+@@ -114,7 +115,7 @@
+     {
+         int i, j;
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x25.java plplot-trunk/examples/java/x25.java
+--- plplot-5.9.9/examples/java/x25.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x25.java	2012-12-14 08:50:57.832356494 -0700
+@@ -1,4 +1,4 @@
+-// $Id: x25.java 11680 2011-03-27 17:57:51Z airwin $
++// $Id: x25.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ //  Test program for filling polygons and proper clipping
+ //
+@@ -25,6 +25,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ class x25 {
+     PLStream pls = new PLStream();
+@@ -40,7 +41,7 @@
+ 
+         // Parse and process command line arguments
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+ 
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x26.java plplot-trunk/examples/java/x26.java
+--- plplot-5.9.9/examples/java/x26.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x26.java	2012-12-14 08:50:57.844356432 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x26.java 11717 2011-04-21 00:47:06Z airwin $
++// $Id: x26.java 12240 2012-10-04 22:10:12Z andrewross $
+ // Multi-lingual version of the first page of example 4.
+ //--------------------------------------------------------------------------
+ 
+@@ -64,6 +64,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -121,7 +122,7 @@
+ 
+         // Parse and process command line arguments.
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot.
+ 
+@@ -149,7 +150,6 @@
+         double[] ampl  = new double[101];
+         double[] phase = new double[101];
+         double f0, freq;
+-        int    nlegend = 2;
+         int[] opt_array        = new int[2];
+         int[] text_colors      = new int[2];
+         int[] line_colors      = new int[2];
+@@ -222,7 +222,7 @@
+         }
+         // Draw a legend
+         // First legend entry.
+-        opt_array[0]   = PLStream.PL_LEGEND_LINE;
++        opt_array[0]   = PL_LEGEND_LINE;
+         text_colors[0] = 2;
+         line_colors[0] = 2;
+         line_styles[0] = 1;
+@@ -234,7 +234,7 @@
+         symbols[0] = "";
+ 
+         // Second legend entry.
+-        opt_array[1]      = PLStream.PL_LEGEND_LINE | PLStream.PL_LEGEND_SYMBOL;
++        opt_array[1]      = PL_LEGEND_LINE | PL_LEGEND_SYMBOL;
+         text_colors[1]    = 3;
+         line_colors[1]    = 3;
+         line_styles[1]    = 1;
+@@ -248,7 +248,7 @@
+ 
+         pls.scol0a( 15, 32, 32, 32, 0.70 );
+         pls.legend( legend_width, legend_height,
+-            PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX, 0,
++            PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX, 0,
+             0.0, 0.0, 0.10, 15,
+             1, 1, 0, 0, opt_array,
+             1.0, 1.0, 2.0,
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x27.java plplot-trunk/examples/java/x27.java
+--- plplot-5.9.9/examples/java/x27.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x27.java	2012-12-14 08:50:57.834356484 -0700
+@@ -1,5 +1,5 @@
+ //--------------------------------------------------------------------------
+-// $Id: x27.java 11935 2011-09-25 16:09:38Z airwin $
++// $Id: x27.java 12240 2012-10-04 22:10:12Z andrewross $
+ // Drawing "spirograph" curves - epitrochoids, cycolids, roulettes
+ //--------------------------------------------------------------------------
+ //
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -70,7 +71,7 @@
+         // plplot initialization
+ 
+         // Parse and process command line arguments
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+         pls.init();
+@@ -174,14 +175,14 @@
+         // http://mathforum.org/mathimages/index.php/Hypotrochoid.
+         windings = (int) Math.abs( params[1] ) / gcd( (int) params[0], (int) params[1] );
+         steps    = NPNT / windings;
+-        dphi     = 2.0 * Math.PI / (double) steps;
++        dphi     = 2.0 * Math.PI / steps;
+ 
+         xcoord = new double[windings * steps + 1];
+         ycoord = new double[windings * steps + 1];
+ 
+         for ( i = 0; i <= windings * steps; i++ )
+         {
+-            phi       = (double) i * dphi;
++            phi       = i * dphi;
+             phiw      = ( params[0] - params[1] ) / params[1] * phi;
+             xcoord[i] = ( params[0] - params[1] ) * Math.cos( phi ) + params[2] * Math.cos( phiw );
+             ycoord[i] = ( params[0] - params[1] ) * Math.sin( phi ) - params[2] * Math.sin( phiw );
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x28.java plplot-trunk/examples/java/x28.java
+--- plplot-5.9.9/examples/java/x28.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x28.java	2012-12-14 08:50:57.846356421 -0700
+@@ -1,4 +1,4 @@
+-// $Id: x28.java 11301 2010-11-02 17:21:08Z airwin $
++// $Id: x28.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ //	plmtex3, plptex3 demo.
+ //
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ 
+@@ -49,13 +50,13 @@
+                ysmin    = ymin + 0.1 * yrange,
+                ysmax    = ymax - 0.1 * yrange,
+                ysrange  = ysmax - ysmin,
+-               dysrot   = ysrange / (double) ( NROTATION - 1 ),
+-               dysshear = ysrange / (double) ( NSHEAR - 1 ),
++               dysrot   = ysrange / ( NROTATION - 1 ),
++               dysshear = ysrange / ( NSHEAR - 1 ),
+                zsmin    = zmin + 0.1 * zrange,
+                zsmax    = zmax - 0.1 * zrange,
+                zsrange  = zsmax - zsmin,
+-               dzsrot   = zsrange / (double) ( NROTATION - 1 ),
+-               dzsshear = zsrange / (double) ( NSHEAR - 1 ),
++               dzsrot   = zsrange / ( NROTATION - 1 ),
++               dzsshear = zsrange / ( NSHEAR - 1 ),
+                ys, zs,
+                x_inclination, y_inclination, z_inclination,
+                x_shear, y_shear, z_shear,
+@@ -73,11 +74,11 @@
+ 
+         for ( i = 0; i < XPTS; i++ )
+         {
+-            x[i] = xmin + (double) i * ( xmax - xmin ) / (double) ( XPTS - 1 );
++            x[i] = xmin + i * ( xmax - xmin ) / ( XPTS - 1 );
+         }
+ 
+         for ( j = 0; j < YPTS; j++ )
+-            y[j] = ymin + (double) j * ( ymax - ymin ) / (double) ( YPTS - 1 );
++            y[j] = ymin + j * ( ymax - ymin ) / ( YPTS - 1 );
+ 
+         for ( i = 0; i < XPTS; i++ )
+         {
+@@ -89,7 +90,7 @@
+ 
+         // Parse and process command line arguments
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+ 
+@@ -166,7 +167,7 @@
+                 0.0, "  revolution" );
+         }
+         // Draw minimal 3D grid to finish defining the 3D box.
+-        pls.mesh( x, y, z, PLStream.DRAW_LINEXY );
++        pls.mesh( x, y, z, DRAW_LINEXY );
+ 
+         // Page 2: Demonstrate rotation of string around its axis.
+         pls.adv( 0 );
+@@ -193,7 +194,7 @@
+             cos_omega = Math.cos( omega );
+             y_shear   = 0.5 * yrange * sin_omega;
+             z_shear   = 0.5 * zrange * cos_omega;
+-            zs        = zsmax - dzsrot * (double) i;
++            zs        = zsmax - dzsrot * i;
+             pls.ptex3(
+                 xmid, ymax, zs,
+                 x_inclination, y_inclination, z_inclination,
+@@ -214,7 +215,7 @@
+             cos_omega = Math.cos( omega );
+             x_shear   = 0.5 * xrange * sin_omega;
+             z_shear   = 0.5 * zrange * cos_omega;
+-            zs        = zsmax - dzsrot * (double) i;
++            zs        = zsmax - dzsrot * i;
+             pls.ptex3(
+                 xmax, ymid, zs,
+                 x_inclination, y_inclination, z_inclination,
+@@ -235,7 +236,7 @@
+             cos_omega = Math.cos( omega );
+             y_shear   = 0.5 * yrange * cos_omega;
+             z_shear   = 0.5 * zrange * sin_omega;
+-            ys        = ysmax - dysrot * (double) i;
++            ys        = ysmax - dysrot * i;
+             pls.ptex3(
+                 xmid, ys, zmin,
+                 x_inclination, y_inclination, z_inclination,
+@@ -243,7 +244,7 @@
+                 0.5, "rotation for z = z#dmin#u" );
+         }
+         // Draw minimal 3D grid to finish defining the 3D box.
+-        pls.mesh( x, y, z, PLStream.DRAW_LINEXY );
++        pls.mesh( x, y, z, DRAW_LINEXY );
+ 
+         // Page 3: Demonstrate shear of string along its axis.
+         // Work around xcairo and pngcairo (but not pscairo) problems for
+@@ -274,7 +275,7 @@
+             cos_omega = Math.cos( omega );
+             x_shear   = 0.5 * xrange * sin_omega;
+             z_shear   = 0.5 * zrange * cos_omega;
+-            zs        = zsmax - dzsshear * (double) i;
++            zs        = zsmax - dzsshear * i;
+             pls.ptex3(
+                 xmid, ymax, zs,
+                 x_inclination, y_inclination, z_inclination,
+@@ -295,7 +296,7 @@
+             cos_omega = Math.cos( omega );
+             y_shear   = -0.5 * yrange * sin_omega;
+             z_shear   = 0.5 * zrange * cos_omega;
+-            zs        = zsmax - dzsshear * (double) i;
++            zs        = zsmax - dzsshear * i;
+             pls.ptex3(
+                 xmax, ymid, zs,
+                 x_inclination, y_inclination, z_inclination,
+@@ -316,7 +317,7 @@
+             cos_omega = Math.cos( omega );
+             y_shear   = 0.5 * yrange * cos_omega;
+             x_shear   = 0.5 * xrange * sin_omega;
+-            ys        = ysmax - dysshear * (double) i;
++            ys        = ysmax - dysshear * i;
+             pls.ptex3(
+                 xmid, ys, zmin,
+                 x_inclination, y_inclination, z_inclination,
+@@ -324,7 +325,7 @@
+                 0.5, "shear for z = z#dmin#u" );
+         }
+         // Draw minimal 3D grid to finish defining the 3D box.
+-        pls.mesh( x, y, z, PLStream.DRAW_LINEXY );
++        pls.mesh( x, y, z, DRAW_LINEXY );
+ 
+         // Page 4: Demonstrate drawing a string on a 3D path.
+         pls.adv( 0 );
+@@ -373,7 +374,7 @@
+             omega += domega;
+         }
+         // Draw minimal 3D grid to finish defining the 3D box.
+-        pls.mesh( x, y, z, PLStream.DRAW_LINEXY );
++        pls.mesh( x, y, z, DRAW_LINEXY );
+ 
+         // Page 5: Demonstrate plmtex3 axis labelling capability
+         pls.adv( 0 );
+@@ -401,7 +402,7 @@
+         pls.mtex3( "zs", -2.5, 0.5, 0.5, "Arbitrarily displaced" );
+         pls.mtex3( "zs", -1.0, 0.5, 0.5, "secondary Z-axis label" );
+         // Draw minimal 3D grid to finish defining the 3D box.
+-        pls.mesh( x, y, z, PLStream.DRAW_LINEXY );
++        pls.mesh( x, y, z, DRAW_LINEXY );
+ 
+         pls.end();
+     }
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x29.java plplot-trunk/examples/java/x29.java
+--- plplot-5.9.9/examples/java/x29.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x29.java	2012-12-14 08:50:57.836356474 -0700
+@@ -1,4 +1,4 @@
+-// $Id: x29.java 11680 2011-03-27 17:57:51Z airwin $
++// $Id: x29.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ //       Sample plots using date / time formatting for axes
+ //
+@@ -24,6 +24,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.util.*;
+ 
+@@ -50,7 +51,7 @@
+     x29( String[] args )
+     {
+         // Parse command line arguments
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+         pls.init();
+@@ -204,7 +205,7 @@
+         x = new double[npts];
+         y = new double[npts];
+ 
+-        xmin = (double) tstart;
++        xmin = tstart;
+         xmax = xmin + npts * 60.0 * 60.0 * 24.0;
+         ymin = 0.0;
+         ymax = 5.0;
+@@ -212,8 +213,8 @@
+         for ( i = 0; i < npts; i++ )
+         {
+             x[i] = xmin + i * 60.0 * 60.0 * 24.0;
+-            y[i] = 1.0 + Math.sin( 2 * Math.PI * ( (double) i ) / 7.0 ) +
+-                   Math.exp( ( (double) Math.min( i, npts - i ) ) / 31.0 );
++            y[i] = 1.0 + Math.sin( 2 * Math.PI * ( i ) / 7.0 ) +
++                   Math.exp( ( Math.min( i, npts - i ) ) / 31.0 );
+         }
+         pls.adv( 0 );
+ 
+@@ -357,7 +358,7 @@
+             y = new double[npts];
+             for ( i = 0; i < npts; i++ )
+             {
+-                x[i] = xmin[0] + i * ( xmax[0] - xmin[0] ) / ( (double) ( npts - 1 ) );
++                x[i] = xmin[0] + i * ( xmax[0] - xmin[0] ) / ( npts - 1 );
+                 pls.configtime( scale, offset1, offset2, 0x0, false, 0, 0, 0, 0, 0, 0. );
+                 tai = x[i];
+                 pls.btime( tai_year, tai_month, tai_day, tai_hour, tai_min, tai_sec, tai );
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x30.java plplot-trunk/examples/java/x30.java
+--- plplot-5.9.9/examples/java/x30.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x30.java	2012-12-14 08:50:57.840356452 -0700
+@@ -1,4 +1,4 @@
+-// $Id: x30.java 11680 2011-03-27 17:57:51Z airwin $
++// $Id: x30.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ //  Alpha color values demonstration.
+ //
+@@ -29,6 +29,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ 
+ class x30 {
+@@ -57,7 +58,7 @@
+         int[] b    = new int[1];
+         double[] a = new double[1];
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         pls.init();
+         pls.scmap0n( 4 );
+@@ -85,7 +86,7 @@
+             // Get a color, change its transparency and
+             // set it as the current color.
+             pls.gcol0a( icol, r, g, b, a );
+-            pls.scol0a( icol, r[0], g[0], b[0], 1.0 - (double) i / 9.0 );
++            pls.scol0a( icol, r[0], g[0], b[0], 1.0 - i / 9.0 );
+             pls.col0( icol );
+ 
+             // Draw the rectangle
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x31.java plplot-trunk/examples/java/x31.java
+--- plplot-5.9.9/examples/java/x31.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x31.java	2012-12-14 08:50:57.830356506 -0700
+@@ -1,4 +1,4 @@
+-// $Id: x31.java 11680 2011-03-27 17:57:51Z airwin $
++// $Id: x31.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ //   set/get tester
+ //
+@@ -25,6 +25,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.text.*;
+ 
+@@ -76,7 +77,7 @@
+ 
+         // Parse and process command line arguments
+ 
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Test setting / getting familying parameters before plinit.
+         // Save values set by plparseopts to be restored later.
+@@ -233,7 +234,7 @@
+             status = 1;
+         }
+ 
+-        pls.sdidev( 0.05, PLStream.PL_NOTSET, 0.1, 0.2 );
++        pls.sdidev( 0.05, PL_NOTSET, 0.1, 0.2 );
+         pls.gdidev( mar, aspect, jx, jy );
+         System.out.println( "device-space window parameters: mar, aspect, jx, jy = " + nf.format( mar[0] ) + " " + nf.format( aspect[0] ) + " " + nf.format( jx[0] ) + " " + nf.format( jy[0] ) );
+         if ( mar[0] != 0.05 || jx[0] != 0.1 || jy[0] != 0.2 )
+diff -ruN --exclude .svn plplot-5.9.9/examples/java/x33.java plplot-trunk/examples/java/x33.java
+--- plplot-5.9.9/examples/java/x33.java	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/java/x33.java	2012-12-14 08:50:57.832356494 -0700
+@@ -1,6 +1,6 @@
+ // -*- coding: utf-8; -*-
+ //
+-// $Id: x33.java 11717 2011-04-21 00:47:06Z airwin $
++// $Id: x33.java 12240 2012-10-04 22:10:12Z andrewross $
+ //
+ // Demonstrate most pllegend capability including unicode symbols.
+ //
+@@ -34,6 +34,7 @@
+ package plplot.examples;
+ 
+ import plplot.core.*;
++import static plplot.core.plplotjavacConstants.*;
+ 
+ import java.lang.Math;
+ import java.text.*;
+@@ -72,11 +73,11 @@
+ //          }
+ //
+ //          int opt;
+-//          opt = PLStream.PL_POSITION_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT |
+-//                PLStream.PL_COLORBAR_CAP_HIGH;
++//          opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT |
++//                PL_COLORBAR_CAP_HIGH;
+ //
+ //          String axis_opts_1, axis_opts_2;
+-//          if ( ( bar_type & PLStream.PL_COLORBAR_SHADE_LABEL ) > 0 )
++//          if ( ( bar_type & PL_COLORBAR_SHADE_LABEL ) > 0 )
+ //          {
+ //              axis_opts_1 = "iv";
+ //              axis_opts_2 = "i";
+@@ -100,24 +101,24 @@
+ //              axis_opts_1, "Test label - Left, High Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT |
+-//                PLStream.PL_COLORBAR_CAP_LOW;
++//          opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT |
++//                PL_COLORBAR_CAP_LOW;
+ //
+ //          pls.colorbar( opt, 0.1, 0.4, 0.5, 0.1,
+ //              ticks, sub_ticks,
+ //              axis_opts_1, "Test label - Right, Low Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_TOP | bar_type | PLStream.PL_COLORBAR_LABEL_TOP |
+-//                PLStream.PL_COLORBAR_CAP_HIGH;
++//          opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP |
++//                PL_COLORBAR_CAP_HIGH;
+ //
+ //          pls.colorbar( opt, 0.1, 0.1, 0.5, 0.1,
+ //              ticks, sub_ticks,
+ //              axis_opts_2, "Test label - Upper, High Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_BOTTOM | bar_type | PLStream.PL_COLORBAR_LABEL_BOTTOM |
+-//                PLStream.PL_COLORBAR_CAP_LOW;
++//          opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM |
++//                PL_COLORBAR_CAP_LOW;
+ //
+ //          pls.colorbar( opt, 0.4, 0.1, 0.5, 0.1,
+ //              ticks, sub_ticks,
+@@ -145,11 +146,11 @@
+ //          }
+ //
+ //          int opt;
+-//          opt = PLStream.PL_POSITION_LEFT | bar_type | PLStream.PL_COLORBAR_LABEL_LEFT |
+-//                PLStream.PL_COLORBAR_CAP_LOW;
++//          opt = PL_POSITION_LEFT | bar_type | PL_COLORBAR_LABEL_LEFT |
++//                PL_COLORBAR_CAP_LOW;
+ //
+ //          String axis_opts_1, axis_opts_2;
+-//          if ( bar_type == PLStream.PL_COLORBAR_SHADE_LABEL )
++//          if ( bar_type == PL_COLORBAR_SHADE_LABEL )
+ //          {
+ //              axis_opts_1 = "";
+ //              axis_opts_2 = "";
+@@ -173,24 +174,24 @@
+ //              axis_opts_1, "Test label - Left, Low Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_RIGHT | bar_type | PLStream.PL_COLORBAR_LABEL_RIGHT |
+-//                PLStream.PL_COLORBAR_CAP_HIGH;
++//          opt = PL_POSITION_RIGHT | bar_type | PL_COLORBAR_LABEL_RIGHT |
++//                PL_COLORBAR_CAP_HIGH;
+ //
+ //          pls.colorbar( opt, 0.1, 0.4, 0.5, 0.1,
+ //              ticks, sub_ticks,
+ //              axis_opts_1, "Test label - Right, High Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_TOP | bar_type | PLStream.PL_COLORBAR_LABEL_TOP |
+-//                PLStream.PL_COLORBAR_CAP_LOW;
++//          opt = PL_POSITION_TOP | bar_type | PL_COLORBAR_LABEL_TOP |
++//                PL_COLORBAR_CAP_LOW;
+ //
+ //          pls.colorbar( opt, 0.1, 0.1, 0.5, 0.1,
+ //              ticks, sub_ticks,
+ //              axis_opts_2, "Test label - Upper, Low Cap",
+ //              colors, values );
+ //
+-//          opt = PLStream.PL_POSITION_BOTTOM | bar_type | PLStream.PL_COLORBAR_LABEL_BOTTOM |
+-//                PLStream.PL_COLORBAR_CAP_HIGH;
++//          opt = PL_POSITION_BOTTOM | bar_type | PL_COLORBAR_LABEL_BOTTOM |
++//                PL_COLORBAR_CAP_HIGH;
+ //
+ //          pls.colorbar( opt, 0.4, 0.1, 0.5, 0.1,
+ //              ticks, sub_ticks,
+@@ -232,29 +233,29 @@
+         double max_height, text_scale;
+         int    position, opt_base, nrow, ncolumn;
+         int[] position_options = {
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_OUTSIDE,
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_INSIDE,
+-            PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_INSIDE
++            PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_OUTSIDE,
++            PL_POSITION_TOP | PL_POSITION_OUTSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_OUTSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_OUTSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE,
++            PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE,
++            PL_POSITION_LEFT | PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE,
++            PL_POSITION_LEFT | PL_POSITION_OUTSIDE,
++            PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_INSIDE,
++            PL_POSITION_TOP | PL_POSITION_INSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_INSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_INSIDE,
++            PL_POSITION_RIGHT | PL_POSITION_BOTTOM | PL_POSITION_INSIDE,
++            PL_POSITION_BOTTOM | PL_POSITION_INSIDE,
++            PL_POSITION_LEFT | PL_POSITION_BOTTOM | PL_POSITION_INSIDE,
++            PL_POSITION_LEFT | PL_POSITION_INSIDE
+         };
+ 
+         NumberFormat nf = NumberFormat.getNumberInstance();
+         nf.setMinimumIntegerDigits( 2 );
+ 
+         // Parse and process command line arguments
+-        pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM );
++        pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
+ 
+         // Initialize plplot
+         pls.init();
+@@ -264,7 +265,7 @@
+         pls.vpor( 0.25, 0.75, 0.25, 0.75 );
+         pls.wind( 0.0, 1.0, 0.0, 1.0 );
+         pls.box( "bc", 0.0, 0, "bc", 0.0, 0 );
+-        pls.sfont( PLStream.PL_FCI_SANS, -1, -1 );
++        pls.sfont( PL_FCI_SANS, -1, -1 );
+         pls.mtex( "t", 8.0, 0.5, 0.5, "The 16 standard legend positions with" );
+         pls.mtex( "t", 6.0, 0.5, 0.5, "the same (0.05) offset in x and y" );
+ 
+@@ -281,8 +282,8 @@
+         symbols        = new String[nlegend];
+         // Only specify legend data that are required according to the
+         // value of opt_array for that entry.
+-        opt_base          = PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX;
+-        opt_array[0]      = PLStream.PL_LEGEND_LINE | PLStream.PL_LEGEND_SYMBOL;
++        opt_base          = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX;
++        opt_array[0]      = PL_LEGEND_LINE | PL_LEGEND_SYMBOL;
+         line_styles[0]    = 1;
+         line_widths[0]    = 1;
+         symbol_scales[0]  = 1.;
+@@ -290,7 +291,7 @@
+         symbols[0]        = "*";
+ 
+         // Use monotype fonts so that all legends are the same size.
+-        pls.sfont( PLStream.PL_FCI_MONO, -1, -1 );
++        pls.sfont( PL_FCI_MONO, -1, -1 );
+         pls.scol0a( 15, 32, 32, 32, 0.70 );
+ 
+         for ( k = 0; k < 16; k++ )
+@@ -317,7 +318,7 @@
+         pls.vpor( 0.25, 0.75, 0.25, 0.75 );
+         pls.wind( 0.0, 1.0, 0.0, 1.0 );
+         pls.box( "bc", 0.0, 0, "bc", 0.0, 0 );
+-        pls.sfont( PLStream.PL_FCI_SANS, -1, -1 );
++        pls.sfont( PL_FCI_SANS, -1, -1 );
+         pls.mtex( "t", 8.0, 0.5, 0.5, "The effect of nrow, ncolumn, PL_LEGEND_ROW_MAJOR," );
+         pls.mtex( "t", 6.0, 0.5, 0.5, "and position for the same legend data" );
+ 
+@@ -339,10 +340,10 @@
+ 
+         // Only specify legend data that are required according to the
+         // value of opt_array for that entry.
+-        opt_base = PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX;
++        opt_base = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX;
+         for ( k = 0; k < nlegend; k++ )
+         {
+-            opt_array[k]      = PLStream.PL_LEGEND_LINE | PLStream.PL_LEGEND_SYMBOL;
++            opt_array[k]      = PL_LEGEND_LINE | PL_LEGEND_SYMBOL;
+             line_styles[k]    = 1;
+             line_widths[k]    = 1;
+             symbol_scales[k]  = 1.;
+@@ -355,10 +356,10 @@
+         }
+ 
+         // Use monotype fonts so that all legends are the same size.
+-        pls.sfont( PLStream.PL_FCI_MONO, -1, -1 );
++        pls.sfont( PL_FCI_MONO, -1, -1 );
+         pls.scol0a( 15, 32, 32, 32, 0.70 );
+ 
+-        position = PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_OUTSIDE;
++        position = PL_POSITION_TOP | PL_POSITION_OUTSIDE;
+         opt      = opt_base;
+         x        = 0.;
+         y        = 0.1;
+@@ -372,7 +373,7 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_OUTSIDE;
++        position = PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE;
+         opt      = opt_base;
+         x        = 0.;
+         y        = 0.1;
+@@ -386,7 +387,7 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_OUTSIDE;
++        position = PL_POSITION_LEFT | PL_POSITION_OUTSIDE;
+         opt      = opt_base;
+         x        = 0.1;
+         y        = 0.;
+@@ -400,7 +401,7 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_OUTSIDE;
++        position = PL_POSITION_RIGHT | PL_POSITION_OUTSIDE;
+         opt      = opt_base;
+         x        = 0.1;
+         y        = 0.;
+@@ -414,7 +415,7 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_INSIDE;
++        position = PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_INSIDE;
+         opt      = opt_base;
+         x        = 0.;
+         y        = 0.;
+@@ -428,8 +429,8 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_INSIDE;
+-        opt      = opt_base | PLStream.PL_LEGEND_ROW_MAJOR;
++        position = PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_INSIDE;
++        opt      = opt_base | PL_LEGEND_ROW_MAJOR;
+         x        = 0.;
+         y        = 0.;
+         nrow     = 6;
+@@ -442,8 +443,8 @@
+             line_colors, line_styles, line_widths,
+             symbol_colors, symbol_scales, symbol_numbers, symbols );
+ 
+-        position = PLStream.PL_POSITION_BOTTOM | PLStream.PL_POSITION_INSIDE;
+-        opt      = opt_base | PLStream.PL_LEGEND_ROW_MAJOR;
++        position = PL_POSITION_BOTTOM | PL_POSITION_INSIDE;
++        opt      = opt_base | PL_LEGEND_ROW_MAJOR;
+         x        = 0.;
+         y        = 0.;
+         nrow     = 3;
+@@ -460,15 +461,15 @@
+         pls.adv( 0 );
+         pls.vpor( 0.0, 1.0, 0.0, 0.9 );
+         pls.wind( 0.0, 1.0, 0.0, 1.0 );
+-        pls.sfont( PLStream.PL_FCI_SANS, -1, -1 );
++        pls.sfont( PL_FCI_SANS, -1, -1 );
+         pls.mtex( "t", 2.0, 0.5, 0.5, "Demonstrate legend alignment" );
+ 
+         x        = 0.1;
+         y        = 0.1;
+         nturn    = 4;
+         nlegend  = 0;
+-        opt_base = PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX;
+-        position = PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_SUBPAGE;
++        opt_base = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX;
++        position = PL_POSITION_TOP | PL_POSITION_LEFT | PL_POSITION_SUBPAGE;
+         opt      = opt_base;
+         for ( i = 0; i < 9; i++ )
+         {
+@@ -497,7 +498,7 @@
+             //  value of opt_array for that entry.
+             for ( k = 0; k < nlegend; k++ )
+             {
+-                opt_array[k]      = PLStream.PL_LEGEND_LINE | PLStream.PL_LEGEND_SYMBOL;
++                opt_array[k]      = PL_LEGEND_LINE | PL_LEGEND_SYMBOL;
+                 line_styles[k]    = 1;
+                 line_widths[k]    = 1;
+                 symbol_scales[k]  = 1.;
+@@ -509,7 +510,7 @@
+                 symbol_colors[k]  = 1 + ( k % 8 );
+             }
+             // Use monotype fonts so that all legends are the same size.
+-            pls.sfont( PLStream.PL_FCI_MONO, -1, -1 );
++            pls.sfont( PL_FCI_MONO, -1, -1 );
+             pls.scol0a( 15, 32, 32, 32, 0.70 );
+ 
+             nrow    = Math.min( 3, nlegend );
+@@ -525,7 +526,7 @@
+ 
+             if ( i == nturn )
+             {
+-                position = PLStream.PL_POSITION_TOP | PLStream.PL_POSITION_RIGHT | PLStream.PL_POSITION_SUBPAGE;
++                position = PL_POSITION_TOP | PL_POSITION_RIGHT | PL_POSITION_SUBPAGE;
+                 opt      = opt_base;
+                 x        = 1. - x;
+                 y        = y + legend_height[0];
+@@ -548,7 +549,7 @@
+         pls.vpor( 0.0, 1., 0.0, 0.90 );
+         pls.wind( 0.0, 1.0, 0.0, 1.0 );
+         //plbox("bc", 0.0, 0, "bc", 0.0, 0);
+-        pls.sfont( PLStream.PL_FCI_SANS, -1, -1 );
++        pls.sfont( PL_FCI_SANS, -1, -1 );
+         pls.mtex( "t", 2.0, 0.5, 0.5, "Demonstrate Various Kinds of Legends" );
+ 
+         nlegend         = 5;
+@@ -573,15 +574,15 @@
+ 
+         // Only specify legend data that are required according to the
+         // value of opt_array for that entry.
+-        position = PLStream.PL_POSITION_LEFT | PLStream.PL_POSITION_TOP;
+-        opt_base = PLStream.PL_LEGEND_BACKGROUND | PLStream.PL_LEGEND_BOUNDING_BOX | PLStream.PL_LEGEND_TEXT_LEFT;
++        position = PL_POSITION_LEFT | PL_POSITION_TOP;
++        opt_base = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX | PL_LEGEND_TEXT_LEFT;
+ 
+         // Set up None, Box, Line, Symbol, and Line & Symbol legend entries.
+-        opt_array[0]   = PLStream.PL_LEGEND_NONE;
++        opt_array[0]   = PL_LEGEND_NONE;
+         text[0]        = "None";
+         text_colors[0] = 1;
+ 
+-        opt_array[1]       = PLStream.PL_LEGEND_COLOR_BOX;
++        opt_array[1]       = PL_LEGEND_COLOR_BOX;
+         text[1]            = "Box";
+         text_colors[1]     = 2;
+         box_colors[1]      = 2;
+@@ -589,14 +590,14 @@
+         box_scales[1]      = 0.8;
+         box_line_widths[1] = 1;
+ 
+-        opt_array[2]   = PLStream.PL_LEGEND_LINE;
++        opt_array[2]   = PL_LEGEND_LINE;
+         text[2]        = "Line";
+         text_colors[2] = 3;
+         line_colors[2] = 3;
+         line_styles[2] = 1;
+         line_widths[2] = 1;
+ 
+-        opt_array[3]      = PLStream.PL_LEGEND_SYMBOL;
++        opt_array[3]      = PL_LEGEND_SYMBOL;
+         text[3]           = "Symbol";
+         text_colors[3]    = 4;
+         symbol_colors[3]  = 4;
+@@ -604,7 +605,7 @@
+         symbol_numbers[3] = 4;
+         symbols[3]        = special_symbols[2];
+ 
+-        opt_array[4]      = PLStream.PL_LEGEND_SYMBOL | PLStream.PL_LEGEND_LINE;
++        opt_array[4]      = PL_LEGEND_SYMBOL | PL_LEGEND_LINE;
+         text[4]           = "L & S";
+         text_colors[4]    = 5;
+         line_colors[4]    = 5;
+@@ -630,7 +631,7 @@
+         // Set up symbol legend entries with various symbols.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]      = PLStream.PL_LEGEND_SYMBOL;
++            opt_array[i]      = PL_LEGEND_SYMBOL;
+             text[i]           = "Symbol " + special_symbols[i];
+             text_colors[i]    = i + 1;
+             symbol_colors[i]  = i + 1;
+@@ -655,7 +656,7 @@
+         // Set up symbol legend entries with various numbers of symbols.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]      = PLStream.PL_LEGEND_SYMBOL;
++            opt_array[i]      = PL_LEGEND_SYMBOL;
+             text[i]           = "Symbol Number " + ( i + 2 );
+             text_colors[i]    = i + 1;
+             symbol_colors[i]  = i + 1;
+@@ -680,7 +681,7 @@
+         // Set up box legend entries with various colours.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]       = PLStream.PL_LEGEND_COLOR_BOX;
++            opt_array[i]       = PL_LEGEND_COLOR_BOX;
+             text[i]            = "Box Color " + ( i + 1 );
+             text_colors[i]     = i + 1;
+             box_colors[i]      = i + 1;
+@@ -708,7 +709,7 @@
+         // Set up box legend entries with various patterns.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]       = PLStream.PL_LEGEND_COLOR_BOX;
++            opt_array[i]       = PL_LEGEND_COLOR_BOX;
+             text[i]            = "Box Pattern " + i;
+             text_colors[i]     = 2;
+             box_colors[i]      = 2;
+@@ -733,7 +734,7 @@
+         // Set up box legend entries with various box pattern line widths.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]       = PLStream.PL_LEGEND_COLOR_BOX;
++            opt_array[i]       = PL_LEGEND_COLOR_BOX;
+             text[i]            = "Box Line Width " + ( i + 1 );
+             text_colors[i]     = 2;
+             box_colors[i]      = 2;
+@@ -758,7 +759,7 @@
+         // Set up line legend entries with various colours.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]   = PLStream.PL_LEGEND_LINE;
++            opt_array[i]   = PL_LEGEND_LINE;
+             text[i]        = "Line Color " + ( i + 1 );
+             text_colors[i] = i + 1;
+             line_colors[i] = i + 1;
+@@ -785,7 +786,7 @@
+         // Set up line legend entries with various styles.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]   = PLStream.PL_LEGEND_LINE;
++            opt_array[i]   = PL_LEGEND_LINE;
+             text[i]        = "Line Style " + ( i + 1 );
+             text_colors[i] = 2;
+             line_colors[i] = 2;
+@@ -809,7 +810,7 @@
+         // Set up line legend entries with various widths.
+         for ( i = 0; i < nlegend; i++ )
+         {
+-            opt_array[i]   = PLStream.PL_LEGEND_LINE;
++            opt_array[i]   = PL_LEGEND_LINE;
+             text[i]        = "Line Width " + ( i + 1 );
+             text_colors[i] = 2;
+             line_colors[i] = 2;
+@@ -835,15 +836,15 @@
+ //        double[] values_small  = { 0.0, 1.0 };
+ //        double[] values_uneven = { 0.0, 2.0, 2.6, 3.4, 6.0, 7.0, 8.0, 9.0, 10.0 };
+ //        double[] values_even   = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+-//        plcolorbar_example_1( PLStream.PL_COLORBAR_IMAGE, 0.0, 0, 2, values_small, "Image Color Bars" );
+-//        plcolorbar_example_2( PLStream.PL_COLORBAR_IMAGE, 0.0, 0, 2, values_small, "Image Color Bars" );
+-//        plcolorbar_example_1( PLStream.PL_COLORBAR_SHADE | PLStream.PL_COLORBAR_SHADE_LABEL, 0.0, 0, 9, values_uneven,
++//        plcolorbar_example_1( PL_COLORBAR_IMAGE, 0.0, 0, 2, values_small, "Image Color Bars" );
++//        plcolorbar_example_2( PL_COLORBAR_IMAGE, 0.0, 0, 2, values_small, "Image Color Bars" );
++//        plcolorbar_example_1( PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0.0, 0, 9, values_uneven,
+ //            "Shade Color Bars - Uneven Steps" );
+-//        plcolorbar_example_2( PLStream.PL_COLORBAR_SHADE, 3.0, 3, 9, values_even,
++//        plcolorbar_example_2( PL_COLORBAR_SHADE, 3.0, 3, 9, values_even,
+ //            "Shade Color Bars - Even Steps" );
+-//        plcolorbar_example_1( PLStream.PL_COLORBAR_GRADIENT, 0.5, 5, 2, values_small,
++//        plcolorbar_example_1( PL_COLORBAR_GRADIENT, 0.5, 5, 2, values_small,
+ //            "Gradient Color Bars" );
+-//        plcolorbar_example_2( PLStream.PL_COLORBAR_GRADIENT, 0.5, 5, 2, values_small,
++//        plcolorbar_example_2( PL_COLORBAR_GRADIENT, 0.5, 5, 2, values_small,
+ //            "Gradient Color Bars" );
+         //
+ 
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/CMakeLists.txt plplot-trunk/examples/lua/CMakeLists.txt
 --- plplot-5.9.9/examples/lua/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/CMakeLists.txt	2012-06-08 08:56:05.673617654 -0600
++++ plplot-trunk/examples/lua/CMakeLists.txt	2012-06-08 08:56:05.000000000 -0600
 @@ -25,6 +25,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1082921,7 +1089424,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/CMakeLists.txt plplot-trunk/e
    "03"
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x00.lua plplot-trunk/examples/lua/x00.lua
 --- plplot-5.9.9/examples/lua/x00.lua	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/lua/x00.lua	2012-06-08 08:56:05.674617584 -0600
++++ plplot-trunk/examples/lua/x00.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -0,0 +1,58 @@
 +--[[ $Id: x00.lua 12179 2012-02-24 23:24:50Z andrewross $
 + 
@@ -1082983,7 +1089486,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x00.lua plplot-trunk/examples
 +pl.plend()
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x02.lua plplot-trunk/examples/lua/x02.lua
 --- plplot-5.9.9/examples/lua/x02.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x02.lua	2012-06-08 08:56:05.675617514 -0600
++++ plplot-trunk/examples/lua/x02.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x02.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x02.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083001,7 +1089504,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x02.lua plplot-trunk/examples
      l = lmin + (lmax - lmin) * math.floor(i/10)/9
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x04.lua plplot-trunk/examples/lua/x04.lua
 --- plplot-5.9.9/examples/lua/x04.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x04.lua	2012-06-08 08:56:05.680617164 -0600
++++ plplot-trunk/examples/lua/x04.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x04.lua 11717 2011-04-21 00:47:06Z airwin $
 +--[[ $Id: x04.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083019,7 +1089522,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x04.lua plplot-trunk/examples
  -- logic OR for number values
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x08.lua plplot-trunk/examples/lua/x08.lua
 --- plplot-5.9.9/examples/lua/x08.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x08.lua	2012-06-08 08:56:05.684616884 -0600
++++ plplot-trunk/examples/lua/x08.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x08.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x08.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083037,7 +1089540,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x08.lua plplot-trunk/examples
  -- logic OR for number values
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x11.lua plplot-trunk/examples/lua/x11.lua
 --- plplot-5.9.9/examples/lua/x11.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x11.lua	2012-06-08 08:56:05.667618075 -0600
++++ plplot-trunk/examples/lua/x11.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x11.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x11.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083055,7 +1089558,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x11.lua plplot-trunk/examples
  -- logic OR for number values
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x13.lua plplot-trunk/examples/lua/x13.lua
 --- plplot-5.9.9/examples/lua/x13.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x13.lua	2012-06-08 08:56:05.670617865 -0600
++++ plplot-trunk/examples/lua/x13.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x13.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x13.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083073,7 +1089576,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x13.lua plplot-trunk/examples
  	pl.line(x, y)
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x17.lua plplot-trunk/examples/lua/x17.lua
 --- plplot-5.9.9/examples/lua/x17.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x17.lua	2012-06-08 08:56:05.672617724 -0600
++++ plplot-trunk/examples/lua/x17.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x17.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x17.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083097,7 +1089600,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x17.lua plplot-trunk/examples
  -- Destroy strip chart and it's memory 
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x21.lua plplot-trunk/examples/lua/x21.lua
 --- plplot-5.9.9/examples/lua/x21.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x21.lua	2012-06-08 08:56:05.677617374 -0600
++++ plplot-trunk/examples/lua/x21.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x21.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x21.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083154,7 +1089657,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x21.lua plplot-trunk/examples
        
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x23.lua plplot-trunk/examples/lua/x23.lua
 --- plplot-5.9.9/examples/lua/x23.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x23.lua	2012-06-08 08:56:05.682617024 -0600
++++ plplot-trunk/examples/lua/x23.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x23.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x23.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083176,7 +1089679,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x23.lua plplot-trunk/examples
        str = string.format("Page 12, %s, %s, %s:  The quick brown fox jumps over the lazy dog",
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x26.lua plplot-trunk/examples/lua/x26.lua
 --- plplot-5.9.9/examples/lua/x26.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x26.lua	2012-06-08 08:56:05.686616743 -0600
++++ plplot-trunk/examples/lua/x26.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,6 +1,6 @@
  --[[ -*- coding: utf-8 -*-
     
@@ -1083196,7 +1089699,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x26.lua plplot-trunk/examples
  -- logic OR for number values
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x27.lua plplot-trunk/examples/lua/x27.lua
 --- plplot-5.9.9/examples/lua/x27.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x27.lua	2012-06-08 08:56:05.688616603 -0600
++++ plplot-trunk/examples/lua/x27.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x27.lua 11858 2011-08-05 07:45:34Z andrewross $
 +--[[ $Id: x27.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083214,7 +1089717,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x27.lua plplot-trunk/examples
      return a
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x30.lua plplot-trunk/examples/lua/x30.lua
 --- plplot-5.9.9/examples/lua/x30.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x30.lua	2012-06-08 08:56:05.669617935 -0600
++++ plplot-trunk/examples/lua/x30.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -1,4 +1,4 @@
 ---[[ $Id: x30.lua 11680 2011-03-27 17:57:51Z airwin $
 +--[[ $Id: x30.lua 12167 2012-02-16 20:24:20Z airwin $
@@ -1083241,7 +1089744,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x30.lua plplot-trunk/examples
    pl.col0(icol)
 diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x33.lua plplot-trunk/examples/lua/x33.lua
 --- plplot-5.9.9/examples/lua/x33.lua	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/lua/x33.lua	2012-06-08 08:56:05.671617795 -0600
++++ plplot-trunk/examples/lua/x33.lua	2012-06-08 08:56:05.000000000 -0600
 @@ -32,7 +32,7 @@
  
  -- return single bit (for OR)
@@ -1083253,7 +1089756,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/lua/x33.lua plplot-trunk/examples
  -- logic OR for number values
 diff -ruN --exclude .svn plplot-5.9.9/examples/Makefile.examples.in plplot-trunk/examples/Makefile.examples.in
 --- plplot-5.9.9/examples/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/Makefile.examples.in	2011-11-02 09:43:10.697875425 -0600
++++ plplot-trunk/examples/Makefile.examples.in	2011-11-02 09:43:10.000000000 -0600
 @@ -284,7 +284,7 @@
  test_clean:
  	rm -f *.psc *.pdfcairo *.pngcairo *.pscairo *.svgcairo \
@@ -1083265,7 +1089768,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/Makefile.examples.in plplot-trunk
  clean: test_clean
 diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/CMakeLists.txt plplot-trunk/examples/ocaml/CMakeLists.txt
 --- plplot-5.9.9/examples/ocaml/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ocaml/CMakeLists.txt	2012-06-08 08:56:06.426565012 -0600
++++ plplot-trunk/examples/ocaml/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -29,6 +29,7 @@
  # BUILD_TEST ON and CORE_BUILD OFF.
  
@@ -1083302,7 +1089805,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/CMakeLists.txt plplot-trunk
      get_property(files_plcairo_ocaml GLOBAL PROPERTY FILES_plcairo_ocaml)
 diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/Makefile.examples.in plplot-trunk/examples/ocaml/Makefile.examples.in
 --- plplot-5.9.9/examples/ocaml/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ocaml/Makefile.examples.in	2012-01-05 11:23:00.258087810 -0700
++++ plplot-trunk/examples/ocaml/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -24,13 +24,12 @@
  OCAMLC = @OCAML_EXAMPLE_COMPILER@
  EXEEXT = @EXEEXT@
@@ -1083323,7 +1089826,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/Makefile.examples.in plplot
  		 x01ocaml$(EXEEXT) \
 diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x00.ml plplot-trunk/examples/ocaml/x00.ml
 --- plplot-5.9.9/examples/ocaml/x00.ml	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/ocaml/x00.ml	2012-06-08 08:56:06.428564874 -0600
++++ plplot-trunk/examples/ocaml/x00.ml	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,56 @@
 +(* $Id: x00.ml 12190 2012-04-20 23:12:46Z airwin $
 +  
@@ -1083383,7 +1089886,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x00.ml plplot-trunk/example
 +
 diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x21.ml plplot-trunk/examples/ocaml/x21.ml
 --- plplot-5.9.9/examples/ocaml/x21.ml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ocaml/x21.ml	2012-01-28 07:51:44.143771969 -0700
++++ plplot-trunk/examples/ocaml/x21.ml	2012-01-28 07:51:44.000000000 -0700
 @@ -1,8 +1,8 @@
 -(* $Id: x21.ml 11680 2011-03-27 17:57:51Z airwin $
 +(* $Id: x21.ml 12156 2012-01-25 11:41:48Z andrewross $
@@ -1083429,7 +1089932,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x21.ml plplot-trunk/example
          (* For the comparison to be fair, all plots should have the
 diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x22.ml plplot-trunk/examples/ocaml/x22.ml
 --- plplot-5.9.9/examples/ocaml/x22.ml	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/ocaml/x22.ml	2012-06-08 08:56:06.424565152 -0600
++++ plplot-trunk/examples/ocaml/x22.ml	2012-06-08 08:56:06.000000000 -0600
 @@ -1,7 +1,7 @@
 -(* $Id: x22.ml 11680 2011-03-27 17:57:51Z airwin $
 +(* $Id: x22.ml 12176 2012-02-24 20:33:39Z andrewross $
@@ -1083442,7 +1089945,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/ocaml/x22.ml plplot-trunk/example
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/octave/CMakeLists.txt plplot-trunk/examples/octave/CMakeLists.txt
 --- plplot-5.9.9/examples/octave/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/octave/CMakeLists.txt	2012-06-08 08:56:05.703615552 -0600
++++ plplot-trunk/examples/octave/CMakeLists.txt	2012-06-08 08:56:05.000000000 -0600
 @@ -47,6 +47,7 @@
    p19.m
    p20.m
@@ -1083453,7 +1089956,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/octave/CMakeLists.txt plplot-trun
    x03c.m
 diff -ruN --exclude .svn plplot-5.9.9/examples/octave/x00c.m plplot-trunk/examples/octave/x00c.m
 --- plplot-5.9.9/examples/octave/x00c.m	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/octave/x00c.m	2012-06-08 08:56:05.700615762 -0600
++++ plplot-trunk/examples/octave/x00c.m	2012-06-08 08:56:05.000000000 -0600
 @@ -0,0 +1,52 @@
 +## $Id: x00c.m 12179 2012-02-24 23:24:50Z andrewross $
 +##
@@ -1083509,7 +1090012,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/octave/x00c.m plplot-trunk/exampl
 +endfunction
 diff -ruN --exclude .svn plplot-5.9.9/examples/octave/x21c.m plplot-trunk/examples/octave/x21c.m
 --- plplot-5.9.9/examples/octave/x21c.m	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/octave/x21c.m	2012-01-28 07:51:43.870781789 -0700
++++ plplot-trunk/examples/octave/x21c.m	2012-01-28 07:51:43.000000000 -0700
 @@ -1,4 +1,4 @@
 -## $Id: x21c.m 11680 2011-03-27 17:57:51Z airwin $
 +## $Id: x21c.m 12143 2012-01-21 21:52:54Z andrewross $
@@ -1083548,7 +1090051,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/octave/x21c.m plplot-trunk/exampl
  	##
 diff -ruN --exclude .svn plplot-5.9.9/examples/plplot_configure.cmake_installed_examples.in plplot-trunk/examples/plplot_configure.cmake_installed_examples.in
 --- plplot-5.9.9/examples/plplot_configure.cmake_installed_examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/plplot_configure.cmake_installed_examples.in	2012-01-28 07:51:44.627754574 -0700
++++ plplot-trunk/examples/plplot_configure.cmake_installed_examples.in	2012-12-14 08:50:59.624345598 -0700
 @@ -6,6 +6,11 @@
  set(CORE_BUILD OFF)
  
@@ -1083601,9 +1090104,17 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/plplot_configure.cmake_installed_
  endif(ENABLE_tk)
  
  if(ENABLE_wxwidgets)
+@@ -160,6 +167,7 @@
+ set(PLD_pdfcairo @PLD_pdfcairo@)
+ set(PLD_pngcairo @PLD_pngcairo@)
+ set(PLD_pscairo @PLD_pscairo@)
++set(PLD_epscairo @PLD_epscairo@)
+ set(PLD_svgcairo @PLD_svgcairo@)
+ set(PLD_cgm @PLD_cgm@)
+ set(PLD_dg300 @PLD_dg300@)
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/CMakeLists.txt plplot-trunk/examples/python/CMakeLists.txt
 --- plplot-5.9.9/examples/python/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/python/CMakeLists.txt	2012-06-08 08:56:06.091588389 -0600
++++ plplot-trunk/examples/python/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -27,6 +27,7 @@
  # N.B. examples 14, 17, and 31 handled independently while 32 has
  # not yet been implemented.
@@ -1083629,7 +1090140,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/CMakeLists.txt plplot-trun
 +endif(BUILD_TEST)
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/plplotcanvas_animation.py plplot-trunk/examples/python/plplotcanvas_animation.py
 --- plplot-5.9.9/examples/python/plplotcanvas_animation.py	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/python/plplotcanvas_animation.py	2011-04-06 14:29:18.058315263 -0600
++++ plplot-trunk/examples/python/plplotcanvas_animation.py	2011-04-06 14:29:18.000000000 -0600
 @@ -11,7 +11,7 @@
  
    $Author: airwin $
@@ -1083641,7 +1090152,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/plplotcanvas_animation.py
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/plplotcanvas_demo.py plplot-trunk/examples/python/plplotcanvas_demo.py
 --- plplot-5.9.9/examples/python/plplotcanvas_demo.py	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/python/plplotcanvas_demo.py	2011-04-06 14:29:18.091312441 -0600
++++ plplot-trunk/examples/python/plplotcanvas_demo.py	2011-04-06 14:29:18.000000000 -0600
 @@ -11,7 +11,7 @@
  
    $Author: airwin $
@@ -1083653,7 +1090164,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/plplotcanvas_demo.py plplo
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/test_circle.py plplot-trunk/examples/python/test_circle.py
 --- plplot-5.9.9/examples/python/test_circle.py	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/python/test_circle.py	2012-01-28 07:51:43.908780425 -0700
++++ plplot-trunk/examples/python/test_circle.py	2012-01-28 07:51:43.000000000 -0700
 @@ -16,6 +16,7 @@
    "Plplot Encoded Hershey Indexed Asterisk with plptex",
    "Asterisk with plsym",
@@ -1083684,7 +1090195,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/test_circle.py plplot-trun
  
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/test_linebreak.py plplot-trunk/examples/python/test_linebreak.py
 --- plplot-5.9.9/examples/python/test_linebreak.py	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/python/test_linebreak.py	2012-06-08 08:56:06.084588878 -0600
++++ plplot-trunk/examples/python/test_linebreak.py	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,43 @@
 +#!/usr/bin/env python
 +# -*- coding: utf-8; -*-
@@ -1083731,7 +1090242,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/test_linebreak.py plplot-t
 +plend()
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/x00 plplot-trunk/examples/python/x00
 --- plplot-5.9.9/examples/python/x00	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/python/x00	2012-06-08 08:56:06.089588528 -0600
++++ plplot-trunk/examples/python/x00	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,39 @@
 +#!/usr/bin/env python
 +
@@ -1083774,7 +1090285,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/x00 plplot-trunk/examples/
 +
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/xw00.py plplot-trunk/examples/python/xw00.py
 --- plplot-5.9.9/examples/python/xw00.py	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/python/xw00.py	2012-06-08 08:56:06.087588668 -0600
++++ plplot-trunk/examples/python/xw00.py	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,47 @@
 +# $Id: xw00.py 12179 2012-02-24 23:24:50Z andrewross $
 +#
@@ -1083825,7 +1090336,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/xw00.py plplot-trunk/examp
 +main()
 diff -ruN --exclude .svn plplot-5.9.9/examples/python/xw21.py plplot-trunk/examples/python/xw21.py
 --- plplot-5.9.9/examples/python/xw21.py	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/python/xw21.py	2012-01-28 07:51:43.907780461 -0700
++++ plplot-trunk/examples/python/xw21.py	2012-01-28 07:51:43.000000000 -0700
 @@ -1,4 +1,4 @@
 -# $Id: xw21.py 11680 2011-03-27 17:57:51Z airwin $
 +# $Id: xw21.py 12151 2012-01-24 15:28:48Z andrewross $
@@ -1083881,7 +1090392,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/python/xw21.py plplot-trunk/examp
                  plw3d(1.0, 1.0, 1.0, xm, xM, ym, yM, lzm, lzM, 30.0, -40.0)
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/CMakeLists.txt plplot-trunk/examples/tcl/CMakeLists.txt
 --- plplot-5.9.9/examples/tcl/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/CMakeLists.txt	2012-06-08 08:56:06.376568502 -0600
++++ plplot-trunk/examples/tcl/CMakeLists.txt	2012-06-08 08:56:06.000000000 -0600
 @@ -1,7 +1,7 @@
  # examples/tcl/CMakeLists.txt
  ### Process this file with cmake to produce Makefile
@@ -1083984,7 +1090495,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/CMakeLists.txt plplot-trunk/e
  if(BUILD_TEST)
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/standard_examples.in plplot-trunk/examples/tcl/standard_examples.in
 --- plplot-5.9.9/examples/tcl/standard_examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/standard_examples.in	2012-06-08 08:56:06.371568850 -0600
++++ plplot-trunk/examples/tcl/standard_examples.in	2012-06-08 08:56:06.000000000 -0600
 @@ -7,6 +7,7 @@
  @pltcl_LOCATION@ $* <<EOF
  source tcldemos.tcl
@@ -1084000,9 +1090511,73 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/standard_examples.in plplot-t
 +33
  exit
  EOF
+diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/tcldemos.tcl plplot-trunk/examples/tcl/tcldemos.tcl
+--- plplot-5.9.9/examples/tcl/tcldemos.tcl	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/tcl/tcldemos.tcl	2012-12-14 08:50:57.848356411 -0700
+@@ -1,5 +1,5 @@
+ #----------------------------------------------------------------------------
+-# $Id: tcldemos.tcl 11477 2011-01-11 08:22:48Z arjenmarkus $
++# $Id: tcldemos.tcl 12225 2012-08-23 20:11:45Z airwin $
+ #
+ # PLplot TCL demos
+ #
+@@ -42,28 +42,30 @@
+ 
+ set  utf8_examples {4 18 24 26 33}
+ 
+-for {set i 1} {$i <= 31} {incr i} {
+-    set demo x[format "%02d" $i]
+-
+-    #
+-    # If the source code contains UTF-8 characters (beyond the
+-    # ASCII-7 encoding), take special measures
+-    #
+-
+-    if { [lsearch $utf8_examples $i] < 0 } {
+-        source $demo.tcl
+-    } else {
+-        sourceUtf8 $demo.tcl
++for {set i 0} {$i <= 33} {incr i} {
++    if {$i != 32} {
++	set demo x[format "%02d" $i]
++	
++	#
++	# If the source code contains UTF-8 characters (beyond the
++	# ASCII-7 encoding), take special measures
++	#
++	
++	if { [lsearch $utf8_examples $i] < 0 } {
++	    source $demo.tcl
++	} else {
++	    sourceUtf8 $demo.tcl
++	}
++	
++	# restore defaults
++	proc $i {} "
++            $demo
++            loopback cmd pleop
++            loopback cmd plcol0 1
++            loopback cmd plsori 0
++            loopback cmd plspal0 cmap0_default.pal
++            loopback cmd plspal1 cmap1_default.pal 1
++            loopback cmd plstransform NULL
++        "
+     }
+-
+-    # restore defaults
+-    proc $i {} "
+-        $demo
+-        loopback cmd pleop
+-        loopback cmd plcol0 1
+-        loopback cmd plsori 0
+-        loopback cmd plspal0 cmap0_default.pal
+-        loopback cmd plspal1 cmap1_default.pal 1
+-        loopback cmd plstransform NULL
+-    "
+ }
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x00 plplot-trunk/examples/tcl/x00
 --- plplot-5.9.9/examples/tcl/x00	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/tcl/x00	2012-06-08 08:56:06.373568712 -0600
++++ plplot-trunk/examples/tcl/x00	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,19 @@
 +#!/bin/sh
 +#--------------------------------*- Tcl -*------------------------------------#
@@ -1084025,7 +1090600,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x00 plplot-trunk/examples/tcl
 +plend
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x00.tcl plplot-trunk/examples/tcl/x00.tcl
 --- plplot-5.9.9/examples/tcl/x00.tcl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/examples/tcl/x00.tcl	2012-06-08 08:56:06.378568362 -0600
++++ plplot-trunk/examples/tcl/x00.tcl	2012-06-08 08:56:06.000000000 -0600
 @@ -0,0 +1,30 @@
 +#----------------------------------------------------------------------------
 +# $Id: x00.tcl 12172 2012-02-19 18:18:19Z airwin $
@@ -1084059,7 +1090634,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x00.tcl plplot-trunk/examples
 +}
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x21.tcl plplot-trunk/examples/tcl/x21.tcl
 --- plplot-5.9.9/examples/tcl/x21.tcl	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/x21.tcl	2012-01-28 07:51:43.933779529 -0700
++++ plplot-trunk/examples/tcl/x21.tcl	2012-01-28 07:51:43.000000000 -0700
 @@ -1,4 +1,4 @@
 -#      $Id: x21.tcl 11680 2011-03-27 17:57:51Z airwin $
 +#      $Id: x21.tcl 12148 2012-01-23 20:42:50Z arjenmarkus $
@@ -1084115,7 +1090690,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x21.tcl plplot-trunk/examples
  #
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x23 plplot-trunk/examples/tcl/x23
 --- plplot-5.9.9/examples/tcl/x23	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/x23	2011-04-06 14:29:19.556187166 -0600
++++ plplot-trunk/examples/tcl/x23	2011-04-06 14:29:19.000000000 -0600
 @@ -1,6 +1,6 @@
  #!/bin/sh
  #--------------------------------*- Tcl -*------------------------------------#
@@ -1084126,7 +1090701,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x23 plplot-trunk/examples/tcl
  # 12/24/02
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x28 plplot-trunk/examples/tcl/x28
 --- plplot-5.9.9/examples/tcl/x28	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/x28	2011-04-06 14:29:19.563186568 -0600
++++ plplot-trunk/examples/tcl/x28	2011-04-06 14:29:19.000000000 -0600
 @@ -1,6 +1,6 @@
  #!/bin/sh
  #--------------------------------*- Tcl -*------------------------------------#
@@ -1084137,7 +1090712,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x28 plplot-trunk/examples/tcl
  # 12/24/02
 diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x29 plplot-trunk/examples/tcl/x29
 --- plplot-5.9.9/examples/tcl/x29	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tcl/x29	2011-04-06 14:29:19.564186482 -0600
++++ plplot-trunk/examples/tcl/x29	2011-04-06 14:29:19.000000000 -0600
 @@ -1,6 +1,6 @@
  #!/bin/sh
  #--------------------------------*- Tcl -*------------------------------------#
@@ -1084148,8 +1090723,24 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tcl/x29 plplot-trunk/examples/tcl
  # 12/24/02
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/CMakeLists.txt plplot-trunk/examples/tk/CMakeLists.txt
 --- plplot-5.9.9/examples/tk/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/CMakeLists.txt	2011-11-30 09:19:45.442785553 -0700
-@@ -172,7 +172,7 @@
++++ plplot-trunk/examples/tk/CMakeLists.txt	2012-12-14 08:50:59.637345535 -0700
+@@ -25,6 +25,7 @@
+ # BUILD_TEST ON and CORE_BUILD OFF.
+ 
+ set(tk_STRING_INDICES
++  "00"
+   "01"
+   "02"
+   "03"
+@@ -56,6 +57,7 @@
+   "29"
+   "30"
+   "31"
++  "33"
+   )
+ 
+ set(tk_SRC_FILES
+@@ -172,7 +174,7 @@
        set_source_files_properties(${TK_SRC_FILE}
          PROPERTIES COMPILE_FLAGS "-DUSINGDLL" )
      endif(BUILD_SHARED_LIBS AND CORE_BUILD)
@@ -1084160,7 +1090751,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/CMakeLists.txt plplot-trunk/ex
    set_property(GLOBAL APPEND PROPERTY TARGETS_examples_tk tclIndex_examples_tk)
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/Makefile.examples.in plplot-trunk/examples/tk/Makefile.examples.in
 --- plplot-5.9.9/examples/tk/Makefile.examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/Makefile.examples.in	2012-01-05 11:23:00.427081349 -0700
++++ plplot-trunk/examples/tk/Makefile.examples.in	2012-01-05 11:23:00.000000000 -0700
 @@ -23,9 +23,9 @@
  CC = @CC@
  EXEEXT = @EXEEXT@
@@ -1084183,9 +1090774,20 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/Makefile.examples.in plplot-tr
 +	$(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -lm
  
  .SUFFIXES: .c $(EXEEXT)
+diff -ruN --exclude .svn plplot-5.9.9/examples/tk/README.tkdemos plplot-trunk/examples/tk/README.tkdemos
+--- plplot-5.9.9/examples/tk/README.tkdemos	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/tk/README.tkdemos	2012-12-14 08:50:59.637345535 -0700
+@@ -61,6 +61,6 @@
+ source runAllDemos.tcl
+ 
+ wish
+-lappend auto_path $prefix/share/plplot$VERSION | ../../bindings/tk-x-plat
++lappend auto_path $prefix/share/plplot$VERSION | ../../bindings/tk-x-plat ../../bindings/tk
+ package require Plplotter
+ source runAllDemos.tcl
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/standard_examples.in plplot-trunk/examples/tk/standard_examples.in
 --- plplot-5.9.9/examples/tk/standard_examples.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/standard_examples.in	2012-06-08 08:56:07.383498346 -0600
++++ plplot-trunk/examples/tk/standard_examples.in	2012-06-08 08:56:07.000000000 -0600
 @@ -8,6 +8,7 @@
  # \
  @plserver_LOCATION@ <<EOF
@@ -1084201,9 +1090803,71 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/standard_examples.in plplot-tr
 +33
  exit
  EOF
+diff -ruN --exclude .svn plplot-5.9.9/examples/tk/tkdemos.tcl plplot-trunk/examples/tk/tkdemos.tcl
+--- plplot-5.9.9/examples/tk/tkdemos.tcl	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/examples/tk/tkdemos.tcl	2012-12-14 08:50:59.636345540 -0700
+@@ -1,5 +1,5 @@
+ #----------------------------------------------------------------------------
+-# $Id: tkdemos.tcl 11477 2011-01-11 08:22:48Z arjenmarkus $
++# $Id: tkdemos.tcl 12226 2012-08-23 20:18:41Z airwin $
+ #
+ # PLplot TK demos
+ #
+@@ -46,27 +46,29 @@
+ plxframe .plw
+ pack append . .plw {left expand fill}
+ 
+-for {set i 1} {$i <= 31} {incr i} {
+-    set demo x[format "%02d" $i]
+-
+-    #
+-    # If the source code contains UTF-8 characters (beyond the
+-    # ASCII-7 encoding), take special measures
+-    #
+-
+-    if { [lsearch $utf8_examples $i] < 0 } {
+-        source $demo.tcl
+-    } else {
+-        sourceUtf8 $demo.tcl
++for {set i 0} {$i <= 33} {incr i} {
++    if {$i != 32} {
++	set demo x[format "%02d" $i]
++
++	#
++	# If the source code contains UTF-8 characters (beyond the
++	# ASCII-7 encoding), take special measures
++	#
++	
++	if { [lsearch $utf8_examples $i] < 0 } {
++	    source $demo.tcl
++	} else {
++	    sourceUtf8 $demo.tcl
++	}
++	
++	proc $i {} "
++            .plw.plwin cmd plspause 0
++            $demo .plw.plwin
++            .plw.plwin cmd plcol0 1
++            .plw.plwin cmd plsori 0
++            .plw.plwin cmd plspal0 cmap0_default.pal
++            .plw.plwin cmd plspal1 cmap1_default.pal 1
++            .plw.plwin cmd plstransform NULL
++        "
+     }
+-
+-    proc $i {} "
+-        .plw.plwin cmd plspause 0
+-        $demo .plw.plwin
+-        .plw.plwin cmd plcol0 1
+-        .plw.plwin cmd plsori 0
+-        .plw.plwin cmd plspal0 cmap0_default.pal
+-        .plw.plwin cmd plspal1 cmap1_default.pal 1
+-        .plw.plwin cmd plstransform NULL
+-    "
+ }
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk01.c plplot-trunk/examples/tk/xtk01.c
 --- plplot-5.9.9/examples/tk/xtk01.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/xtk01.c	2012-01-28 07:51:44.618754888 -0700
++++ plplot-trunk/examples/tk/xtk01.c	2012-01-28 07:51:44.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: xtk01.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: xtk01.c 12129 2012-01-14 23:19:10Z airwin $
@@ -1084348,7 +1091012,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk01.c plplot-trunk/examples/
          myplot1();
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk02.c plplot-trunk/examples/tk/xtk02.c
 --- plplot-5.9.9/examples/tk/xtk02.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/xtk02.c	2012-01-04 08:45:36.243525516 -0700
++++ plplot-trunk/examples/tk/xtk02.c	2012-01-04 08:45:36.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: xtk02.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: xtk02.c 12077 2011-11-30 22:04:42Z andrewross $
@@ -1084433,7 +1091097,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk02.c plplot-trunk/examples/
          myplot1();
 diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk04.c plplot-trunk/examples/tk/xtk04.c
 --- plplot-5.9.9/examples/tk/xtk04.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/examples/tk/xtk04.c	2012-01-04 08:45:36.245525444 -0700
++++ plplot-trunk/examples/tk/xtk04.c	2012-01-04 08:45:36.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: xtk04.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: xtk04.c 12077 2011-11-30 22:04:42Z andrewross $
@@ -1084511,7 +1091175,7 @@ diff -ruN --exclude .svn plplot-5.9.9/examples/tk/xtk04.c plplot-trunk/examples/
  
 diff -ruN --exclude .svn plplot-5.9.9/fonts/plhershey-unicode-gen.c plplot-trunk/fonts/plhershey-unicode-gen.c
 --- plplot-5.9.9/fonts/plhershey-unicode-gen.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/fonts/plhershey-unicode-gen.c	2011-11-02 09:43:05.023083440 -0600
++++ plplot-trunk/fonts/plhershey-unicode-gen.c	2011-11-02 09:43:05.000000000 -0600
 @@ -1,4 +1,4 @@
 -//  $Id: plhershey-unicode-gen.c 11680 2011-03-27 17:57:51Z airwin $
 +//  $Id: plhershey-unicode-gen.c 11985 2011-10-20 04:35:53Z airwin $
@@ -1084581,16 +1091245,33 @@ diff -ruN --exclude .svn plplot-5.9.9/fonts/plhershey-unicode-gen.c plplot-trunk
          }
 diff -ruN --exclude .svn plplot-5.9.9/include/disptab.h plplot-trunk/include/disptab.h
 --- plplot-5.9.9/include/disptab.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/disptab.h	2012-01-04 08:45:34.607584408 -0700
++++ plplot-trunk/include/disptab.h	2012-01-04 08:45:34.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: disptab.h 11269 2010-10-22 00:25:36Z airwin $
 +// $Id: disptab.h 12085 2011-12-01 23:38:31Z andrewross $
  //
  // Defines the data structure which holds the driver functions.
  //
+diff -ruN --exclude .svn plplot-5.9.9/include/drivers.h plplot-trunk/include/drivers.h
+--- plplot-5.9.9/include/drivers.h	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/include/drivers.h	2012-12-14 08:51:01.726332827 -0700
+@@ -1,4 +1,4 @@
+-// $Id: drivers.h 11269 2010-10-22 00:25:36Z airwin $
++// $Id: drivers.h 12275 2012-11-17 22:49:34Z hbabcock $
+ //
+ //      Contains all prototypes for driver functions.
+ //
+@@ -93,6 +93,7 @@
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_xcairo( PLDispatchTable *pdt );
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdfcairo( PLDispatchTable *pdt );
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_pscairo( PLDispatchTable *pdt );
++PLDLLIMPEXP_DRIVER void plD_dispatch_init_epscairo( PLDispatchTable *pdt );
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_svgcairo( PLDispatchTable *pdt );
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_pngcairo( PLDispatchTable *pdt );
+ PLDLLIMPEXP_DRIVER void plD_dispatch_init_memcairo( PLDispatchTable *pdt );
 diff -ruN --exclude .svn plplot-5.9.9/include/ltdl_win32.h plplot-trunk/include/ltdl_win32.h
 --- plplot-5.9.9/include/ltdl_win32.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/ltdl_win32.h	2011-11-02 09:43:07.685985829 -0600
++++ plplot-trunk/include/ltdl_win32.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: ltdl_win32.h 11938 2011-10-06 18:13:58Z airwin $
 +// $Id: ltdl_win32.h 11970 2011-10-14 08:30:19Z airwin $
@@ -1084607,7 +1091288,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/ltdl_win32.h plplot-trunk/include/
  #endif // __LTDL_WIN32_H__
 diff -ruN --exclude .svn plplot-5.9.9/include/pdf.h plplot-trunk/include/pdf.h
 --- plplot-5.9.9/include/pdf.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/pdf.h	2011-11-02 09:43:07.673986268 -0600
++++ plplot-trunk/include/pdf.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: pdf.h 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: pdf.h 11975 2011-10-19 11:05:10Z andrewross $
@@ -1084683,7 +1091364,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/pdf.h plplot-trunk/include/pdf.h
  #endif  // __PDF_H__
 diff -ruN --exclude .svn plplot-5.9.9/include/plConfig.h.cmake plplot-trunk/include/plConfig.h.cmake
 --- plplot-5.9.9/include/plConfig.h.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plConfig.h.cmake	2011-11-02 09:43:07.683985903 -0600
++++ plplot-trunk/include/plConfig.h.cmake	2011-11-02 09:43:07.000000000 -0600
 @@ -1,5 +1,5 @@
  // -*-C-*-
 -// $Id: plConfig.h.cmake 11680 2011-03-27 17:57:51Z airwin $
@@ -1084709,10 +1091390,10 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plConfig.h.cmake plplot-trunk/incl
  
 diff -ruN --exclude .svn plplot-5.9.9/include/plcore.h plplot-trunk/include/plcore.h
 --- plplot-5.9.9/include/plcore.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plcore.h	2012-01-04 08:45:34.606584444 -0700
++++ plplot-trunk/include/plcore.h	2012-12-14 08:51:01.727332820 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plcore.h 11269 2010-10-22 00:25:36Z airwin $
-+// $Id: plcore.h 12096 2011-12-03 21:11:14Z andrewross $
++// $Id: plcore.h 12275 2012-11-17 22:49:34Z hbabcock $
  //
  //      Contains declarations for core plplot data structures.  This file
  //      should be included only by plcore.c.
@@ -1084725,7 +1091406,17 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plcore.h plplot-trunk/include/plco
  static void     grline( short *, short *, PLINT );
  static void     grpolyline( short *, short *, PLINT );
  static void     grfill( short *, short *, PLINT );
-@@ -362,8 +362,9 @@
+@@ -285,6 +285,9 @@
+ #if defined ( PLD_pscairo ) && !defined ( ENABLE_DYNDRIVERS )
+     plD_dispatch_init_pscairo,
+ #endif
++#if defined ( PLD_epscairo ) && !defined ( ENABLE_DYNDRIVERS )
++    plD_dispatch_init_epscairo,
++#endif
+ #if defined ( PLD_svgcairo ) && !defined ( ENABLE_DYNDRIVERS )
+     plD_dispatch_init_svgcairo,
+ #endif
+@@ -362,8 +365,9 @@
  
  static PLLoadableDevice *loadable_device_list;
  static PLLoadableDriver *loadable_driver_list;
@@ -1084738,7 +1091429,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plcore.h plplot-trunk/include/plco
  #endif  // __PLCORE_H__
 diff -ruN --exclude .svn plplot-5.9.9/include/pldebug.h plplot-trunk/include/pldebug.h
 --- plplot-5.9.9/include/pldebug.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/pldebug.h	2011-11-02 09:43:07.689985684 -0600
++++ plplot-trunk/include/pldebug.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: pldebug.h 11269 2010-10-22 00:25:36Z airwin $
 +// $Id: pldebug.h 11998 2011-10-21 12:34:16Z andrewross $
@@ -1084755,9 +1091446,27 @@ diff -ruN --exclude .svn plplot-5.9.9/include/pldebug.h plplot-trunk/include/pld
  #endif  // DEBUG
  }
  #endif  // NEED_PLDEBUG
+diff -ruN --exclude .svn plplot-5.9.9/include/plDevs.h.cmake plplot-trunk/include/plDevs.h.cmake
+--- plplot-5.9.9/include/plDevs.h.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/include/plDevs.h.cmake	2012-12-14 08:51:01.725332834 -0700
+@@ -1,5 +1,5 @@
+ // -*-C-*-
+-// $Id: plDevs.h.cmake 11269 2010-10-22 00:25:36Z airwin $
++// $Id: plDevs.h.cmake 12275 2012-11-17 22:49:34Z hbabcock $
+ //
+ //  Maurice LeBrun
+ //  IFS, University of Texas at Austin
+@@ -81,6 +81,7 @@
+ #cmakedefine PLD_xcairo
+ #cmakedefine PLD_pdfcairo
+ #cmakedefine PLD_pscairo
++#cmakedefine PLD_epscairo
+ #cmakedefine PLD_svgcairo
+ #cmakedefine PLD_pngcairo
+ #cmakedefine PLD_memcairo
 diff -ruN --exclude .svn plplot-5.9.9/include/plfci-truetype.h plplot-trunk/include/plfci-truetype.h
 --- plplot-5.9.9/include/plfci-truetype.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plfci-truetype.h	2011-11-02 09:43:07.680986013 -0600
++++ plplot-trunk/include/plfci-truetype.h	2011-11-02 09:43:07.000000000 -0600
 @@ -26,34 +26,34 @@
  //
  #define N_TrueTypeLookup    30
@@ -1084825,7 +1091534,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plfci-truetype.h plplot-trunk/incl
  };
 diff -ruN --exclude .svn plplot-5.9.9/include/plfci-type1.h plplot-trunk/include/plfci-type1.h
 --- plplot-5.9.9/include/plfci-type1.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plfci-type1.h	2011-11-02 09:43:07.671986342 -0600
++++ plplot-trunk/include/plfci-type1.h	2011-11-02 09:43:07.000000000 -0600
 @@ -40,34 +40,34 @@
  
  #define N_Type1Lookup    30
@@ -1084893,7 +1091602,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plfci-type1.h plplot-trunk/include
  };
 diff -ruN --exclude .svn plplot-5.9.9/include/plfreetype.h plplot-trunk/include/plfreetype.h
 --- plplot-5.9.9/include/plfreetype.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plfreetype.h	2011-11-02 09:43:07.682985940 -0600
++++ plplot-trunk/include/plfreetype.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plfreetype.h 11269 2010-10-22 00:25:36Z airwin $
 +// $Id: plfreetype.h 11973 2011-10-17 21:16:39Z andrewross $
@@ -1084908,9 +1091617,21 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plfreetype.h plplot-trunk/include/
  
  #define FT_Data    _FT_Data_
  
+diff -ruN --exclude .svn plplot-5.9.9/include/plplotcanvas.h plplot-trunk/include/plplotcanvas.h
+--- plplot-5.9.9/include/plplotcanvas.h	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/include/plplotcanvas.h	2012-12-14 08:51:01.723332842 -0700
+@@ -450,7 +450,7 @@
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+ 
+-PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev );
++PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *alt_hue_path );
+ 
+ // Set number of colors in cmap 1
+ 
 diff -ruN --exclude .svn plplot-5.9.9/include/plplotcanvas-hacktext.h plplot-trunk/include/plplotcanvas-hacktext.h
 --- plplot-5.9.9/include/plplotcanvas-hacktext.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plplotcanvas-hacktext.h	2012-01-04 08:45:34.605584480 -0700
++++ plplot-trunk/include/plplotcanvas-hacktext.h	2012-01-04 08:45:34.000000000 -0700
 @@ -15,7 +15,7 @@
  //
  //  You should have received a copy of the GNU Library General Public
@@ -1084922,10 +1091643,10 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplotcanvas-hacktext.h plplot-tru
  //    Federico Mena <federico at nuclecu.unam.mx>
 diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plplot.h
 --- plplot-5.9.9/include/plplot.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plplot.h	2012-01-28 07:51:43.557793050 -0700
++++ plplot-trunk/include/plplot.h	2012-12-14 08:51:01.724332839 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plplot.h 11887 2011-08-16 19:49:14Z hbabcock $
-+// $Id: plplot.h 12146 2012-01-22 00:21:26Z airwin $
++// $Id: plplot.h 12254 2012-10-25 01:33:29Z hezekiahcarty $
  //
  //  Macros and prototypes for the PLplot package.  This header file must
  //  be included by all user codes.
@@ -1084976,6 +1091697,15 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  } PLfGrid;
  
  //
+@@ -459,7 +466,7 @@
+     PLFLT s;                    // saturation
+     PLFLT p;                    // position
+     PLFLT a;                    // alpha (or transparency)
+-    int   rev;                  // if set, interpolate through h=0
++    int   alt_hue_path;         // if set, interpolate through h=0
+ } PLControlPt;
+ 
+ // A PLBufferingCB is a control block for interacting with devices
 @@ -759,15 +766,17 @@
  
  #ifdef PL_DEPRECATED
@@ -1085037,7 +1091767,21 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  // Routine for drawing continous colour legends
  PLDLLIMPEXP void
-@@ -1285,7 +1294,7 @@
+@@ -1246,9 +1255,10 @@
+               PLINT bg_color, PLINT bb_color, PLINT bb_style,
+               PLFLT low_cap_color, PLFLT high_cap_color,
+               PLINT cont_color, PLINT cont_width,
+-              PLFLT ticks, PLINT sub_ticks,
+-              const char *axis_opts, const char *label,
+-              PLINT n_values, const PLFLT *values );
++              PLINT n_labels, PLINT *label_opts, const char *label[],
++              PLINT n_axes, const char *axis_opts[],
++              PLFLT *ticks, PLINT *sub_ticks,
++              PLINT *n_values, const PLFLT * const *values );
+ 
+ // Sets position of the light source
+ PLDLLIMPEXP void
+@@ -1285,7 +1295,7 @@
  // Plots a mesh representation of the function z[x][y].
  
  PLDLLIMPEXP void
@@ -1085046,7 +1091790,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  // Like plmesh, but uses an evaluator function to access z data from zp
  
-@@ -1296,7 +1305,7 @@
+@@ -1296,7 +1306,7 @@
  // Plots a mesh representation of the function z[x][y] with contour
  
  PLDLLIMPEXP void
@@ -1085055,7 +1091799,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
             const PLFLT *clevel, PLINT nlevel );
  
  // Like plmeshc, but uses an evaluator function to access z data from zp
-@@ -1325,7 +1334,7 @@
+@@ -1325,7 +1335,7 @@
  // Plots a 3-d representation of the function z[x][y].
  
  PLDLLIMPEXP void
@@ -1085064,7 +1091808,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
            PLINT nx, PLINT ny, PLINT opt, PLBOOL side );
  
  // Like plot3d, but uses an evaluator function to access z data from zp
-@@ -1337,7 +1346,7 @@
+@@ -1337,7 +1347,7 @@
  // Plots a 3-d representation of the function z[x][y] with contour.
  
  PLDLLIMPEXP void
@@ -1085073,7 +1091817,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
             PLINT nx, PLINT ny, PLINT opt,
             const PLFLT *clevel, PLINT nlevel );
  
-@@ -1351,7 +1360,7 @@
+@@ -1351,7 +1361,7 @@
  // y index limits.
  
  PLDLLIMPEXP void
@@ -1085082,7 +1091826,25 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
              PLINT nx, PLINT ny, PLINT opt,
              const PLFLT *clevel, PLINT nlevel,
              PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax );
-@@ -1609,7 +1618,7 @@
+@@ -1489,7 +1499,7 @@
+ 
+ PLDLLIMPEXP void
+ c_plscmap1l( PLBOOL itype, PLINT npts, const PLFLT *intensity,
+-             const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLBOOL *rev );
++             const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLBOOL *alt_hue_path );
+ 
+ // Set color map 1 colors using a piece-wise linear relationship between
+ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space.
+@@ -1497,7 +1507,7 @@
+ 
+ PLDLLIMPEXP void
+ c_plscmap1la( PLBOOL itype, PLINT npts, const PLFLT *intensity,
+-              const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const PLBOOL *rev );
++              const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const PLBOOL *alt_hue_path );
+ 
+ // Set number of colors in cmap 1
+ 
+@@ -1609,7 +1619,7 @@
  // Shade region.
  
  PLDLLIMPEXP void
@@ -1085091,7 +1091853,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
             PLFLT left, PLFLT right, PLFLT bottom, PLFLT top,
             PLFLT shade_min, PLFLT shade_max,
             PLINT sh_cmap, PLFLT sh_color, PLINT sh_width,
-@@ -1631,7 +1640,7 @@
+@@ -1631,7 +1641,7 @@
              PLPointer pltr_data );
  
  PLDLLIMPEXP void
@@ -1085100,7 +1091862,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
              PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
              const PLFLT *clevel, PLINT nlevel, PLINT fill_width,
              PLINT cont_color, PLINT cont_width,
-@@ -1804,7 +1813,7 @@
+@@ -1804,7 +1814,7 @@
  // plots a 2d image (or a matrix too large for plshade() )
  
  PLDLLIMPEXP void
@@ -1085109,7 +1091871,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
               PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
               PLFLT valuemin, PLFLT valuemax,
               void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ),
-@@ -1826,7 +1835,7 @@
+@@ -1826,7 +1836,7 @@
  // automatically scaled
  
  PLDLLIMPEXP void
@@ -1085118,7 +1091880,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
             PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
             PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax );
  
-@@ -1848,7 +1857,7 @@
+@@ -1848,7 +1858,7 @@
  // Plots the 3d surface representation of the function z[x][y].
  
  PLDLLIMPEXP void
@@ -1085127,7 +1091889,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
              PLINT opt, const PLFLT *clevel, PLINT nlevel );
  
  // Like plsurf3d, but uses an evaluator function to access z data from zp
-@@ -1861,7 +1870,7 @@
+@@ -1861,7 +1871,7 @@
  // index limits.
  
  PLDLLIMPEXP void
@@ -1085136,7 +1091898,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
               PLINT opt, const PLFLT *clevel, PLINT nlevel,
               PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax );
  
-@@ -1927,7 +1936,7 @@
+@@ -1927,7 +1937,7 @@
  // simple arrow plotter.
  
  PLDLLIMPEXP void
@@ -1085145,7 +1091907,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
            void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ),
            PLPointer pltr_data );
  
-@@ -2068,7 +2077,7 @@
+@@ -2068,7 +2078,7 @@
  //
  
  PLDLLIMPEXP PLF2OPS
@@ -1085154,7 +1091916,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  //
  // Returns a pointer to a plf2ops_t stucture with pointers to functions for accessing 2-D data
-@@ -2077,7 +2086,7 @@
+@@ -2077,7 +2087,7 @@
  //
  
  PLDLLIMPEXP PLF2OPS
@@ -1085163,7 +1091925,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  //
  // Returns a pointer to a plf2ops_t stucture with pointers to functions for
-@@ -2089,7 +2098,7 @@
+@@ -2089,7 +2099,7 @@
  //
  
  PLDLLIMPEXP PLF2OPS
@@ -1085172,7 +1091934,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  //
  // Returns a pointer to a plf2ops_t stucture with pointers to functions for
-@@ -2101,7 +2110,7 @@
+@@ -2101,7 +2111,7 @@
  //
  
  PLDLLIMPEXP PLF2OPS
@@ -1085181,7 +1091943,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
  
  // Function evaluators (Should these be deprecated in favor of plf2ops?)
-@@ -2265,7 +2274,7 @@
+@@ -2265,7 +2275,7 @@
  // Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid().
  
  PLDLLIMPEXP void
@@ -1085192,7 +1091954,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplot.h plplot-trunk/include/plpl
  
 diff -ruN --exclude .svn plplot-5.9.9/include/plplotP.h plplot-trunk/include/plplotP.h
 --- plplot-5.9.9/include/plplotP.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plplotP.h	2012-01-04 08:45:34.600584660 -0700
++++ plplot-trunk/include/plplotP.h	2012-01-04 08:45:34.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plplotP.h 11849 2011-08-03 23:11:30Z hezekiahcarty $
 +// $Id: plplotP.h 12095 2011-12-03 08:56:15Z andrewross $
@@ -1085304,7 +1092066,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plplotP.h plplot-trunk/include/plp
  
 diff -ruN --exclude .svn plplot-5.9.9/include/plstrm.h plplot-trunk/include/plstrm.h
 --- plplot-5.9.9/include/plstrm.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plstrm.h	2011-11-02 09:43:07.688985720 -0600
++++ plplot-trunk/include/plstrm.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plstrm.h 11774 2011-06-20 22:09:33Z airwin $
 +// $Id: plstrm.h 11991 2011-10-20 22:02:21Z andrewross $
@@ -1085373,7 +1092135,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plstrm.h plplot-trunk/include/plst
      // present).
 diff -ruN --exclude .svn plplot-5.9.9/include/plxwd.h plplot-trunk/include/plxwd.h
 --- plplot-5.9.9/include/plxwd.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/plxwd.h	2011-11-02 09:43:07.673986268 -0600
++++ plplot-trunk/include/plxwd.h	2011-11-02 09:43:07.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plxwd.h 11749 2011-05-12 20:39:42Z airwin $
 +// $Id: plxwd.h 11975 2011-10-19 11:05:10Z andrewross $
@@ -1085390,7 +1092152,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/plxwd.h plplot-trunk/include/plxwd
  
 diff -ruN --exclude .svn plplot-5.9.9/include/qt.h plplot-trunk/include/qt.h
 --- plplot-5.9.9/include/qt.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/include/qt.h	2011-11-02 09:43:07.695985463 -0600
++++ plplot-trunk/include/qt.h	2011-11-02 09:43:07.000000000 -0600
 @@ -131,7 +131,7 @@
      virtual void drawPolygon( short * x, short * y, PLINT npts );
      virtual void drawText( EscText* txt );
@@ -1085402,7 +1092164,7 @@ diff -ruN --exclude .svn plplot-5.9.9/include/qt.h plplot-trunk/include/qt.h
                                unsigned char *b, PLFLT *alpha, PLINT ncol1 );
 diff -ruN --exclude .svn plplot-5.9.9/lib/csa/CMakeLists.txt plplot-trunk/lib/csa/CMakeLists.txt
 --- plplot-5.9.9/lib/csa/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/csa/CMakeLists.txt	2011-11-28 16:54:36.464436246 -0700
++++ plplot-trunk/lib/csa/CMakeLists.txt	2011-11-28 16:54:36.000000000 -0700
 @@ -33,6 +33,12 @@
  
    add_library(csirocsa ${csirocsa_LIB_SRCS})
@@ -1085418,7 +1092180,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/csa/CMakeLists.txt plplot-trunk/lib/cs
      INSTALL_NAME_DIR "${LIB_DIR}"
 diff -ruN --exclude .svn plplot-5.9.9/lib/csa/csa.c plplot-trunk/lib/csa/csa.c
 --- plplot-5.9.9/lib/csa/csa.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/csa/csa.c	2012-06-08 08:56:05.146654585 -0600
++++ plplot-trunk/lib/csa/csa.c	2012-06-08 08:56:05.000000000 -0600
 @@ -132,7 +132,9 @@
      int nppc;                   // average number of points per square
  };
@@ -1085555,7 +1092317,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/csa/csa.c plplot-trunk/lib/csa/csa.c
          double  b[10];
 diff -ruN --exclude .svn plplot-5.9.9/lib/csa/csa.h plplot-trunk/lib/csa/csa.h
 --- plplot-5.9.9/lib/csa/csa.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/csa/csa.h	2011-11-02 09:43:06.071045026 -0600
++++ plplot-trunk/lib/csa/csa.h	2011-11-02 09:43:06.000000000 -0600
 @@ -34,14 +34,14 @@
  } point;
  #endif
@@ -1085576,7 +1092338,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/csa/csa.h plplot-trunk/lib/csa/csa.h
  CSADLLIMPEXP
 diff -ruN --exclude .svn plplot-5.9.9/lib/csa/version.h plplot-trunk/lib/csa/version.h
 --- plplot-5.9.9/lib/csa/version.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/csa/version.h	2011-11-02 09:43:06.069045100 -0600
++++ plplot-trunk/lib/csa/version.h	2011-11-02 09:43:06.000000000 -0600
 @@ -14,6 +14,6 @@
  #if !defined ( _VERSION_H )
  #define _VERSION_H
@@ -1085587,7 +1092349,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/csa/version.h plplot-trunk/lib/csa/ver
  #endif
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/CMakeLists.txt plplot-trunk/lib/nn/CMakeLists.txt
 --- plplot-5.9.9/lib/nn/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/CMakeLists.txt	2012-06-08 08:56:05.155653954 -0600
++++ plplot-trunk/lib/nn/CMakeLists.txt	2012-06-08 08:56:05.000000000 -0600
 @@ -38,6 +38,13 @@
    endif(BUILD_SHARED_LIBS)
  
@@ -1085629,7 +1092391,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/CMakeLists.txt plplot-trunk/lib/nn/
      ARCHIVE DESTINATION ${LIB_DIR}
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/delaunay.c plplot-trunk/lib/nn/delaunay.c
 --- plplot-5.9.9/lib/nn/delaunay.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/delaunay.c	2011-11-02 09:43:06.273037623 -0600
++++ plplot-trunk/lib/nn/delaunay.c	2011-11-02 09:43:06.000000000 -0600
 @@ -44,6 +44,8 @@
  
  int circle_build( circle* c, point* p0, point* p1, point* p2 );
@@ -1085717,7 +1092479,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/delaunay.c plplot-trunk/lib/nn/dela
              d->n_point_triangles[i] = 0;
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/hash.c plplot-trunk/lib/nn/hash.c
 --- plplot-5.9.9/lib/nn/hash.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/hash.c	2011-11-02 09:43:06.282037292 -0600
++++ plplot-trunk/lib/nn/hash.c	2011-11-02 09:43:06.000000000 -0600
 @@ -47,6 +47,8 @@
      ht_bucket   ** table;
  };
@@ -1085774,7 +1092536,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/hash.c plplot-trunk/lib/nn/hash.c
  static int streq( void* key1, void* key2 )
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/istack.c plplot-trunk/lib/nn/istack.c
 --- plplot-5.9.9/lib/nn/istack.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/istack.c	2011-11-02 09:43:06.277037476 -0600
++++ plplot-trunk/lib/nn/istack.c	2011-11-02 09:43:06.000000000 -0600
 @@ -56,7 +56,7 @@
  {
      if ( s->n == s->nallocated )
@@ -1085786,7 +1092548,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/istack.c plplot-trunk/lib/nn/istack
  
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/istack.h plplot-trunk/lib/nn/istack.h
 --- plplot-5.9.9/lib/nn/istack.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/istack.h	2011-11-02 09:43:06.284037220 -0600
++++ plplot-trunk/lib/nn/istack.h	2011-11-02 09:43:06.000000000 -0600
 @@ -26,7 +26,7 @@
  } istack;
  
@@ -1085798,7 +1092560,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/istack.h plplot-trunk/lib/nn/istack
  int istack_pop( istack* s );
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/lpi.c plplot-trunk/lib/nn/lpi.c
 --- plplot-5.9.9/lib/nn/lpi.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/lpi.c	2011-11-02 09:43:06.286037146 -0600
++++ plplot-trunk/lib/nn/lpi.c	2011-11-02 09:43:06.000000000 -0600
 @@ -50,7 +50,7 @@
      lpi * l = malloc( sizeof ( lpi ) );
  
@@ -1085810,7 +1092572,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/lpi.c plplot-trunk/lib/nn/lpi.c
      {
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nnai.c plplot-trunk/lib/nn/nnai.c
 --- plplot-5.9.9/lib/nn/nnai.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/nnai.c	2011-11-02 09:43:06.291036962 -0600
++++ plplot-trunk/lib/nn/nnai.c	2011-11-02 09:43:06.000000000 -0600
 @@ -46,7 +46,7 @@
      nn_weights* weights;
  };
@@ -1085887,7 +1092649,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nnai.c plplot-trunk/lib/nn/nnai.c
  }
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nncommon.c plplot-trunk/lib/nn/nncommon.c
 --- plplot-5.9.9/lib/nn/nncommon.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/nncommon.c	2011-11-02 09:43:06.288037072 -0600
++++ plplot-trunk/lib/nn/nncommon.c	2011-11-02 09:43:06.000000000 -0600
 @@ -46,7 +46,11 @@
  
  #include "version.h"
@@ -1085983,7 +1092745,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nncommon.c plplot-trunk/lib/nn/nnco
          if ( fclose( f ) != 0 )
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nn.h plplot-trunk/lib/nn/nn.h
 --- plplot-5.9.9/lib/nn/nn.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/nn.h	2011-11-02 09:43:06.279037402 -0600
++++ plplot-trunk/lib/nn/nn.h	2011-11-02 09:43:06.000000000 -0600
 @@ -316,7 +316,7 @@
  
  // Contains version string for the nn package.
@@ -1085995,7 +1092757,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nn.h plplot-trunk/lib/nn/nn.h
  // debugging purposes).
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nnpi.c plplot-trunk/lib/nn/nnpi.c
 --- plplot-5.9.9/lib/nn/nnpi.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/nnpi.c	2011-11-02 09:43:06.276037513 -0600
++++ plplot-trunk/lib/nn/nnpi.c	2011-11-02 09:43:06.000000000 -0600
 @@ -69,7 +69,14 @@
  int circle_contains( circle* c, point* p );
  void delaunay_circles_find( delaunay* d, point* p, int* n, int** out );
@@ -1086163,7 +1092925,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/nnpi.c plplot-trunk/lib/nn/nnpi.c
      orig->z = p->z;
 diff -ruN --exclude .svn plplot-5.9.9/lib/nn/version.h plplot-trunk/lib/nn/version.h
 --- plplot-5.9.9/lib/nn/version.h	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/nn/version.h	2011-11-02 09:43:06.296036779 -0600
++++ plplot-trunk/lib/nn/version.h	2011-11-02 09:43:06.000000000 -0600
 @@ -14,6 +14,6 @@
  #if !defined ( _VERSION_H )
  #define _VERSION_H
@@ -1086174,7 +1092936,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/nn/version.h plplot-trunk/lib/nn/versi
  #endif
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/CMakeLists.txt plplot-trunk/lib/qsastime/CMakeLists.txt
 --- plplot-5.9.9/lib/qsastime/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/CMakeLists.txt	2011-11-28 16:54:36.490435317 -0700
++++ plplot-trunk/lib/qsastime/CMakeLists.txt	2011-11-28 16:54:36.000000000 -0700
 @@ -98,6 +98,12 @@
  add_library(qsastime ${qsastime_LIB_SRCS})
  add_dependencies(qsastime tai-utc.h_built deltaT.h_built)
@@ -1086190,7 +1092952,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/CMakeLists.txt plplot-trunk/l
  endif(MATH_LIB)
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/deltaT-gen.c plplot-trunk/lib/qsastime/deltaT-gen.c
 --- plplot-5.9.9/lib/qsastime/deltaT-gen.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/deltaT-gen.c	2011-11-02 09:43:06.176041178 -0600
++++ plplot-trunk/lib/qsastime/deltaT-gen.c	2011-11-02 09:43:06.000000000 -0600
 @@ -1,4 +1,4 @@
 -//  $Id: deltaT-gen.c 11680 2011-03-27 17:57:51Z airwin $
 +//  $Id: deltaT-gen.c 11971 2011-10-14 09:28:58Z andrewross $
@@ -1086242,7 +1093004,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/deltaT-gen.c plplot-trunk/lib
      rewind( fr ); // Go back to the start of the file
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/deltaT_test.c plplot-trunk/lib/qsastime/deltaT_test.c
 --- plplot-5.9.9/lib/qsastime/deltaT_test.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/deltaT_test.c	2011-11-02 09:43:06.164041618 -0600
++++ plplot-trunk/lib/qsastime/deltaT_test.c	2011-11-02 09:43:06.000000000 -0600
 @@ -1,5 +1,6 @@
  #include "deltaT.h"
  #include "qsastime.h"
@@ -1086252,7 +1093014,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/deltaT_test.c plplot-trunk/li
  {
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dspline.c plplot-trunk/lib/qsastime/dspline.c
 --- plplot-5.9.9/lib/qsastime/dspline.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/dspline.c	2011-11-02 09:43:06.162041691 -0600
++++ plplot-trunk/lib/qsastime/dspline.c	2011-11-02 09:43:06.000000000 -0600
 @@ -22,6 +22,9 @@
  // Fortran to C with the aid of f2c and relicensed for PLplot under the LGPL
  // with the permission of the FreeEOS copyright holder (Alan W. Irwin).
@@ -1086265,7 +1093027,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dspline.c plplot-trunk/lib/qs
  {
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dspline.h plplot-trunk/lib/qsastime/dspline.h
 --- plplot-5.9.9/lib/qsastime/dspline.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/lib/qsastime/dspline.h	2011-11-02 09:43:06.163041655 -0600
++++ plplot-trunk/lib/qsastime/dspline.h	2011-11-02 09:43:06.000000000 -0600
 @@ -0,0 +1,25 @@
 +#ifndef _DSPLINE_H_
 +#define _DSPLINE_H_
@@ -1086294,7 +1093056,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dspline.h plplot-trunk/lib/qs
 +#endif // _DSPLINE_H_
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dsplint.c plplot-trunk/lib/qsastime/dsplint.c
 --- plplot-5.9.9/lib/qsastime/dsplint.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/dsplint.c	2011-11-02 09:43:06.171041362 -0600
++++ plplot-trunk/lib/qsastime/dsplint.c	2011-11-02 09:43:06.000000000 -0600
 @@ -22,6 +22,9 @@
  // Fortran to C with the aid of f2c and relicensed for PLplot under the LGPL
  // with the permission of the FreeEOS copyright holder (Alan W. Irwin).
@@ -1086307,7 +1093069,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dsplint.c plplot-trunk/lib/qs
  
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dsplint.h plplot-trunk/lib/qsastime/dsplint.h
 --- plplot-5.9.9/lib/qsastime/dsplint.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/lib/qsastime/dsplint.h	2011-11-02 09:43:06.174041251 -0600
++++ plplot-trunk/lib/qsastime/dsplint.h	2011-11-02 09:43:06.000000000 -0600
 @@ -0,0 +1,25 @@
 +#ifndef _DSPLINT_H_
 +#define _DSPLINT_H_
@@ -1086336,7 +1093098,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/dsplint.h plplot-trunk/lib/qs
 +#endif  // _DSPLINT_H_
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/qsastime.c plplot-trunk/lib/qsastime/qsastime.c
 --- plplot-5.9.9/lib/qsastime/qsastime.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/qsastime.c	2011-11-02 09:43:06.184040884 -0600
++++ plplot-trunk/lib/qsastime/qsastime.c	2011-11-02 09:43:06.000000000 -0600
 @@ -333,8 +333,8 @@
  
  const char * getDayOfWeek( const MJDtime *MJD )
@@ -1086496,7 +1093258,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/qsastime.c plplot-trunk/lib/q
          else
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/qsastimeP.h.in plplot-trunk/lib/qsastime/qsastimeP.h.in
 --- plplot-5.9.9/lib/qsastime/qsastimeP.h.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/qsastimeP.h.in	2011-11-02 09:43:06.173041288 -0600
++++ plplot-trunk/lib/qsastime/qsastimeP.h.in	2011-11-02 09:43:06.000000000 -0600
 @@ -79,6 +79,5 @@
  QSASTIME_static const char * getMonth( int m );
  QSASTIME_static const char * getLongMonth( int m );
@@ -1086506,7 +1093268,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/qsastimeP.h.in plplot-trunk/l
  #endif
 diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/tai-utc-gen.c plplot-trunk/lib/qsastime/tai-utc-gen.c
 --- plplot-5.9.9/lib/qsastime/tai-utc-gen.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/lib/qsastime/tai-utc-gen.c	2011-11-02 09:43:06.166041544 -0600
++++ plplot-trunk/lib/qsastime/tai-utc-gen.c	2011-11-02 09:43:06.000000000 -0600
 @@ -1,4 +1,4 @@
 -//  $Id: tai-utc-gen.c 11680 2011-03-27 17:57:51Z airwin $
 +//  $Id: tai-utc-gen.c 11971 2011-10-14 09:28:58Z andrewross $
@@ -1086556,7 +1093318,7 @@ diff -ruN --exclude .svn plplot-5.9.9/lib/qsastime/tai-utc-gen.c plplot-trunk/li
      rewind( fr ); // Go back to the start of the file
 diff -ruN --exclude .svn plplot-5.9.9/OLD-README.release plplot-trunk/OLD-README.release
 --- plplot-5.9.9/OLD-README.release	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/OLD-README.release	2011-11-02 09:43:11.089861059 -0600
++++ plplot-trunk/OLD-README.release	2011-11-02 09:43:11.000000000 -0600
 @@ -1,3 +1,1270 @@
 +PLplot Release 5.9.9
 +~~~~~~~~~~~~~~~~~~~~
@@ -1087830,7 +1094592,7 @@ diff -ruN --exclude .svn plplot-5.9.9/OLD-README.release plplot-trunk/OLD-README
  This is a development release of PLplot. It represents the ongoing efforts
 diff -ruN --exclude .svn plplot-5.9.9/pkgcfg/plplot-template.pc.cmake plplot-trunk/pkgcfg/plplot-template.pc.cmake
 --- plplot-5.9.9/pkgcfg/plplot-template.pc.cmake	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/pkgcfg/plplot-template.pc.cmake	2011-11-28 16:54:36.436437247 -0700
++++ plplot-trunk/pkgcfg/plplot-template.pc.cmake	2011-11-28 16:54:36.000000000 -0700
 @@ -4,7 +4,7 @@
  
  Name: PLplot @PC_SHORT_NAME@
@@ -1087842,7 +1094604,7 @@ diff -ruN --exclude .svn plplot-5.9.9/pkgcfg/plplot-template.pc.cmake plplot-tru
  Cflags: -I${includedir} @PC_COMPILE_FLAGS@
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/CMakeLists.txt plplot-trunk/plplot_test/CMakeLists.txt
 --- plplot-5.9.9/plplot_test/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/CMakeLists.txt	2011-11-29 20:50:49.994024726 -0700
++++ plplot-trunk/plplot_test/CMakeLists.txt	2011-11-29 20:50:49.000000000 -0700
 @@ -70,11 +70,14 @@
      )
    list(APPEND SCRIPTS test_c_interactive.sh)
@@ -1088195,7 +1094957,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/CMakeLists.txt plplot-trunk/pl
    set(PERM_SCRIPTS
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/plplot-test-interactive.sh.in plplot-trunk/plplot_test/plplot-test-interactive.sh.in
 --- plplot-5.9.9/plplot_test/plplot-test-interactive.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/plplot-test-interactive.sh.in	2011-11-28 16:54:36.554433028 -0700
++++ plplot-trunk/plplot_test/plplot-test-interactive.sh.in	2011-11-28 16:54:36.000000000 -0700
 @@ -1,6 +1,6 @@
  #!@SH_EXECUTABLE@
  # -*- mode: shell-script -*-
@@ -1088221,9 +1094983,37 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/plplot-test-interactive.sh.in
      INDEX_LIST="$INDEX_LIST $COUNT"
      DIRECTORY[$COUNT]="${EXAMPLES_DIR}/c++"
      COMMAND[$COUNT]="./qt_example"
+diff -ruN --exclude .svn plplot-5.9.9/plplot_test/plplot-test.sh.cmake plplot-trunk/plplot_test/plplot-test.sh.cmake
+--- plplot-5.9.9/plplot_test/plplot-test.sh.cmake	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/plplot_test/plplot-test.sh.cmake	2012-12-14 08:50:54.832375750 -0700
+@@ -1,6 +1,6 @@
+ #!@SH_EXECUTABLE@
+ # -*- mode: shell-script -*-
+-# $Id: plplot-test.sh.cmake 11874 2011-08-12 09:10:30Z andrewross $
++# $Id: plplot-test.sh.cmake 12277 2012-11-19 00:02:13Z airwin $
+ #
+ # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Alan W. Irwin
+ # Copyright (C) 2004  Rafael Laboissiere
+@@ -310,6 +310,7 @@
+ # special case
+ PLD_psc=@PLD_ps@
+ PLD_pscairo=@PLD_pscairo@
++PLD_epscairo=@PLD_epscairo@
+ PLD_pstex=@PLD_pstex@
+ PLD_psttf=@PLD_psttf@
+ # special case
+@@ -355,7 +356,7 @@
+ 
+ # Some devices require special options others do not.
+ case "$device" in
+-   png|pngcairo|jpeg|xfig|svg|svgcairo|bmpqt|jpgqt|pngqt|ppmqt|tiffqt|svgqt|epsqt|pdfqt)
++   png|pngcairo|epscairo|jpeg|xfig|svg|svgcairo|bmpqt|jpgqt|pngqt|ppmqt|tiffqt|svgqt|epsqt|pdfqt)
+       options="-fam -fflen 2"
+       ;;
+    gif)
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_ada.sh.in plplot-trunk/plplot_test/test_ada.sh.in
 --- plplot-5.9.9/plplot_test/test_ada.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_ada.sh.in	2012-06-08 08:56:05.222649259 -0600
++++ plplot-trunk/plplot_test/test_ada.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -30,10 +30,10 @@
  # Skip 17 because it is interactive.
  lang="a"
@@ -1088239,7 +1095029,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_ada.sh.in plplot-trunk/pl
      if [ "$verbose_test" ] ; then
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_c.sh.in plplot-trunk/plplot_test/test_c.sh.in
 --- plplot-5.9.9/plplot_test/test_c.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_c.sh.in	2011-11-02 09:43:06.356034581 -0600
++++ plplot-trunk/plplot_test/test_c.sh.in	2011-11-02 09:43:06.000000000 -0600
 @@ -29,7 +29,7 @@
  # Do the standard non-interactive examples.
  lang="c"
@@ -1088251,7 +1095041,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_c.sh.in plplot-trunk/plpl
  	echo "x${index}${lang}"
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_cxx.sh.in plplot-trunk/plplot_test/test_cxx.sh.in
 --- plplot-5.9.9/plplot_test/test_cxx.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_cxx.sh.in	2012-06-08 08:56:05.197651011 -0600
++++ plplot-trunk/plplot_test/test_cxx.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -31,7 +31,7 @@
  export index lang 
  
@@ -1088263,7 +1095053,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_cxx.sh.in plplot-trunk/pl
  	echo "x${index}"
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_diff.sh.in plplot-trunk/plplot_test/test_diff.sh.in
 --- plplot-5.9.9/plplot_test/test_diff.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_diff.sh.in	2011-11-28 16:54:36.555432993 -0700
++++ plplot-trunk/plplot_test/test_diff.sh.in	2011-11-28 16:54:36.000000000 -0700
 @@ -90,7 +90,7 @@
      missingstdout=""
  
@@ -1088275,7 +1095065,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_diff.sh.in plplot-trunk/p
      for index in ${INDEX_LIST} ; do
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_d.sh.in plplot-trunk/plplot_test/test_d.sh.in
 --- plplot-5.9.9/plplot_test/test_d.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_d.sh.in	2012-06-08 08:56:05.219649469 -0600
++++ plplot-trunk/plplot_test/test_d.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -31,7 +31,7 @@
  # 20-22, 28, and 31 not implemented yet.
  # example 14 excluded until plgdev fixed since the bad driver information
@@ -1088287,7 +1095077,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_d.sh.in plplot-trunk/plpl
      fi
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_f77.sh.in plplot-trunk/plplot_test/test_f77.sh.in
 --- plplot-5.9.9/plplot_test/test_f77.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_f77.sh.in	2011-11-02 09:43:06.354034653 -0600
++++ plplot-trunk/plplot_test/test_f77.sh.in	2011-11-02 09:43:06.000000000 -0600
 @@ -40,7 +40,7 @@
  	echo "x16af"
      fi
@@ -1088312,7 +1095102,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_f77.sh.in plplot-trunk/pl
    cat test.error
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_f95.sh.in plplot-trunk/plplot_test/test_f95.sh.in
 --- plplot-5.9.9/plplot_test/test_f95.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_f95.sh.in	2012-06-08 08:56:05.201650731 -0600
++++ plplot-trunk/plplot_test/test_f95.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -40,7 +40,8 @@
      if [ "$verbose_test" ] ; then
  	echo "x16af"
@@ -1088356,7 +1095146,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_f95.sh.in plplot-trunk/pl
        fi
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_java.sh.in plplot-trunk/plplot_test/test_java.sh.in
 --- plplot-5.9.9/plplot_test/test_java.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_java.sh.in	2012-06-08 08:56:05.207650310 -0600
++++ plplot-trunk/plplot_test/test_java.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -44,7 +44,7 @@
      PLPLOT_CLASSPATH="${javadir}":"${PLPLOT_CLASSPATH}"
  fi
@@ -1088368,7 +1095158,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_java.sh.in plplot-trunk/p
      fi
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_lua.sh.in plplot-trunk/plplot_test/test_lua.sh.in
 --- plplot-5.9.9/plplot_test/test_lua.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_lua.sh.in	2012-06-08 08:56:05.209650170 -0600
++++ plplot-trunk/plplot_test/test_lua.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -32,7 +32,7 @@
  results="$(pwd |sed 's?^/\(.\)/?\1:/?')"
  export results
@@ -1088380,7 +1095170,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_lua.sh.in plplot-trunk/pl
      fi
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_ocaml.sh.in plplot-trunk/plplot_test/test_ocaml.sh.in
 --- plplot-5.9.9/plplot_test/test_ocaml.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_ocaml.sh.in	2012-06-08 08:56:05.225649049 -0600
++++ plplot-trunk/plplot_test/test_ocaml.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -24,7 +24,7 @@
  
  # Do the standard non-interactive examples.
@@ -1088392,7 +1095182,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_ocaml.sh.in plplot-trunk/
      fi
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_octave_interactive.sh.in plplot-trunk/plplot_test/test_octave_interactive.sh.in
 --- plplot-5.9.9/plplot_test/test_octave_interactive.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_octave_interactive.sh.in	2012-01-28 15:13:34.339113234 -0700
++++ plplot-trunk/plplot_test/test_octave_interactive.sh.in	2012-01-28 15:13:34.000000000 -0700
 @@ -42,7 +42,7 @@
  endif
  
@@ -1088404,7 +1095194,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_octave_interactive.sh.in
    tt = deblank (t(i,:)); len = length(tt);
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_octave.sh.in plplot-trunk/plplot_test/test_octave.sh.in
 --- plplot-5.9.9/plplot_test/test_octave.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_octave.sh.in	2012-06-08 08:56:05.212649960 -0600
++++ plplot-trunk/plplot_test/test_octave.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -45,7 +45,7 @@
  endif
  
@@ -1088437,7 +1095227,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_octave.sh.in plplot-trunk
          tt = deblank (t(j,:)); len = length(tt);
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_python.sh.in plplot-trunk/plplot_test/test_python.sh.in
 --- plplot-5.9.9/plplot_test/test_python.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_python.sh.in	2012-06-08 08:56:05.204650521 -0600
++++ plplot-trunk/plplot_test/test_python.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -29,7 +29,7 @@
  # Skip 21 if using Numeric - it doesn't work
  # For 24 you need special fonts installed to get good result.
@@ -1088449,7 +1095239,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_python.sh.in plplot-trunk
  	echo "x${index}"
 diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_tcl.sh.in plplot-trunk/plplot_test/test_tcl.sh.in
 --- plplot-5.9.9/plplot_test/test_tcl.sh.in	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/plplot_test/test_tcl.sh.in	2012-06-08 08:56:05.217649610 -0600
++++ plplot-trunk/plplot_test/test_tcl.sh.in	2012-06-08 08:56:05.000000000 -0600
 @@ -76,7 +76,7 @@
  if [ -n "$is_error" ] ; then
      exit 1
@@ -1088461,7 +1095251,7 @@ diff -ruN --exclude .svn plplot-5.9.9/plplot_test/test_tcl.sh.in plplot-trunk/pl
      fi
 diff -ruN --exclude .svn plplot-5.9.9/README.developers plplot-trunk/README.developers
 --- plplot-5.9.9/README.developers	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/README.developers	2011-11-02 09:43:11.129859596 -0600
++++ plplot-trunk/README.developers	2011-11-02 09:43:11.000000000 -0600
 @@ -1,67 +1,55 @@
  Information for developers on UNIX/Linux
  ----------------------------------------
@@ -1088566,14 +1095356,14 @@ diff -ruN --exclude .svn plplot-5.9.9/README.developers plplot-trunk/README.deve
 +source code, and to apply any styling changes required.
 diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
 --- plplot-5.9.9/README.release	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/README.release	2012-01-28 07:51:44.767749538 -0700
++++ plplot-trunk/README.release	2012-12-14 08:51:05.429311333 -0700
 @@ -1,4 +1,4 @@
 -PLplot Release 5.9.9
 +PLplot Release 5.9.10
  ~~~~~~~~~~~~~~~~~~~~
  This is a development release of PLplot. It represents the ongoing efforts
  of the community to improve the PLplot plotting package. Development
-@@ -25,9 +25,9 @@
+@@ -25,9 +25,11 @@
  
  -1.1 Add full bindings and examples for the D language.
  
@@ -1088582,13 +1095372,27 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
  
 -1. Changes relative to PLplot 5.9.8 (the previous development release)
 +1. Changes relative to PLplot 5.9.9 (the previous development release)
++
++1.1 The format for map data used by plmap has changed
  
  2. Changes relative to PLplot 5.8.0 (the previous stable release)
  
-@@ -89,6 +89,99 @@
+@@ -86,9 +88,111 @@
+ 2.50 Support large polygons
+ 2.51 Complete set of PLplot parameters now available for Fortran
+ 2.52 The plarc function has been added
++2.53 The format for map data used by plmap has changed
  
  OFFICIAL NOTICES FOR USERS
  
++(5.9.10) The current format for maps used by plmap has been deprecated in
++favour of using shapefiles (a standard format widely used for GIS and with
++suitable free data sources available). This requires the shapelib library 
++to be installed. If this library is not installed then by default no map
++support will be available. Support for the old binary format is still 
++available by setting the cmake variable PL_DEPRECATED, however this 
++support will be removed in a future release of PLplot.
++
 +(5.9.10) Those who use the Python version of plgriddata will have to
 +change their use of this function for this release as follows (see
 +examples/xw21.py)
@@ -1088685,7 +1095489,7 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
  (5.9.9) This is a quick release to deal with two broken build issues
  that were recently discovered for our Windows platform.  Windows users should
  avoid 5.9.8 because of these problems for that release, and instead use
-@@ -148,7 +241,7 @@
+@@ -148,7 +252,7 @@
  
  The general documentation and safety justification for such const
  modifier changes to our API is given in
@@ -1088694,12 +1095498,13 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
  Essentially, the above const modifier changes constitute our guarantee
  that the associated arrays are not changed internally by the PLplot
  libraries.
-@@ -351,91 +444,10 @@
+@@ -351,94 +455,23 @@
  good).
  
  
 -0. Tests made for release 5.9.9
 +0. Tests made for release 5.9.10
++
  
 -* (Alan W. Irwin) The scripts/comprehensive_test.sh script was run for
 -  a fully loaded (all Linux bindings other than PDL, all Linux device
@@ -1088782,13 +1095587,27 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
 -  results on Linux) so there may be a mismatch between our cairo
 -  device driver and this newer version of GTK+ that needs to be sorted
 -  out.
++1. Changes relative to PLplot 5.9.9 (the previous development release)
  
 -1. Changes relative to PLplot 5.9.8 (the previous development release)
-+1. Changes relative to PLplot 5.9.9 (the previous development release)
++1.1 The format for map data used by plmap has changed
++
++The format for map data used by plmap is now the shapefile format. 
++This is a widely used standard format and there are many sources of data
++in this format. This replaces the custom binary format that PLplot used
++to use. The support for reading shapefiles is provided by the shapelib 
++library, which is a new dependency for PLplot. If users do not have this
++installed then, by default, they will not get any map capabilites with 
++PLplot. Support for the old format can still be enabled by setting the
++PL_DEPRECATED cmake variable, but this support will be removed in a 
++subsequent PLplot release.
+ 
+-No notable new features.  This is a bug fix release.  See the above
+-announcements.
+ 
+ 2. Changes relative to PLplot 5.8.0 (the previous stable release)
  
- No notable new features.  This is a bug fix release.  See the above
- announcements.
-@@ -1164,7 +1176,7 @@
+@@ -1164,7 +1197,7 @@
  we have now added substantially to the pllegend capabilities. and we
  now believe pllegend is ready for prime time.  The pllegend
  capabilities are documented in our DocBook documentation and
@@ -1088797,7 +1095616,7 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
  
  N.B. The current set of changes required a backwards-incompatible
  change to the pllegend API.  This requires users who tried this new
-@@ -1220,7 +1232,7 @@
+@@ -1220,7 +1253,7 @@
  Previous releases had an implicit limitation with respect to the
  number of vertices in a polygon. This was due to the use of statically
  defined arrays (to avoid allocating and freeing memory for each polygon
@@ -1088806,9 +1095625,53 @@ diff -ruN --exclude .svn plplot-5.9.9/README.release plplot-trunk/README.release
  provided patches to eliminate this limitation. The strategy is
  that for small polygons, the original statically defined arrays
  are used and for large polygons new arrays are allocated and freed.
+@@ -1263,3 +1296,15 @@
+ 
+ The plarc function allows drawing filled and outlined arcs in PLplot.
+ Standard example 3 uses plarc.
++
++2.53 The format for map data used by plmap has changed
++
++The format for map data used by plmap is now the shapefile format.  
++This is a widely used standard format and there are many sources of data
++in this format. This replaces the custom binary format that PLplot used
++to use. The support for reading shapefiles is provided by the shapelib
++library, which is a new dependency for PLplot. If users do not have this
++installed then, by default, they will not get any map capabilites with
++PLplot. Support for the old format can still be enabled by setting the
++PL_DEPRECATED cmake variable, but this support will be removed in a 
++subsequent PLplot release.
+diff -ruN --exclude .svn plplot-5.9.9/README.Release_Manager_Cookbook plplot-trunk/README.Release_Manager_Cookbook
+--- plplot-5.9.9/README.Release_Manager_Cookbook	2011-10-12 18:43:01.000000000 -0600
++++ plplot-trunk/README.Release_Manager_Cookbook	2012-12-14 08:51:01.738332765 -0700
+@@ -32,6 +32,12 @@
+ any changes to the examples themselves (i.e. pages added or removed
+ from an existing example or entirely new examples).
+ 
++You also need to install "xmlto" (in the xmlto debian package).
++xmlto is used to generate some of our older release announcements for
++the website, and could also be used to generate present release
++announcements for the website if desired.  See www/announce/README for
++just how easy this step would be.
++
+ Run (on a Linux host that is capable of building the documentation
+ for the source tree that has all local changes)
+ 
+@@ -69,7 +75,10 @@
+ necessary on modern versions of Ubuntu in order to allow php-based websites
+ like that of PLplot to work when installed in local user directories.
+ 
+-You will also need to install "xml-to" (in the xml-to debian package).
++After the above changes, you must restart the apache server.  On
++Debian this is done with
++
++service apache2 restart
+ 
+ (When user directories are enabled this way, for the above case
+ /home/irwin/public_html/plplot/htdocs, browses as
 diff -ruN --exclude .svn plplot-5.9.9/scripts/CMakeLists.txt plplot-trunk/scripts/CMakeLists.txt
 --- plplot-5.9.9/scripts/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/scripts/CMakeLists.txt	2012-01-04 08:45:31.094710869 -0700
++++ plplot-trunk/scripts/CMakeLists.txt	2012-01-04 08:45:31.000000000 -0700
 @@ -30,8 +30,12 @@
    if(PLD_pstex)
      set(scripts_SCRIPTS ${scripts_SCRIPTS} pstex2eps)
@@ -1088826,7 +1095689,7 @@ diff -ruN --exclude .svn plplot-5.9.9/scripts/CMakeLists.txt plplot-trunk/script
 +
 diff -ruN --exclude .svn plplot-5.9.9/scripts/comprehensive_test.sh plplot-trunk/scripts/comprehensive_test.sh
 --- plplot-5.9.9/scripts/comprehensive_test.sh	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/scripts/comprehensive_test.sh	2011-11-28 16:54:34.975489518 -0700
++++ plplot-trunk/scripts/comprehensive_test.sh	2011-11-28 16:54:34.000000000 -0700
 @@ -68,153 +68,167 @@
  	$* $CMAKE_BUILD_TYPE_OPTION -G "$generator_string" \
          "$SOURCE_TREE" >& "$output"
@@ -1089199,7 +1096062,7 @@ diff -ruN --exclude .svn plplot-5.9.9/scripts/comprehensive_test.sh plplot-trunk
  while [ "$ANSWER" != "yes" -a "$ANSWER" != "no" ] ; do
 diff -ruN --exclude .svn plplot-5.9.9/scripts/style_source.sh plplot-trunk/scripts/style_source.sh
 --- plplot-5.9.9/scripts/style_source.sh	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/scripts/style_source.sh	2012-01-28 07:51:41.685860356 -0700
++++ plplot-trunk/scripts/style_source.sh	2012-01-28 07:51:41.000000000 -0700
 @@ -1,10 +1,10 @@
  #!/bin/bash
  
@@ -1089453,7 +1096316,7 @@ diff -ruN --exclude .svn plplot-5.9.9/scripts/style_source.sh plplot-trunk/scrip
  transform_source "$cppsource_LIST" CPP "comments"
 diff -ruN --exclude .svn plplot-5.9.9/src/CMakeLists.txt plplot-trunk/src/CMakeLists.txt
 --- plplot-5.9.9/src/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/CMakeLists.txt	2011-11-28 16:54:35.276478698 -0700
++++ plplot-trunk/src/CMakeLists.txt	2012-12-14 08:50:53.060385470 -0700
 @@ -29,7 +29,6 @@
    plcore.c
    plctrl.c
@@ -1089490,9 +1096353,46 @@ diff -ruN --exclude .svn plplot-5.9.9/src/CMakeLists.txt plplot-trunk/src/CMakeL
  set(LIB_INSTALL_RPATH ${LIB_DIR})
  if(ENABLE_DYNDRIVERS)
    set(libplplot${LIB_TAG}_LINK_LIBRARIES ${LTDL_LIBRARIES})
+@@ -292,6 +305,36 @@
+     )
+ endif(WITH_FREETYPE)
+ 
++if(HAVE_SHAPELIB)
++  get_source_file_property(PLMAP_COMPILE_PROPS plmap.c COMPILE_FLAGS)
++  # Deal with NOTFOUND case.
++  if(NOT PLMAP_COMPILE_PROPS)
++    set(PLMAP_COMPILE_PROPS)
++  endif(NOT PLMAP_COMPILE_PROPS)
++  set_source_files_properties(plmap.c PROPERTIES COMPILE_FLAGS "${PLMAP_COMPILE_PROPS} -I${SHAPELIB_INCLUDE_DIR}")
++  set(
++    libplplot${LIB_TAG}_LINK_LIBRARIES
++    ${libplplot${LIB_TAG}_LINK_LIBRARIES}
++    ${SHAPELIB_LIBRARIES}
++    )
++  
++  set(LIB_INSTALL_RPATH ${LIB_INSTALL_RPATH} ${SHAPELIB_RPATH})
++
++  # Convert to -L... -l... form.
++  string(REGEX REPLACE "(/[^ ]*)/lib([^ ]*)\\.so" "-L\\1 -l\\2"
++    _SHAPELIB_LINK_FLAGS
++    ${SHAPELIB_LIBRARIES}
++    )
++  string(REGEX REPLACE "(/[^ ]*)/lib([^ ]*)\\.so" "-L\\1 -l\\2"
++    SHAPELIB_LINK_FLAGS
++    ${_SHAPELIB_LINK_FLAGS}
++    )
++  set(
++    libplplot${LIB_TAG}_LINK_FLAGS
++    "${libplplot${LIB_TAG}_LINK_FLAGS} ${SHAPELIB_LINK_FLAGS}"
++    )
++endif(HAVE_SHAPELIB)
++
+ #message(STATUS
+ #"libplplot${LIB_TAG}_LINK_LIBRARIES = ${libplplot${LIB_TAG}_LINK_LIBRARIES}"
+ #)
 diff -ruN --exclude .svn plplot-5.9.9/src/ltdl_win32.c plplot-trunk/src/ltdl_win32.c
 --- plplot-5.9.9/src/ltdl_win32.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/ltdl_win32.c	2011-11-02 09:43:04.521101842 -0600
++++ plplot-trunk/src/ltdl_win32.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: ltdl_win32.c 11938 2011-10-06 18:13:58Z airwin $
 +// $Id: ltdl_win32.c 12015 2011-10-28 19:07:41Z hbabcock $
@@ -1089593,7 +1096493,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/ltdl_win32.c plplot-trunk/src/ltdl_win
  }
 diff -ruN --exclude .svn plplot-5.9.9/src/mt19937ar.c plplot-trunk/src/mt19937ar.c
 --- plplot-5.9.9/src/mt19937ar.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/mt19937ar.c	2011-11-02 09:43:04.514102099 -0600
++++ plplot-trunk/src/mt19937ar.c	2011-11-02 09:43:04.000000000 -0600
 @@ -43,6 +43,11 @@
  // email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
  //
@@ -1089740,7 +1096640,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/mt19937ar.c plplot-trunk/src/mt19937ar
  // These real versions are due to Isaku Wada, 2002/01/09 added
 diff -ruN --exclude .svn plplot-5.9.9/src/pdfutils.c plplot-trunk/src/pdfutils.c
 --- plplot-5.9.9/src/pdfutils.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/pdfutils.c	2012-01-04 08:45:31.774686391 -0700
++++ plplot-trunk/src/pdfutils.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: pdfutils.c 11680 2011-03-27 17:57:51Z airwin $
 +// xId: pdfutils.c 11966 2011-10-14 07:10:05Z andrewross $
@@ -1090464,7 +1097364,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pdfutils.c plplot-trunk/src/pdfutils.c
  }
 diff -ruN --exclude .svn plplot-5.9.9/src/plaffine.c plplot-trunk/src/plaffine.c
 --- plplot-5.9.9/src/plaffine.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plaffine.c	2011-11-28 16:54:35.277478666 -0700
++++ plplot-trunk/src/plaffine.c	2011-11-28 16:54:35.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plaffine.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plaffine.c 12024 2011-11-03 20:10:21Z hbabcock $
@@ -1090632,7 +1097532,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plaffine.c plplot-trunk/src/plaffine.c
  plP_affine_multiply(
 diff -ruN --exclude .svn plplot-5.9.9/src/plarc.c plplot-trunk/src/plarc.c
 --- plplot-5.9.9/src/plarc.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plarc.c	2011-11-28 16:54:35.276478698 -0700
++++ plplot-trunk/src/plarc.c	2011-11-28 16:54:35.000000000 -0700
 @@ -19,16 +19,33 @@
  // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  //
@@ -1090730,7 +1097630,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plarc.c plplot-trunk/src/plarc.c
  void
 diff -ruN --exclude .svn plplot-5.9.9/src/plargs.c plplot-trunk/src/plargs.c
 --- plplot-5.9.9/src/plargs.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plargs.c	2012-01-04 08:45:31.747687361 -0700
++++ plplot-trunk/src/plargs.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plargs.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: plargs.c 12090 2011-12-02 13:19:39Z andrewross $
@@ -1092654,7 +1099554,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plargs.c plplot-trunk/src/plargs.c
      return 0;
 diff -ruN --exclude .svn plplot-5.9.9/src/plbox.c plplot-trunk/src/plbox.c
 --- plplot-5.9.9/src/plbox.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plbox.c	2011-11-02 09:43:04.465103895 -0600
++++ plplot-trunk/src/plbox.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plbox.c 11811 2011-07-12 05:48:39Z airwin $
 +// $Id: plbox.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1092780,7 +1099680,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plbox.c plplot-trunk/src/plbox.c
  
 diff -ruN --exclude .svn plplot-5.9.9/src/plbuf.c plplot-trunk/src/plbuf.c
 --- plplot-5.9.9/src/plbuf.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plbuf.c	2011-11-02 09:43:04.435104994 -0600
++++ plplot-trunk/src/plbuf.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plbuf.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plbuf.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1092968,7 +1099868,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plbuf.c plplot-trunk/src/plbuf.c
          plot_state->color_map[0].icol = pls->icol0;
 diff -ruN --exclude .svn plplot-5.9.9/src/plcont.c plplot-trunk/src/plcont.c
 --- plplot-5.9.9/src/plcont.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plcont.c	2012-01-04 08:45:31.742687536 -0700
++++ plplot-trunk/src/plcont.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plcont.c 11759 2011-06-01 17:41:34Z airwin $
 +// $Id: plcont.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1093081,7 +1099981,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plcont.c plplot-trunk/src/plcont.c
      *ty = y;
 diff -ruN --exclude .svn plplot-5.9.9/src/plcore.c plplot-trunk/src/plcore.c
 --- plplot-5.9.9/src/plcore.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plcore.c	2012-01-28 07:51:42.017848422 -0700
++++ plplot-trunk/src/plcore.c	2012-01-28 07:51:42.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plcore.c 11936 2011-09-25 16:40:30Z airwin $
 +// $Id: plcore.c 12128 2012-01-14 23:17:53Z airwin $
@@ -1093756,10 +1100656,10 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plcore.c plplot-trunk/src/plcore.c
  // Set the floating point precision (in number of places) in numeric labels.
 diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 --- plplot-5.9.9/src/plctrl.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plctrl.c	2011-11-28 16:54:35.269478961 -0700
++++ plplot-trunk/src/plctrl.c	2012-12-14 08:50:53.059385482 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plctrl.c 11935 2011-09-25 16:09:38Z airwin $
-+// $Id: plctrl.c 12050 2011-11-26 06:46:51Z airwin $
++// $Id: plctrl.c 12242 2012-10-05 21:31:41Z andrewross $
  //
  //      Misc. control routines, like begin, end, exit, change graphics/text
  //      mode, change color.  Includes some spillage from plcore.c.  If you
@@ -1094095,7 +1100995,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          plsc->cmap1[i].a = a[i];
      }
  
-@@ -525,53 +590,52 @@
+@@ -525,57 +590,58 @@
  //--------------------------------------------------------------------------
  // plscmap1l()
  //
@@ -1094171,10 +1101071,11 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 +//! coordinates in HLS or RGB space.  The first point MUST correspond to
 +//! position = 0, and the last to position = 1.
 +//!
-+//! The hue is interpolated around the "front" of the color wheel
-+//! (red<->green<->blue<->red) unless the "rev" flag is set, in which case
-+//! interpolation proceeds around the back (reverse) side.  Specifying
-+//! rev=NULL is equivalent to setting rev[]=0 for every control point.
++//! Every change in hue from one control point to the next can be linearly
++//! interpolated in two ways.  The usual (alt_hue_path[i] false) method for the ith interval
++//! uses the dh = h[i+1] - h[i] interval for interpolation.  The alternate (alt_hue_path true) method for the ith interval uses the dh = (h[i+1] - h[i]) - 360 if (h[i+1] - h[i]) is positive or dh = 360 - (h[i+1] - h[i]) if (h[i+1] - h[i]) is negative interval for the interpolation.  Thus, alt_hue_path true interpolation intervals always include hue = 0.
++//! Specifying
++//! alt_hue_path=NULL is equivalent to setting alt_hue_path[]=false for every control point.
 +//!
 +//! Bounds on RGB coordinates:
 +//!	R,G,B		[0, 1]		magnitude
@@ -1094191,11 +1101092,31 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 +//! @param coord1[] first coordinate for each control point
 +//! @param coord2[] second coordinate for each control point
 +//! @param coord3[] third coordinate for each control point
-+//! @param rev[] reverse flag for each control point
++//! @param alt_hue_path[] if true, use alternative hue interpolation path
++//! for the associated interval.
  
  void
  c_plscmap1l( PLINT itype, PLINT npts, const PLFLT *pos,
-@@ -643,9 +707,16 @@
+-             const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *rev )
++             const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *alt_hue_path )
+ {
+     int   n;
+     PLFLT h, l, s, r, g, b;
+@@ -629,10 +695,10 @@
+         plsc->cmap1cp[n].p = pos[n];
+         plsc->cmap1cp[n].a = 1.0;
+ 
+-        if ( rev == NULL )
+-            plsc->cmap1cp[n].rev = 0;
++        if ( alt_hue_path == NULL )
++            plsc->cmap1cp[n].alt_hue_path = 0;
+         else
+-            plsc->cmap1cp[n].rev = rev[n];
++            plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n];
+     }
+ 
+ // Calculate and set color map
+@@ -643,13 +709,21 @@
  //--------------------------------------------------------------------------
  // plscmap1la()
  //
@@ -1094211,11 +1101132,31 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 +//! @param coord2[] second coordinate for each control point
 +//! @param coord3[] third coordinate for each control point
 +//! @param a[] alpha value for each control point
-+//! @param rev[] reverse flag for each control point
++//! @param alt_hue_path[] if true, use alternative hue interpolation path
++//! for the associated interval.
  
  void
  c_plscmap1la( PLINT itype, PLINT npts, const PLFLT *pos,
-@@ -717,9 +788,8 @@
+-              const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const PLINT *rev )
++              const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, const PLINT *alt_hue_path )
+ {
+     int   n;
+     PLFLT h, l, s, r, g, b;
+@@ -703,10 +777,10 @@
+         plsc->cmap1cp[n].p = pos[n];
+         plsc->cmap1cp[n].a = a[n];
+ 
+-        if ( rev == NULL )
+-            plsc->cmap1cp[n].rev = 0;
++        if ( alt_hue_path == NULL )
++            plsc->cmap1cp[n].alt_hue_path = 0;
+         else
+-            plsc->cmap1cp[n].rev = rev[n];
++            plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n];
+     }
+ 
+ // Calculate and set color map
+@@ -717,9 +791,8 @@
  //--------------------------------------------------------------------------
  // plcmap1_calc()
  //
@@ -1094227,7 +1101168,16 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  plcmap1_calc( void )
-@@ -777,9 +847,9 @@
+@@ -745,7 +818,7 @@
+ 
+         // Adjust dh if we are to go around "the back side"
+ 
+-        if ( plsc->cmap1cp[n].rev )
++        if ( plsc->cmap1cp[n].alt_hue_path )
+             dh = ( dh > 0 ) ? dh - 360 : dh + 360;
+ 
+         // Loop over all color cells.  Only interested in cells located (in
+@@ -777,9 +850,9 @@
  
              c_plhlsrgb( h, l, s, &r, &g, &b );
  
@@ -1094240,7 +1101190,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
              plsc->cmap1[i].a = a;
          }
      }
-@@ -841,12 +911,13 @@
+@@ -841,12 +914,13 @@
  //--------------------------------------------------------------------------
  // plscmap0n()
  //
@@ -1094260,7 +1101210,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  c_plscmap0n( PLINT ncol0 )
-@@ -868,13 +939,13 @@
+@@ -868,13 +942,13 @@
          ncol = ncol0;
  
      imax = ncol - 1;
@@ -1094276,7 +1101226,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          {
              plexit( "c_plscmap0n: Insufficient memory" );
          }
-@@ -882,7 +953,7 @@
+@@ -882,7 +956,7 @@
      }
      else
      {
@@ -1094285,7 +1101235,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          {
              plexit( "c_plscmap0n: Insufficient memory" );
          }
-@@ -901,11 +972,17 @@
+@@ -901,11 +975,17 @@
  //--------------------------------------------------------------------------
  // color_set()
  //
@@ -1094306,7 +1101256,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  {
      plsc->cmap0[i].r    = r;
      plsc->cmap0[i].g    = g;
-@@ -920,21 +997,24 @@
+@@ -920,21 +1000,24 @@
  //--------------------------------------------------------------------------
  // plcmap0_def()
  //
@@ -1094338,7 +1101288,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
                  "colors defined by default cmap0 palette file" );
          free( r );
          free( g );
-@@ -956,17 +1036,19 @@
+@@ -956,17 +1039,19 @@
  //--------------------------------------------------------------------------
  // plscmap1n()
  //
@@ -1094365,7 +1101315,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  // No change
  
-@@ -982,7 +1064,7 @@
+@@ -982,7 +1067,7 @@
      else
          ncol = ncol1;
  
@@ -1094374,7 +1101324,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  // Allocate the space
  
-@@ -995,7 +1077,7 @@
+@@ -995,7 +1080,7 @@
      }
      else
      {
@@ -1094383,7 +1101333,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          {
              plexit( "c_plscmap1n: Insufficient memory" );
          }
-@@ -1013,15 +1095,15 @@
+@@ -1013,15 +1098,15 @@
  //--------------------------------------------------------------------------
  // plcmap1_def()
  //
@@ -1094408,7 +1101358,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  plcmap1_def( void )
-@@ -1092,7 +1174,9 @@
+@@ -1092,7 +1177,9 @@
  //--------------------------------------------------------------------------
  // plscolor()
  //
@@ -1094419,7 +1101369,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1105,7 +1189,11 @@
+@@ -1105,7 +1192,11 @@
  //--------------------------------------------------------------------------
  // void value()
  //
@@ -1094432,7 +1101382,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  PLFLT
-@@ -1133,16 +1221,22 @@
+@@ -1133,16 +1224,22 @@
  //--------------------------------------------------------------------------
  // void c_plhlsrgb()
  //
@@ -1094465,7 +1101415,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  c_plhlsrgb( PLFLT h, PLFLT l, PLFLT s, PLFLT *p_r, PLFLT *p_g, PLFLT *p_b )
-@@ -1164,13 +1258,18 @@
+@@ -1164,13 +1261,18 @@
  //--------------------------------------------------------------------------
  // void c_plrgbhls()
  //
@@ -1094491,7 +1101441,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  c_plrgbhls( PLFLT r, PLFLT g, PLFLT b, PLFLT *p_h, PLFLT *p_l, PLFLT *p_s )
-@@ -1220,10 +1319,15 @@
+@@ -1220,10 +1322,15 @@
  //--------------------------------------------------------------------------
  // read_line()
  //
@@ -1094511,7 +1101461,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  static char *
  read_line( char *buffer, int length, FILE *fp )
-@@ -1272,13 +1376,19 @@
+@@ -1272,13 +1379,19 @@
  //--------------------------------------------------------------------------
  // cmap0_palette_read()
  //
@@ -1094535,7 +1101485,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  {
      int  i, err = 0;
      char color_info[COLLEN];
-@@ -1318,10 +1428,10 @@
+@@ -1318,10 +1431,10 @@
      {
          // Allocate arrays to hold r, g, b, and a data for calling routine.
          // The caller must free these after it is finished with them.
@@ -1094550,7 +1101500,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          {
              fclose( fp );
              plexit( "cmap0_palette_read: insufficient memory" );
-@@ -1339,7 +1449,8 @@
+@@ -1339,7 +1452,8 @@
              if ( strlen( color_info ) == 7 )
              {
                  if ( sscanf( color_info, "#%2x%2x%2x",
@@ -1094560,7 +1101510,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
                  {
                      err = 1;
                      break;
-@@ -1349,8 +1460,8 @@
+@@ -1349,8 +1463,8 @@
              else if ( strlen( color_info ) > 9 )
              {
                  if ( sscanf( color_info, "#%2x%2x%2x %lf",
@@ -1094571,7 +1101521,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
                  {
                      err = 1;
                      break;
-@@ -1393,10 +1504,10 @@
+@@ -1393,10 +1507,10 @@
      if ( err )
      {
          *number_colors = 16;
@@ -1094586,7 +1101536,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          {
              plexit( "cmap0_palette_read: insufficient memory" );
          }
-@@ -1419,16 +1530,18 @@
+@@ -1419,16 +1533,18 @@
  //--------------------------------------------------------------------------
  // void c_plspal0(filename)
  //
@@ -1094611,7 +1101561,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
      cmap0_palette_read( filename, &number_colors, &r, &g, &b, &a );
      // Allocate default number of cmap0 colours if cmap0 allocation not
      // done already.
-@@ -1440,7 +1553,7 @@
+@@ -1440,7 +1556,7 @@
      }
      for ( i = 0; i < number_colors; i++ )
      {
@@ -1094620,7 +1101570,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
      }
      free( r );
      free( g );
-@@ -1448,10 +1561,15 @@
+@@ -1448,10 +1564,15 @@
      free( a );
  }
  
@@ -1094640,7 +1101590,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  #define fuzzy_range_check( value, min, max, fuzz, err_number )                                                                        \
      if ( value < ( min - fuzz ) || value > ( max + fuzz ) ) {                                                                         \
          snprintf( msgbuf, MSGLEN, "Unrecognized cmap1 format data line.  Error number is %d. Line is %s\n", err_number, color_info ); \
-@@ -1463,29 +1581,33 @@
+@@ -1463,29 +1584,33 @@
      } else if ( value > max ) {                                                                                                       \
          value = max;                                                                                                                  \
      }
@@ -1094679,18 +1101629,18 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 +    PLBOOL       rgb;
 +    char         color_info[PALLEN];
 +    unsigned int r_i, g_i, b_i;
-+    int          pos_i, rev_i;
++    int          pos_i, alt_hue_path_i;
 +    double       r_d, g_d, b_d, a_d, pos_d;
 +    PLFLT        *r, *g, *b, *a, *pos;
 +    PLINT        *ri, *gi, *bi;
-+    PLBOOL       *rev;
++    PLBOOL       *alt_hue_path;
 +    FILE         *fp;
 +    char         msgbuf[MSGLEN];
 +    char         * save_locale = plsave_set_locale();
  
      rgb            = TRUE;
      err            = 0;
-@@ -1548,19 +1670,19 @@
+@@ -1548,19 +1673,19 @@
          goto finish;
      }
  
@@ -1094703,15 +1101653,15 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
 -    a   = (PLFLT *) malloc( number_colors * sizeof ( PLFLT ) );
 -    pos = (PLFLT *) malloc( number_colors * sizeof ( PLFLT ) );
 -    rev = (PLBOOL *) malloc( number_colors * sizeof ( PLBOOL ) );
-+    r   = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
-+    g   = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
-+    b   = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
-+    ri  = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
-+    gi  = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
-+    bi  = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
-+    a   = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
-+    pos = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
-+    rev = (PLBOOL *) malloc( (size_t) number_colors * sizeof ( PLBOOL ) );
++    r            = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
++    g            = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
++    b            = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
++    ri           = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
++    gi           = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
++    bi           = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) );
++    a            = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
++    pos          = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) );
++    alt_hue_path = (PLBOOL *) malloc( (size_t) number_colors * sizeof ( PLBOOL ) );
  
      if ( format_version == 0 )
      {
@@ -1094720,7 +1101670,68 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          // Old tk file format
          for ( i = 0; i < number_colors; i++ )
          {
-@@ -1662,9 +1784,9 @@
+@@ -1573,7 +1698,7 @@
+             }
+             // Ensure string is null terminated if > 160 characters
+             color_info[PALLEN - 1] = '\0';
+-            return_sscanf          = sscanf( color_info, "#%2x%2x%2x %d %d", &r_i, &g_i, &b_i, &pos_i, &rev_i );
++            return_sscanf          = sscanf( color_info, "#%2x%2x%2x %d %d", &r_i, &g_i, &b_i, &pos_i, &alt_hue_path_i );
+             if ( return_sscanf < 4 || ( return_sscanf_old != 0 && return_sscanf != return_sscanf_old ) )
+             {
+                 snprintf( msgbuf, MSGLEN, "Unrecognized cmap1 format (wrong number of items for version 1 of format) %s\n", color_info );
+@@ -1595,20 +1720,20 @@
+             fuzzy_range_check( pos[i], 0., 1., FUZZ_EPSILON, 4 );
+             if ( return_sscanf == 5 )
+             {
+-                // Next to oldest tk format with rev specified.
+-                rev[i] = (PLBOOL) rev_i;
++                // Next to oldest tk format with alt_hue_path specified.
++                alt_hue_path[i] = (PLBOOL) alt_hue_path_i;
+             }
+         }
+         if ( return_sscanf == 4 )
+         {
+-            // Oldest tk format.  No rev specified.
+-            free( rev );
+-            rev = NULL;
++            // Oldest tk format.  No alt_hue_path specified.
++            free( alt_hue_path );
++            alt_hue_path = NULL;
+         }
+     }
+     else
+     {
+-        // New floating point file version with support for alpha and rev values
++        // New floating point file version with support for alpha and alt_hue_path values
+         for ( i = 0; i < number_colors; i++ )
+         {
+             if ( read_line( color_info, PALLEN, fp ) == NULL )
+@@ -1618,7 +1743,7 @@
+                 fclose( fp );
+                 goto finish;
+             }
+-            if ( sscanf( color_info, "%lf %lf %lf %lf %lf %d", &pos_d, &r_d, &g_d, &b_d, &a_d, &rev_i ) != 6 )
++            if ( sscanf( color_info, "%lf %lf %lf %lf %lf %d", &pos_d, &r_d, &g_d, &b_d, &a_d, &alt_hue_path_i ) != 6 )
+             {
+                 snprintf( msgbuf, MSGLEN, "Unrecognized cmap1 format (wrong number of items for version 2 of format) %s\n", color_info );
+                 plwarn( msgbuf );
+@@ -1647,7 +1772,7 @@
+             fuzzy_range_check( a[i], 0., 1., FUZZ_EPSILON, 9 );
+             fuzzy_range_check( pos[i], 0., 1., FUZZ_EPSILON, 10 );
+ 
+-            rev[i] = (PLBOOL) rev_i;
++            alt_hue_path[i] = (PLBOOL) alt_hue_path_i;
+         }
+     }
+     fclose( fp );
+@@ -1656,15 +1781,15 @@
+     {
+         if ( interpolate )
+         {
+-            c_plscmap1la( rgb, number_colors, pos, r, g, b, a, rev );
++            c_plscmap1la( rgb, number_colors, pos, r, g, b, a, alt_hue_path );
+         }
+         else
          {
              for ( i = 0; i < number_colors; i++ )
              {
@@ -1094733,7 +1101744,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
              }
              c_plscmap1a( ri, gi, bi, a, number_colors );
          }
-@@ -1678,10 +1800,10 @@
+@@ -1678,10 +1803,10 @@
          free( b );
          free( pos );
          number_colors = 2;
@@ -1094748,7 +1101759,16 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
          r[0]          = 0.;
          r[1]          = 1.;
          g[0]          = 0.;
-@@ -1713,8 +1835,9 @@
+@@ -1701,7 +1826,7 @@
+     free( bi );
+     free( a );
+     free( pos );
+-    free( rev );
++    free( alt_hue_path );
+ 
+ finish: plrestore_locale( save_locale );
+ }
+@@ -1713,8 +1838,9 @@
  //--------------------------------------------------------------------------
  // void plwarn()
  //
@@ -1094760,7 +1101780,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  plwarn( const char *errormsg )
-@@ -1738,13 +1861,14 @@
+@@ -1738,13 +1864,14 @@
  //--------------------------------------------------------------------------
  // void plabort()
  //
@@ -1094782,7 +1101802,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  void
  plabort( const char *errormsg )
-@@ -1784,7 +1908,10 @@
+@@ -1784,7 +1911,10 @@
  //--------------------------------------------------------------------------
  // void plsabort()
  //
@@ -1094794,7 +1101814,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1796,13 +1923,15 @@
+@@ -1796,13 +1926,15 @@
  //--------------------------------------------------------------------------
  // void plexit()
  //
@@ -1094817,7 +1101837,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1828,7 +1957,10 @@
+@@ -1828,7 +1960,10 @@
  //--------------------------------------------------------------------------
  // void plsexit()
  //
@@ -1094829,7 +1101849,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1840,11 +1972,11 @@
+@@ -1840,11 +1975,11 @@
  //--------------------------------------------------------------------------
  // void plgra()
  //
@@ -1094846,7 +1101866,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1854,6 +1986,14 @@
+@@ -1854,6 +1989,14 @@
          plP_esc( PLESC_GRAPH, NULL );
  }
  
@@ -1094861,7 +1101881,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  void
  c_plxormod( PLINT mode, PLINT *status )   // xor mode
  {
-@@ -1933,7 +2073,7 @@
+@@ -1933,7 +2076,7 @@
  //--------------------------------------------------------------------------
  // void pltext()
  //
@@ -1094870,7 +1101890,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1946,9 +2086,12 @@
+@@ -1946,9 +2089,12 @@
  //--------------------------------------------------------------------------
  // void pl_cmd()
  //
@@ -1094886,7 +1101906,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -1960,18 +2103,22 @@
+@@ -1960,18 +2106,22 @@
  //--------------------------------------------------------------------------
  // char *plFindCommand
  //
@@ -1094921,7 +1101941,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  char *
-@@ -2044,13 +2191,17 @@
+@@ -2044,13 +2194,17 @@
  //--------------------------------------------------------------------------
  // FILE *plLibOpen(fn)
  //
@@ -1094946,7 +1101966,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  FILE *
-@@ -2072,6 +2223,21 @@
+@@ -2072,6 +2226,21 @@
      return ret;
  }
  
@@ -1094968,7 +1101988,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  PDFstrm *
  plLibOpenPdfstrm( const char *fn )
  {
-@@ -2168,28 +2334,31 @@
+@@ -2168,28 +2337,31 @@
  //--------------------------------------------------------------------------
  // int plFindName
  //
@@ -1095015,7 +1102035,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
      struct stat sbuf;
  
      pldebug( "plFindName", "Trying to find %s\n", p );
-@@ -2200,7 +2369,7 @@
+@@ -2200,7 +2372,7 @@
          {
              // Link is an absolute path
  
@@ -1095024,7 +1102044,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
              p[n] = '\0';
              pldebug( "plFindName", "Link is absolute: %s\n", p );
          }
-@@ -2209,7 +2378,7 @@
+@@ -2209,7 +2381,7 @@
              // Link is relative to its directory; make it absolute
  
              cp = 1 + strrchr( p, '/' );
@@ -1095033,7 +1102053,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
              cp[n] = '\0';
              pldebug( "plFindName",
                  "Link is relative: %s\n\tTotal path:%s\n", cp, p );
-@@ -2248,16 +2417,21 @@
+@@ -2248,16 +2420,21 @@
  //--------------------------------------------------------------------------
  // void plGetName()
  //
@@ -1095060,7 +1102080,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
  // Malloc space for filespec
  
-@@ -2280,21 +2454,23 @@
+@@ -2280,21 +2457,23 @@
          strcat_delim( *filespec );
          strcat( *filespec, filename );
      }
@@ -1095088,7 +1102108,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  #if defined ( MSDOS ) || defined ( WIN32 )
      if ( dirspec[ldirspec - 1] != '\\' )
          strcat( dirspec, "\\" );
-@@ -2310,9 +2486,14 @@
+@@ -2310,9 +2489,14 @@
  //--------------------------------------------------------------------------
  // plcol_interp()
  //
@@ -1095106,7 +1102126,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2348,9 +2529,11 @@
+@@ -2348,9 +2532,11 @@
  //--------------------------------------------------------------------------
  // plOpenFile()
  //
@@ -1095121,7 +1102141,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  #define MAX_NUM_TRIES    10
-@@ -2413,7 +2596,9 @@
+@@ -2413,7 +2599,9 @@
  //--------------------------------------------------------------------------
  // plCloseFile()
  //
@@ -1095132,7 +1102152,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2433,17 +2618,19 @@
+@@ -2433,17 +2621,19 @@
  //--------------------------------------------------------------------------
  // plP_getmember()
  //
@@ -1095158,7 +1102178,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  
      maxlen = strlen( pls->BaseName ) + 10;
      if ( pls->FileName == NULL )
-@@ -2472,16 +2659,19 @@
+@@ -2472,16 +2662,19 @@
  //--------------------------------------------------------------------------
  // plP_sfnam()
  //
@@ -1095183,7 +1102203,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
      pls->OutFile = NULL;
  
      if ( pls->FileName != NULL )
-@@ -2522,7 +2712,9 @@
+@@ -2522,7 +2715,9 @@
  //--------------------------------------------------------------------------
  // plFamInit()
  //
@@ -1095194,7 +1102214,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2545,11 +2737,13 @@
+@@ -2545,11 +2740,13 @@
  //--------------------------------------------------------------------------
  // plGetFam()
  //
@@ -1095213,7 +1102233,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2582,10 +2776,18 @@
+@@ -2582,10 +2779,18 @@
  //--------------------------------------------------------------------------
  // plRotPhy()
  //
@@ -1095236,7 +1102256,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2622,8 +2824,12 @@
+@@ -2622,8 +2827,12 @@
  //--------------------------------------------------------------------------
  // plAllocDev()
  //
@@ -1095251,7 +1102271,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  PLDev *
-@@ -2642,7 +2848,9 @@
+@@ -2642,7 +2851,9 @@
  //--------------------------------------------------------------------------
  // plGinInit()
  //
@@ -1095262,7 +1102282,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2661,7 +2869,11 @@
+@@ -2661,7 +2872,11 @@
  //--------------------------------------------------------------------------
  // plGetInt()
  //
@@ -1095275,7 +1102295,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  PLINT
-@@ -2692,7 +2904,11 @@
+@@ -2692,7 +2907,11 @@
  //--------------------------------------------------------------------------
  // plGetFlt()
  //
@@ -1095288,7 +1102308,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  PLFLT
-@@ -2727,8 +2943,12 @@
+@@ -2727,8 +2946,12 @@
  //--------------------------------------------------------------------------
  // plstrdup()
  //
@@ -1095303,7 +1102323,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  char PLDLLIMPEXP *
-@@ -2747,9 +2967,16 @@
+@@ -2747,9 +2970,16 @@
  //--------------------------------------------------------------------------
  // plsnprintf()
  //
@@ -1095323,7 +1102343,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  int
-@@ -2772,9 +2999,16 @@
+@@ -2772,9 +3002,16 @@
  //--------------------------------------------------------------------------
  // plsnscanf()
  //
@@ -1095343,7 +1102363,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  int
-@@ -2795,7 +3029,9 @@
+@@ -2795,7 +3032,9 @@
  //--------------------------------------------------------------------------
  // plseed()
  //
@@ -1095354,7 +1102374,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  void
-@@ -2807,7 +3043,8 @@
+@@ -2807,7 +3046,8 @@
  //--------------------------------------------------------------------------
  // plrandd()
  //
@@ -1095364,7 +1102384,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  PLFLT
-@@ -2819,13 +3056,15 @@
+@@ -2819,13 +3059,15 @@
  //--------------------------------------------------------------------------
  // plsave_set_locale()
  //
@@ -1095387,7 +1102407,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  //--------------------------------------------------------------------------
  
  char *
-@@ -2865,9 +3104,11 @@
+@@ -2865,9 +3107,11 @@
  //--------------------------------------------------------------------------
  // plrestore_locale()
  //
@@ -1095404,7 +1102424,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plctrl.c plplot-trunk/src/plctrl.c
  void
 diff -ruN --exclude .svn plplot-5.9.9/src/plcvt.c plplot-trunk/src/plcvt.c
 --- plplot-5.9.9/src/plcvt.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plcvt.c	2011-11-02 09:43:04.546100925 -0600
++++ plplot-trunk/src/plcvt.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plcvt.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plcvt.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1095440,7 +1102460,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plcvt.c plplot-trunk/src/plcvt.c
                         ( y - plsc->basecy ) * plsc->cxy ) );
 diff -ruN --exclude .svn plplot-5.9.9/src/pldeprecated.c plplot-trunk/src/pldeprecated.c
 --- plplot-5.9.9/src/pldeprecated.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/pldeprecated.c	2011-11-02 09:43:04.485103162 -0600
++++ plplot-trunk/src/pldeprecated.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: pldeprecated.c 11682 2011-03-31 02:55:49Z airwin $
 +// $Id: pldeprecated.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1095463,7 +1102483,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pldeprecated.c plplot-trunk/src/pldepr
  //   plParseOpts
 diff -ruN --exclude .svn plplot-5.9.9/src/plf2ops.c plplot-trunk/src/plf2ops.c
 --- plplot-5.9.9/src/plf2ops.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plf2ops.c	2011-11-02 09:43:04.467103821 -0600
++++ plplot-trunk/src/plf2ops.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plf2ops.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plf2ops.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1095526,7 +1102546,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plf2ops.c plplot-trunk/src/plf2ops.c
              min = z[i];
 diff -ruN --exclude .svn plplot-5.9.9/src/plfill.c plplot-trunk/src/plfill.c
 --- plplot-5.9.9/src/plfill.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plfill.c	2011-11-02 09:43:04.451104408 -0600
++++ plplot-trunk/src/plfill.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plfill.c 11927 2011-09-15 14:55:03Z andrewross $
 +// $Id: plfill.c 12008 2011-10-28 12:50:46Z andrewross $
@@ -1096203,10 +1103223,10 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfill.c plplot-trunk/src/plfill.c
 +#endif
 diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreetype.c
 --- plplot-5.9.9/src/plfreetype.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plfreetype.c	2012-08-03 15:40:24.509810027 -0600
++++ plplot-trunk/src/plfreetype.c	2012-12-14 08:50:53.060385470 -0700
 @@ -1,8 +1,8 @@
 -// $Id: plfreetype.c 11680 2011-03-27 17:57:51Z airwin $
-+// $Id: plfreetype.c 12198 2012-07-06 20:59:43Z airwin $
++// $Id: plfreetype.c 12243 2012-10-10 22:17:10Z andrewross $
  //
  // Copyright (C) 2002, 2004, 2005  Andrew Roach
  // Copyright (C) 2002  Maurice LeBrun
@@ -1096224,12 +1103244,43 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  static void FT_SetFace( PLStream *pls, PLUNICODE fci );
  static PLFLT CalculateIncrement( int bg, int fg, int levels );
  
-@@ -178,14 +178,14 @@
+@@ -148,7 +148,7 @@
+ //
+ 
+ static void FT_WriteStrW( PLStream *pls, const PLUNICODE  *text, short len, int x, int y );
+-static void FT_StrX_YW( PLStream *pls, const PLUNICODE *text, short len, int *xx, int *yy );
++static void FT_StrX_YW( PLStream *pls, const PLUNICODE *text, short len, int *xx, int *yy, int *overyy, int *underyy );
+ 
+ //--------------------------------------------------------------------------
+ // FT_StrX_YW()
+@@ -161,12 +161,12 @@
+ //--------------------------------------------------------------------------
+ 
+ void
+-FT_StrX_YW( PLStream *pls, const PLUNICODE *text, short len, int *xx, int *yy )
++FT_StrX_YW( PLStream *pls, const PLUNICODE *text, short len, int *xx, int *yy, int *overyy, int *underyy )
+ {
+     FT_Data   *FT = (FT_Data *) pls->FT;
+     short     i   = 0;
+-    FT_Vector akerning;
+-    int       x = 0, y = 0;
++    FT_Vector akerning, adjust;
++    int       x = 0, y = 0, startingy;
+     char      esc;
+ 
+     plgesc( &esc );
+@@ -178,22 +178,45 @@
  // and this is the best thing I could think of.
  //
  
 -    y -= FT->face->size->metrics.height;
-+    y -= (int) FT->face->size->metrics.height;
++    y        -= (int) FT->face->size->metrics.height;
++    startingy = y;
++    *yy       = y; //note height is negative!
++    *overyy   = 0;
++    *underyy  = 0;
++    adjust.x  = 0;
++    adjust.y  = 0;
  
  // walk through the text character by character
      for ( i = 0; i < len; i++ )
@@ -1096242,7 +1103293,42 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
                  continue;
  
              switch ( text[i + 1] )
-@@ -213,7 +213,7 @@
+             {
+             case 'u': // super script
++            case 'U': // super script
++                adjust.y = FT->face->size->metrics.height / 2;
++                adjust.x = 0;
++                FT_Vector_Transform( &adjust, &FT->matrix );
++                x += (int) adjust.x;
++                y -= (int) adjust.y;
++                //calculate excess height from superscripts, this will need changing if scale of sub/superscripts changes
++                *overyy = y - startingy < *overyy ? y - startingy : *overyy;
++                i++;
++                break;
++
+             case 'd': // subscript
+-            case 'U':
+-            case 'D':
++            case 'D': // subscript
++                adjust.y = -FT->face->size->metrics.height / 2;
++                adjust.x = 0;
++                FT_Vector_Transform( &adjust, &FT->matrix );
++                x += (int) adjust.x;
++                y -= (int) adjust.y;
++                //calculate excess depth from subscripts, this will need changing if scale of sub/superscripts changes
++                *underyy = startingy - y < *underyy ? startingy - y : *underyy;
+                 i++;
+                 break;
+             }
+@@ -202,6 +225,7 @@
+         {
+             // FCI in text stream; change font accordingly.
+             FT_SetFace( pls, text[i] );
++            *yy = FT->face->size->metrics.height > -*yy  ? -FT->face->size->metrics.height : *yy;
+         }
+         else
+         {
+@@ -213,7 +237,7 @@
                      text[i],
                      ft_kerning_default,
                      &akerning );
@@ -1096251,7 +1103337,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
              }
  
              //
-@@ -234,8 +234,8 @@
+@@ -234,8 +258,8 @@
              // Y is negative because freetype does things upside down
              //
  
@@ -1096262,7 +1103348,15 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          }
      }
  
-@@ -304,8 +304,8 @@
+@@ -250,7 +274,6 @@
+ //yy=y>> 6;
+ //xx=x>> 6;
+ //
+-    *yy = y;
+     *xx = x;
+ }
+ 
+@@ -304,8 +327,8 @@
      adjust.x = 0;
      adjust.y = 0;
      FT_Vector_Transform( &adjust, &FT->matrix );
@@ -1096273,7 +1103367,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
  // (RL, on 2005-01-25) The computation of cumulated glyph width within
  // the text is done now with full precision, using 26.6 Freetype
-@@ -324,9 +324,9 @@
+@@ -324,9 +347,9 @@
  
      for ( i = 0; i < len; i++ )
      {
@@ -1096285,7 +1103379,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
                  continue;
  
              switch ( text[i + 1] )
-@@ -345,8 +345,8 @@
+@@ -345,8 +368,8 @@
                  adjust.y = FT->face->size->metrics.height / 2;
                  adjust.x = 0;
                  FT_Vector_Transform( &adjust, &FT->matrix );
@@ -1096296,7 +1103390,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
                  i++;
                  break;
  
-@@ -355,8 +355,8 @@
+@@ -355,8 +378,8 @@
                  adjust.y = -FT->face->size->metrics.height / 2;
                  adjust.x = 0;
                  FT_Vector_Transform( &adjust, &FT->matrix );
@@ -1096307,7 +1103401,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
                  i++;
                  break;
              }
-@@ -377,17 +377,17 @@
+@@ -377,17 +400,17 @@
                      text[last_char],
                      text[i],
                      ft_kerning_default, &akerning );
@@ -1096330,7 +1103424,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
              last_char = i;
          }
-@@ -403,14 +403,15 @@
+@@ -403,14 +426,15 @@
  
  void
  FT_PlotChar( PLStream *pls, FT_Data *FT, FT_GlyphSlot slot,
@@ -1096348,7 +1103442,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
      int           xx;
      short         imin, imax, kmin, kmax;
  
-@@ -433,33 +434,33 @@
+@@ -433,33 +457,33 @@
  
      if ( FT->scale != 0.0 )    // scale was set
      {
@@ -1096394,7 +1103488,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          }
      }
      if ( clipxmin > clipxmax )
-@@ -484,8 +485,8 @@
+@@ -484,8 +508,8 @@
          x += slot->bitmap_left;
          y -= slot->bitmap_top;
  
@@ -1096405,7 +1103499,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          for ( i = imin; i < imax; i++ )
          {
              for ( k = 0; k < n; k++ )
-@@ -512,10 +513,10 @@
+@@ -512,10 +536,10 @@
          x += slot->bitmap_left;
          y -= slot->bitmap_top;
  
@@ -1096420,7 +1103514,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          for ( i = imin; i < imax; i++ )
          {
              for ( k = kmin; k < kmax; k++ )
-@@ -540,9 +541,9 @@
+@@ -540,9 +564,9 @@
                              alpha_a = (float) FT->shade / 255.0;
  
                              // alpha_b=1.0-alpha_a;
@@ -1096433,7 +1103527,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
                              //
  
                              //  This next bit of code is, I *think*, computationally
-@@ -554,9 +555,9 @@
+@@ -554,9 +578,9 @@
                              //  Is one faster than the other so that you'd ever notice ?
                              //
  
@@ -1096446,7 +1103540,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
                              FT->set_pixel( pls, x + k, y + i, RGB( R > 255 ? 255 : R, G > 255 ? 255 : G, B > 255 ? 255 : B ) );
                          }
-@@ -659,15 +660,16 @@
+@@ -659,15 +683,16 @@
  
  #if defined ( MSDOS ) || defined ( WIN32 )
  
@@ -1096471,7 +1103565,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          if ( access( "c:\\windows\\fonts\\arial.ttf", F_OK ) == 0 )
          {
              strcpy( font_dir, "c:/windows/fonts/" );
-@@ -681,6 +683,7 @@
+@@ -681,6 +706,7 @@
      }
      else
      {
@@ -1096479,7 +1103573,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          strncat( WINDIR_PATH, "\\fonts\\arial.ttf", PLPLOT_MAX_PATH - 1 - strlen( WINDIR_PATH ) );
          if ( access( WINDIR_PATH, F_OK ) == 0 )
          {
-@@ -693,6 +696,7 @@
+@@ -693,6 +719,7 @@
          else
              plwarn( "Could not find font path; I sure hope you have defined fonts manually !" );
      }
@@ -1096487,7 +1103581,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
      if ( pls->debug )
          fprintf( stderr, "%s\n", font_dir );
-@@ -749,7 +753,7 @@
+@@ -749,7 +776,7 @@
          else
          {
              strncpy( FT->font_name[i], font_dir, PLPLOT_MAX_PATH - 1 );
@@ -1096496,7 +1103590,21 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          }
          FT->font_name[i][PLPLOT_MAX_PATH - 1] = '\0';
  
-@@ -796,7 +800,7 @@
+@@ -768,8 +795,11 @@
+                 fclose( infile );
+             }
+         }
+-        FontLookup[i].fci   = TrueTypeLookup[i].fci;
+-        FontLookup[i].pfont = (unsigned char *) FT->font_name[i];
++        FontLookup[i].fci = TrueTypeLookup[i].fci;
++        if ( FT->font_name[i][0] == '\0' )
++            FontLookup[i].pfont = NULL;
++        else
++            FontLookup[i].pfont = (unsigned char *) FT->font_name[i];
+     }
+ //
+ // Next, we check to see if -drvopt has been used on the command line to
+@@ -796,7 +826,7 @@
  
      if ( fci != FT->fci )
      {
@@ -1096505,7 +1103613,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
          if ( font_name == NULL )
          {
              if ( FT->fci == PL_FCI_IMPOSSIBLE )
-@@ -819,11 +823,16 @@
+@@ -819,11 +849,16 @@
                  if ( FT_New_Face( FT->library, font_name, 0, &FT->face ) )
                      plexit( "FT_SetFace: Error loading a font in freetype" );
              }
@@ -1096524,124 +1103632,299 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  }
  
  //--------------------------------------------------------------------------
-@@ -891,7 +900,7 @@
-         FT_Vector_Transform( &FT->pos, &FT->matrix );
-         FT_Set_Transform( FT->face, &FT->matrix, &FT->pos );
+@@ -838,11 +873,14 @@
+ {
+     FT_Data   *FT = (FT_Data *) pls->FT;
+     int       x, y;
+-    int       w  = 0, h = 0;
++    int       w  = 0, h = 0, overh = 0, underh = 0;
+     PLFLT     *t = args->xform;
+     FT_Matrix matrix;
+     PLFLT     angle = PI * pls->diorot / 2;
+-//
++    PLUNICODE *line = args->unicode_array;
++    int       linelen;
++    int       prevlineheights = 0;
++
+ // Used later in a commented out section (See Rotate The Page), if that
+ // section will never be used again, remove these as well.
+ //      PLINT clxmin, clxmax, clymin, clymax;
+@@ -853,7 +891,7 @@
+     FT_Fixed  height;
+     PLFLT     height_factor;
+ 
+-    if ( ( args->string != NULL ) || ( args->unicode_array_len > 0 ) )
++    if ( ( args->unicode_array_len > 0 ) )
+     {
+ //
+ //   Work out if either the font size, the font face or the
+@@ -876,6 +914,15 @@
+ 
+ 
+ //
++// Split the text into lines based on the newline character
++//
++        while ( line < args->unicode_array + args->unicode_array_len )
++        {
++            linelen = 0;
++            while ( line[linelen] != '\n' && line + linelen < args->unicode_array + args->unicode_array_len )
++                ++linelen;
++
++//
+ //  Now we work out how long the text is (for justification etc...) and how
+ //  high the text is. This is done on UN-TRANSFORMED text, since we will
+ //  apply our own transformations on it later, so it's necessary for us
+@@ -883,15 +930,15 @@
+ //  that calculates the text size.
+ //
+ 
+-        FT->matrix.xx = 0x10000;
+-        FT->matrix.xy = 0x00000;
+-        FT->matrix.yx = 0x00000;
+-        FT->matrix.yy = 0x10000;
++            FT->matrix.xx = 0x10000;
++            FT->matrix.xy = 0x00000;
++            FT->matrix.yx = 0x00000;
++            FT->matrix.yy = 0x10000;
+ 
+-        FT_Vector_Transform( &FT->pos, &FT->matrix );
+-        FT_Set_Transform( FT->face, &FT->matrix, &FT->pos );
++            FT_Vector_Transform( &FT->pos, &FT->matrix );
++            FT_Set_Transform( FT->face, &FT->matrix, &FT->pos );
  
 -        FT_StrX_YW( pls, args->unicode_array, args->unicode_array_len, &w, &h );
-+        FT_StrX_YW( pls, args->unicode_array, (short) args->unicode_array_len, &w, &h );
++            FT_StrX_YW( pls, line, (short) linelen, &w, &h, &overh, &underh );
  
  //
  //      Set up the transformation Matrix
-@@ -921,15 +930,15 @@
-         height = (FT_Fixed) ( 0x10000 * height_factor );
+@@ -916,20 +963,20 @@
+ // always a negative quantity.
+ //
+ 
+-        height_factor = (PLFLT) ( FT->face->ascender - FT->face->descender )
+-                        / FT->face->ascender;
+-        height = (FT_Fixed) ( 0x10000 * height_factor );
++            height_factor = (PLFLT) ( FT->face->ascender - FT->face->descender )
++                            / FT->face->ascender;
++            height = (FT_Fixed) ( 0x10000 * height_factor );
  
  #ifdef DJGPP
 -        FT->matrix.xx = height * t[0];
 -        FT->matrix.xy = height * t[2];
 -        FT->matrix.yx = height * t[1];
 -        FT->matrix.yy = height * t[3];
-+        FT->matrix.xx = (FT_Fixed) ( (PLFLT) height * t[0] );
-+        FT->matrix.xy = (FT_Fixed) ( (PLFLT) height * t[2] );
-+        FT->matrix.yx = (FT_Fixed) ( (PLFLT) height * t[1] );
-+        FT->matrix.yy = (FT_Fixed) ( (PLFLT) height * t[3] );
++            FT->matrix.xx = (FT_Fixed) ( (PLFLT) height * t[0] );
++            FT->matrix.xy = (FT_Fixed) ( (PLFLT) height * t[2] );
++            FT->matrix.yx = (FT_Fixed) ( (PLFLT) height * t[1] );
++            FT->matrix.yy = (FT_Fixed) ( (PLFLT) height * t[3] );
  #else
 -        FT->matrix.xx = height * t[0];
 -        FT->matrix.xy = height * t[1];
 -        FT->matrix.yx = height * t[2];
 -        FT->matrix.yy = height * t[3];
-+        FT->matrix.xx = (FT_Fixed) ( (PLFLT) height * t[0] );
-+        FT->matrix.xy = (FT_Fixed) ( (PLFLT) height * t[1] );
-+        FT->matrix.yx = (FT_Fixed) ( (PLFLT) height * t[2] );
-+        FT->matrix.yy = (FT_Fixed) ( (PLFLT) height * t[3] );
++            FT->matrix.xx = (FT_Fixed) ( (PLFLT) height * t[0] );
++            FT->matrix.xy = (FT_Fixed) ( (PLFLT) height * t[1] );
++            FT->matrix.yx = (FT_Fixed) ( (PLFLT) height * t[2] );
++            FT->matrix.yy = (FT_Fixed) ( (PLFLT) height * t[3] );
  #endif
  
  
-@@ -943,17 +952,17 @@
-         Cos_A = cos( angle );
-         Sin_A = sin( angle );
+@@ -940,22 +987,22 @@
+ //  will use freetypes matrix math stuff to do this for us.
+ //
+ 
+-        Cos_A = cos( angle );
+-        Sin_A = sin( angle );
++            Cos_A = cos( angle );
++            Sin_A = sin( angle );
  
 -        matrix.xx = (FT_Fixed) 0x10000 * Cos_A;
-+        matrix.xx = (FT_Fixed) ( (PLFLT) 0x10000 * Cos_A );
++            matrix.xx = (FT_Fixed) ( (PLFLT) 0x10000 * Cos_A );
  
  #ifdef DJGPP
 -        matrix.xy = (FT_Fixed) 0x10000 * Sin_A * -1;
 -        matrix.yx = (FT_Fixed) 0x10000 * Sin_A;
-+        matrix.xy = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A * -1.0 );
-+        matrix.yx = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A );
++            matrix.xy = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A * -1.0 );
++            matrix.yx = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A );
  #else
 -        matrix.xy = (FT_Fixed) 0x10000 * Sin_A;
 -        matrix.yx = (FT_Fixed) 0x10000 * Sin_A * -1;
-+        matrix.xy = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A );
-+        matrix.yx = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A * -1.0 );
++            matrix.xy = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A );
++            matrix.yx = (FT_Fixed) ( (PLFLT) 0x10000 * Sin_A * -1.0 );
  #endif
  
 -        matrix.yy = (FT_Fixed) 0x10000 * Cos_A;
-+        matrix.yy = (FT_Fixed) ( (PLFLT) 0x10000 * Cos_A );
++            matrix.yy = (FT_Fixed) ( (PLFLT) 0x10000 * Cos_A );
  
-         FT_Matrix_Multiply( &matrix, &FT->matrix );
+-        FT_Matrix_Multiply( &matrix, &FT->matrix );
++            FT_Matrix_Multiply( &matrix, &FT->matrix );
  
-@@ -997,21 +1006,21 @@
  
-         if ( FT->scale != 0.0 ) // scale was set
-         {
+ //       Calculate a Vector from the matrix
+@@ -967,7 +1014,7 @@
+ //
+ 
+ 
+-        FT_Vector_Transform( &FT->pos, &FT->matrix );
++            FT_Vector_Transform( &FT->pos, &FT->matrix );
+ 
+ 
+ //    Transform the font face
+@@ -979,7 +1026,7 @@
+ // it is asked for.
+ //
+ 
+-        FT_Set_Transform( FT->face, &FT->matrix, &FT->pos );
++            FT_Set_Transform( FT->face, &FT->matrix, &FT->pos );
+ 
+ 
+ //                            Rotate the Page
+@@ -995,51 +1042,51 @@
+ //   Convert into normal coordinates from virtual coordinates
+ //
+ 
+-        if ( FT->scale != 0.0 ) // scale was set
+-        {
 -            x = args->x / FT->scale;
-+            x = (int) ( args->x / FT->scale );
++            if ( FT->scale != 0.0 )             // scale was set
++            {
++                x = (int) ( args->x / FT->scale );
  
-             if ( FT->invert_y == 1 )
+-            if ( FT->invert_y == 1 )
 -                y = FT->ymax - ( args->y / FT->scale );
-+                y = (int) ( FT->ymax - ( args->y / FT->scale ) );
++                if ( FT->invert_y == 1 )
++                    y = (int) ( FT->ymax - ( args->y / FT->scale ) );
++                else
++                    y = (int) ( args->y / FT->scale );
++            }
              else
 -                y = args->y / FT->scale;
-+                y = (int) ( args->y / FT->scale );
-         }
-         else
-         {
+-        }
+-        else
+-        {
 -            x = args->x / FT->scalex;
-+            x = (int) ( args->x / FT->scalex );
++            {
++                x = (int) ( args->x / FT->scalex );
  
-             if ( FT->invert_y == 1 )
+-            if ( FT->invert_y == 1 )
 -                y = FT->ymax - ( args->y / FT->scaley );
-+                y = (int) ( FT->ymax - ( args->y / FT->scaley ) );
-             else
+-            else
 -                y = args->y / FT->scaley;
-+                y = (int) ( args->y / FT->scaley );
-         }
+-        }
++                if ( FT->invert_y == 1 )
++                    y = (int) ( FT->ymax - ( args->y / FT->scaley ) );
++                else
++                    y = (int) ( args->y / FT->scaley );
++            }
  
-         //          Adjust for the justification and character height
-@@ -1063,8 +1072,8 @@
-         if ( ( args->unicode_array_len == 2 )
-              && ( args->unicode_array[0] == ( PL_FCI_MARK | 0x004 ) ) )
-         {
+-        //          Adjust for the justification and character height
+-        //
+-        //  Eeeksss... this wasn't a nice bit of code to work out, let me tell you.
+-        //  I could not work out an entirely satisfactory solution that made
+-        //  logical sense, so came up with an "illogical" one as well.
+-        //  The logical one works fine for text in the normal "portrait"
+-        //  orientation, and does so for reasons you might expect it to work; But
+-        //  for all other orientations, the text's base line is either a little
+-        //  high, or a little low. This is because of the way the base-line pos
+-        //  is calculated from the decender height. The "dodgie" way of calculating
+-        //  the position is to use the character height here, then adjust for the
+-        //  decender height by a three-fold factor later on. That approach seems to
+-        //  work a little better for rotated pages, but why it should be so, I
+-        //  don't understand. You can compile in or out which way you want it by
+-        //  defining "DODGIE_DECENDER_HACK".
+-        //
+-        //  note: the logic of the page rotation coming up next is that we pump in
+-        //  the justification factor and then use freetype to rotate and transform
+-        //  the values, which we then use to change the plotting location.
+-        //
++            //          Adjust for the justification and character height
++            //
++            //  Eeeksss... this wasn't a nice bit of code to work out, let me tell you.
++            //  I could not work out an entirely satisfactory solution that made
++            //  logical sense, so came up with an "illogical" one as well.
++            //  The logical one works fine for text in the normal "portrait"
++            //  orientation, and does so for reasons you might expect it to work; But
++            //  for all other orientations, the text's base line is either a little
++            //  high, or a little low. This is because of the way the base-line pos
++            //  is calculated from the decender height. The "dodgie" way of calculating
++            //  the position is to use the character height here, then adjust for the
++            //  decender height by a three-fold factor later on. That approach seems to
++            //  work a little better for rotated pages, but why it should be so, I
++            //  don't understand. You can compile in or out which way you want it by
++            //  defining "DODGIE_DECENDER_HACK".
++            //
++            //  note: the logic of the page rotation coming up next is that we pump in
++            //  the justification factor and then use freetype to rotate and transform
++            //  the values, which we then use to change the plotting location.
++            //
+ 
+ 
+ #ifdef DODGIE_DECENDER_HACK
+-        adjust.y = h;
++            adjust.y = h;
+ #else
+-        adjust.y = 0;
++            adjust.y = 0;
+ #endif
+ 
+ // (RL, on 2005-01-24) The code below uses floating point and division
+@@ -1060,14 +1107,14 @@
+ // only one glyph in the string in this case, we are okay here).
+ //
+ 
+-        if ( ( args->unicode_array_len == 2 )
+-             && ( args->unicode_array[0] == ( PL_FCI_MARK | 0x004 ) ) )
+-        {
 -            adjust.x = args->just * ROUND( FT->face->glyph->metrics.width / 64.0 );
 -            adjust.y = (FT_Pos) ROUND( FT->face->glyph->metrics.height / 128.0 );
-+            adjust.x = (FT_Pos) ( args->just * ROUND( (PLFLT) FT->face->glyph->metrics.width / 64.0 ) );
-+            adjust.y = (FT_Pos) ROUND( (PLFLT) FT->face->glyph->metrics.height / 128.0 );
-         }
-         else
-         {
-@@ -1078,16 +1087,16 @@
+-        }
+-        else
+-        {
++            if ( ( args->unicode_array_len == 2 )
++                 && ( args->unicode_array[0] == ( PL_FCI_MARK | 0x004 ) ) )
++            {
++                adjust.x = (FT_Pos) ( args->just * ROUND( (PLFLT) FT->face->glyph->metrics.width / 64.0 ) );
++                adjust.y = (FT_Pos) ROUND( (PLFLT) FT->face->glyph->metrics.height / 128.0 );
++            }
++            else
++            {
+ // (RL, on 2005-01-21) The vertical adjustment is set below, making
+ // the DODGIE conditional moot.  I use the value of h as return by FT_StrX_YW,
+ // which should correspond to the total height of the text being
+@@ -1077,17 +1124,24 @@
+ // height_factor below.
  //
  
-             adjust.y = (FT_Pos)
+-            adjust.y = (FT_Pos)
 -                       ROUND( FT->face->size->metrics.height / height_factor / 128.0 );
-+                       ROUND( (PLFLT) FT->face->size->metrics.height / height_factor / 128.0 );
-             adjust.x = (FT_Pos) ( args->just * ROUND( w / 64.0 ) );
-         }
+-            adjust.x = (FT_Pos) ( args->just * ROUND( w / 64.0 ) );
+-        }
++                adjust.y = (FT_Pos)
++                           ROUND( (PLFLT) FT->face->size->metrics.height / height_factor / 128.0 - ( prevlineheights + overh ) / 64.0 );
++                adjust.x = (FT_Pos) ( args->just * ROUND( w / 64.0 ) );
++            }
++
++            FT_Vector_Transform( &adjust, &FT->matrix );             // was /&matrix); -  was I using the wrong matrix all this time ?
  
-         FT_Vector_Transform( &adjust, &FT->matrix ); // was /&matrix); -  was I using the wrong matrix all this time ?
+-        FT_Vector_Transform( &adjust, &FT->matrix ); // was /&matrix); -  was I using the wrong matrix all this time ?
++            x -= (int) adjust.x;
++            y += (int) adjust.y;
  
 -        x -= adjust.x;
 -        y += adjust.y;
-+        x -= (int) adjust.x;
-+        y += (int) adjust.y;
++            FT_WriteStrW( pls, line, (short) linelen, x, y );             // write it out
  
 -        FT_WriteStrW( pls, args->unicode_array, args->unicode_array_len, x, y ); // write it out
-+        FT_WriteStrW( pls, args->unicode_array, (short) args->unicode_array_len, x, y ); // write it out
++//
++// Move to the next line
++//
++            line            += linelen + 1;
++            prevlineheights += h + overh + underh;
++        }
      }
      else
      {
-@@ -1106,7 +1115,7 @@
+@@ -1106,7 +1160,7 @@
  void plD_FreeType_Destroy( PLStream *pls )
  {
      FT_Data *FT = (FT_Data *) pls->FT;
@@ -1096650,7 +1103933,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
      if ( FT )
      {
-@@ -1176,9 +1185,9 @@
+@@ -1176,9 +1230,9 @@
  
          for ( j = 0, k = ncol0_org + i - 1; j < ncol0_width; j++, k += ( ncol0_org - 1 ) )
          {
@@ -1096663,7 +1103946,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
              if ( ( r < 0 ) || ( g < 0 ) || ( b < 0 ) )
                  plscol0( k, 0, 0, 0 );
              else
-@@ -1209,21 +1218,21 @@
+@@ -1209,21 +1263,21 @@
  
      if ( FT->scale != 0.0 )    // scale was set
      {
@@ -1096691,7 +1103974,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
      }
  
  
-@@ -1251,8 +1260,8 @@
+@@ -1251,8 +1305,8 @@
  
      adjust.x = 0;
      FT_Vector_Transform( &adjust, &FT->matrix );
@@ -1096702,7 +1103985,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
      plgfci( &fci );
      FT_SetFace( pls, fci );
-@@ -1270,8 +1279,8 @@
+@@ -1270,8 +1324,8 @@
  // but it is as good a way as I can think of.
  //
  
@@ -1096715,7 +1103998,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plfreetype.c plplot-trunk/src/plfreety
  
 diff -ruN --exclude .svn plplot-5.9.9/src/plgradient.c plplot-trunk/src/plgradient.c
 --- plplot-5.9.9/src/plgradient.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plgradient.c	2012-01-04 08:45:31.749687289 -0700
++++ plplot-trunk/src/plgradient.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plgradient.c 11738 2011-05-01 19:14:40Z airwin $
 +// $Id: plgradient.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1096780,7 +1104063,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plgradient.c plplot-trunk/src/plgradie
      plFree2dGrid( z, NX, NY );
 diff -ruN --exclude .svn plplot-5.9.9/src/plgridd.c plplot-trunk/src/plgridd.c
 --- plplot-5.9.9/src/plgridd.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plgridd.c	2011-11-02 09:43:04.544100999 -0600
++++ plplot-trunk/src/plgridd.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,6 +1,6 @@
  //
  // plgridd.c: Plot grids data from irregularly sampled data.
@@ -1096973,7 +1104256,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plgridd.c plplot-trunk/src/plgridd.c
          for ( j = 0; j < nptsy; j++ )
 diff -ruN --exclude .svn plplot-5.9.9/src/plimage.c plplot-trunk/src/plimage.c
 --- plplot-5.9.9/src/plimage.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plimage.c	2012-01-04 08:45:31.759686931 -0700
++++ plplot-trunk/src/plimage.c	2012-01-04 08:45:31.000000000 -0700
 @@ -56,23 +56,26 @@
      plP_esc( PLESC_IMAGEOPS, &op );
  }
@@ -1097047,10 +1104330,10 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plimage.c plplot-trunk/src/plimage.c
  {
 diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
 --- plplot-5.9.9/src/pllegend.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/pllegend.c	2012-06-08 08:56:05.112656968 -0600
++++ plplot-trunk/src/pllegend.c	2012-12-14 08:50:53.062385463 -0700
 @@ -1,4 +1,4 @@
 -// $Id: pllegend.c 11939 2011-10-07 07:00:30Z arjenmarkus $
-+// $Id: pllegend.c 12166 2012-02-15 07:37:17Z airwin $
++// $Id: pllegend.c 12281 2012-11-23 21:27:51Z andrewross $
  // All routines that help to create a discrete legend (pllegend) or
  // a continuous legend (plcolorbar).
  //
@@ -1097230,7 +1104513,55 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
  
      // Start preparing data to help plot the label or
      // calculate the corresponding bounding box changes.
-@@ -1489,11 +1493,11 @@
+@@ -1433,18 +1437,26 @@
+ //! @param cont_width Contour width for PL_COLORBAR_SHADE plots.  This is
+ //! passed directly to plshades, so it will be interpreted according to the
+ //! design of plshades.
+-//! @param ticks Spacing of major ticks, as for plbox.
+-//! @param sub_ticks Number of subticks, as for plbox.
+-//! @param axis_opts Axis options for the colorbar's major axis, as for plbox.
+-//! @param label Text label for the colorbar.  No label is drawn if no
++//! @param n_labels Number of labels to place around the colorbar
++//! @param label_opts Options for each label.  n_label total values.
++//! @param labels Text labels for the colorbar. No label is drawn if no
+ //! label position is specified with one of the
+-//! PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM) bits in opt.
+-//! @param n_values Number of elements in the values array.
++//! PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM) bits in the corresponding
++//! label_opts field.
++//! @param n_axes Number of axis definitions provided.  Must be >= 1.
++//! @param axis_opts Axis options for the colorbar's major axis, as for plbox.
++//! n_axes values in the array.
++//! @param ticks Spacing of major ticks, as for plbox.  n_axes values in the
++//! array.
++//! @param sub_ticks Number of subticks, as for plbox.  n_axes values in the
++//! array.
++//! @param n_values Number of elements in each values array.
+ //! @param values Numeric values for the data range represented by the
+ //! colorbar.  For PL_COLORBAR_SHADE, this should include one value per break
+ //! between segments.  For PL_COLORBAR_IMAGE and PL_COLORBAR_GRADIENT this
+ //! includes two values, one for the maximum value on the scale and one for the
+-//! minimum value.
++//! minimum value.  The first entry will be used to render the colorbar
++//! contents.  All other entries will be used only for axis rendering.
+ //!
+ 
+ void
+@@ -1454,9 +1466,10 @@
+               PLINT bg_color, PLINT bb_color, PLINT bb_style,
+               PLFLT low_cap_color, PLFLT high_cap_color,
+               PLINT cont_color, PLINT cont_width,
+-              PLFLT ticks, PLINT sub_ticks,
+-              const char *axis_opts, const char *label,
+-              PLINT n_values, const PLFLT *values )
++              PLINT n_labels, PLINT *label_opts, const char *labels[],
++              PLINT n_axes, const char *axis_opts[],
++              PLFLT *ticks, PLINT *sub_ticks,
++              PLINT *n_values, const PLFLT * const *values )
+ {
+     // Min and max values
+     // Assumes that the values array is sorted from smallest to largest
+@@ -1489,11 +1502,11 @@
      PLFLT xwmin_save, xwmax_save, ywmin_save, ywmax_save;
      // Saved external normalized coordinates of viewport.
      // (These are actual values used only for the restore.)
@@ -1097244,7 +1104575,13 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
  
      // Active attributes to be saved and restored afterward.
      PLINT col0_save       = plsc->icol0,
-@@ -1528,16 +1532,16 @@
+@@ -1523,24 +1536,26 @@
+     // colorbar minus decorated colorbar, and the dml suffix refers to
+     // decorated colorbar minus labelled and decorated colorbar.)
+     PLFLT dx_subpage_omd, dy_subpage_omd, dx_subpage_dml, dy_subpage_dml;
++    PLFLT dx_subpage_omd_accu = 0.0, dy_subpage_omd_accu = 0.0, dx_subpage_dml_accu = 0.0, dy_subpage_dml_accu = 0.0;
+     // Normalized subpage coordinates of the top left of undecorated
+     // colorbar,
      PLFLT plot_x_subpage, plot_y_subpage;
  
      // Position of the undecorated colorbar in normalized subpage coordinates.
@@ -1097263,8 +1104600,348 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
 +    PLINT  i, j, ni = 0, nj = 0, n_steps;
      PLFLT  step_size;
  
-     PLBOOL if_edge;
-@@ -1962,7 +1966,7 @@
+-    PLBOOL if_edge;
++    PLBOOL if_edge   = 0;
++    PLBOOL if_edge_b = 0, if_edge_c = 0, if_edge_u = 0, if_edge_w = 0;
+ 
+     // Ratio of normalized subpage coordinates to mm coordinates in
+     // x and y.
+@@ -1587,6 +1602,12 @@
+         return;
+     }
+ 
++    if ( n_axes < 1 )
++    {
++        plabort( "plcolorbar: At least one axis must be specified" );
++        return;
++    }
++
+     // xdmin_save, etc., are the actual external relative viewport
+     // coordinates within the current sub-page used only for
+     // restoration at the end.
+@@ -1621,14 +1642,14 @@
+             opt = opt | PL_COLORBAR_ORIENT_RIGHT;
+     }
+ 
+-    if_edge = plP_stsearch( axis_opts, 'b' ) &&
+-              !plP_stsearch( axis_opts, 'u' ) &&
+-              plP_stsearch( axis_opts, 'c' ) &&
+-              !plP_stsearch( axis_opts, 'w' );
+-
+-    min_value = values[0];
+-    max_value = values[ n_values - 1 ];
+-    max_abs   = MAX( fabs( min_value ), fabs( max_value ) );
++    for ( i = 0; i < n_axes; i++ )
++    {
++        if_edge_b = if_edge_b || plP_stsearch( axis_opts[i], 'b' );
++        if_edge_c = if_edge_c || plP_stsearch( axis_opts[i], 'c' );
++        if_edge_u = if_edge_u || plP_stsearch( axis_opts[i], 'u' );
++        if_edge_w = if_edge_w || plP_stsearch( axis_opts[i], 'w' );
++    }
++    if_edge = if_edge_b && if_edge_c && !( if_edge_u || if_edge_w );
+ 
+     // Assumes that the colors array is sorted from smallest to largest.
+     plgcmap1_range( &min_color, &max_color );
+@@ -1639,6 +1660,8 @@
+                      adopted_to_subpage_x( 0. );
+     colorbar_height = adopted_to_subpage_y( y_length ) -
+                       adopted_to_subpage_y( 0. );
++    colorbar_width_d   = colorbar_width;
++    colorbar_height_d  = colorbar_height;
+     colorbar_width_mm  = colorbar_width / spxpmm;
+     colorbar_height_mm = colorbar_height / spypmm;
+     // Extent of cap in normalized subpage coordinates in either X or Y
+@@ -1654,111 +1677,141 @@
+         cap_extent_mm = cap_extent / spypmm;
+     }
+ 
+-    // Specify the proper window ranges for colorbar depending on
+-    // orientation.
+-    if ( opt & PL_COLORBAR_ORIENT_RIGHT )
+-    {
+-        wx_min = min_value;
+-        wx_max = max_value;
+-        wy_min = 0.0;
+-        wy_max = max_abs;
+-    }
+-    else if ( opt & PL_COLORBAR_ORIENT_TOP )
+-    {
+-        wx_min = 0.0;
+-        wx_max = max_abs;
+-        wy_min = min_value;
+-        wy_max = max_value;
+-    }
+-    else if ( opt & PL_COLORBAR_ORIENT_LEFT )
+-    {
+-        wx_min = max_value;
+-        wx_max = min_value;
+-        wy_min = 0.0;
+-        wy_max = max_abs;
+-    }
+-    else if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
++    for ( i = n_axes - 1; i >= 0; i-- )
+     {
+-        wx_min = 0.0;
+-        wx_max = max_abs;
+-        wy_min = max_value;
+-        wy_max = min_value;
+-    }
+-    else
+-    {
+-        plabort( "plcolorbar: Invalid PL_COLORBAR_ORIENT_* bits" );
+-    }
++        min_value = values[i][0];
++        max_value = values[i][ n_values[i] - 1 ];
++        max_abs   = MAX( fabs( min_value ), fabs( max_value ) );
+ 
+-    // Viewport has correct size but has a shifted zero-point
+-    // convention required by bounding-box calculations in draw_box,
+-    // further bounding-box calculations in the cap_extent section
+-    // below, and also in the calculate_limits call below that.
+-    plvpor( 0., colorbar_width, 0., colorbar_height );
+-    plwind( wx_min, wx_max, wy_min, wy_max );
++        // Specify the proper window ranges for colorbar depending on
++        // orientation.
++        if ( opt & PL_COLORBAR_ORIENT_RIGHT )
++        {
++            wx_min = min_value;
++            wx_max = max_value;
++            wy_min = 0.0;
++            wy_max = max_abs;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_TOP )
++        {
++            wx_min = 0.0;
++            wx_max = max_abs;
++            wy_min = min_value;
++            wy_max = max_value;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_LEFT )
++        {
++            wx_min = max_value;
++            wx_max = min_value;
++            wy_min = 0.0;
++            wy_max = max_abs;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
++        {
++            wx_min = 0.0;
++            wx_max = max_abs;
++            wy_min = max_value;
++            wy_max = min_value;
++        }
++        else
++        {
++            plabort( "plcolorbar: Invalid PL_COLORBAR_ORIENT_* bits" );
++        }
+ 
+-    // Calculate the bounding box for decorated (i.e., including tick
+-    // marks + numerical tick labels) box.
+-    draw_box( TRUE, opt, axis_opts, if_edge,
+-        ticks, sub_ticks, n_values, values );
++        // Viewport has correct size but has a shifted zero-point
++        // convention required by bounding-box calculations in draw_box,
++        // further bounding-box calculations in the cap_extent section
++        // below, and also in the calculate_limits call below that.
++        plvpor( 0., colorbar_width_d, 0., colorbar_height_d );
++        plwind( wx_min, wx_max, wy_min, wy_max );
++
++        // Calculate the bounding box for decorated (i.e., including tick
++        // marks + numerical tick labels) box.
++        draw_box( TRUE, opt, axis_opts[i], if_edge,
++            ticks[i], sub_ticks[i], n_values[i], values[i] );
++
++        if ( i == n_axes - 1 )
++        {
++            if ( opt & PL_COLORBAR_CAP_LOW )
++            {
++                if ( opt & PL_COLORBAR_ORIENT_RIGHT )
++                    plsc->boxbb_xmin = MIN( plsc->boxbb_xmin, -cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_TOP )
++                    plsc->boxbb_ymin = MIN( plsc->boxbb_ymin, -cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_LEFT )
++                    plsc->boxbb_xmax = MAX( plsc->boxbb_xmax, colorbar_width_mm + cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
++                    plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, colorbar_height_mm + cap_extent_mm );
++            }
++            if ( opt & PL_COLORBAR_CAP_HIGH )
++            {
++                if ( opt & PL_COLORBAR_ORIENT_RIGHT )
++                    plsc->boxbb_xmax = MAX( plsc->boxbb_xmax, colorbar_width_mm + cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_TOP )
++                    plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, colorbar_height_mm + cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_LEFT )
++                    plsc->boxbb_xmin = MIN( plsc->boxbb_xmin, -cap_extent_mm );
++                if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
++                    plsc->boxbb_ymin = MIN( plsc->boxbb_ymin, -cap_extent_mm );
++            }
++        }
++
++        // Calculate limits relevant to label position.
++        calculate_limits( position, x, y,
++            xdmin_adopted, xdmax_adopted, ydmin_adopted, ydmax_adopted,
++            colorbar_height_d,
++            &colorbar_width_d, &colorbar_height_d,
++            &colorbar_width_ac, &colorbar_height_ac,
++            &plot_x_subpage_bb, &plot_y_subpage_bb,
++            &dx_subpage_omd, &dy_subpage_omd );
++
++        // Viewport has correct size but has a shifted zero point
++        // convention required by bounding-box calculations in draw_label
++        // and further calculations in calculate_limits.
++        plvpor( 0., colorbar_width_d, 0., colorbar_height_d );
++
++        dx_subpage_omd_accu += dx_subpage_omd;
++        dy_subpage_omd_accu += dy_subpage_omd;
++    }
++
++    // Capture the current bounding box dimensions
++    colorbar_width_l  = colorbar_width_d;
++    colorbar_height_l = colorbar_height_d;
++
++    for ( i = 0; i < n_labels; i++ )
++    {
++        // Viewport has correct size but has a shifted zero-point
++        // convention required by bounding-box calculations in draw_box,
++        // further bounding-box calculations in the cap_extent section
++        // below, and also in the calculate_limits call below that.
++        plvpor( 0., colorbar_width_l, 0., colorbar_height_l );
++        plwind( wx_min, wx_max, wy_min, wy_max );
++
++        // Calculate the bounding box for combined label + decorated box.
++        draw_label( TRUE, opt | label_opts[i], labels[i] );
++
++        // Calculate overall limits.
++        calculate_limits( position, x, y,
++            xdmin_adopted, xdmax_adopted, ydmin_adopted, ydmax_adopted,
++            colorbar_height_l,
++            &colorbar_width_l, &colorbar_height_l,
++            &colorbar_width_ac, &colorbar_height_ac,
++            &plot_x_subpage_bb, &plot_y_subpage_bb,
++            &dx_subpage_dml, &dy_subpage_dml );
+ 
+-    if ( opt & PL_COLORBAR_CAP_LOW )
+-    {
+-        if ( opt & PL_COLORBAR_ORIENT_RIGHT )
+-            plsc->boxbb_xmin = MIN( plsc->boxbb_xmin, -cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_TOP )
+-            plsc->boxbb_ymin = MIN( plsc->boxbb_ymin, -cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_LEFT )
+-            plsc->boxbb_xmax = MAX( plsc->boxbb_xmax, colorbar_width_mm + cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
+-            plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, colorbar_height_mm + cap_extent_mm );
++        dx_subpage_dml_accu += dx_subpage_dml;
++        dy_subpage_dml_accu += dy_subpage_dml;
+     }
+-    if ( opt & PL_COLORBAR_CAP_HIGH )
+-    {
+-        if ( opt & PL_COLORBAR_ORIENT_RIGHT )
+-            plsc->boxbb_xmax = MAX( plsc->boxbb_xmax, colorbar_width_mm + cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_TOP )
+-            plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, colorbar_height_mm + cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_LEFT )
+-            plsc->boxbb_xmin = MIN( plsc->boxbb_xmin, -cap_extent_mm );
+-        if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
+-            plsc->boxbb_ymin = MIN( plsc->boxbb_ymin, -cap_extent_mm );
+-    }
+-
+-    // Calculate limits relevant to label position.
+-    calculate_limits( position, x, y,
+-        xdmin_adopted, xdmax_adopted, ydmin_adopted, ydmax_adopted,
+-        colorbar_height,
+-        &colorbar_width_d, &colorbar_height_d,
+-        &colorbar_width_ac, &colorbar_height_ac,
+-        &plot_x_subpage_bb, &plot_y_subpage_bb,
+-        &dx_subpage_omd, &dy_subpage_omd );
+-
+-    // Viewport has correct size but has a shifted zero point
+-    // convention required by bounding-box calculations in draw_label
+-    // and further calculations in calculate_limits.
+-    plvpor( 0., colorbar_width_d, 0., colorbar_height_d );
+-
+-    // Calculate the bounding box for combined label + decorated box.
+-    draw_label( TRUE, opt, label );
+-
+-    // Calculate overall limits.
+-    calculate_limits( position, x, y,
+-        xdmin_adopted, xdmax_adopted, ydmin_adopted, ydmax_adopted,
+-        colorbar_height_d,
+-        &colorbar_width_l, &colorbar_height_l,
+-        &colorbar_width_ac, &colorbar_height_ac,
+-        &plot_x_subpage_bb, &plot_y_subpage_bb,
+-        &dx_subpage_dml, &dy_subpage_dml );
+ 
+     // Normalized subpage coordinates (top-left corner) for undecorated
+     // colorbar
+-    plot_x_subpage = plot_x_subpage_bb + dx_subpage_omd + dx_subpage_dml;
+-    plot_y_subpage = plot_y_subpage_bb + dy_subpage_omd + dy_subpage_dml;
++    plot_x_subpage = plot_x_subpage_bb + dx_subpage_omd_accu + dx_subpage_dml_accu;
++    plot_y_subpage = plot_y_subpage_bb + dy_subpage_omd_accu + dy_subpage_dml_accu;
+ 
+     // Coordinates of bounding box for decorated colorbar (without overall label).
+-    label_vpor_xmin = plot_x_subpage_bb + dx_subpage_dml;
++    label_vpor_xmin = plot_x_subpage_bb + dx_subpage_dml_accu;
+     label_vpor_xmax = label_vpor_xmin + colorbar_width_d;
+-    label_vpor_ymax = plot_y_subpage_bb + dy_subpage_dml;
++    label_vpor_ymax = plot_y_subpage_bb + dy_subpage_dml_accu;
+     label_vpor_ymin = label_vpor_ymax - colorbar_height_d;
+ 
+     // Return bounding box width and height in adopted coordinates for
+@@ -1835,7 +1888,7 @@
+         // Interpolate
+         // TODO: Should this be decided with an extra opt option instead of by
+         // counting n_values?
+-        if ( n_values == 2 )
++        if ( n_values[0] == 2 )
+         {
+             // Use the same number of steps as there are steps in
+             // color palette 1.
+@@ -1902,7 +1955,7 @@
+         // No interpolation - use values array as-is
+         else
+         {
+-            n_steps = n_values;
++            n_steps = n_values[0];
+             // Use the provided values in this case.
+             if ( opt & PL_COLORBAR_ORIENT_RIGHT )
+             {
+@@ -1913,7 +1966,7 @@
+                 {
+                     for ( j = 0; j < nj; j++ )
+                     {
+-                        color_data[i][j] = values[i];
++                        color_data[i][j] = values[0][i];
+                     }
+                 }
+             }
+@@ -1926,7 +1979,7 @@
+                 {
+                     for ( j = 0; j < nj; j++ )
+                     {
+-                        color_data[i][j] = values[j];
++                        color_data[i][j] = values[0][j];
+                     }
+                 }
+             }
+@@ -1939,7 +1992,7 @@
+                 {
+                     for ( j = 0; j < nj; j++ )
+                     {
+-                        color_data[i][j] = values[ni - 1 - i];
++                        color_data[i][j] = values[0][ni - 1 - i];
+                     }
+                 }
+             }
+@@ -1952,7 +2005,7 @@
+                 {
+                     for ( j = 0; j < nj; j++ )
+                     {
+-                        color_data[i][j] = values[nj - 1 - j];
++                        color_data[i][j] = values[0][nj - 1 - j];
+                     }
+                 }
+             }
+@@ -1962,7 +2015,7 @@
              }
          }
          // Draw the color bar
@@ -1097273,16 +1104950,90 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
              min_value, max_value, wx_min, wx_max, wy_min, wy_max );
          plFree2dGrid( color_data, ni, nj );
      }
-@@ -2051,7 +2055,7 @@
+@@ -1975,11 +2028,11 @@
+         // then segment B will be twice the length of segment A.
+         PLcGrid grid;
+         PLFLT   grid_axis[2] = { 0.0, max_abs };
+-        n_steps = n_values;
++        n_steps = n_values[0];
+         // Use the provided values.
+         if ( opt & PL_COLORBAR_ORIENT_RIGHT )
+         {
+-            grid.xg = (PLFLT *) values;
++            grid.xg = (PLFLT *) values[0];
+             grid.yg = grid_axis;
+             grid.nx = n_steps;
+             grid.ny = 2;
+@@ -1990,14 +2043,14 @@
+             {
+                 for ( j = 0; j < nj; j++ )
+                 {
+-                    color_data[i][j] = values[i];
++                    color_data[i][j] = values[0][i];
+                 }
+             }
+         }
+         else if ( opt & PL_COLORBAR_ORIENT_TOP )
+         {
+             grid.xg = grid_axis;
+-            grid.yg = (PLFLT *) values;
++            grid.yg = (PLFLT *) values[0];
+             grid.nx = 2;
+             grid.ny = n_steps;
+             ni      = 2;
+@@ -2007,13 +2060,13 @@
+             {
+                 for ( j = 0; j < nj; j++ )
+                 {
+-                    color_data[i][j] = values[j];
++                    color_data[i][j] = values[0][j];
+                 }
+             }
+         }
+         else if ( opt & PL_COLORBAR_ORIENT_LEFT )
+         {
+-            grid.xg = (PLFLT *) values;
++            grid.xg = (PLFLT *) values[0];
+             grid.yg = grid_axis;
+             grid.nx = n_steps;
+             grid.ny = 2;
+@@ -2024,14 +2077,14 @@
+             {
+                 for ( j = 0; j < nj; j++ )
+                 {
+-                    color_data[i][j] = values[ni - 1 - i];
++                    color_data[i][j] = values[0][ni - 1 - i];
+                 }
+             }
+         }
+         else if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
+         {
+             grid.xg = grid_axis;
+-            grid.yg = (PLFLT *) values;
++            grid.yg = (PLFLT *) values[0];
+             grid.nx = 2;
+             grid.ny = n_steps;
+             ni      = 2;
+@@ -2041,7 +2094,7 @@
+             {
+                 for ( j = 0; j < nj; j++ )
+                 {
+-                    color_data[i][j] = values[nj - 1 - j];
++                    color_data[i][j] = values[0][nj - 1 - j];
+                 }
+             }
+         }
+@@ -2051,15 +2104,15 @@
          }
  
          // Draw the color bar
 -        plshades( (const PLFLT **) color_data, ni, nj, NULL, wx_min, wx_max, wy_min, wy_max,
+-            values, n_steps, 0, cont_color, cont_width, plfill, TRUE,
 +        plshades( (const PLFLT * const *) color_data, ni, nj, NULL, wx_min, wx_max, wy_min, wy_max,
-             values, n_steps, 0, cont_color, cont_width, plfill, TRUE,
++            values[0], n_steps, 0, cont_color, cont_width, plfill, TRUE,
              pltr1, (void *) ( &grid ) );
          plFree2dGrid( color_data, ni, nj );
-@@ -2059,7 +2063,7 @@
+     }
      else if ( opt & PL_COLORBAR_GRADIENT )
      {
          PLFLT xs[4], ys[4];
@@ -1097291,9 +1105042,85 @@ diff -ruN --exclude .svn plplot-5.9.9/src/pllegend.c plplot-trunk/src/pllegend.c
          xs[0] = wx_min;
          ys[0] = wy_min;
          xs[1] = wx_max;
+@@ -2154,14 +2207,56 @@
+                 high_cap_color );
+     }
+ 
+-    // Viewport and world coordinate ranges for box.
+-    plvpor( vx_min, vx_max, vy_min, vy_max );
+-    plwind( wx_min, wx_max, wy_min, wy_max );
++    for ( i = n_axes - 1; i >= 0; i-- )
++    {
++        min_value = values[i][0];
++        max_value = values[i][ n_values[i] - 1 ];
++        max_abs   = MAX( fabs( min_value ), fabs( max_value ) );
+ 
+-    // draw decorated (i.e., including tick marks + numerical tick
+-    // labels) box.
+-    draw_box( FALSE, opt, axis_opts, if_edge,
+-        ticks, sub_ticks, n_values, values );
++        // Specify the proper window ranges for colorbar depending on
++        // orientation.
++        if ( opt & PL_COLORBAR_ORIENT_RIGHT )
++        {
++            wx_min = min_value;
++            wx_max = max_value;
++            wy_min = 0.0;
++            wy_max = max_abs;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_TOP )
++        {
++            wx_min = 0.0;
++            wx_max = max_abs;
++            wy_min = min_value;
++            wy_max = max_value;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_LEFT )
++        {
++            wx_min = max_value;
++            wx_max = min_value;
++            wy_min = 0.0;
++            wy_max = max_abs;
++        }
++        else if ( opt & PL_COLORBAR_ORIENT_BOTTOM )
++        {
++            wx_min = 0.0;
++            wx_max = max_abs;
++            wy_min = max_value;
++            wy_max = min_value;
++        }
++        else
++        {
++            plabort( "plcolorbar: Invalid PL_COLORBAR_ORIENT_* bits" );
++        }
++
++        // Viewport and world coordinate ranges for box.
++        plvpor( vx_min, vx_max, vy_min, vy_max );
++        plwind( wx_min, wx_max, wy_min, wy_max );
++
++        // draw decorated (i.e., including tick marks + numerical tick
++        // labels) box.
++        draw_box( FALSE, opt, axis_opts[i], if_edge,
++            ticks[i], sub_ticks[i], n_values[i], values[i] );
++    }
+ 
+     // Viewport and world coordinate ranges for bounding-box.
+     plvpor( 0., 1., 0., 1. );
+@@ -2193,7 +2288,10 @@
+     // Write label.
+     // Viewport coordinate ranges for label.
+     plvpor( label_vpor_xmin, label_vpor_xmax, label_vpor_ymin, label_vpor_ymax );
+-    draw_label( FALSE, opt, label );
++    for ( i = 0; i < n_labels; i++ )
++    {
++        draw_label( FALSE, opt | label_opts[i], labels[i] );
++    }
+ 
+     // Restore previous plot characteristics.
+     plcol0( col0_save );
 diff -ruN --exclude .svn plplot-5.9.9/src/plline.c plplot-trunk/src/plline.c
 --- plplot-5.9.9/src/plline.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plline.c	2011-11-02 09:43:04.458104151 -0600
++++ plplot-trunk/src/plline.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plline.c 11682 2011-03-31 02:55:49Z airwin $
 +// $Id: plline.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1097409,25 +1105236,202 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plline.c plplot-trunk/src/plline.c
      }
 diff -ruN --exclude .svn plplot-5.9.9/src/plmap.c plplot-trunk/src/plmap.c
 --- plplot-5.9.9/src/plmap.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plmap.c	2011-11-02 09:43:04.439104847 -0600
++++ plplot-trunk/src/plmap.c	2012-12-14 08:50:53.059385482 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plmap.c 11283 2010-10-28 22:38:29Z airwin $
-+// $Id: plmap.c 12008 2011-10-28 12:50:46Z andrewross $
++// $Id: plmap.c 12281 2012-11-23 21:27:51Z andrewross $
  //
  //      Continental Outline and Political Boundary Backgrounds
  //
-@@ -87,7 +87,7 @@
+@@ -39,8 +39,18 @@
+ //
+ //
+ 
++#define NEED_PLDEBUG    1
++
+ #include "plplotP.h"
+ 
++#ifdef HAVE_SHAPELIB
++#include <shapefil.h>
++
++SHPHandle
++OpenShapeFile( const char *fn );
++
++#endif
++
+ //--------------------------------------------------------------------------
+ // void plmap(void (*mapform)(PLINT, PLFLT *, PLFLT *), const char *type,
+ //            PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat);
+@@ -67,6 +77,10 @@
+ //      "usa"		USA and state boundaries
+ //      "cglobe"	continental outlines and countries
+ //      "usaglobe"	USA, state boundaries and continental outlines
++// alternatively the filename of a shapefile can be passed if PLplot has
++// been compiled with shapelib. In this case either the base name of the
++// file can be passed or the filename including the .shp or .shx suffix.
++// Only the .shp and .shx files are used.
+ //
+ // minlong, maxlong are the values of the longitude on the left and right
+ // side of the plot, respectively. The value of minlong must be less than
+@@ -80,159 +94,261 @@
+ // plotted.
+ //--------------------------------------------------------------------------
+ 
++#ifdef HAVE_SHAPELIB
++#define MAP_FILE    ""
++#define OpenMap     OpenShapeFile
++#define CloseMap    SHPClose
++#else
+ #define MAP_FILE    ".map"
++#define OpenMap     plLibOpenPdfstrm
++#define CloseMap    pdf_close
+ #define OFFSET      ( 180 * 100 )
+ #define SCALE       100.0
+ #define W_BUFSIZ    ( 32 * 1024 )
++#endif
  
  void
  plmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type,
--       PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat )
-+       PLFLT minlong, PLFLT maxlong, PLFLT PL_UNUSED( minlat ), PLFLT PL_UNUSED( maxlat ) )
+        PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat )
  {
-     PLINT            wrap, sign;
-     int              i, j;
-@@ -113,25 +113,25 @@
+-    PLINT            wrap, sign;
+-    int              i, j;
+-    PLFLT            bufx[200], bufy[200], x[2], y[2];
+-    short int        test[400];
++#if defined ( HAVE_SHAPELIB ) || defined ( PL_DEPRECATED )
++    int       i, j;
++    char      *filename;
++    char      *warning;
++    int       n = 200;
++    PLFLT     minsectlon, maxsectlon, minsectlat, maxsectlat;
++    const int ncopies = 5;          //must be odd - original plus copies shifted by multiples of +/- 360
++    const int mid     = ncopies / 2 + 1;
++    PLFLT     **bufx  = NULL, **bufy = NULL;
++    int       bufsize = 0;
++
++#ifdef HAVE_SHAPELIB
++    SHPHandle        in;
++    int              nentries;
++    int              nparts;
++    int              entrynumber = 0;
++    int              partnumber  = 0;
++    int              shapetype;
++    double           mins[4];
++    double           maxs[4];
++    SHPObject        *object = NULL;
++    double           *bufxraw;
++    double           *bufyraw;
++#else
+     register PDFstrm *in;
+-    char             filename[100];
+-
++    //PLFLT            bufx[ncopies][200], bufy[ncopies][200];
+     unsigned char    n_buff[2], buff[800];
+-    int              n;
+     long int         t;
++    int              k;
++#endif
+ 
+     //
+     // read map outline
+     //
+-    strncpy( filename, type, 99 );
+-    filename[99] = '\0';
+-    strncat( filename, MAP_FILE, 99 - strlen( filename ) );
+-
++    filename = malloc( strlen( type ) + strlen( MAP_FILE ) + 1 );
++    strcpy( filename, type );
++    strcat( filename, MAP_FILE );
++
++    warning = malloc( strlen( type ) + strlen( MAP_FILE ) + 50 );
++    strcpy( warning, "Could not find " );
++    strcat( warning, filename );
++    strcat( warning, " file." );
++#ifdef HAVE_SHAPELIB
++    if ( ( in = OpenShapeFile( filename ) ) == NULL )
++    {
++        plwarn( warning );
++        return;
++    }
++    SHPGetInfo( in, &nentries, &shapetype, mins, maxs );
++#else
+     if ( ( in = plLibOpenPdfstrm( filename ) ) == NULL )
++    {
++        plwarn( warning );
+         return;
++    }
++#endif
++
++    bufx = malloc( ncopies * sizeof ( PLFLT* ) );
++    bufy = malloc( ncopies * sizeof ( PLFLT* ) );
++    for ( i = 0; i < ncopies; i++ )
++    {
++        bufx[i] = NULL;
++        bufy[i] = NULL;
++    }
+ 
      for (;; )
      {
++#ifdef HAVE_SHAPELIB
++        //break condition if we've reached the end of the file
++        if ( entrynumber == nentries )
++            break;
++        //if partnumber == 0 then we need to load the next object
++        if ( partnumber == 0 )
++        {
++            object = SHPReadObject( in, entrynumber );
++            nparts = object->nParts;
++        }
++
++        //work out how many points are in the current part
++        if ( partnumber == ( nparts - 1 ) )
++            n = object->nVertices - object->panPartStart[partnumber];
++        else
++            n = object->panPartStart[partnumber + 1] - object->panPartStart[partnumber];
++#endif
++        //allocate memory for the data
++        if ( n > bufsize )
++        {
++            bufsize = n;
++            for ( i = 0; i < ncopies; i++ )
++            {
++                if ( bufx[i] )
++                    free( bufx[i] );
++                if ( bufy[i] )
++                    free( bufy[i] );
++                bufx[i] = malloc( bufsize * sizeof ( double ) );
++                bufy[i] = malloc( bufsize * sizeof ( double ) );
++            }
++        }
++
++#ifdef HAVE_SHAPELIB
++        //point the plot buffer to the correct starting vertex
++        //and copy it to the PLFLT arrays
++        bufxraw = object->padfX + object->panPartStart[partnumber];
++        bufyraw = object->padfY + object->panPartStart[partnumber];
++        for ( i = 0; i < n; i++ )
++        {
++            bufx[mid][i] = (PLFLT) bufxraw[i];
++            for ( j = 0; j < ncopies; j++ )
++                bufy[j][i] = (PLFLT) bufyraw[i];
++        }
++
++        //set the minlat/lon of the object
++        minsectlon = object->dfXMin;
++        maxsectlon = object->dfXMax;
++        minsectlat = object->dfYMin;
++        maxsectlat = object->dfYMax;
++
++        //increment the partnumber or if we've reached the end of
++        //an entry increment the entrynumber and set partnumber to 0
++        if ( partnumber == nparts - 1 )
++        {
++            entrynumber++;
++            partnumber = 0;
++        }
++        else
++            partnumber++;
++#else
          // read in # points in segment
 -        if ( pdf_rdx( n_buff, sizeof ( unsigned char ) * 2, in ) == 0 )
 +        if ( pdf_rdx( n_buff, (long) sizeof ( unsigned char ) * 2, in ) == 0 )
@@ -1097443,21 +1105447,302 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plmap.c plplot-trunk/src/plmap.c
  
          for ( j = i = 0; i < n; i++, j += 2 )
          {
-             t       = ( buff[j] << 8 ) + buff[j + 1];
+-            t       = ( buff[j] << 8 ) + buff[j + 1];
 -            bufx[i] = ( t - OFFSET ) / SCALE;
-+            bufx[i] = ( (PLFLT) t - OFFSET ) / SCALE;
++            t            = ( buff[j] << 8 ) + buff[j + 1];
++            bufx[mid][i] = ( (PLFLT) t - OFFSET ) / SCALE;
          }
          for ( i = 0; i < n; i++, j += 2 )
          {
-             t       = ( buff[j] << 8 ) + buff[j + 1];
+-            t       = ( buff[j] << 8 ) + buff[j + 1];
 -            bufy[i] = ( t - OFFSET ) / SCALE;
-+            bufy[i] = ( (PLFLT) t - OFFSET ) / SCALE;
++            t          = ( buff[j] << 8 ) + buff[j + 1];
++            bufy[0][i] = ( (PLFLT) t - OFFSET ) / SCALE;
++            for ( k = 1; k < ncopies; k++ )
++                bufy[k][i] = bufy[0][i];
+         }
++        //set the min/max section lat/lon with extreme values
++        //to be overwritten later
++        minsectlon = 1000.;
++        maxsectlon = -1000.;
++        minsectlat = 1000.;
++        maxsectlat = -1000.;
++
++#endif
++        //two obvious issues exist here with plotting longitudes:
++        //
++        //1) wraparound causing lines which go the wrong way round
++        //   the globe
++        //2) some people plot lon from 0-360 deg, others from -180 - +180
++        //
++        //we can cure these problems by conditionally adding/subtracting
++        //360 degrees to each data point in order to ensure that the
++        //distance between adgacent points is always less than 180
++        //degrees, then plotting up to 2 out of 5 copies of the data
++        //each separated by 360 degrees.
+ 
+-        for ( i = 0; i < n; i++ )
+-        {
+-            while ( bufx[i] < minlong )
+-            {
+-                bufx[i] += 360.0;
+-            }
+-            while ( bufx[i] > maxlong )
+-            {
+-                bufx[i] -= 360.0;
+-            }
+-        }
+-
+-        // remove last 2 points if both outside of domain and won't plot
+-
+-// AR: 18/11/01
+-//       I have commented out the next section which supposedly
+-//       removes points that do not plot within the domain.
+-//
+-//       This code appears at any rate to be superseded by the next
+-//       block of code that checks for wrapping problems. Removing
+-//       this code seems to have fixed up the problems with mapping
+-//       function, but I do not wish to delete it outright just now in
+-//       case I have managed to miss something.
+-//
+-
+-//	while (n > 1) {
+-//          if ((bufx[n-1] < minlong && bufx[n-2] < minlong) ||
+-//              (bufx[n-1] > maxlong && bufx[n-2] > maxlong) ||
+-//              (bufy[n-1] < minlat && bufy[n-2] < minlat) ||
+-//              (bufy[n-1] > maxlat && bufy[n-2] > maxlat)) {
+-//              n--;
+-//          }
+-//          else {
+-//              break;
+-//          }
+-//      }
+-//      if (n <= 1) continue;
+-//
+-
+-        if ( mapform != NULL )
+-            ( *mapform )( n, bufx, bufy );                    // moved transformation to here
+-                                                              // so bound-checking worked right
+-
+-        wrap = 0;
+-        // check for wrap around problems
+         for ( i = 0; i < n - 1; i++ )
+         {
+-            // jc: this code is wrong, as the bufx/y are floats that are
+-            // converted to ints before abs() is called. Thus, small
+-            // differences are masked off. The proof that it is wrong is
+-            // that when replacing abs() with fabs(), as it should be,
+-            // the code works the wrong way. What a proof :-)
+-            //
+-            // test[i] = abs((bufx[i]-bufx[i+1])) > abs(bufy[i]/3);
+-            //
+-            // If the intended behaviour is *really* that, than an
+-            // explicit cast should be used to help other programmers, as
+-            // is done bellow!!!
+-            //
+-
+-            test[i] = abs( (int) ( bufx[i] - bufx[i + 1] ) ) > abs( (int) bufy[i] / 3 ); // Changed this from 30 degrees so it is now "polar sensitive"
+-            if ( test[i] )
+-                wrap = 1;
++            if ( bufx[mid][i] - bufx[mid][i + 1] > 180. )
++                bufx[mid][i + 1] += 360.;
++            else if ( bufx[mid][i] - bufx[mid][i + 1] < -180. )
++                bufx[mid][i + 1] -= 360.;
+         }
+-
+-        if ( wrap == 0 )
++        for ( i = 0; i < n; i++ )
+         {
+-            plline( n, bufx, bufy );
++            for ( j = 0; j < mid; j++ )
++                bufx[j][i] = bufx[mid][i] + 360. * (PLFLT) ( j - mid );
++            for ( j = mid + 1; j < ncopies; j++ )
++                bufx[j][i] = bufx[mid][i] + 360. * (PLFLT) ( j - mid );
++#ifndef HAVE_SHAPELIB
++            minsectlon = MIN( minsectlon, bufx[mid][i] );
++            maxsectlon = MAX( minsectlon, bufx[mid][i] );
++            minsectlat = MIN( minsectlat, bufy[mid][i] );
++            maxsectlat = MAX( minsectlat, bufy[mid][i] );
++#endif
+         }
+-        else
++
++        //check if the latitude range means we need to plot this section
++        if ( ( maxsectlat > minlat ) && ( minsectlat < maxlat ) )
+         {
+-            for ( i = 0; i < n - 1; i++ )
++            //check which of the translated maps fall within the
++            //range and transform and plot them - note more than one
++            //map may be needed due to wrapping
++            for ( j = 0; j < ncopies; j++ )
+             {
+-                x[0] = bufx[i];
+-                x[1] = bufx[i + 1];
+-                y[0] = bufy[i];
+-                y[1] = bufy[i + 1];
+-                if ( test[i] == 0 )
+-                {
+-                    plline( 2, x, y );
+-                }
+-                else    // this code seems to supercede the block commented out above
++                if ( ( minsectlon + 360. * (PLFLT) ( j - mid ) < maxlong )
++                     && ( maxsectlon + 360. * (PLFLT) ( j - mid ) > minlong ) )
+                 {
+-                    // segment goes off the edge
+-                    sign  = ( x[1] > x[0] ) ? 1 : -1;
+-                    x[1] -= sign * 360.0;
+-                    plline( 2, x, y );
+-                    x[0]  = bufx[i];
+-                    x[1]  = bufx[i + 1];
+-                    y[0]  = bufy[i];
+-                    y[1]  = bufy[i + 1];
+-                    x[0] += sign * 360.0;
+-                    plline( 2, x, y );
++                    if ( mapform != NULL )
++                        ( *mapform )( n, bufx[j], bufy[j] );
++                    plline( n, bufx[j], bufy[j] );
+                 }
+             }
          }
++
++
++
++#ifdef HAVE_SHAPELIB
++        if ( partnumber == 0 )
++            SHPDestroyObject( object );
++#endif
+     }
+     // Close map file
++#ifdef HAVE_SHAPELIB
++    SHPClose( in );
++#else
+     pdf_close( in );
++#endif
++
++    //free memory
++    for ( i = 0; i < ncopies; i++ )
++    {
++        if ( bufx[i] )
++            free( bufx[i] );
++        if ( bufy[i] )
++            free( bufy[i] );
++    }
++    free( bufx );
++    free( bufy );
++    free( filename );
++    free( warning );
++#else   // defined (HAVE_SHAPELIB) || defined (PL_DEPRECATED)
++    plwarn( "Use of the old plplot map file format is deprecated.\nIt is recommended that the shapelib library be used to provide map support.\n" );
++#endif  // defined (HAVE_SHAPELIB) || defined (PL_DEPRECATED)
+ }
  
-         for ( i = 0; i < n; i++ )
+ //--------------------------------------------------------------------------
+@@ -333,3 +449,102 @@
+         }
+     }
+ }
++
++//--------------------------------------------------------------------------
++// SHPHandle OpenShapeFile(fn)
++//
++//! Returns a handle to a shapefile from the filename fn. Content based on
++//! plLibOpenPdfstrm in plctrl.c
++//! Locations checked:
++//!	PLPLOT_LIB_ENV = $(PLPLOT_LIB)
++//!	current directory
++//!	PLPLOT_HOME_ENV/lib = $(PLPLOT_HOME)/lib
++//!	DATA_DIR
++//!	PLLIBDEV
++//!
++//! @param fn Name of the file.
++//!
++//! @Return handle to a shapefile on success or NULL if the file cannot be
++//! found
++//--------------------------------------------------------------------------
++#ifdef HAVE_SHAPELIB
++SHPHandle
++OpenShapeFile( const char *fn )
++{
++    SHPHandle file;
++    char      *fs = NULL, *dn = NULL;
++
++//***   search build tree               ***
++
++    if ( plInBuildTree() == 1 )
++    {
++        plGetName( SOURCE_DIR, "data", fn, &fs );
++
++        if ( ( file = SHPOpen( fs, "rb" ) ) != NULL )
++            goto done;
++    }
++
++//***	search PLPLOT_LIB_ENV = $(PLPLOT_LIB)	***
++
++#if defined ( PLPLOT_LIB_ENV )
++    if ( ( dn = getenv( PLPLOT_LIB_ENV ) ) != NULL )
++    {
++        plGetName( dn, "", fn, &fs );
++
++        if ( ( file = SHPOpen( fs, "rb" ) ) != NULL )
++            goto done;
++        fprintf( stderr, PLPLOT_LIB_ENV "=\"%s\"\n", dn ); // what IS set?
++    }
++#endif  // PLPLOT_LIB_ENV
++
++//***	search current directory	***
++
++    if ( ( file = SHPOpen( fn, "rb" ) ) != NULL )
++    {
++        pldebug( "OpenShapeFile", "Found file %s in current directory.\n", fn );
++        free_mem( fs );
++        return ( file );
++    }
++
++//***	search PLPLOT_HOME_ENV/lib = $(PLPLOT_HOME)/lib	***
++
++#if defined ( PLPLOT_HOME_ENV )
++    if ( ( dn = getenv( PLPLOT_HOME_ENV ) ) != NULL )
++    {
++        plGetName( dn, "lib", fn, &fs );
++
++        if ( ( file = SHPOpen( fs, "rb" ) ) != NULL )
++            goto done;
++        fprintf( stderr, PLPLOT_HOME_ENV "=\"%s\"\n", dn ); // what IS set?
++    }
++#endif  // PLPLOT_HOME_ENV/lib
++
++//***   search installed location	***
++
++#if defined ( DATA_DIR )
++    plGetName( DATA_DIR, "", fn, &fs );
++
++    if ( ( file = SHPOpen( fs, "rb" ) ) != NULL )
++        goto done;
++#endif  // DATA_DIR
++
++//***   search hardwired location	***
++
++#ifdef PLLIBDEV
++    plGetName( PLLIBDEV, "", fn, &fs );
++
++    if ( ( file = SHPOpen( fs, "rb" ) ) != NULL )
++        goto done;
++#endif  // PLLIBDEV
++
++//***   not found, give up      ***
++    pldebug( "OpenShapeFile", "File %s not found.\n", fn );
++    free_mem( fs );
++    return NULL;
++
++done:
++    pldebug( "OpenShapeFile", "Found file %s\n", fs );
++    free_mem( fs );
++    return ( file );
++}
++#endif
 diff -ruN --exclude .svn plplot-5.9.9/src/plot3d.c plplot-trunk/src/plot3d.c
 --- plplot-5.9.9/src/plot3d.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plot3d.c	2012-01-04 08:45:31.757687003 -0700
++++ plplot-trunk/src/plot3d.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plot3d.c 11760 2011-06-01 19:29:11Z airwin $
 +// $Id: plot3d.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1098038,7 +1106323,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plot3d.c plplot-trunk/src/plot3d.c
      plabort( msg );
 diff -ruN --exclude .svn plplot-5.9.9/src/plpage.c plplot-trunk/src/plpage.c
 --- plplot-5.9.9/src/plpage.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plpage.c	2011-11-02 09:43:04.503102502 -0600
++++ plplot-trunk/src/plpage.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plpage.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plpage.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1098062,7 +1106347,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plpage.c plplot-trunk/src/plpage.c
          plcol0( ocolor );
 diff -ruN --exclude .svn plplot-5.9.9/src/plsdef.c plplot-trunk/src/plsdef.c
 --- plplot-5.9.9/src/plsdef.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plsdef.c	2011-11-02 09:43:04.441104773 -0600
++++ plplot-trunk/src/plsdef.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plsdef.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plsdef.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1098098,10 +1106383,10 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plsdef.c plplot-trunk/src/plsdef.c
  
 diff -ruN --exclude .svn plplot-5.9.9/src/plshade.c plplot-trunk/src/plshade.c
 --- plplot-5.9.9/src/plshade.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plshade.c	2012-01-04 08:45:31.763686787 -0700
++++ plplot-trunk/src/plshade.c	2012-12-14 08:50:53.061385466 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plshade.c 11759 2011-06-01 17:41:34Z airwin $
-+// $Id: plshade.c 12095 2011-12-03 08:56:15Z andrewross $
++// $Id: plshade.c 12280 2012-11-23 21:25:40Z andrewross $
  //
  //      Functions to shade regions on the basis of value.
  //      Can be used to shade contour plots or alone.
@@ -1098271,7 +1106556,16 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plshade.c plplot-trunk/src/plshade.c
      {
          plabort( "plfshade: unable to allocate memory for condition codes" );
          free( a );
-@@ -1007,9 +994,9 @@
+@@ -835,6 +822,8 @@
+             *cond++ = NEG;
+         else if ( *a > sh_max )
+             *cond++ = POS;
++        else if ( isnan(*a) )	//check for nans and set cond to undefined
++            *cond++ = UNDEF;
+         else
+             *cond++ = OK;
+         a++;
+@@ -1007,9 +996,9 @@
  
          // Slightly less than 2 n points are required for xx, yy, but
          // allocate room for 2 n to be safe.
@@ -1098283,7 +1106577,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plshade.c plplot-trunk/src/plshade.c
              plexit( "exfill: out of memory for yy." );
  
          for ( i = 0; i < n; i++ )
-@@ -1251,7 +1238,7 @@
+@@ -1251,7 +1240,7 @@
  #define RATIO_SQ          6.0
  
  static PLINT
@@ -1098294,7 +1106588,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plshade.c plplot-trunk/src/plshade.c
      double t[4], sorted[4], temp;
 diff -ruN --exclude .svn plplot-5.9.9/src/plstdio.c plplot-trunk/src/plstdio.c
 --- plplot-5.9.9/src/plstdio.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plstdio.c	2012-01-28 07:51:42.009848734 -0700
++++ plplot-trunk/src/plstdio.c	2012-01-28 07:51:42.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plstdio.c 11257 2010-10-11 22:34:18Z airwin $
 +// $Id: plstdio.c 12128 2012-01-14 23:17:53Z airwin $
@@ -1098372,7 +1106666,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plstdio.c plplot-trunk/src/plstdio.c
      tmpdir = getenv( "TEMP" );
 diff -ruN --exclude .svn plplot-5.9.9/src/plstripc.c plplot-trunk/src/plstripc.c
 --- plplot-5.9.9/src/plstripc.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plstripc.c	2011-11-02 09:43:04.487103088 -0600
++++ plplot-trunk/src/plstripc.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plstripc.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plstripc.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1098494,7 +1106788,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plstripc.c plplot-trunk/src/plstripc.c
          }
 diff -ruN --exclude .svn plplot-5.9.9/src/plsym.c plplot-trunk/src/plsym.c
 --- plplot-5.9.9/src/plsym.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plsym.c	2011-11-02 09:43:04.494102832 -0600
++++ plplot-trunk/src/plsym.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plsym.c 11785 2011-07-04 19:54:19Z airwin $
 +// $Id: plsym.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1098592,7 +1106886,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plsym.c plplot-trunk/src/plsym.c
  
 diff -ruN --exclude .svn plplot-5.9.9/src/plvect.c plplot-trunk/src/plvect.c
 --- plplot-5.9.9/src/plvect.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plvect.c	2012-01-04 08:45:31.776686319 -0700
++++ plplot-trunk/src/plvect.c	2012-01-04 08:45:31.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: plvect.c 11759 2011-06-01 17:41:34Z airwin $
 +// $Id: plvect.c 12095 2011-12-03 08:56:15Z andrewross $
@@ -1098632,7 +1106926,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plvect.c plplot-trunk/src/plvect.c
  {
 diff -ruN --exclude .svn plplot-5.9.9/src/plvpor.c plplot-trunk/src/plvpor.c
 --- plplot-5.9.9/src/plvpor.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/src/plvpor.c	2011-11-02 09:43:04.454104298 -0600
++++ plplot-trunk/src/plvpor.c	2011-11-02 09:43:04.000000000 -0600
 @@ -1,4 +1,4 @@
 -// $Id: plvpor.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: plvpor.c 11973 2011-10-17 21:16:39Z andrewross $
@@ -1098650,7 +1106944,7 @@ diff -ruN --exclude .svn plplot-5.9.9/src/plvpor.c plplot-trunk/src/plvpor.c
      if ( plsc->level < 1 )
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/makefile.vc plplot-trunk/sys/win-tk/makefile.vc
 --- plplot-5.9.9/sys/win-tk/makefile.vc	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/makefile.vc	2011-04-06 14:29:28.328436971 -0600
++++ plplot-trunk/sys/win-tk/makefile.vc	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,512 @@
 +# Makefile.vc
 +#
@@ -1099166,7 +1107460,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/makefile.vc plplot-trunk/sys/wi
 +	-$(RM) $(PROJECT).exp
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/makePlplotStarkit.tcl plplot-trunk/sys/win-tk/makePlplotStarkit.tcl
 --- plplot-5.9.9/sys/win-tk/makePlplotStarkit.tcl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/makePlplotStarkit.tcl	2011-04-06 14:29:28.334436458 -0600
++++ plplot-trunk/sys/win-tk/makePlplotStarkit.tcl	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,49 @@
 +puts stdout "Making plplotter starkit" ; update
 +set execdir E:/Apps
@@ -1099219,7 +1107513,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/makePlplotStarkit.tcl plplot-tr
 +puts "Done making plplotter.kit"
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/pkgIndex.tcl plplot-trunk/sys/win-tk/pkgIndex.tcl
 --- plplot-5.9.9/sys/win-tk/pkgIndex.tcl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/pkgIndex.tcl	2011-04-06 14:29:28.331436714 -0600
++++ plplot-trunk/sys/win-tk/pkgIndex.tcl	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,20 @@
 +if {[info exists ::tcl_platform(debug)]} {
 +    set file [file join $dir plplotter521g[info sharedlibextension]]
@@ -1099244,7 +1107538,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/pkgIndex.tcl plplot-trunk/sys/w
 \ No newline at end of file
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/plConfig.h plplot-trunk/sys/win-tk/plConfig.h
 --- plplot-5.9.9/sys/win-tk/plConfig.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/plConfig.h	2011-04-06 14:29:28.330436800 -0600
++++ plplot-trunk/sys/win-tk/plConfig.h	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,113 @@
 +/* -*-C-*- */
 +/* $Id: plConfig.h 3782 2002-07-04 15:17:15Z vincentdarley $
@@ -1099361,7 +1107655,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/plConfig.h plplot-trunk/sys/win
 +#endif	/* __PLCONFIG_H__ */
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/plDevs.h plplot-trunk/sys/win-tk/plDevs.h
 --- plplot-5.9.9/sys/win-tk/plDevs.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/plDevs.h	2011-04-06 14:29:28.327437057 -0600
++++ plplot-trunk/sys/win-tk/plDevs.h	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,50 @@
 +/* -*-C-*- */
 +/* $Id: plDevs.h 3749 2002-07-02 09:35:31Z vincentdarley $
@@ -1099415,7 +1107709,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/plDevs.h plplot-trunk/sys/win-t
 +#endif	/* __PLDEVS_H__ */
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/Readme.txt plplot-trunk/sys/win-tk/Readme.txt
 --- plplot-5.9.9/sys/win-tk/Readme.txt	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/Readme.txt	2011-04-06 14:29:28.333436544 -0600
++++ plplot-trunk/sys/win-tk/Readme.txt	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,16 @@
 +If running on any windows platform, and you have VC++ installed, you
 +should be able to do 'nmake -f makefile.vc' to compile plplot into a
@@ -1099435,7 +1107729,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/Readme.txt plplot-trunk/sys/win
 +are included here.
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.c plplot-trunk/sys/win-tk/tclgen.c
 --- plplot-5.9.9/sys/win-tk/tclgen.c	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/tclgen.c	2011-04-06 14:29:28.342435774 -0600
++++ plplot-trunk/sys/win-tk/tclgen.c	2012-12-14 08:50:48.272412428 -0700
 @@ -0,0 +1,5295 @@
 +/*--------------------------------------------------------------------------*\
 + * pl_setcontlabelformatCmd
@@ -1102990,14 +1111284,14 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.c plplot-trunk/sys/win-t
 +    tclMatrix *matcoord2;
 +    PLFLT *coord3;
 +    tclMatrix *matcoord3;
-+    PLINT *rev;
++    PLINT *alt_hue_path;
 +    tclMatrix *matrev;
 +
 +    errcode = 0; errmsg[0] = '\0';
 +
 +    if ( (argc == 2) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
 +	Tcl_AppendResult( interp, "command syntax: \"",
-+			  "plscmap1l itype npts intensity coord1 coord2 coord3 rev", "\"",
++			  "plscmap1l itype npts intensity coord1 coord2 coord3 alt_hue_path", "\"",
 +			  (char *) NULL);
 +	return TCL_ERROR;
 +    }
@@ -1103006,7 +1111300,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.c plplot-trunk/sys/win-t
 +         (!0 && !0 && (argc != (7 + 1))) ||
 +         ( 0 && (argc != 1) && (argc != (7 + 1))) ) {
 +	Tcl_AppendResult( interp, "wrong # args: should be \"",
-+			  "plscmap1l itype npts intensity coord1 coord2 coord3 rev", "\"",
++			  "plscmap1l itype npts intensity coord1 coord2 coord3 alt_hue_path", "\"",
 +			  (char *) NULL);
 +	return TCL_ERROR;
 +    }
@@ -1103027,9 +1111321,9 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.c plplot-trunk/sys/win-t
 +    coord3 = matcoord3->fdata;
 +    matrev = Tcl_GetMatrixPtr( interp, argv[1+6] );
 +    if (matrev == NULL) return TCL_ERROR;
-+    rev = matrev->idata;
++    alt_hue_path = matrev->idata;
 +
-+    plscmap1l ( itype, npts, intensity, coord1, coord2, coord3, rev );
++    plscmap1l ( itype, npts, intensity, coord1, coord2, coord3, alt_hue_path );
 +
 +
 +    if (errcode != 0) {
@@ -1104734,7 +1113028,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.c plplot-trunk/sys/win-t
 +
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.h plplot-trunk/sys/win-tk/tclgen.h
 --- plplot-5.9.9/sys/win-tk/tclgen.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/tclgen.h	2011-04-06 14:29:28.326437142 -0600
++++ plplot-trunk/sys/win-tk/tclgen.h	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,104 @@
 +static int pl_setcontlabelformatCmd( ClientData, Tcl_Interp *, int, char **);
 +static int pl_setcontlabelparamCmd( ClientData, Tcl_Interp *, int, char **);
@@ -1104842,7 +1113136,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen.h plplot-trunk/sys/win-t
 +static int plxormodCmd( ClientData, Tcl_Interp *, int, char **);
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen_s.h plplot-trunk/sys/win-tk/tclgen_s.h
 --- plplot-5.9.9/sys/win-tk/tclgen_s.h	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/tclgen_s.h	2011-04-06 14:29:28.329436886 -0600
++++ plplot-trunk/sys/win-tk/tclgen_s.h	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,104 @@
 +    {"pl_setcontlabelformat",          pl_setcontlabelformatCmd},
 +    {"pl_setcontlabelparam",          pl_setcontlabelparamCmd},
@@ -1104950,7 +1113244,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclgen_s.h plplot-trunk/sys/win
 +    {"plxormod",          plxormodCmd},
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclIndex plplot-trunk/sys/win-tk/tclIndex
 --- plplot-5.9.9/sys/win-tk/tclIndex	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/tclIndex	2011-04-06 14:29:28.332436629 -0600
++++ plplot-trunk/sys/win-tk/tclIndex	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,42 @@
 +# Tcl autoload index file, version 2.0
 +# This file is generated by the "auto_mkindex" command
@@ -1104996,7 +1113290,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/tclIndex plplot-trunk/sys/win-t
 +set auto_index(x19) [list source [file join $dir x19.tcl]]
 diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/testPlplot.tcl plplot-trunk/sys/win-tk/testPlplot.tcl
 --- plplot-5.9.9/sys/win-tk/testPlplot.tcl	1969-12-31 17:00:00.000000000 -0700
-+++ plplot-trunk/sys/win-tk/testPlplot.tcl	2011-04-06 14:29:28.335436372 -0600
++++ plplot-trunk/sys/win-tk/testPlplot.tcl	2011-04-06 14:29:28.000000000 -0600
 @@ -0,0 +1,50 @@
 +puts stdout "Creating plplot directory" ; update
 +catch {
@@ -1105050,7 +1113344,7 @@ diff -ruN --exclude .svn plplot-5.9.9/sys/win-tk/testPlplot.tcl plplot-trunk/sys
 +
 diff -ruN --exclude .svn plplot-5.9.9/utils/CMakeLists.txt plplot-trunk/utils/CMakeLists.txt
 --- plplot-5.9.9/utils/CMakeLists.txt	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/utils/CMakeLists.txt	2011-11-30 09:19:44.941803491 -0700
++++ plplot-trunk/utils/CMakeLists.txt	2011-11-30 09:19:44.000000000 -0700
 @@ -80,7 +80,7 @@
  
    add_executable(pltcl pltcl.c)
@@ -1105069,7 +1113363,7 @@ diff -ruN --exclude .svn plplot-5.9.9/utils/CMakeLists.txt plplot-trunk/utils/CM
 +add_executable(parity_bit_check parity_bit_check.c)
 diff -ruN --exclude .svn plplot-5.9.9/utils/parity_bit_check.c plplot-trunk/utils/parity_bit_check.c
 --- plplot-5.9.9/utils/parity_bit_check.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/utils/parity_bit_check.c	2012-01-04 08:45:34.634583436 -0700
++++ plplot-trunk/utils/parity_bit_check.c	2012-01-04 08:45:34.000000000 -0700
 @@ -9,6 +9,8 @@
  main( int argc, char *argv[] )
  {
@@ -1105081,7 +1113375,7 @@ diff -ruN --exclude .svn plplot-5.9.9/utils/parity_bit_check.c plplot-trunk/util
          if ( c & 0x80 )
 diff -ruN --exclude .svn plplot-5.9.9/utils/pltcl.c plplot-trunk/utils/pltcl.c
 --- plplot-5.9.9/utils/pltcl.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/utils/pltcl.c	2012-01-04 08:45:34.632583508 -0700
++++ plplot-trunk/utils/pltcl.c	2012-01-04 08:45:34.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: pltcl.c 11680 2011-03-27 17:57:51Z airwin $
 +// $Id: pltcl.c 12093 2011-12-03 08:33:04Z andrewross $
@@ -1105110,7 +1113404,7 @@ diff -ruN --exclude .svn plplot-5.9.9/utils/pltcl.c plplot-trunk/utils/pltcl.c
  
 diff -ruN --exclude .svn plplot-5.9.9/utils/pltek.c plplot-trunk/utils/pltek.c
 --- plplot-5.9.9/utils/pltek.c	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/utils/pltek.c	2012-01-28 07:51:43.585792037 -0700
++++ plplot-trunk/utils/pltek.c	2012-01-28 07:51:43.000000000 -0700
 @@ -1,4 +1,4 @@
 -// $Id: pltek.c 11289 2010-10-29 20:44:17Z airwin $
 +// $Id: pltek.c 12128 2012-01-14 23:17:53Z airwin $
@@ -1105182,7 +1113476,7 @@ diff -ruN --exclude .svn plplot-5.9.9/utils/pltek.c plplot-trunk/utils/pltek.c
                  exit( 1 );
 diff -ruN --exclude .svn plplot-5.9.9/www/examples.php plplot-trunk/www/examples.php
 --- plplot-5.9.9/www/examples.php	2011-10-12 18:43:01.000000000 -0600
-+++ plplot-trunk/www/examples.php	2011-11-02 09:43:03.972121965 -0600
++++ plplot-trunk/www/examples.php	2011-11-02 09:43:03.000000000 -0600
 @@ -216,7 +216,7 @@
  		echo <<<END
  			<h3>Examples</h3>


More information about the scm-commits mailing list