summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-09-28 18:20:40 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-09-28 18:20:40 (GMT)
commit95c384b4251822d8eae7e6569527a31f01547262 (patch)
tree88c6bbb2b908d9588bb743a9775e8ae00a7ace53
parent7a51c5d5331769956624ae2259c617f63a726094 (diff)
downloadhdf5-95c384b4251822d8eae7e6569527a31f01547262.zip
hdf5-95c384b4251822d8eae7e6569527a31f01547262.tar.gz
hdf5-95c384b4251822d8eae7e6569527a31f01547262.tar.bz2
[svn-r1683] Did some cleanup.
-rw-r--r--tools/h5toh4.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/tools/h5toh4.c b/tools/h5toh4.c
index 9bb03f1..ab7616e 100644
--- a/tools/h5toh4.c
+++ b/tools/h5toh4.c
@@ -42,12 +42,6 @@ extern int get_tableflag(int, int);
extern int set_tableflag(int, int);
extern char* get_objectname(int, int);
-#if 0 /*these are defined elsewhere, possibly incompatible --rpm 19990614 */
-extern int optind;
-extern void perror(const char *);
-extern int errno;
-#endif
-
typedef herr_t (*H5G_operator_t)(hid_t, const char*, void*);
@@ -77,9 +71,8 @@ main(int argc, char **argv)
int status = 0;
int status2 = 0;
- optind = 1;
- fargv = argv + optind;
- argc -= optind;
+ argc--;
+ argv++;
if (argc == 0) {
fprintf(stderr,"\nError: Invalid Arguments\n");
@@ -87,14 +80,7 @@ main(int argc, char **argv)
return -1;
}
-/*
- if ((status = H5dont_atexit()) < 0) {
- fprintf(stderr,"Error: Unable to stop loading of the cleanup routines\n");
- DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "h5toh4", __FILE__, __LINE__);
- return status;
- }
-*/
-
+ fargv = argv;
while ( *fargv != NULL ) {
if ( HDstrcmp(*fargv,"-h") == 0 ) {
PrintOptions_h5toh4();
@@ -103,7 +89,7 @@ main(int argc, char **argv)
fargv++;
}
- fargv = argv + optind;
+ fargv = argv;
if (argc == 2 && HDstrcmp(*fargv,"-m") == 0) {
fargv++;