From f0124823867f2ce6a807c396a71ef28156c53ed7 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Mon, 5 Nov 2007 15:37:37 -0500 Subject: [svn-r14237] new feature: add a -V option to h52gif and gif2h5 tested: linux --- hl/tools/gif2h5/gif2hdf.c | 13 ++++++++++++- hl/tools/gif2h5/hdf2gif.c | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c index 9906a96..24aaf31 100644 --- a/hl/tools/gif2h5/gif2hdf.c +++ b/hl/tools/gif2h5/gif2hdf.c @@ -17,6 +17,8 @@ #include #include "gif.h" +#include "h5tools_utils.h" + int main(int argv , char *argc[]) @@ -47,8 +49,17 @@ main(int argv , char *argc[]) GifMemoryStruct.GifApplicationExtension = NULL; GifMemoryStruct.GifCommentExtension = NULL; + if ( argc[1] && (strcmp("-V",argc[1])==0) ) + { + print_version("gif2h5"); + exit(EXIT_SUCCESS); + + } + if (argv < 3) { - printf("\n\nWrong Usage. Use:\ngif2h5 \n\n"); + printf("Usage: gif2h5 \n"); + fprintf(stdout, " gif2h5 -V \n"); + fprintf(stdout, " Print HDF5 library version and exit\n"); return(-1); } diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c index 3f57386..7def4f0 100644 --- a/hl/tools/gif2h5/hdf2gif.c +++ b/hl/tools/gif2h5/hdf2gif.c @@ -17,6 +17,8 @@ #include #include "gif.h" #include "H5IMpublic.h" +#include "h5tools_utils.h" + int EndianOrder; @@ -33,6 +35,8 @@ static void usage(void) { printf("Usage: h52gif -i \n"); + fprintf(stdout, " h52gif -V \n"); + fprintf(stdout, " Print HDF5 library version and exit\n"); printf("h52gif expects *at least* one h5_image.\n"); } @@ -65,6 +69,14 @@ int main(int argc , char **argv) int bool_is_image = 0; /* 0 = false , 1 = true */ char *image_name = NULL; int idx; + + if ( argv[1] && (strcmp("-V",argv[1])==0) ) + { + print_version("gif2h5"); + exit(EXIT_SUCCESS); + + } + if (argc < 4) { -- cgit v0.12