[svn-r15901] undo some changes in the list of parameters of parse_command_line (forgot that this function is called both on serial and parallel)

tested: linux
This commit is contained in:
Pedro Vicente Nunes
2008-10-17 22:01:34 -05:00
parent 1e1bcb801c
commit 3a6ad02916
3 changed files with 32 additions and 38 deletions

View File

@@ -55,12 +55,21 @@ static struct long_options l_opts[] = {
void parse_command_line(int argc,
const char* argv[],
const char** fname1,
const char** fname2,
const char** objname1,
const char** objname2,
diff_opt_t* options)
{
int opt;
/* process the command-line */
memset(options, 0, sizeof (diff_opt_t));
/* assume equal contents initially */
options->contents = 1;
/* parse command line options */
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF)
{
@@ -132,10 +141,29 @@ void parse_command_line(int argc,
h5diff_exit(EXIT_FAILURE);
}
*fname1 = argv[ opt_ind ];
*fname2 = argv[ opt_ind + 1 ];
*objname1 = argv[ opt_ind + 2 ];
if ( *objname1 == NULL )
{
*objname2 = NULL;
return;
}
if ( argv[ opt_ind + 3 ] != NULL)
{
*objname2 = argv[ opt_ind + 3 ];
}
else
{
*objname2 = *objname1;
}
}
/*-------------------------------------------------------------------------
* Function: print_info
*