IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14744


Ignore:
Timestamp:
Sep 4, 2007, 4:30:30 PM (19 years ago)
Author:
Paul Price
Message:

Allow use of NULL 'file' or 'list' argument name in making a filelist.
For example, I may not wish to offer a list option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r14675 r14744  
    44 *  @author EAM (IfA)
    55 *
    6  *  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-08-27 21:56:17 $
     6 *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-09-05 02:30:30 $
    88 *
    99 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    11201120    PS_ASSERT_INT_NONNEGATIVE(*argc, NULL);
    11211121    PS_ASSERT_PTR_NON_NULL(argv, NULL);
    1122     PS_ASSERT_STRING_NON_EMPTY(file, NULL);
    1123     PS_ASSERT_STRING_NON_EMPTY(list, NULL);
    11241122
    11251123    int Narg;
     
    11311129    // maybe a comma-separated list of words
    11321130    // each word may be a glob: "file*.fits"
    1133     if ((Narg = psArgumentGet (*argc, argv, file))) {
     1131    if (file && strlen(file) > 0 && (Narg = psArgumentGet (*argc, argv, file))) {
    11341132
    11351133        // select the word after 'file' and split by comma
     
    11601158
    11611159    // load the list from the supplied text file
    1162     if ((Narg = psArgumentGet (*argc, argv, list))) {
     1160    if (list && strlen(list) > 0 && (Narg = psArgumentGet (*argc, argv, list))) {
    11631161        int nItems;
    11641162        char line[1024]; // XXX limits the list lines to 1024 chars
     
    11981196    PS_ASSERT_PTR_NON_NULL(metadata, false);
    11991197    PS_ASSERT_STRING_NON_EMPTY(name, NULL);
    1200     PS_ASSERT_STRING_NON_EMPTY(file, NULL);
    1201     PS_ASSERT_STRING_NON_EMPTY(list, NULL);
    12021198
    12031199    psErrorClear();   // pmConfigFileSets may or may not call psError, so
Note: See TracChangeset for help on using the changeset viewer.