diff options
Diffstat (limited to 'tools/misc')
-rwxr-xr-x | tools/misc/h5cc.in | 8 | ||||
-rwxr-xr-x | tools/misc/h5redeploy.in | 18 | ||||
-rw-r--r-- | tools/misc/h5repart.c | 2 |
3 files changed, 18 insertions, 10 deletions
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in index 28f0dee..c274f3f 100755 --- a/tools/misc/h5cc.in +++ b/tools/misc/h5cc.in @@ -38,6 +38,10 @@ HL="@HL@" ## ## ############################################################################ +# Constants definitions +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + host_os="@host_os@" prog_name="`basename $0`" @@ -95,7 +99,7 @@ usage() { echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" echo " [default: no]" echo " " - exit 1 + exit $EXIT_FAILURE } # Show the configuration summary of the library recorded in the @@ -107,7 +111,7 @@ showconfigure() } # Main -status=0 +status=$EXIT_SUCCESS if test "$#" = "0"; then # No parameters specified, issue usage statement and exit. diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in index 6abca62..ae79b70 100755 --- a/tools/misc/h5redeploy.in +++ b/tools/misc/h5redeploy.in @@ -18,6 +18,10 @@ ## in a new location. ## For help page, use "h5redeploy -help" +# Constants definitions +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + # Function definitions # show help page @@ -34,7 +38,7 @@ usage() { echo " directory and writable. [default: $h5tools]" echo " -show Show the commands without executing them" echo " " - exit 1 + exit $EXIT_FAILURE } # display variable values @@ -96,7 +100,7 @@ for arg in $@ ; do *) ERROR "Unknown Option($arg)" usage - exit 1 + exit $EXIT_FAILURE ;; esac done @@ -104,7 +108,7 @@ done # Sanity checks if [ ! -d $prefix ]; then ERROR "prefix($prefix) is not an existing directory" - exit 1 + exit $EXIT_FAILURE fi for x in $h5tools; do @@ -112,14 +116,14 @@ for x in $h5tools; do foundtools="$foundtools $x" if [ ! -w $x ]; then ERROR "h5tool($x) is not writable" - exit 1 + exit $EXIT_FAILURE fi fi done if [ -z "$foundtools" ]; then ERROR "found no tools to modify" - exit 1 + exit $EXIT_FAILURE fi # Show actions to be taken and get consent @@ -131,7 +135,7 @@ if [ x-$fmode = x- ]; then ans=`echo $ansx | tr "[A-Z]" "[a-z]"` if [ x-$ans != x-yes ]; then echo ABORT. No tools changed. - exit 1 + exit $EXIT_FAILURE fi fi @@ -166,7 +170,7 @@ done # Cleanup rm -f $CMDFILE -exit 0 +exit $EXIT_SUCCESS # Some possible future features to add # CCBASE - Name of the alternative C compiler diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 2374059..d41dfc9 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -238,7 +238,7 @@ main (int argc, char *argv[]) } else if (!strcmp(argv[argno], "-V")) { printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - exit(0); + exit(EXIT_SUCCESS); } else if (!strcmp (argv[argno], "-family_to_sec2")) { family_to_sec2 = TRUE; argno++; |