Changeset 8767
- Timestamp:
- Sep 7, 2006, 11:24:47 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadataConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadataConfig.c
r8766 r8767 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.7 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-09-07 21: 13:58$12 * @version $Revision: 1.77 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-09-07 21:24:47 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include <limits.h> 22 22 #include <inttypes.h> 23 #include <strings.h> 23 24 24 25 #include "psAbort.h" … … 258 259 psS32 *status) 259 260 { 260 if ( !strncmp(inString, "T", 2) || !strncmp(inString, "t", 2) || 261 !strncmp(inString, "1", 2) || !strncmp(inString, "TRUE", 5) || 262 !strncmp(inString, "true", 5) || !strncmp(inString, "True", 5)) { 261 // if inString is NULL return flalse, status = 0 262 if (!inString) { 263 if (status) { 264 *status = 0; 265 } 266 return false; 267 } 268 269 if (!strncasecmp(inString, "T", 2) || 270 !strncmp(inString, "1", 2) || 271 !strncasecmp(inString, "true", 5)) { 272 if (status) { 273 *status = 0; 274 } 263 275 return true; 264 276 } 265 if ( !strncmp(inString, "F", 2) || !strncmp(inString, "f", 2) || 266 !strncmp(inString, "0", 2) || !strncmp(inString, "FALSE", 6) || 267 !strncmp(inString, "false", 6) || !strncmp(inString, "False", 6) ) { 277 if ( !strncasecmp(inString, "F", 2) || 278 !strncmp(inString, "0", 2) || 279 !strncasecmp(inString, "false", 6)) { 280 if (status) { 281 *status = 0; 282 } 268 283 return false; 269 284 } 270 285 271 *status = 1; 286 if (status) { 287 *status = 1; 288 } 272 289 return false; 273 290 }
Note:
See TracChangeset
for help on using the changeset viewer.
