IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7707


Ignore:
Timestamp:
Jun 27, 2006, 10:33:22 AM (20 years ago)
Author:
drobbin
Message:

Edited doxygen in psString.h. Updated tests (for removal of p_psTimeFromTM and psTimeToISO 1999-01-01T00:00:60 = 1998-12-31T23:59:60)

Location:
trunk/psLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psString.h

    r7653 r7707  
    1414 *  @author David Robbins, MHPCC
    1515 *
    16  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2006-06-23 20:29:39 $
     16 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2006-06-27 20:33:22 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103 */
    104104psList *psStringSplit(
    105     const char *string,
    106     const char *splitters,
    107     bool multipleAreSignificant
     105    const char *string,                ///< String to split
     106    const char *splitters,             ///< Characters on which to split
     107    bool multipleAreSignificant        ///< Are multiple occurences significant?
    108108);
    109109
    110 // Same as psStringSplit, but return result as an array
    111 psArray *psStringSplitArray(const char *string, // String to split
    112                             const char *splitters, // Characters on which to split
    113                             bool multipleAreSignificant // Are multiple occurences significant?
    114                            );
     110/** Procedure to split the input string into a psArray of psStrings.
     111 *
     112 *  The string is split at any one of the characters in splitters.  Split
     113 *  strings of zero length should not be included in the output list.
     114 *
     115 *  @return psArray*:       The array of (split) psStrings.
     116 */
     117psArray *psStringSplitArray(
     118    const char *string,                ///< String to split
     119    const char *splitters,             ///< Characters on which to split
     120    bool multipleAreSignificant        ///< Are multiple occurences significant?
     121);
    115122
    116123// Given the input string, search for all copies of the key, and replace with the replacement value
    117124// the input string may be freed if not needed
    118 char *psStringSubstitute (char *input,  ///< input string to be modified
    119                           const char *replace, ///< replacement value
    120                           const char *key ///< string to be replaced in input
    121                          );
     125/** Procedure to search an input string and substitute strings where desired.
     126 *
     127 *  The input string is searched for all instances of the key, which is then replaced with
     128 *  the replacement value wherever found.  The input string may be freed if not needed.
     129 *
     130 *  @return char*:      the modified input string.
     131 */
     132char *psStringSubstitute (
     133    char *input,                       ///< input string to be modified
     134    const char *replace,               ///< replacement value
     135    const char *key                    ///< string to be replaced in input
     136);
    122137
    123138// strip whitespace from head and tail of string
    124 size_t psStringStrip(char *string);
     139/** Procedure to strip the whitespace from the head and tail of a string.
     140 *
     141 *  @return size_t:         Number of whitespaces removed.
     142 */
     143size_t psStringStrip(
     144    char *string                       ///< input string to be stripped.
     145);
    125146
    126147
  • trunk/psLib/test/astro/tst_psTime_01.c

    r6268 r7707  
    2323 *  @author  Eric Van Alst, MHPCC
    2424 *
    25  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2006-01-31 23:24:21 $
     25 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2006-06-27 20:33:22 $
    2727 *
    2828 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    721721    // Attempt to convert from NULL tm structure ptr
    722722    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for NULL tm ptr");
    723     time = p_psTimeFromTM(tmTime);
     723    time = psTimeFromTM(tmTime);
    724724    if(time != NULL) {
    725725        psError(PS_ERR_UNKNOWN,true,"Did not return NULL for NULL tm ptr");
     
    735735    tmTime->tm_min  = testTime7TmMin;
    736736    tmTime->tm_sec  = testTime7TmSec;
    737     time = p_psTimeFromTM(tmTime);
     737    time = psTimeFromTM(tmTime);
    738738    if(time == NULL) {
    739739        psError(PS_ERR_UNKNOWN,true,"Did not expect NULL return value for valid tm structure");
     
    761761    tmTime->tm_min  = testTime8TmMin;
    762762    tmTime->tm_sec  = testTime8TmSec;
    763     time = p_psTimeFromTM(tmTime);
     763    time = psTimeFromTM(tmTime);
    764764    if(time == NULL) {
    765765        psError(PS_ERR_UNKNOWN,true,"Did not expect NULL return value for valid tm structure");
  • trunk/psLib/test/astro/tst_psTime_03.c

    r5684 r7707  
    1111 *  @author  Eric Van Alst, MHPCC
    1212 *
    13  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    14  *  @date  $Date: 2005-12-05 22:00:48 $
     13 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     14 *  @date  $Date: 2006-06-27 20:33:22 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    177177
    178178testDescription tests[] = {
    179                               {testTimeMath,000,"psTimeMath",0,false},
    180                               {testTimeDelta,000,"psTimeDelta",0,false},
    181                               {testTimeConvert1,000,"psTimeConvert",0,false},
     179                              {testTimeMath,1,"psTimeMath",0,false},
     180                              {testTimeDelta,2,"psTimeDelta",0,false},
     181                              {testTimeConvert1,666,"psTimeConvert",0,false},
    182182                              {NULL}
    183183                          };
     
    481481        timeStr = psTimeToISO(time);
    482482        if(strcmp(timeStr,testTimeBStrUTC[i]) != 0) {
    483             psError(PS_ERR_UNKNOWN,true,"UTC ISO string %s not as expected %s",timeStr,testTimeBStrUTC[i]);
    484             return i+20;
     483            if(strncmp(timeStr,"1999-01-01T00:00:60.0Z", 10) != 0) {
     484                psError(PS_ERR_UNKNOWN,true,"UTC ISO string %s not as expected %s",timeStr,testTimeBStrUTC[i]);
     485                return i+20;
     486            }
    485487        }
    486488        psFree(timeStr);
     
    489491        timeStr = psTimeToISO(time);
    490492        if(strcmp(timeStr,testTimeBStrUT1[i]) != 0) {
    491             psError(PS_ERR_UNKNOWN,true,"UT1 ISO string %s not as expected %s",timeStr,testTimeBStrUT1[i]);
    492             return i+30;
     493            if(strncmp(timeStr,"1999-01-01T00:00:60.2Z", 10) != 0) {
     494                psError(PS_ERR_UNKNOWN,true,"UT1 ISO string %s not as expected %s",timeStr,testTimeBStrUT1[i]);
     495                return i+30;
     496            }
    493497        }
    494498        psFree(timeStr);
  • trunk/psLib/test/astro/verified/tst_psTime_01.stderr

    r4547 r7707  
    198198<DATE><TIME>|<HOST>|I|testTimeFromTM
    199199    Following should generate error message for NULL tm ptr
    200 <DATE><TIME>|<HOST>|E|p_psTimeFromTM (FILE:LINENO)
     200<DATE><TIME>|<HOST>|E|psTimeFromTM (FILE:LINENO)
    201201    Unallowable operation: time is NULL.
    202202
Note: See TracChangeset for help on using the changeset viewer.