Commit eb6761c5 authored by Jerome Benoit's avatar Jerome Benoit

Wipe out library exit calls

parent 32c5fcb8
......@@ -26,4 +26,4 @@ apophenia (0.999b+ds-1) unstable; urgency=medium
discussed; thanks to the upstream maintainer.
* -
-- Jerome Benoit <calculus@rezozer.net> Mon, 08 Sep 2014 14:16:25 +0000
-- Jerome Benoit <calculus@rezozer.net> Mon, 08 Sep 2014 22:25:54 +0000
upstream-autotools-m4.patch
upstream-wipeout-exit.patch
debianization.patch
debianization-help2man.patch
debianization-documentation.patch
......
Description: wipe out exit calls
Wipe out exit calls as reported by lintian (shlib-calls-exit tag);
meant to be submitted to the upstream maintainer.
Origin: debian
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2014-09-09
--- a/apop_arms.c
+++ b/apop_arms.c
@@ -241,7 +241,7 @@
assert(isfinite(q->y));
/* guard against imprecision yielding point outside interval */
- if ((p->x < xl) || (p->x > xr)) exit(1);
+ Apop_stopif( ((p->x < xl) || (p->x > xr)), return,-5, "imprecision yields point outside interval");
}
int test(arms_state *env, POINT *p, apop_arms_settings *params, gsl_rng *r){
@@ -364,7 +364,8 @@
q->pl = p->pl;
m->pr->pl = m;
q->pl->pr = q;
- } else exit(10);// this should be impossible
+ } else
+ Apop_stopif(1, return 1,-5, "unexpected event"); // this should be impossible
/* now adjust position of q within interval if too close to an endpoint */
ql = q->pl->pl ? q->pl->pl : q->pl;
@@ -503,8 +504,8 @@
double area(POINT *q){
/* To integrate piece of exponentiated envelope to left of POINT q */
- if(q->pl == NULL) // this is leftmost point in envelope
- exit(1);
+ if(q->pl == NULL) // this is leftmost point in envelope
+ Apop_stopif(1, return GSL_NAN,-5, "leftmost point in envelope");
if(q->pl->x == q->x) // interval is zero length
return 0.;
if (fabs(q->y - q->pl->y) < YEPS) // integrate straight line piece
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment