Changeset 4434
- Timestamp:
- Jun 29, 2005, 2:33:36 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
sys/psString.c (modified) (3 diffs)
-
sys/psString.h (modified) (2 diffs)
-
sysUtils/psString.c (modified) (3 diffs)
-
sysUtils/psString.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r4409 r4434 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 28 20:17:52$14 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-30 00:33:36 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include <stdlib.h> 21 21 #include <string.h> 22 #include <limits.h> 22 23 #include "psString.h" 23 24 #include "psMemory.h" … … 34 35 } 35 36 36 psString psStringNCopy(const char *string, int nChar)37 psString psStringNCopy(const char *string, unsigned int nChar) 37 38 { 38 39 char *returnValue = NULL; 39 40 40 41 // Check the number of characters to copy is non-negative 41 if (nChar < 0) {42 if (nChar == UINT_MAX) { 42 43 // Log error message and return NULL 43 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, -
trunk/psLib/src/sys/psString.h
r4409 r4434 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06- 28 20:17:52$15 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-30 00:33:36 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 psString psStringNCopy( 65 65 const char *string, ///< Input string of characters to copy 66 int nChar ///< Number of bytes to allocate for string copy66 unsigned int nChar ///< Number of bytes to allocate for string copy 67 67 ); 68 68 -
trunk/psLib/src/sysUtils/psString.c
r4409 r4434 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 28 20:17:52$14 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-30 00:33:36 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include <stdlib.h> 21 21 #include <string.h> 22 #include <limits.h> 22 23 #include "psString.h" 23 24 #include "psMemory.h" … … 34 35 } 35 36 36 psString psStringNCopy(const char *string, int nChar)37 psString psStringNCopy(const char *string, unsigned int nChar) 37 38 { 38 39 char *returnValue = NULL; 39 40 40 41 // Check the number of characters to copy is non-negative 41 if (nChar < 0) {42 if (nChar == UINT_MAX) { 42 43 // Log error message and return NULL 43 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, -
trunk/psLib/src/sysUtils/psString.h
r4409 r4434 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06- 28 20:17:52$15 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-30 00:33:36 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 psString psStringNCopy( 65 65 const char *string, ///< Input string of characters to copy 66 int nChar ///< Number of bytes to allocate for string copy66 unsigned int nChar ///< Number of bytes to allocate for string copy 67 67 ); 68 68
Note:
See TracChangeset
for help on using the changeset viewer.
