IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2005, 2:36:12 PM (21 years ago)
Author:
drobbin
Message:

Changed psLogSetFormat to return bool instead of void

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psLogMsg.c

    r4951 r4952  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-09-07 00:15:48 $
     14 *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-09-07 00:36:12 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    144144    */
    145145    /*
    146      
     146
    147147        if (strcmp(protocol, "dest") == 0) {
    148148            if (strcmp(location, "stderr") == 0) {
     
    165165        } else if (strcmp(protocol, "file") == 0) {
    166166            FILE *file = fopen(location, "w");
    167      
     167
    168168            if (file == NULL) {
    169169                psError(PS_ERR_IO, true, PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,
     
    195195    NULL.
    196196 *****************************************************************************/
    197 void psLogSetFormat(const char *format)
     197bool psLogSetFormat(const char *format)
    198198{
    199199    // assume none.
     
    206206    // if fmt is NULL, no logging is desired.
    207207    if (format == NULL) {
    208         return;
     208        return false;
    209209    }
    210210
     
    241241            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    242242                    PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
    243             break;
     243            return false;
    244244        }
    245245    }
     
    248248    if (!logMsg) {
    249249        psTrace("utils.logMsg", 1, "You must at least log error messages (You chose \"%s\")", format);
    250     }
     250
     251    }
     252    return true;
    251253}
    252254
Note: See TracChangeset for help on using the changeset viewer.