diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/htscore.c | 2 | ||||
-rw-r--r-- | src/htscoremain.c | 8 | ||||
-rw-r--r-- | src/htshash.c | 2 | ||||
-rw-r--r-- | src/htshelp.c | 2 | ||||
-rw-r--r-- | src/htsparse.c | 4 |
5 files changed, 7 insertions, 11 deletions
diff --git a/src/htscore.c b/src/htscore.c index ac2f8f0..fc352f4 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -84,7 +84,7 @@ int nsocDEBUG=0; #define _GOTOXY(X,Y) printf("\33[" X ";" Y "f"); #if DEBUG_CHECKINT - #define _CHECKINT_FAIL(a) printf("\n%s\n",a); fflush(stdout); exit(1); + #define _CHECKINT_FAIL(a) printf("\n%s\n",a); fflush(stdout); abort(); #define _CHECKINT(obj_ptr,message) \ if (obj_ptr) {\ if (( * ((char*) (obj_ptr)) != 0) || ( * ((char*) (((char*) (obj_ptr)) + sizeof(*(obj_ptr))-1)) != 0)) {\ diff --git a/src/htscoremain.c b/src/htscoremain.c index 53eb146..2213feb 100644 --- a/src/htscoremain.c +++ b/src/htscoremain.c @@ -489,7 +489,7 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) { fprintf(opt->log,"An aborted mirror has been detected!\nThe current temporary cache is required for any update operation and only contains data downloaded during the last aborted session.\nThe former cache might contain more complete information; if you do not want to lose that information, you have to restore it and delete the current cache.\nThis can easily be done here by erasing the hts-cache/new.* files\n"); fprintf(opt->log,"Please restart HTTrack with --continue (-iC1) option to override this message!\n"); } - exit(0); + return 0; } } } @@ -742,10 +742,6 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) { } } else { // aucune URL définie et pas de cache - //if (argc > 1 && strcmp(argv[1], "-#h") == 0) { - // printf("HTTrack version "HTTRACK_VERSION"%s\n", hts_get_version_info(opt)); - // exit(0); - //} if (opt->quiet) { help(argv[0],!opt->quiet); htsmain_free(); @@ -1714,7 +1710,7 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) { /* autotest */ case 't': /* not yet implemented */ fprintf(stderr, "** AUTOCHECK OK\n"); - exit(0); + return 0; break; default: printf("Internal option %c not recognized\n",*com); break; diff --git a/src/htshash.c b/src/htshash.c index ed17be6..840f257 100644 --- a/src/htshash.c +++ b/src/htshash.c @@ -263,7 +263,7 @@ void hash_write(hash_struct* hash,int lpos,int normalized) { else { printf("* hash_write=0!!\n"); abortLogFmt("unexpected error in hash_write (pos=%d)" _ pos); - exit(1); + abort(); } #endif // diff --git a/src/htshelp.c b/src/htshelp.c index d1b4a7f..1ede58c 100644 --- a/src/htshelp.c +++ b/src/htshelp.c @@ -262,7 +262,7 @@ void help_wizard(httrackp* opt) { linput(stdin,str,250); if (strnotempty(str)) { if (!((str[0]=='y') || (str[0]=='Y'))) - exit(0); + return 0; } printf("\n"); diff --git a/src/htsparse.c b/src/htsparse.c index 3db1e08..d5784bd 100644 --- a/src/htsparse.c +++ b/src/htsparse.c @@ -90,7 +90,7 @@ Please visit our Website: http://www.httrack.com printf("PANIC! : Not enough memory [%d]\n",__LINE__); \ XH_uninit; \ abortLogFmt("not enough memory for current html document in HT_ADD_CHK : realloct(%d) failed" _ ht_size); \ - exit(1); \ + abort(); \ } \ } \ ht_len+=A; @@ -143,7 +143,7 @@ Please visit our Website: http://www.httrack.com printf("PANIC! : Not enough memory [%d]\n",__LINE__); \ XH_uninit; \ abortLogFmt("not enough memory for current html document in HT_ADD_START : malloct(%d) failed" _ (int) ht_size); \ - exit(1); \ + abort(); \ } \ ht_buff[0]='\0'; \ } |