[Debian-astro-commits] [cpl-plugin-vimos] 03/03: Adjust patches for new version; add gsl to build dependencies

Ole Streicher olebole at moszumanska.debian.org
Tue Oct 13 14:35:42 UTC 2015


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

olebole pushed a commit to branch debian
in repository cpl-plugin-vimos.

commit b3027c629dcc4514b4f7d481313a9fa3068855db
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Tue Oct 13 16:25:56 2015 +0200

    Adjust patches for new version; add gsl to build dependencies
---
 debian/changelog                           |   6 +
 debian/control                             |   8 +-
 debian/patches/dont_build_sextractor.patch |   6 +-
 debian/patches/fix_compiler_errors.patch   | 156 -----------------
 debian/patches/fix_irplib_gcc5.patch       | 110 ------------
 debian/patches/fix_test_fail.patch         |   2 +-
 debian/patches/private_libpil.patch        |   8 +-
 debian/patches/series                      |   3 -
 debian/patches/set_plugindir.patch         |   2 +-
 debian/patches/shlib-calls-exit.patch      | 263 -----------------------------
 10 files changed, 20 insertions(+), 544 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 86e4c5f..9fb24a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cpl-plugin-vimos (3.0.6+dfsg-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Ole Streicher <olebole at debian.org>  Tue, 13 Oct 2015 16:25:17 +0200
+
 cpl-plugin-vimos (2.9.16+dfsg-1) unstable; urgency=low
 
   * New upstream version
diff --git a/debian/control b/debian/control
index 84860a0..66db09f 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,8 @@ Uploaders: Ole Streicher <olebole at debian.org>
 Build-Depends: debhelper (>= 9),
                dh-autoreconf,
                libcpl-dev (>= 5.3.1),
+               libgsl0-dev,
+	       pkg-config,
                python,
                python-astropy,
                python-cpl,
@@ -18,7 +20,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-astro/packages/cpl-plugi
 Package: cpl-plugin-vimos
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
-Recommends: esorex|python-cpl, sextractor
+Recommends: esorex | python-cpl, sextractor
 Suggests: cpl-plugin-vimos-calib, cpl-plugin-vimos-doc
 Multi-Arch: same
 Description: ESO data reduction pipeline for VIMOS
@@ -44,9 +46,9 @@ Description: ESO data reduction pipeline documentation for VIMOS
 Package: cpl-plugin-vimos-calib
 Architecture: all
 Multi-Arch: foreign
-Depends: ${misc:Depends}, cpl-plugin-vimos, wget
+Depends: cpl-plugin-vimos, wget, ${misc:Depends}
 Section: contrib/science
 Description: ESO data reduction pipeline calibration data downloader for VIMOS
- This package downloads calibration and other static data of the 
+ This package downloads calibration and other static data of the
  data reduction pipeline for the VIMOS instrument of the
  Very Large Telescope (VLT) from the European Southern Observatory (ESO).
diff --git a/debian/patches/dont_build_sextractor.patch b/debian/patches/dont_build_sextractor.patch
index 81d103f..38f1744 100644
--- a/debian/patches/dont_build_sextractor.patch
+++ b/debian/patches/dont_build_sextractor.patch
@@ -19,7 +19,7 @@ Description: Use the system provided sextractor binary
 +DIST_SUBDIRS = $(COMPILE_FIRST) $(TOPSUBDIRS)
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -158,7 +158,7 @@
+@@ -172,7 +172,7 @@
      # Define the preprocessor symbols for the sextractor executable
      # and the configuration files.
  
@@ -30,9 +30,9 @@ Description: Use the system provided sextractor binary
                         [Absolute path to the sextractor executable])
 --- a/configure.ac
 +++ b/configure.ac
-@@ -114,7 +114,7 @@
+@@ -128,7 +128,7 @@
  
- VIMOS_SET_SEX_PREFIX
+ VIMOS_SET_PSFEX_PREFIX
  
 -AC_CONFIG_SUBDIRS(external/sextractor external/psfex)
 +AC_CONFIG_SUBDIRS(external/psfex)
