IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psTrace.c

    r1834 r2204  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-20 22:03:35 $
     11 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-27 00:57:31 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434 
    3535    PS_DEFAULT_TRACE_LEVEL: This should only be used when adding the
    36     intermediate components of a long name.  Ie. the "B" in .A.B.C
     36    intermediate components of a psS64 name.  Ie. the "B" in .A.B.C
    3737 
    3838 *****************************************************************************/
     
    5656
    5757static void componentFree(p_psComponent* comp);
    58 static p_psComponent* componentAlloc(const char *name, int level);
     58static p_psComponent* componentAlloc(const char *name, psS32 level);
    5959
    6060/*****************************************************************************
    6161componentAlloc(): allocate memory for a new node, and initialize members.
    6262 *****************************************************************************/
    63 static p_psComponent* componentAlloc(const char *name, int level)
     63static p_psComponent* componentAlloc(const char *name, psS32 level)
    6464{
    6565    p_psComponent* comp = psAlloc(sizeof(p_psComponent));
     
    6868    p_psMemSetDeallocator(comp, (psFreeFcn) componentFree);
    6969    comp->name = psStringCopy(name);
    70     p_psMemSetPersistent((void*)comp->name,true);
     70    p_psMemSetPersistent((psPtr)comp->name,true);
    7171    comp->level = level;
    7272    comp->n = 0;
     
    8686
    8787    if (comp->subcomp != NULL) {
    88         for (int i = 0; i < comp->n; i++) {
     88        for (psS32 i = 0; i < comp->n; i++) {
    8989            p_psMemSetPersistent(comp->subcomp[i],false);
    9090            psFree(comp->subcomp[i]);
     
    9494    }
    9595
    96     p_psMemSetPersistent((void*)comp->name,false);
    97     psFree((void*)comp->name);
     96    p_psMemSetPersistent((psPtr)comp->name,false);
     97    psFree((psPtr)comp->name);
    9898}
    9999
     
    115115void p_psTraceReset(p_psComponent* currentNode)
    116116{
    117     int i = 0;
     117    psS32 i = 0;
    118118
    119119    if (NULL == currentNode) {
     
    149149to ANSI-C.
    150150 *****************************************************************************/
    151 static bool componentAdd(const char *addNodeName, int level)
    152 {
    153     int i = 0;                  // Loop index variable.
     151static psBool componentAdd(const char *addNodeName, psS32 level)
     152{
     153    psS32 i = 0;                  // Loop index variable.
    154154    char name[strlen(addNodeName) + 1]; // buffer for writeable copy.
    155155    char *pname = name;
    156156    char *firstComponent = NULL;        // first component of name
    157157    p_psComponent* currentNode = cRoot;
    158     int nodeExists = 0;
     158    psS32 nodeExists = 0;
    159159
    160160    // XXX: Verify that this is the correct behavior.
     
    240240 zero
    241241*****************************************************************************/
    242 bool psTraceSetLevel(const char *comp,   // component of interest
    243                      int level)  // desired trace level
     242psBool psTraceSetLevel(const char *comp,   // component of interest
     243                       psS32 level)  // desired trace level
    244244{
    245245    char *compName = NULL;
     
    299299 The trace level of the "name" component.
    300300 *****************************************************************************/
    301 static int doGetTraceLevel(const char *aname)
     301static psS32 doGetTraceLevel(const char *aname)
    302302{
    303303    char name[strlen(aname) + 1];       // need a writeable copy: for strsep()
     
    305305    char *firstComponent = NULL;        // first component of name
    306306    p_psComponent* currentNode = cRoot;
    307     int i = 0;
    308     int defaultLevel = 0;
     307    psS32 i = 0;
     308    psS32 defaultLevel = 0;
    309309
    310310    if (NULL == currentNode) {
     
    365365 The level of "name" in the root component tree.
    366366 *****************************************************************************/
    367 int psTraceGetLevel(const char *name)
     367psS32 psTraceGetLevel(const char *name)
    368368{
    369369    char *compName = NULL;
    370     int traceLevel;
     370    psS32 traceLevel;
    371371
    372372    if (cRoot == NULL) {
     
    401401 *****************************************************************************/
    402402static void doPrintTraceLevels(const p_psComponent* comp,
    403                                int depth,
    404                                int defLevel)
    405 {
    406     int i = 0;
     403                               psS32 depth,
     404                               psS32 defLevel)
     405{
     406    psS32 i = 0;
    407407
    408408    if (comp->name[0] == '\0') {
     
    472472 *****************************************************************************/
    473473void p_psTrace(const char *comp,        // component being traced
    474                int level,       // desired trace level
     474               psS32 level,       // desired trace level
    475475               ...)             // arguments
    476476{
    477477    char *fmt = NULL;
    478478    va_list ap;
    479     int i = 0;
     479    psS32 i = 0;
    480480
    481481    if (NULL == comp) {
Note: See TracChangeset for help on using the changeset viewer.