[eso-midas] 02/03: Remove qsort.patch since this is fixed upstream

Ole Streicher olebole at moszumanska.debian.org
Wed Jun 10 08:19:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository eso-midas.

commit 625e9b37471cdd4b6e66c787fdd6742ceb421fe4
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Jun 10 09:43:54 2015 +0200

    Remove qsort.patch since this is fixed upstream
---
 debian/changelog                   |   6 +-
 debian/patches/fix_fitswdm_c.patch |   1 -
 debian/patches/qsort.patch         | 234 -------------------------------------
 debian/patches/series              |   1 -
 4 files changed, 3 insertions(+), 239 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b05ace6..9038bd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-eso-midas (15.02pl1.2-1) UNRELEASED; urgency=low
+eso-midas (15.02pl1.3-1) UNRELEASED; urgency=low
 
-  * Add CI tests
   * New upstream version
+  * Add CI tests
   * Move back to unstable
 
- -- Ole Streicher <olebole at debian.org>  Fri, 22 May 2015 09:17:51 +0200
+ -- Ole Streicher <olebole at debian.org>  Wed, 10 Jun 2015 09:21:14 +0200
 
 eso-midas (15.02pl1.1-1~exp5) experimental; urgency=low
 
diff --git a/debian/patches/fix_fitswdm_c.patch b/debian/patches/fix_fitswdm_c.patch
index 4ec9bee..625208d 100644
--- a/debian/patches/fix_fitswdm_c.patch
+++ b/debian/patches/fix_fitswdm_c.patch
@@ -46,4 +46,3 @@ Description: fix nullification of fitswdm.c
              *pd++;
              }
           else