diff --git a/debian/patches/fix_compiler_errors.patch b/debian/patches/fix_compiler_errors.patch
deleted file mode 100644
index a92702f..0000000
--- a/debian/patches/fix_compiler_errors.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Fix format security errors
---- a/vimos/moses.c
-+++ b/vimos/moses.c
-@@ -5463,7 +5463,7 @@
-         *err = sqrt(*err);
-     
-         if (ids == NULL) {
--            cpl_msg_debug(cpl_error_get_where(), cpl_error_get_message());
-+            cpl_msg_debug(cpl_error_get_where(), "%s", cpl_error_get_message());
-             cpl_msg_debug(func, "Fitting IDS");
-             cpl_error_set_where(func);
-             if (rejection) {
---- a/vimos/fors_dfs.c
-+++ b/vimos/fors_dfs.c
-@@ -665,7 +665,7 @@
-     if (frame) {
-         image = cpl_image_load(cpl_frame_get_filename(frame), type, 0, ext);
-         if (image == NULL) {
--            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-             cpl_msg_error(func, "Cannot load image %s",
-                           cpl_frame_get_filename(frame));
-         }
-@@ -720,7 +720,7 @@
-     if (frame) {
-         table = cpl_table_load(cpl_frame_get_filename(frame), ext, 1);
-         if (table == NULL) {
--            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-             cpl_msg_error(func, "Cannot load table %s",
-                           cpl_frame_get_filename(frame));
-         }
-@@ -771,7 +771,7 @@
-     if (frame) {
-         plist = cpl_propertylist_load(cpl_frame_get_filename(frame), ext);
-         if (plist == NULL) {
--            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-             cpl_msg_error(func, "Cannot load header from %s",
-                           cpl_frame_get_filename(frame));
-         }
-@@ -827,7 +827,7 @@
- 
- 
-     if (category == NULL || frameset == NULL || image == NULL) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
-         return -1;
-     }
-@@ -847,7 +847,7 @@
-     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
-     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
-     if (cpl_error_get_code()) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Cannot initialise the product frame");
-         cpl_frame_delete(frame);
-         cpl_free(filename);
-@@ -871,7 +871,7 @@
-     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
-                                      recipename, version, "PRO-1.15")) {
- #endif
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Problem with product %s FITS header definition",
-                       category);
-         if (header == NULL)
-@@ -899,7 +899,7 @@
- 
-     if (cpl_image_save(image, filename, CPL_BPP_IEEE_FLOAT, plist,
-                        CPL_IO_DEFAULT)) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Cannot save product %s to disk", filename);
-         if (header == NULL)
-             cpl_propertylist_delete(plist);
-@@ -965,7 +965,7 @@
- 
-     if (category == NULL || frameset == NULL || table == NULL) {
-         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         return -1;
-     }
- 
-@@ -991,7 +991,7 @@
-     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
-     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
-     if (cpl_error_get_code()) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Cannot initialise the product frame");
-         cpl_frame_delete(frame);
-         cpl_free(filename);
-@@ -1015,7 +1015,7 @@
-     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
-                                      recipename, version, "PRO-1.15")) {
- #endif
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Problem with product %s FITS header definition",
-                       category);
-         if (header == NULL)
-@@ -1041,7 +1041,7 @@
-     
-     
-     if (cpl_table_save(table, plist, NULL, filename, CPL_IO_DEFAULT)) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         cpl_msg_error(func, "Cannot save product %s to disk", filename);
-         if (header == NULL)
-             cpl_propertylist_delete(plist);
---- a/vimos/vimos_calib_impl.c
-+++ b/vimos/vimos_calib_impl.c
-@@ -970,7 +970,7 @@
-     slits = mos_locate_spectra(refmask);
- 
-     if (!slits) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         vimos_calib_exit("No slits could be detected!");
-     }
- 
-@@ -2057,7 +2057,7 @@
-     cpl_table_delete(slits); slits = NULL;
- 
-     if (cpl_error_get_code()) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         vimos_calib_exit(NULL);
-     }
- 
---- a/vimos/vimos_science_impl.c
-+++ b/vimos/vimos_science_impl.c
-@@ -1561,7 +1561,7 @@
-     cpl_propertylist_delete(header); header = NULL;
- 
-     if (cpl_error_get_code()) {
--        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-         vimos_science_exit(NULL);
-     }
-     else 
---- a/vimos/vimos_calib_mult.c
-+++ b/vimos/vimos_calib_mult.c
-@@ -1960,7 +1960,7 @@
-         cpl_table_delete(subslits); subslits = NULL;
- 
-         if (cpl_error_get_code()) {
--            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
-+            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
-             vimos_calmul_exit(NULL);
-         }
-     }
diff --git a/debian/patches/fix_irplib_gcc5.patch b/debian/patches/fix_irplib_gcc5.patch
deleted file mode 100644
index fa3b637..0000000
--- a/debian/patches/fix_irplib_gcc5.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From: jtaylor <jtaylor at 318c8218-2dab-440d-9263-6f70bac63e5b>
-Date: Fri, 31 Oct 2014 09:48:58 +0000
-Subject: [PATCH] make aligned allocator more robust to weird standard
- requirements
-
-C11 requires size to be multiple of alignment, so extend the size
-internally. glibc does not require that and additionally does not require
-the alignment to be a power of two. In irplib requires this for all variants
-for consistency.
---- a/irplib/irplib_utils.c
-+++ b/irplib/irplib_utils.c
-@@ -1587,51 +1587,61 @@
- /*----------------------------------------------------------------------------*/
- void * irplib_aligned_malloc(size_t alignment, size_t size)
- {
--#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
--    return aligned_alloc(alignment, size);
--#elif defined HAVE_POSIX_MEMALIGN && defined HAVE_DECL_POSIX_MEMALIGN
--    void *ptr;
--    if (alignment == 1)
--        return malloc (size);
--    if (alignment == 2 || (sizeof (void *) == 8 && alignment == 4))
--        alignment = sizeof (void *);
--    if (posix_memalign (&ptr, alignment, size) == 0)
--        return ptr;
--    else
--        return NULL;
--#else
--    /* copied from gmm_malloc.h in gcc-4.8 */
--    void * malloc_ptr;
--    void * aligned_ptr;
--
-+    if (alignment == 0)
-+        alignment = 1;
-     /* Error if align is not a power of two.  */
-     if (alignment & (alignment - 1)) {
-         errno = EINVAL;
-         return NULL;
-     }
-+    /* make size a multiple of alignment (required by C11) */
-+    if ((size % alignment) != 0) {
-+        size += alignment - (size % alignment);
-+    }
- 
--    if (size == 0)
--        return NULL;
--
--    /* Assume malloc'd pointer is aligned at least to sizeof (void*).
--       If necessary, add another sizeof (void*) to store the value
--       returned by malloc. Effectively this enforces a minimum alignment
--       of sizeof double. */
--    if (alignment < 2 * sizeof (void *))
--        alignment = 2 * sizeof (void *);
--
--    malloc_ptr = malloc (size + alignment);
--    if (!malloc_ptr)
--        return NULL;
--
--    /* Align  We have at least sizeof (void *) space below malloc'd ptr. */
--    aligned_ptr = (void *) (((size_t) malloc_ptr + alignment)
--                            & ~((size_t) (alignment) - 1));
-+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
-+    return aligned_alloc(alignment, size);
-+#elif defined HAVE_POSIX_MEMALIGN && defined HAVE_DECL_POSIX_MEMALIGN
-+    {
-+        void *ptr;
-+        if (alignment == 1)
-+            return malloc (size);
-+        if (alignment == 2 || (sizeof (void *) == 8 && alignment == 4))
-+            alignment = sizeof (void *);
-+        if (posix_memalign (&ptr, alignment, size) == 0)
-+            return ptr;
-+        else
-+            return NULL;
-+    }
-+#else
-+    /* copied from gmm_malloc.h in gcc-4.8 */
-+    {
-+        void * malloc_ptr;
-+        void * aligned_ptr;
-+
-+        if (size == 0)
-+            return NULL;
-+
-+        /* Assume malloc'd pointer is aligned at least to sizeof (void*).
-+           If necessary, add another sizeof (void*) to store the value
-+           returned by malloc. Effectively this enforces a minimum alignment
-+           of sizeof double. */
-+        if (alignment < 2 * sizeof (void *))
-+            alignment = 2 * sizeof (void *);
-+
-+        malloc_ptr = malloc (size + alignment);
-+        if (!malloc_ptr)
-+            return NULL;
-+
-+        /* Align  We have at least sizeof (void *) space below malloc'd ptr. */
-+        aligned_ptr = (void *) (((size_t) malloc_ptr + alignment)
-+                                & ~((size_t) (alignment) - 1));
- 
--    /* Store the original pointer just before p.  */
--    *(((void **) aligned_ptr) - 1) = malloc_ptr;
-+        /* Store the original pointer just before p.  */
-+        *(((void **) aligned_ptr) - 1) = malloc_ptr;
- 
--    return aligned_ptr;
-+        return aligned_ptr;
-+    }
- #endif
- }
- 
diff --git a/debian/patches/fix_test_fail.patch b/debian/patches/fix_test_fail.patch
index dd30010..27692fd 100644
--- a/debian/patches/fix_test_fail.patch
+++ b/debian/patches/fix_test_fail.patch
@@ -2,7 +2,7 @@ Author: Ole Streicher <olebole at debian.org>
 Description: Increase tolerance to fix FTBS on mips, mipsel64, and ia64
 --- a/irplib/tests/irplib_polynomial-test.c
 +++ b/irplib/tests/irplib_polynomial-test.c
