From 0556db98e281f377b54e7e918bc296604b490993 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 3 Nov 2000 00:12:47 -0500 Subject: [svn-r2794] Purpose: "bug fix" Description: the h5ls tests sometimes failed because the tool sometimes prints the tool name in the help message as "lt-h5ls" while the expected result has it as "h5ls". This was the tools pulled its name from argv[0]. Solution: Hardcode the progname as "h5ls" and blocked out the code that pulls the program name from argv[0]. The better solution is to find a way to create the real binary with the orginal tool name. Platforms tested: linux --- tools/h5ls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/h5ls.c b/tools/h5ls.c index f7af540..2a37318 100644 --- a/tools/h5ls.c +++ b/tools/h5ls.c @@ -1914,7 +1914,7 @@ main (int argc, char *argv[]) { hid_t file=-1, root=-1; char *fname=NULL, *oname=NULL, *x; - const char *progname; + const char *progname="h5ls"; const char *s = NULL; char *rest, *container=NULL; int argno; @@ -1938,9 +1938,11 @@ main (int argc, char *argv[]) DISPATCH(H5G_RAGGED, "Ragged Array", H5Gopen, H5Gclose, NULL, ragged_list2); +#if 0 /* Name of this program without the path */ if ((progname=strrchr(argv[0], '/'))) progname++; else progname = argv[0]; +#endif /* Default output width */ width_g = get_width(); -- cgit v0.12