Changeset 4409 for trunk/psLib/src/sys
- Timestamp:
- Jun 28, 2005, 10:17:52 AM (21 years ago)
- Location:
- trunk/psLib/src/sys
- Files:
-
- 4 edited
-
psString.c (modified) (3 diffs)
-
psString.h (modified) (4 diffs)
-
psTrace.c (modified) (4 diffs)
-
psTrace.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r3997 r4409 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 5-20 01:41:17$14 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-28 20:17:52 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psSysUtilsErrors.h" 27 27 28 char *psStringCopy(const char *str)28 psString psStringCopy(const char *string) 29 29 { 30 30 // Allocate memory using psAlloc function 31 31 // Copy input string to memory just allocated 32 32 // Return the copy 33 return strcpy(psAlloc(strlen(str ) + 1), str);33 return strcpy(psAlloc(strlen(string) + 1), string); 34 34 } 35 35 36 char *psStringNCopy(const char *str, psS32nChar)36 psString psStringNCopy(const char *string, int nChar) 37 37 { 38 38 char *returnValue = NULL; … … 49 49 // Copy input string to memory allocated up to nChar characters 50 50 // Return the copy 51 returnValue = strncpy(psAlloc((size_t) nChar + 1), str , (size_t) nChar);51 returnValue = strncpy(psAlloc((size_t) nChar + 1), string, (size_t) nChar); 52 52 53 53 // Ensure the last byte is NULL character -
trunk/psLib/src/sys/psString.h
r4162 r4409 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06- 08 23:40:45$15 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-28 20:17:52 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 39 39 * plus one and copy the input string to the newly allocated memory. 40 40 * 41 * @return char*Copy of input string41 * @return psString: Copy of input string 42 42 * 43 43 */ 44 char *psStringCopy( 45 const char *str 46 /**< Input string of characters to copy */ 44 psString psStringCopy( 45 const char *string ///< Input string of characters to copy 47 46 ); 48 47 … … 57 56 * be set to NULL. 58 57 * 59 * @return char*Copy of input string58 * @return psString: Copy of input string 60 59 * 61 60 */ … … 63 62 /*@null@*/ 64 63 65 char *psStringNCopy( 66 const char *str, 67 /**< Input string of characters to copy */ 68 69 psS32 nChar 70 /**< Number of bytes to allocate for string copy */ 64 psString psStringNCopy( 65 const char *string, ///< Input string of characters to copy 66 int nChar ///< Number of bytes to allocate for string copy 71 67 ); 72 68 -
trunk/psLib/src/sys/psTrace.c
r4392 r4409 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06-2 5 02:02:05$11 * @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-28 20:17:52 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 57 57 58 58 static void componentFree(p_psComponent* comp); 59 static p_psComponent* componentAlloc(const char *name, psS32level);59 static p_psComponent* componentAlloc(const char *name, int level); 60 60 61 61 /***************************************************************************** 62 62 componentAlloc(): allocate memory for a new node, and initialize members. 63 63 *****************************************************************************/ 64 static p_psComponent* componentAlloc(const char *name, psS32level)64 static p_psComponent* componentAlloc(const char *name, int level) 65 65 { 66 66 p_psComponent* comp = psAlloc(sizeof(p_psComponent)); … … 245 245 *****************************************************************************/ 246 246 psBool psTraceSetLevel(const char *comp, // component of interest 247 psS32level) // desired trace level247 int level) // desired trace level 248 248 { 249 249 char *compName = NULL; … … 487 487 *****************************************************************************/ 488 488 void p_psTrace(const char *comp, // component being traced 489 psS32 level,// desired trace level490 ...) // arguments489 int level, // desired trace level 490 ...) // arguments 491 491 { 492 492 char *fmt = NULL; -
trunk/psLib/src/sys/psTrace.h
r4330 r4409 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.3 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06-2 1 03:01:37$11 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-28 20:17:52 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 60 60 61 61 #ifdef DOXYGEN 62 void psTrace(const char *facil, ///< facilty of interest 63 psS32 myLevel, ///< desired trace level 64 ...) ///< trace message arguments 65 ; 62 void psTrace( 63 const char *facil, ///< facilty of interest 64 int level, ///< desired trace level 65 ... ///< trace message arguments 66 ); 67 66 68 #else 67 69 /// Send a trace message 68 void p_psTrace(const char *facil, ///< facilty of interest 69 psS32 myLevel, ///< desired trace level 70 ...) ///< trace message arguments 71 ; 70 void p_psTrace( 71 const char *facil, ///< facilty of interest 72 psS32 myLevel, ///< desired trace level 73 ... ///< trace message arguments 74 ); 72 75 73 76 #ifndef SWIG … … 78 81 79 82 /// Set trace level 80 psBool psTraceSetLevel(const char *facil, ///< facilty of interest 81 psS32 level) ///< desired trace level 82 ; 83 psBool psTraceSetLevel( 84 const char *facil, ///< facilty of interest 85 int level ///< desired trace level 86 ); 83 87 84 88 /// Get the trace level … … 94 98 95 99 /// Set the destination of future trace messages. 96 void psTraceSetDestination(FILE * fp); 100 void psTraceSetDestination( 101 FILE * fp ///< 102 ); 97 103 98 104 /// Get the current destination for trace messages.
Note:
See TracChangeset
for help on using the changeset viewer.
