summaryrefslogtreecommitdiffstats
path: root/tools/h5ls
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
commitd2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch)
treea066f01361afaf5df457cef612bb0bb9fd80fe18 /tools/h5ls
parentee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff)
downloadhdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to fixed and extensible array dataset chunk indexing code to accommodate changes to private APIs in those interfaces. Also, other adjustments to source code and expected output in response to changes on the trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools/h5ls')
-rw-r--r--tools/h5ls/Makefile.am2
-rw-r--r--tools/h5ls/Makefile.in23
-rw-r--r--tools/h5ls/h5ls.c41
3 files changed, 35 insertions, 31 deletions
diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am
index 64e89f1..41e66f6 100644
--- a/tools/h5ls/Makefile.am
+++ b/tools/h5ls/Makefile.am
@@ -32,7 +32,7 @@ SCRIPT_DEPEND=h5ls$(EXEEXT)
bin_PROGRAMS=h5ls
# Add h5ls specific linker flags here
-h5ls_LDFLAGS = $(LT_STATIC_EXEC)
+h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the hdf5 and h5tools libraries
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index bace577..c11dc43 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -97,6 +97,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -110,21 +120,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -147,7 +154,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -354,7 +361,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5ls$(EXEEXT)
# Add h5ls specific linker flags here
-h5ls_LDFLAGS = $(LT_STATIC_EXEC)
+h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the hdf5 and h5tools libraries
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index ca0ddcb..9bc0448 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1991,9 +1991,9 @@ done:
*
* Purpose: Begins iteration on an object
*
- * Return: Success: 0
+ * Return: Success: EXIT_SUCCESS(0)
*
- * Failure: -1
+ * Failure: EXIT_FAILURE(1)
*
* Programmer: Neil Fortner
* Wednesday, August 21, 2008
@@ -2109,15 +2109,12 @@ get_width(void)
width = w[0];
}
#elif defined(H5_HAVE_TIOCGWINSZ) && defined(H5_HAVE_IOCTL)
-#ifndef __PUMAGON__
-/* the ioctl() call coredump on TFLOPS. Turn it off for now. */
{
/* Unix with ioctl(TIOCGWINSZ) */
struct winsize w;
if (ioctl(2, TIOCGWINSZ, &w)>=0 && w.ws_col>0)
width = w.ws_col;
}
-#endif
#elif defined(H5_HAVE_TIOCGETD) && defined(H5_HAVE_IOCTL)
{
/* Unix with ioctl(TIOCGETD) */
@@ -2203,7 +2200,7 @@ main(int argc, const char *argv[])
break;
} else if(!HDstrcmp(argv[argno], "--help")) {
usage();
- leave(0);
+ leave(EXIT_SUCCESS);
} else if(!HDstrcmp(argv[argno], "--address")) {
address_g = TRUE;
} else if(!HDstrcmp(argv[argno], "--data")) {
@@ -2234,25 +2231,25 @@ main(int argc, const char *argv[])
no_line_wrap_g = TRUE;
else if(width_g < 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if(!HDstrcmp(argv[argno], "--width")) {
if((argno + 1) >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} else {
s = argv[++argno];
}
width_g = (int)HDstrtol(s, &rest, 0);
if(width_g <= 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if(!HDstrcmp(argv[argno], "--verbose")) {
verbose_g++;
} else if(!HDstrcmp(argv[argno], "--version")) {
print_version(progname);
- leave(0);
+ leave(EXIT_SUCCESS);
} else if(!HDstrcmp(argv[argno], "--hexdump")) {
hexdump_g = TRUE;
} else if(!HDstrncmp(argv[argno], "-w", 2)) {
@@ -2260,7 +2257,7 @@ main(int argc, const char *argv[])
s = argv[argno] + 2;
} else if((argno + 1) >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} else {
s = argv[++argno];
}
@@ -2270,7 +2267,7 @@ main(int argc, const char *argv[])
no_line_wrap_g = TRUE;
else if(width_g < 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if('-'!=argv[argno][1]) {
/* Single-letter switches */
@@ -2279,7 +2276,7 @@ main(int argc, const char *argv[])
case '?':
case 'h': /* --help */
usage();
- leave(0);
+ leave(EXIT_SUCCESS);
case 'a': /* --address */
address_g = TRUE;
@@ -2328,7 +2325,7 @@ main(int argc, const char *argv[])
case 'V': /* --version */
print_version(progname);
- leave(0);
+ leave(EXIT_SUCCESS);
case 'x': /* --hexdump */
hexdump_g = TRUE;
@@ -2336,12 +2333,12 @@ main(int argc, const char *argv[])
default:
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end switch */
} /* end for */
} else {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} /* end for */
@@ -2349,14 +2346,14 @@ main(int argc, const char *argv[])
* absolutely nothing ;-) */
if(argno >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
/* Check for conflicting arguments */
if(recursive_g && grp_literal_g) {
fprintf(stderr, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
/* Turn off HDF5's automatic error printing unless you're debugging h5ls */
@@ -2419,7 +2416,7 @@ main(int argc, const char *argv[])
x = oname;
if(NULL == (oname = HDstrdup(oname))) {
fprintf(stderr, "memory allocation failed\n");
- leave(1);
+ leave(EXIT_FAILURE);
}
*x = '\0';
/* Delay specifying the name start point so the original object name
@@ -2452,7 +2449,7 @@ main(int argc, const char *argv[])
/* Check the type of link given */
if(H5Lget_info(file, oname, &li, H5P_DEFAULT) < 0) {
display_obj_name(stdout, &iter, oname, "**NOT FOUND**");
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
} /* end if */
else
@@ -2461,7 +2458,7 @@ main(int argc, const char *argv[])
/* Open the object and display it's information */
if(li.type == H5L_TYPE_HARD) {
if(visit_obj(file, oname, &iter) < 0)
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if(li.type == H5L_TYPE_HARD) */
else {
/* Specified name is not for object -- list that link */
@@ -2481,6 +2478,6 @@ main(int argc, const char *argv[])
HDfree(elink_list.objs);
} /* end while */
- leave(0);
+ leave(EXIT_SUCCESS);
} /* end main() */