diff --git a/src/ciderlib/oned/onedopng.c b/src/ciderlib/oned/onedopng.c index a29f01657..025ae64b5 100644 --- a/src/ciderlib/oned/onedopng.c +++ b/src/ciderlib/oned/onedopng.c @@ -36,7 +36,7 @@ ONEdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x) if (pTable == NULL) { fprintf(stderr, "Error: unknown impurity profile %d\n", ((int)pProfile->IMPID)); - exit(1); + controlled_exit(1); } } /* Find distances */ diff --git a/src/ciderlib/support/suprmitf.c b/src/ciderlib/support/suprmitf.c index fd0245ecd..3baafc548 100644 --- a/src/ciderlib/support/suprmitf.c +++ b/src/ciderlib/support/suprmitf.c @@ -208,7 +208,7 @@ SUPbinRead(char *inFile, float *x, float *conc, int *impId, int *numNod) if(j < 0) { fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__); - exit(1); + controlled_exit(1); } siIndex = j; @@ -344,7 +344,7 @@ SUPascRead(char *inFile, float *x, float *conc, int *impId, int *numNod) if(j < 0) { fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__); - exit(1); + controlled_exit(1); } siIndex = j; diff --git a/src/ciderlib/twod/twodopng.c b/src/ciderlib/twod/twodopng.c index 9b3ceefde..7b9bbb39d 100644 --- a/src/ciderlib/twod/twodopng.c +++ b/src/ciderlib/twod/twodopng.c @@ -37,7 +37,7 @@ TWOdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x, if ( pTable == NULL ) { fprintf( stderr, "Error: unknown impurity profile %d\n", ((int)pProfile->IMPID) ); - exit(1); + controlled_exit(1); } } /* Find distances */ diff --git a/src/include/ngspice/1-f-code.h b/src/include/ngspice/1-f-code.h index 8cfd86237..bc45d616c 100644 --- a/src/include/ngspice/1-f-code.h +++ b/src/include/ngspice/1-f-code.h @@ -53,7 +53,7 @@ trnoise_state_get(struct trnoise_state *this, CKTcircuit *ckt, size_t index) if(index + TRNOISE_STATE_MEM_LEN < this->top) { fprintf(stderr, "ouch, trying to fetch from the past %d %d\n", (int)index, (int)this->top); - exit(1); + controlled_exit(1); } return this->points[index % TRNOISE_STATE_MEM_LEN]; diff --git a/src/include/ngspice/memory.h b/src/include/ngspice/memory.h index 75a64b188..d1c7fe7ca 100644 --- a/src/include/ngspice/memory.h +++ b/src/include/ngspice/memory.h @@ -45,7 +45,7 @@ extern void txfree(const void *ptr); do { \ if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) { \ SPfrontEnd->IFerrorf(E_PANIC, "Out of Memory"); \ - exit(1); \ + controlled_exit(1); \ } \ } while(0) @@ -53,7 +53,7 @@ extern void txfree(const void *ptr); do { \ if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) { \ fprintf(stderr, "Out of Memory\n"); \ - exit(1); \ + controlled_exit(1); \ } \ } while(0)