-@@ -560,16 +560,16 @@
+@@ -567,16 +567,16 @@
          const double root = cpl_vector_get(roots, i);
          const double residual = cpl_polynomial_eval_1d(p1d, root, NULL);
  
diff --git a/debian/patches/private_libpil.patch b/debian/patches/private_libpil.patch
index 4c3e678..fe562c3 100644
--- a/debian/patches/private_libpil.patch
+++ b/debian/patches/private_libpil.patch
@@ -14,16 +14,16 @@ Description: Make the "pil" library private since it should only be used
      if test x"$includedir" = x'${prefix}/include'; then
          includedir='${prefix}/include/pil'
      fi
-@@ -124,5 +128,6 @@
-     AC_SUBST(configdir)
+@@ -129,5 +133,6 @@
      AC_SUBST(pilprivatelibdir)
-     AC_SUBST(htmldir)
+     AC_SUBST(pipedocsdir)
+     AC_SUBST(apidocdir)
 +    AC_SUBST(privatelibdir)
  
  ])
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -109,7 +109,7 @@
+@@ -123,7 +123,7 @@
      fi
  
      if test -z "$privatelibdir"; then
diff --git a/debian/patches/series b/debian/patches/series
index 3650c12..1899f8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,6 @@
 set_plugindir.patch
 use-std-paths-for-cpl.patch
