[svn-r3412] Purpose:

Code cleanup
Description:
    Cleaned the code up a bit getting rid of some warnings about "const"
    being lost from passing a const char * to a function, etc.

    Also force the error messages to stderr instead of simply printing
    them to stdout. The same behaviour can be achieved by running h5dump
    like:

            h5dump ... 2>&1

    however, the error reporting before this change wasn't consistent in
    its use. I also made some of the error messages clearer (giving names
    of the failed types and, when there's an "internal error", reporting
    the line number the error occurred on so that we can debug).
Solution:
    Converted to "fflush(stdout); fprintf(stderr,...);" for all error
    reportings.
Platforms tested:
    Linux
This commit is contained in:
Bill Wendling 2001-02-15 14:31:55 -05:00
parent d12fa9b5c5
commit 71090d2e9a
2 changed files with 324 additions and 274 deletions

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ int
get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts) get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts)
{ {
static int sp = 1; /* character index in current token */ static int sp = 1; /* character index in current token */
int opt_opt='?'; /* option character passed back to user */ int opt_opt = '?'; /* option character passed back to user */
if (sp == 1) { if (sp == 1) {
/* check for more flag-like tokens */ /* check for more flag-like tokens */