[surf-alggeo] 01/01: Corrected Imported Debian patch 1.0.6+ds-2
Jerome Benoit
calculus-guest at moszumanska.debian.org
Thu May 14 12:18:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
calculus-guest pushed a commit to branch master
in repository surf-alggeo.
commit 0afa17b1ea64245ff35c270e6cfd61970839310e
Author: Jerome Benoit <calculus at rezozer.net>
Date: Thu May 14 14:10:08 2015 +0200
Corrected Imported Debian patch 1.0.6+ds-2
---
debian/changelog | 6 +-
debian/patches/upstream-automatic_extension.patch | 161 +++++++++++++++++++++-
debian/patches/upstream-clip_to_rectangle.patch | 6 +-
3 files changed, 166 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 08b6412..20f85de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,9 +4,11 @@ surf-alggeo (1.0.6+ds-2) unstable; urgency=medium
-debian/patches/:
- autotool chain:
- libjepg find and check, harden;
- - GMP find and check, refresh.
+ - GMP find and check, refresh;
+ - clip to rectangle, correct important bug;
+ - automatic extension, bring to dithered image.
- -- Jerome Benoit <calculus at rezozer.net> Mon, 27 Apr 2015 09:52:53 +0000
+ -- Jerome Benoit <calculus at rezozer.net> Thu, 14 May 2015 12:09:42 +0000
surf-alggeo (1.0.6+ds-1) unstable; urgency=medium
diff --git a/debian/patches/upstream-automatic_extension.patch b/debian/patches/upstream-automatic_extension.patch
index 6195dfe..318da5f 100644
--- a/debian/patches/upstream-automatic_extension.patch
+++ b/debian/patches/upstream-automatic_extension.patch
@@ -35,8 +35,11 @@ Last-Update: 2015-04-10
if (Thread::shouldStop())
return;
-@@ -444,7 +448,52 @@
+@@ -442,9 +446,55 @@
+
+ if (!surface_filename_data) {
Misc::alert ("no filename given.");
++ return ;
}
-// const char *name = surface_filename_data;
@@ -89,7 +92,7 @@ Last-Update: 2015-04-10
/* Fuck, fuck, fuck...why cant I just have working exceptions with
* every every version of gcc I can think of (especially 2.7.x)...
-@@ -452,22 +501,6 @@
+@@ -452,22 +502,6 @@
* I could have just thrown an exception in FileWriter if the file couldnt
* be opened. But now Ive got to open the file too early...
*/
@@ -112,6 +115,160 @@ Last-Update: 2015-04-10
FileWriter fw (surface_filename_data);
FILE *f = fw.openFile();
+@@ -571,6 +605,8 @@
+
+ void Script::saveDitheredImage()
+ {
++ bool auto_extension = false;
++
+ if (Thread::shouldStop())
+ return;
+
+@@ -578,87 +614,101 @@
+
+ BEGIN("Script::saveDitheredImage");
+ Thread::setDoing ("saving dithered image...");
+- bit_buffer *pixel = getBitBuffer();
+
+- switch( print_output_data ) {
+- case 0 :
+- strcat(surface_filename_data, ".ps");
+- break;
+- case 1 :
+- strcat(surface_filename_data, ".eps");
+- break;
+- case 2 :
+- strcat(surface_filename_data, ".bmp");
+- break;
+- case 3 :
+- strcat(surface_filename_data, ".tiff");
+- break;
+- case 5:
+- strcat(surface_filename_data, ".pgm");
+- break;
+- case 6:
+- strcat(surface_filename_data, ".pbm");
+- break;
+- case 7:
+- strcat(surface_filename_data, ".pdf");
+- break;
+- default :
+- Misc::alert ("dither_file_format out of range. no saving done.");
+- break;
++ if (!surface_filename_data) {
++ Misc::alert ("no filename given.");
++ return ;
+ }
+
+- char *name = surface_filename_data;
++ char * surface_filename_data_extension=strrchr(surface_filename_data,'.');
+
+- if (name == 0)
+- return;
+- FileWriter fw (name);
++ if ((surface_filename_data_extension != NULL) &&
++ ( (strcmp(surface_filename_data_extension, ".xxx") == 0)
++ || (strcmp(surface_filename_data_extension, ".XXX") == 0)
++ || (strcmp(surface_filename_data_extension, ".auto-extension") == 0)
++ || (strcmp(surface_filename_data_extension, ".automatic-extension") == 0)
++ )
++ ) {
++ *surface_filename_data_extension = '\0';
++ auto_extension = true;
++ }
++ else if(options->get_auto_extension()) {
++ if ((surface_filename_data_extension == NULL) ||
++ (!(((print_output_data == 0) && (strcmp(surface_filename_data_extension, ".ps") == 0))
++ || ((print_output_data == 1) && (strcmp(surface_filename_data_extension, ".eps") == 0))
++ || ((print_output_data == 2) && (strcmp(surface_filename_data_extension, ".bmp") == 0))
++ || ((print_output_data == 3) && (strcmp(surface_filename_data_extension, ".tiff") == 0))
++ || ((print_output_data == 5) && (strcmp(surface_filename_data_extension, ".pgm") == 0))
++ || ((print_output_data == 6) && (strcmp(surface_filename_data_extension, ".pbm") == 0))
++ || ((print_output_data == 7) && (strcmp(surface_filename_data_extension, ".pdf") == 0))
++ ))
++ ) {
++ auto_extension = true;
++ }
++ }
++
++ if(auto_extension) {
++ switch( print_output_data ) {
++ case 0: strcat(surface_filename_data, ".ps"); break;
++ case 1: strcat(surface_filename_data, ".eps"); break;
++ case 2: strcat(surface_filename_data, ".bmp"); break;
++ case 3: strcat(surface_filename_data, ".tiff"); break;
++ case 5: strcat(surface_filename_data, ".pgm"); break;
++ case 6: strcat(surface_filename_data, ".pbm"); break;
++ case 7: strcat(surface_filename_data, ".pdf"); break;
++ default: Misc::alert ("dither_file_format out of range, no saving done."); break;
++ }
++ }
++ else {
++ switch( print_output_data ) {
++ case 0: case 1: case 2: case 3: case 5: case 6: case 7: break;
++ default: Misc::alert ("dither_file_format out of range, no saving done."); break;
++ }
++ }
++
++ FileWriter fw (surface_filename_data);
+
+ // see comments above in saveColorImage
+- FILE *f=fw.openFile();
++ FILE *f=fw.openFile();
+ if (f==0) {
+ Misc::alert ("Could not open file for writing...");
+ return;
+ }
+-
++
++ bit_buffer *pixel = getBitBuffer();
++
+ switch( print_output_data ) {
+ case 0 :
+ psprint (*pixel, fw.openFile(),
+ print_resolution_array_data[print_resolution_data]);
+ break;
+-
+ case 1 :
+ epsprint (*pixel, fw.openFile(),
+ print_resolution_array_data[print_resolution_data] );
+ break;
+-
+ case 2 :
+ bitmapprint (*pixel, fw.openFile(), fw.getName());
+ break;
+-
+ case 3 :
+ if (fw.isWritingToPipe()) {
+ Misc::alert ("Tiff images can only be written to a file.");
+ return;
+ }
+- tiffprint (*pixel, name,
++ tiffprint (*pixel, surface_filename_data,
+ print_resolution_array_data[print_resolution_data]);
+ break;
+-
+ case 5:
+ pixel->write_as_pgm (fw.openFile());
+ break;
+-
+ case 6:
+ pixel->write_as_pbm (fw.openFile());
+ break;
+-
+- case 7:
+- pdfprint (*pixel, fw.openFile(),
++ case 7:
++ pdfprint (*pixel, fw.openFile(),
+ print_resolution_array_data[print_resolution_data], fw.getName());
+ break;
+-
+ default :
+- Misc::alert ("dither_file_format out of range. no saving done.");
++ Misc::alert ("dither_file_format out of range, no saving done.");
+ break;
+ }
+ }
--- a/src/Options.h
+++ b/src/Options.h
@@ -15,6 +15,7 @@
diff --git a/debian/patches/upstream-clip_to_rectangle.patch b/debian/patches/upstream-clip_to_rectangle.patch
index af625fb..f1adcfc 100644
--- a/debian/patches/upstream-clip_to_rectangle.patch
+++ b/debian/patches/upstream-clip_to_rectangle.patch
@@ -11,7 +11,7 @@ Forwarded: submitted
Author:
Jerome Benoit <calculus at rezozer.net>
Henning Meyer <hmeyer at mathematik.uni-kl.de>
-Last-Update: 2015-04-10
+Last-Update: 2015-05-14
--- a/src/Options.h
+++ b/src/Options.h
@@ -99,8 +99,8 @@ Last-Update: 2015-04-10
+ int clip_ymax = options->get_clip_ymax();
+ xmin = ((clip_xmin<0)? 0 : min(clip_xmin, main_width_data));
+ ymin = ((clip_ymin<0)? 0 : min(clip_ymin, main_height_data));
-+ xmax = ((clip_xmax<0)? 0 : min(clip_xmax, main_width_data));
-+ ymax = ((clip_ymax<0)? 0 : min(clip_ymax, main_height_data));
++ xmax = ((clip_xmax<0)? main_width_data : min(clip_xmax, main_width_data));
++ ymax = ((clip_ymax<0)? main_height_data : min(clip_ymax, main_height_data));
+ }
+ else {
+ xmin = 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/surf-alggeo.git
More information about the debian-science-commits
mailing list