-fix_compiler_errors.patch
 private_libpil.patch
 dont_build_sextractor.patch
-shlib-calls-exit.patch
 fix_test_fail.patch
 force-serial-tests.patch
-fix_irplib_gcc5.patch
diff --git a/debian/patches/set_plugindir.patch b/debian/patches/set_plugindir.patch
index 053c2f1..7dccd13 100644
--- a/debian/patches/set_plugindir.patch
+++ b/debian/patches/set_plugindir.patch
@@ -2,7 +2,7 @@ Author: Ole Streicher <olebole at debian.org>
 Description: Set the plugin directory so that esorex and python-cpl can find it.
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -105,7 +105,7 @@
+@@ -119,7 +119,7 @@
  [
  
      if test -z "$plugindir"; then
diff --git a/debian/patches/shlib-calls-exit.patch b/debian/patches/shlib-calls-exit.patch
deleted file mode 100644
index ebeaf58..0000000
--- a/debian/patches/shlib-calls-exit.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Replace exit() by abort() in shared libs.
---- a/vimos/vmcube.c
-+++ b/vimos/vmcube.c
-@@ -54,7 +54,7 @@
-   /* check if space was allocated */
-   if (theCube == NULL) 
-     {
--     exit(-1);
-+       abort();
-     }
-     
-   /* a VimosCube is only an interface to a Fits Image. */
-@@ -86,7 +86,7 @@
-     {
-      /* cleanup */
-      deleteCube(tmpCube);
--     exit(-1);
-+     abort();
-     }
-   
-   return(tmpCube);
---- a/vimos/vmfit.c
-+++ b/vimos/vmfit.c
-@@ -1253,7 +1253,7 @@
-                else if (iPivot[k] > 1)
-                  {
-                   puts("gaussJordan: Singular Matrix-1");
--                  exit(-1);
-+                  abort();
-                  }
- 	      }
-       ++(iPivot[iCol]);
-@@ -1267,7 +1267,7 @@
-       if (a[iCol][iCol] == 0.0)
-         {
-          puts("gaussJordan: Singular Matrix-2");
--         exit(-1);
-+         abort();
-         }
-       pivotInv = 1.0 / a[iCol][iCol];
-       a[iCol][iCol] = 1.0;
-@@ -1670,7 +1670,7 @@
-   if ((nTerms < 3) || (nTerms > 6))
-     {
-      puts(" fit1DGauss: nTerms at least 3, at most 6");
--     exit(-1);
-+     abort();
-     }
- 
-   /* to work with curvefit it is better to have arrays. I transform to    */
---- a/vimos/vmifutypes.c
-+++ b/vimos/vmifutypes.c
-@@ -64,7 +64,7 @@
-   /* error occured, exit */
-   if (newPData == NULL)
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   /* fill up fields with default values */
-@@ -118,7 +118,7 @@
-   /* error occured, exit */
-   if (newPList == NULL)
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   /* fill up fields with default values */
-@@ -173,7 +173,7 @@
-   /* error occured, exit */
-   if (newPRegion == NULL)
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   /* fill up fields with default values */
-@@ -404,7 +404,7 @@
-   if (ngoodpix > (int)(0.6 * (double)numMapPix))
-     {
-      puts("findRegionsOnPixelMap: more than 60% of good pixel. Exiting");
--     exit(-1);
-+     abort();
-     }
- 
-   /* Allocate memory: we will store a pixel position and a boolean flag */
---- a/vimos/vmimageset.c
-+++ b/vimos/vmimageset.c
-@@ -76,7 +76,7 @@
- 
-   /* error occured, exit */
-   if (theSingleImage == NULL) {
--    exit(-1);
-+    abort();
-   }
- 
-   /* fill up fields with default values */
-@@ -188,7 +188,7 @@
- 
-   /* if error: exit */
-   if (theImageSet == NULL) {
--    exit(-1);
-+    abort();
-   }
- 
-   theImageSet->images = NULL;
-@@ -289,7 +289,7 @@
-   if ((ifp = fopen(imageList,"r")) == NULL)
-     {
-      printf("Can't open file %s. \n", imageList);
--     exit(1);
-+     abort();
-     }
- 
-   lastOneImage = NULL;
---- a/vimos/vmmatrix.c
-+++ b/vimos/vmmatrix.c
-@@ -534,7 +534,7 @@
-   v = (int *)pil_malloc((size_t) ((nhigh-nlow+1+RANGE_END)*sizeof(int)));
-   if (!v)
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   return v-nlow+RANGE_END;
-@@ -561,7 +561,7 @@
-   v = (float *)pil_malloc((size_t) ((nhigh-nlow+1+RANGE_END)*sizeof(float)));
-   if (!v)
-     {
--     exit(-1);
-+     abort();
-     }
-   return v-nlow+RANGE_END;
- }
-@@ -578,7 +578,7 @@
-   v = (double *)pil_malloc((size_t) ((nhigh-nlow+1+RANGE_END)*sizeof(double)));
-   if (!v)
-     {
--     exit(-1);
-+     abort();
-     }
-   return v-nlow+RANGE_END;
- }
-@@ -617,7 +617,7 @@
-         
-   if (!m)
-     {
--     exit(-1);
-+     abort();
-     }
-   m += RANGE_END;
-   m -= nrl;
-@@ -626,7 +626,7 @@
- 
-   if (!m[nrl])
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   m[nrl] += RANGE_END;
-@@ -659,14 +659,14 @@
- 	/* allocate pointers to rows */
- 	m=(double **) pil_malloc((size_t)((nrow+RANGE_END)*sizeof(double*)));
- 	if (!m) {
--	  exit(-1) ;
-+	  abort();
- 	}
- 	m += RANGE_END;
- 	m -= nrl;
- 
- 	/* allocate rows and set pointers to them */
- 	m[nrl]=(double *) pil_malloc((size_t)((nrow*ncol+RANGE_END)*sizeof(double)));
--	if (!m[nrl]) exit(-1);
-+	if (!m[nrl]) abort();
- 	m[nrl] += RANGE_END;
- 	m[nrl] -= ncl;
- 
-@@ -704,7 +704,7 @@
- 
-   if (!m)
-     {
--     exit(-1);
-+     abort();
-     }
- 
-   m += RANGE_END;
-@@ -760,14 +760,14 @@
-   
-   tArray = (VimosFloat2DArray *) pil_malloc(sizeof(VimosFloat2DArray));
-   if (tArray == NULL) {
--    exit(-2);
-+    abort();
-   }
-   
-   tArray->x = (float *) pil_calloc(len, sizeof(float));
-   tArray->y = (float *) pil_calloc(len, sizeof(float));
-   if ( (tArray->x == NULL) || (tArray->y == NULL) ) {
-     pil_free(tArray);
--    exit(-1);
-+    abort();
-   }
-   
-   tArray->len = len;
---- a/vimos/vmqcutils.c
-+++ b/vimos/vmqcutils.c
-@@ -71,7 +71,7 @@
-     if (s[0]==0) return 0 ;
-     if (regcomp(&re_int, &regex_int[0], REG_EXTENDED|REG_NOSUB)!=0) {
-         printf("internal error: compiling int rule");
--        exit(-1);
-+        abort();
-     }
-     status = regexec(&re_int, s, 0, NULL, 0) ;
-     regfree(&re_int) ;
-@@ -87,7 +87,7 @@
-     if (s[0]==0) return 0 ;
-     if (regcomp(&re_float, &regex_float[0], REG_EXTENDED|REG_NOSUB)!=0) {
-         printf("internal error: compiling float rule");
--        exit(-1);
-+        abort();
-     }
-     status = regexec(&re_float, s, 0, NULL, 0) ;
-     regfree(&re_float) ;
-@@ -112,7 +112,7 @@
-     if (s[0]==0) return 0 ;
-     if (regcomp(&re_cmp, &regex_cmp[0], REG_EXTENDED|REG_NOSUB)!=0) {
-         printf("internal error: compiling complex rule");
--        exit(-1);
-+        abort();
-     }
-     status = regexec(&re_cmp, s, 0, NULL, 0) ;
-     regfree(&re_cmp) ;
---- a/libpil/pil/pilrecipe.c
-+++ b/libpil/pil/pilrecipe.c
-@@ -1578,12 +1578,12 @@
-     switch (c) {
-     case 'h':
-       pilRecUsage(parg);
--      exit(0);
-+      return NULL;
-       break;
- 
-     case 'V':
-       pilRecVersion();
--      exit(0);
-+      return NULL;
-       break;
- 
-     case 'D':
-@@ -1852,7 +1852,7 @@
-     if (dump_file)
-       pil_free(dump_file);
- 
--    exit(status);
-+    return NULL;
-   }
- 
- 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl-plugin-vimos.git



More information about the Debian-astro-commits mailing list