From 3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 1 Dec 2000 02:55:13 +0000 Subject: Stop using TRUE and FALSE for exit status. --- archival/ar.c | 2 +- archival/gunzip.c | 2 +- archival/gzip.c | 2 +- archival/tar.c | 12 +++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'archival') diff --git a/archival/ar.c b/archival/ar.c index f3ba59b..0f16ec8 100644 --- a/archival/ar.c +++ b/archival/ar.c @@ -387,5 +387,5 @@ extern int ar_main(int argc, char **argv) } extractList=extractList->next; } - return (TRUE); + return EXIT_SUCCESS; } diff --git a/archival/gunzip.c b/archival/gunzip.c index 70b25bd..eeff977 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -1350,7 +1350,7 @@ int gunzip_main(int argc, char **argv) if (delInputFile == 1 && unlink(delFileName) < 0) { perror(delFileName); - exit(FALSE); + return EXIT_FAILURE; } } return(exit_code); diff --git a/archival/gzip.c b/archival/gzip.c index 2e147b1..d8c22a9 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1930,7 +1930,7 @@ int gzip_main(int argc, char **argv) if (unlink(delFileName) < 0) { perror(delFileName); - exit(FALSE); + exit(EXIT_FAILURE); } } diff --git a/archival/tar.c b/archival/tar.c index 826ab96..01997e4 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -156,6 +156,7 @@ extern int tar_main(int argc, char **argv) int tostdoutFlag = FALSE; int firstOpt = TRUE; int stopIt; + int status; if (argc <= 1) @@ -227,16 +228,21 @@ extern int tar_main(int argc, char **argv) #ifndef BB_FEATURE_TAR_CREATE fatalError( "This version of tar was not compiled with tar creation support.\n"); #else - exit(writeTarFile(tarName, verboseFlag, argv, excludeList)); + status = writeTarFile(tarName, verboseFlag, argv, excludeList); #endif } if (listFlag == TRUE || extractFlag == TRUE) { if (*argv) extractList = argv; - exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag, - verboseFlag, extractList, excludeList)); + status = readTarFile(tarName, extractFlag, listFlag, tostdoutFlag, + verboseFlag, extractList, excludeList); } + if (status == TRUE) + return EXIT_SUCCESS; + else + return EXIT_FAILURE; + flagError: fatalError( "Exactly one of 'c', 'x' or 't' must be specified\n"); } -- cgit v1.1