[113126] trunk/dports/science/gmt4
takeshi at macports.org
takeshi at macports.org
Sat Nov 9 14:46:03 PST 2013
Revision: 113126
https://trac.macports.org/changeset/113126
Author: takeshi at macports.org
Date: 2013-11-09 14:46:03 -0800 (Sat, 09 Nov 2013)
Log Message:
-----------
gmt4: added forgotten patches closing #41226 again
Added Paths:
-----------
trunk/dports/science/gmt4/files/
trunk/dports/science/gmt4/files/patch-grdvector.diff
trunk/dports/science/gmt4/files/patch-ps2raster.2.diff
trunk/dports/science/gmt4/files/patch-ps2raster.diff
Added: trunk/dports/science/gmt4/files/patch-grdvector.diff
===================================================================
--- trunk/dports/science/gmt4/files/patch-grdvector.diff (rev 0)
+++ trunk/dports/science/gmt4/files/patch-grdvector.diff 2013-11-09 22:46:03 UTC (rev 113126)
@@ -0,0 +1,27 @@
+--- src/grdvector.c (revision 10145)
++++ src/grdvector.c (working copy)
+@@ -388,15 +388,7 @@
+ if (!Ctrl->N.active) GMT_map_clip_on (GMT_no_rgb, 3);
+
+ if (Ctrl->I.xinc != 0.0 && Ctrl->I.yinc != 0.0) { /* Gave a coarser grid spacing, we hope */
+- struct GRD_HEADER tmp_h;
+- double val;
+- tmp_h = h[0];
+- tmp_h.x_inc = Ctrl->I.xinc;
+- tmp_h.y_inc = Ctrl->I.yinc;
+- GMT_RI_prepare (&tmp_h); /* Convert to make sure we have correct increments */
+- Ctrl->I.xinc = tmp_h.x_inc;
+- Ctrl->I.yinc = tmp_h.y_inc;
+- val = Ctrl->I.yinc / h[0].y_inc;
++ double val = Ctrl->I.yinc / h[0].y_inc;
+ dj = irint (val);
+ if (dj == 0 || fabs (val - dj) > GMT_CONV_LIMIT) {
+ fprintf (stderr, "%s: Error: New y grid increment (%g) is not a multiple of actual grid increment (%g).\n", GMT_program, Ctrl->I.xinc, h[0].x_inc);
+@@ -408,6 +400,7 @@
+ fprintf (stderr, "%s: Error: New x grid increment (%g) is not a multiple of actual grid increment (%g).\n", GMT_program, Ctrl->I.xinc, h[0].x_inc);
+ exit (EXIT_FAILURE);
+ }
++ /* Determine starting point for straddled access */
+ tmp = ceil (h[0].y_max / Ctrl->I.yinc) * Ctrl->I.yinc;
+ if (tmp > h[0].y_max) tmp -= Ctrl->I.yinc;
+ j0 = irint ((h[0].y_max - tmp) / h[0].y_inc);
Added: trunk/dports/science/gmt4/files/patch-ps2raster.2.diff
===================================================================
--- trunk/dports/science/gmt4/files/patch-ps2raster.2.diff (rev 0)
+++ trunk/dports/science/gmt4/files/patch-ps2raster.2.diff 2013-11-09 22:46:03 UTC (rev 113126)
@@ -0,0 +1,11 @@
+--- src/ps2raster.c (revision 10145)
++++ src/ps2raster.c (working copy)
+@@ -505,7 +505,7 @@
+ for (k = 0; k < n_files; k++) {
+ excessK = FALSE;
+ memset ((void *)out_file, 0, BUFSIZ);
+- strcpy(ps_file,ps_names[k]);
++ if (ps_file != ps_names[k]) strcpy(ps_file,ps_names[k]);
+ if ((fp = fopen (ps_file, "r")) == NULL) {
+ fprintf (stderr, "%s: Cannot to open file %s\n", GMT_program, ps_file);
+ continue;
Added: trunk/dports/science/gmt4/files/patch-ps2raster.diff
===================================================================
--- trunk/dports/science/gmt4/files/patch-ps2raster.diff (rev 0)
+++ trunk/dports/science/gmt4/files/patch-ps2raster.diff 2013-11-09 22:46:03 UTC (rev 113126)
@@ -0,0 +1,11 @@
+--- src/ps2raster.c (revision 10145)
++++ src/ps2raster.c (working copy)
+@@ -505,7 +505,7 @@
+ for (k = 0; k < n_files; k++) {
+ excessK = FALSE;
+ memset ((void *)out_file, 0, BUFSIZ);
+- strcpy(ps_file,ps_names[k]);
++ if (ps_file != ps_names[k]) strcpy(ps_file,ps_names[k]);
+ if ((fp = fopen (ps_file, "r")) == NULL) {
+ fprintf (stderr, "%s: Cannot to open file %s\n", GMT_program, ps_file);
+ continue;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131109/5fcae253/attachment.html>
More information about the macports-changes
mailing list