File gerbv-2.6.1-undefined-symbols.patch of Package gerbv

diff -ur gerbv-2.6.1/src/callbacks.c gerbv-2.6.1.mod/src/callbacks.c
--- a/src/callbacks.c	2013-07-22 21:09:16.000000000 +0200
+++ b/src/callbacks.c	2015-03-01 02:41:55.775350761 +0100
@@ -89,13 +89,6 @@
 #define SAVE_AS_PROJECT 1
 #define OPEN_PROJECT 2
 
-/**Global variable to keep track of what's happening on the screen.
-   Declared extern in gerbv_screen.h
- */
-extern gerbv_screen_t screen;
-extern gerbv_render_info_t screenRenderInfo;
-
-
 /* These are the names of the valid apertures.  These
  * values are used in several places in this file.
  * Please keep this in sync with the gerbv_aperture_type_t 
diff -ur gerbv-2.6.1/src/exportimage.c gerbv-2.6.1.mod/src/exportimage.c
--- a/src/exportimage.c	2013-07-22 21:09:16.000000000 +0200
+++ b/src/exportimage.c	2015-03-01 02:43:23.249446752 +0100
@@ -28,19 +28,14 @@
     \ingroup libgerbv
 */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "gerbv.h"
+#include "common.h"
 
 #include <math.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <png.h>
 
-#include "gerbv.h"
+#include "render.h"
 
 #include "draw.h"
 #include <cairo.h>
@@ -48,8 +43,6 @@
 #include <cairo-ps.h>
 #include <cairo-svg.h>
 
-extern gerbv_render_info_t screenRenderInfo;
-
 void exportimage_render_to_surface_and_destroy (gerbv_project_t *gerbvProject,
 		cairo_surface_t *cSurface, gerbv_render_info_t *renderInfo, gchar const* filename) {
       cairo_t *cairoTarget = cairo_create (cSurface);
diff -ur gerbv-2.6.1/src/interface.c gerbv-2.6.1.mod/src/interface.c
--- a/src/interface.c	2013-07-22 21:09:16.000000000 +0200
+++ b/src/interface.c	2015-03-01 02:43:32.812566655 +0100
@@ -52,7 +52,6 @@
 
 #include "gerbv_icon.h"
 #include "icons.h"
-extern gerbv_render_info_t screenRenderInfo;
 
 #define WIN_TITLE N_("Gerbv -- gEDA's Gerber Viewer")
 
diff -ur gerbv-2.6.1/src/main.c gerbv-2.6.1.mod/src/main.c
--- a/src/main.c	2013-07-22 21:09:16.000000000 +0200
+++ b/src/main.c	2015-03-01 02:43:50.698790955 +0100
@@ -160,7 +160,7 @@
 const char *opt_options = "VadhB:D:O:W:b:f:r:m:l:o:p:t:T:w:x:";
 
 /**Global state variable to keep track of what's happening on the screen.
-   Declared extern in gerbv_screen.h
+   Declared extern in main.h
  */
 gerbv_project_t *mainProject;
 gerbv_screen_t screen;
diff -ur gerbv-2.6.1/src/render.c gerbv-2.6.1.mod/src/render.c
--- a/src/render.c	2013-07-22 21:09:16.000000000 +0200
+++ b/src/render.c	2015-03-01 02:44:39.142398742 +0100
@@ -69,17 +69,7 @@
 
 #define dprintf if(DEBUG) printf
 
-/**Global variable to keep track of what's happening on the screen.
-   Declared extern in gerbv_screen.h
- */
-extern gerbv_screen_t screen;
-
-extern gerbv_render_info_t screenRenderInfo;
-
-/*
-static void
-render_layer_to_cairo_target_without_transforming(cairo_t *cr, gerbv_fileinfo_t *fileInfo, gerbv_render_info_t *renderInfo );
-*/
+gerbv_render_info_t screenRenderInfo;
 
 gboolean
 render_check_scale_factor_limits (void) {
diff -ur gerbv-2.6.1/src/render.h gerbv-2.6.1.mod/src/render.h
--- a/src/render.h	2013-07-22 21:09:16.000000000 +0200
+++ b/src/render.h	2015-03-01 02:45:20.823922017 +0100
@@ -71,8 +71,4 @@
 render_fill_selection_buffer_from_mouse_drag (gint corner1X, gint corner1Y,
 	gint corner2X, gint corner2Y, gint activeFileIndex, gboolean eraseOldSelection);
 
-gerbv_render_info_t screenRenderInfo;
-
-
-
-
+extern gerbv_render_info_t screenRenderInfo;
diff --git a/src/pick-and-place.c b/src/pick-and-place.c
index ab50337..23d1cd1 100644
--- a/src/pick-and-place.c
+++ b/src/pick-and-place.c
@@ -56,7 +56,6 @@
 
 #include "gerbv.h"
 #include "gerber.h"
-#include "main.h"
 #ifdef RENDER_USING_GDK
   #include "draw-gdk.h"
 #else
@@ -161,36 +160,22 @@ pick_and_place_reset_bounding_box (gerbv_net_t *net) {
 }
 
 //! Parses a string representing float number with a unit, default is mil
-static double 
-pick_and_place_get_float_unit(char *str)
+static double
+pick_and_place_get_float_unit(const char *str)
 {
     double x = 0.0;
     char unit[41];
-    extern gerbv_screen_t screen;
 
     /* float, optional space, optional unit mm,cm,in,mil */
     sscanf(str, "%lf %40s", &x, unit);
     if(strstr(unit,"in")) {
 	;
-    } else if(strstr(unit, "mil")) {
-	x /= 1000;
     } else if(strstr(unit, "cm")) {
 	x /= 2.54;
     } else if(strstr(unit, "mm")) {
 	x /= 25.4;
-    } else { /* default to GUI units */
-	switch (screen.unit) {
-	case GERBV_INS:
-	    break;
-	case GERBV_MILS:
-	    x /= 1000;
-	    break;
-	case GERBV_MMS:
-	    x /= 25.4;
-	    break;
-	default:
-	    assert(screen.unit);
-	}
+    } else { /* default to mils */
+	x /= 1000;
     }
 
     return x;