-
diff --git a/debian/patches/qsort.patch b/debian/patches/qsort.patch
deleted file mode 100644
index 1e09dcb..0000000
--- a/debian/patches/qsort.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Replace heapsort by qsort
- The heapsort code used in MIDAS is buggy: it creates wrong results, and it
- may corrupt the stack. The simplest solution is to replace it with the
- qsort() function provided by standard libm.
---- /dev/null
-+++ b/libsrc/math/quicksort.c
-@@ -0,0 +1,115 @@
-+/*===========================================================================
-+  Copyright (C) 2015 Ole Streicher <olebole at debian.org>
-+
-+  This program is free software; you can redistribute it and/or
-+  modify it under the terms of the GNU General Public License as
-+  published by the Free Software Foundation; either version 2 of
-+  the License, or (at your option) any later version.
-+
-+  This program 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 General Public License for more details.
-+
-+  You should have received a copy of the GNU General Public
-+  License along with this program; if not, write to the Free
-+  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+  Boston, MA 02110-1301, USA.
-+
-+  Corresponding concerning ESO-MIDAS should be addressed as follows:
-+        Internet e-mail: midas at eso.org
-+        Postal address: European Southern Observatory
-+                        Data Management Division
-+                        Karl-Schwarzschild-Strasse 2
-+                        D 85748 Garching bei Muenchen
-+                        GERMANY
-+===========================================================================*/
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include "mutil.h"
-+
-+typedef struct {
-+    int number;
-+    int rank;
-+} int_sort_s;
-+
-+static int compar_int(const void *a1, const void *a2) {
-+    int n1 = ((int_sort_s *)a1)->number;
-+    int n2 = ((int_sort_s *)a2)->number;
-+    return (n1 < n2)?-1:(n1 > n2)?1:0;
-+}
-+
-+void quickSortInt(int array_size, int numbers[], int rank[]) {
-+    int i;
-+    int_sort_s *a = malloc(array_size * sizeof(int_sort_s));
-+    for (i = 0; i < array_size; i++) {
-+	a[i].number = numbers[i];
-+	a[i].rank = rank[i];
-+    }
-+    qsort(a, array_size, sizeof(int_sort_s), compar_int);
-+    for (i = 0; i < array_size; i++) {
-+	numbers[i] = a[i].number;
-+	rank[i] = a[i].rank;
-+    }
-+    free(a);
-+}
-+
-+typedef struct {
-+    float number;
-+    int rank;
-+} float_sort_s;
-+
-+static int compar_float(const void *a1, const void *a2) {
-+    float n1 = ((float_sort_s *)a1)->number;
-+    float n2 = ((float_sort_s *)a2)->number;
-+    return (n1 < n2)?-1:(n1 > n2)?1:0;
-+}
-+
-+void quickSortFloat(int array_size, float numbers[], int rank[]) {
-+    int i;
-+    float_sort_s *a = malloc(array_size * sizeof(float_sort_s));
-+    for (i = 0; i < array_size; i++) {
-+	a[i].number = numbers[i];
-+	a[i].rank = rank[i];
-+    }
-+    qsort(a, array_size, sizeof(float_sort_s), compar_float);
-+    for (i = 0; i < array_size; i++) {
-+	numbers[i] = a[i].number;
-+	rank[i] = a[i].rank;
-+    }
-+    free(a);
-+}
-+
-+typedef struct {
-+    double number;
-+    int rank;
-+} double_sort_s;
-+
-+static int compar_double(const void *a1, const void *a2) {
-+    double n1 = ((double_sort_s *)a1)->number;
-+    double n2 = ((double_sort_s *)a2)->number;
-+    return (n1 < n2)?-1:(n1 > n2)?1:0;
-+}
-+
-+void quickSortDouble(int array_size, double numbers[], int rank[]) {
-+    int i;
-+    double_sort_s *a = malloc(array_size * sizeof(double_sort_s));
-+    for (i = 0; i < array_size; i++) {
-+	a[i].number = numbers[i];
-+	a[i].rank = rank[i];
-+    }
-+    qsort(a, array_size, sizeof(double_sort_s), compar_double);
-+    for (i = 0; i < array_size; i++) {
-+	numbers[i] = a[i].number;
-+	rank[i] = a[i].rank;
-+    }
-+    free(a);
-+}
-+
-+void  quickFillRank(int array_size, int rank[], int offset)
-+{
-+  int i;
-+  for (i=0; i<array_size; i++)
-+       rank[i] = i + offset;
-+}
---- a/libsrc/math/makefile
-+++ b/libsrc/math/makefile
-@@ -18,7 +18,7 @@
- LIB = $(LIBDIR)/libmidmath.a
- 
- OBJ0 =  rebu01.o
--OBJ1 =  sort.o heapsort.o cpl_matrix.o nrutil.o mutil.o mpfit.o fitnol.o spline.o
-+OBJ1 =  sort.o quicksort.o cpl_matrix.o nrutil.o mutil.o mpfit.o fitnol.o spline.o
- 
- 
- # DEPENDENCIES:
---- a/incl/mutil.h
-+++ b/incl/mutil.h
-@@ -111,25 +111,25 @@
- #endif
- );
- 
--extern void heapSortInt(
-+extern void quickSortInt(
- #ifdef __STDC__
-   int array_size, int numbers[], int rank[]
- #endif
- );
- 
--extern void heapSortFloat(
-+extern void quickSortFloat(
- #ifdef __STDC__
-   int array_size, float numbers[], int rank[]
- #endif
- );
- 
--extern void heapSortDouble(
-+extern void quickSortDouble(
- #ifdef __STDC__
-   int array_size, double numbers[], int rank[]
- #endif
- );
- 
--extern void heapFillRank(
-+extern void quickFillRank(
- #ifdef __STDC__
-   int array_size, int rank[], int offset
- #endif
---- a/libsrc/math/sort.c
-+++ b/libsrc/math/sort.c
-@@ -51,8 +51,8 @@
- {
- 
-   int *ia = (int*)malloc((size_t)n*sizeof(int)); 
--  heapFillRank(n,ia,0);   
--  heapSortFloat(n,ra,ia); 
-+  quickFillRank(n,ia,0);
-+  quickSortFloat(n,ra,ia);
-   free(ia); 
- 
- }
---- a/prim/general/libsrc/iqefunc.c
-+++ b/prim/general/libsrc/iqefunc.c
-@@ -456,9 +456,9 @@
-  
-   heap_copy(n, arrin, b); 
- 
--  heapFillRank(n,indx,0); 
--  // heapSortFloat(n, arrin, indx); 
--  heapSortFloat(n, b, indx); 
-+  quickFillRank(n,indx,0);
-+  // quickSortFloat(n, arrin, indx);
-+  quickSortFloat(n, b, indx);
- 
- }
- 
---- a/prim/general/libsrc/sort.c
-+++ b/prim/general/libsrc/sort.c
-@@ -35,7 +35,7 @@
- .VERSION 
-  090630		creation 
-  110517         last modif
-- 150215         making use of hsort and heapSort modules (libsrc/math)
-+ 310315         making use of hsort and quickSort modules (libsrc/math)
- ---------------------------------------------------------------------*/
- 
- #include <mutil.h>
-@@ -51,7 +51,7 @@
- -----------------------------------------------------------------------*/
- 
- {
--  heapSortFloat(nsiz, ra, ia); 
-+  quickSortFloat(nsiz, ra, ia);
- }
- 
- 
---- a/stdred/ccdred/libsrc/sort.c
-+++ b/stdred/ccdred/libsrc/sort.c
-@@ -88,7 +88,7 @@
- int   *xval, *yval;
- 
- {
--  heapSortInt(n, xval, yval); 
-+  quickSortInt(n, xval, yval);
- }
- 
- /*
-@@ -99,7 +99,7 @@
- float *xval;
- int   *yval;
- {
--  heapSortFloat(n,xval,yval); 
-+  quickSortFloat(n,xval,yval);
- }
- 
- 
diff --git a/debian/patches/series b/debian/patches/series
index bfd55e2..daae03f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,7 +10,6 @@ system_readline.patch
 fix_manpages.patch
 dont_compile_sp_pty.patch
 fix_fitswdm_c.patch
-qsort.patch
 fix_rarthm_for.patch
 fix_mdb_put.patch
 fix_fitswdb.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/eso-midas.git



More information about the debian-science-commits mailing list