mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r14237] new feature: add a -V option to h52gif and gif2h5
tested: linux
This commit is contained in:
parent
c57f03ad75
commit
f012482386
@ -17,6 +17,8 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#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 <GIFFILE> <HDFFILE>\n\n");
|
||||
printf("Usage: gif2h5 <GIFFILE> <HDFFILE>\n");
|
||||
fprintf(stdout, " gif2h5 -V \n");
|
||||
fprintf(stdout, " Print HDF5 library version and exit\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include <assert.h>
|
||||
#include "gif.h"
|
||||
#include "H5IMpublic.h"
|
||||
#include "h5tools_utils.h"
|
||||
|
||||
|
||||
|
||||
int EndianOrder;
|
||||
@ -33,6 +35,8 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
printf("Usage: h52gif <h5_file> <gif_file> -i <h5_image>\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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user