Changeset 8627 for trunk/psLib/src/types
- Timestamp:
- Aug 25, 2006, 6:34:28 PM (20 years ago)
- Location:
- trunk/psLib/src/types
- Files:
-
- 9 edited
-
psArguments.c (modified) (2 diffs)
-
psArray.c (modified) (2 diffs)
-
psBitSet.c (modified) (5 diffs)
-
psHash.c (modified) (4 diffs)
-
psList.c (modified) (4 diffs)
-
psLookupTable.c (modified) (5 diffs)
-
psMetadata.c (modified) (5 diffs)
-
psMetadataConfig.c (modified) (4 diffs)
-
psMetadataItemCompare.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psArguments.c
r8245 r8627 7 7 * @author David Robbins, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-08- 09 02:26:44$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-26 04:34:28 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 304 304 case PS_DATA_STRING: 305 305 if (item->data.V) { 306 printf("""%s""", (char*)(item->data.V));306 printf("""%s""", item->data.str); 307 307 } 308 308 break; -
trunk/psLib/src/types/psArray.c
r8591 r8627 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.4 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-08-2 5 05:26:19$11 * @version $Revision: 1.48 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-08-26 04:34:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 215 215 if (position >= array->nalloc) { 216 216 psError(PS_ERR_BAD_PARAMETER_NULL, true, 217 _("Specified position, % d, is greater than the allocated size of the array, %d."),217 _("Specified position, %ld, is greater than the allocated size of the array, %ld."), 218 218 position, array->nalloc); 219 219 return false; -
trunk/psLib/src/types/psBitSet.c
r8232 r8627 11 11 * @author Robert DeSonia, MHPCC 12 12 * 13 * @version $Revision: 1.3 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-08- 08 23:32:23$13 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-08-26 04:34:28 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 82 82 if (nalloc < 0) { 83 83 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 84 _("The number of bit in a psBitSet (% d) must be greater than zero."),84 _("The number of bit in a psBitSet (%ld) must be greater than zero."), 85 85 nalloc); 86 86 return NULL; … … 113 113 (bit > bitSet->n * 8 - 1) ) { 114 114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 115 _("The specified bit position (% d) is invalid. Position must be between 0 and %d."),116 bit, bitSet->n * 8 - 1);115 _("The specified bit position (%ld) is invalid. Position must be between 0 and %ld."), 116 bit, bitSet->n * 8 - 1); 117 117 return bitSet; 118 118 } … … 136 136 (bit > bitSet->n * 8 - 1) ) { 137 137 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 138 _("The specified bit position (% d) is invalid. Position must be between 0 and %d."),139 bit, bitSet->n * 8 - 1);138 _("The specified bit position (%ld) is invalid. Position must be between 0 and %ld."), 139 bit, bitSet->n * 8 - 1); 140 140 return bitSet; 141 141 } … … 159 159 (bit > bitSet->n * 8 - 1) ) { 160 160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 161 _("The specified bit position (% d) is invalid. Position must be between 0 and %d."),161 _("The specified bit position (%ld) is invalid. Position must be between 0 and %ld."), 162 162 bit,bitSet->n * 8 - 1); 163 163 return false; -
trunk/psLib/src/types/psHash.c
r8245 r8627 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08- 09 02:26:44$14 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-26 04:34:28 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include <stdio.h> 21 21 #include <string.h> 22 #include <inttypes.h> 23 22 24 #include "psHash.h" 23 25 #include "psMemory.h" … … 148 150 table->n = nalloc; 149 151 150 psTrace("psLib.types", 1, "Creating % d-element hash table\n", nalloc);152 psTrace("psLib.types", 1, "Creating %ld-element hash table\n", nalloc); 151 153 152 154 // Initialize all buckets to NULL. … … 260 262 if ((hash < 0) || (hash >= table->n)) { 261 263 psError(PS_ERR_UNKNOWN, true, 262 "Internal hash function out of range (% d)", hash);264 "Internal hash function out of range (%" PRId64 ")", hash); 263 265 } 264 266 // ptr will have the correct hash bucket. -
trunk/psLib/src/types/psList.c
r8232 r8627 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.5 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-08- 08 23:32:23$8 * @version $Revision: 1.52 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-26 04:34:28 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 206 206 if (location < 0 || location >= (int)list->n) { 207 207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 208 _("Specified location, % d, is invalid."),208 _("Specified location, %ld, is invalid."), 209 209 location); 210 210 return false; … … 260 260 if (location > 0 && location >= (int)list->n) { 261 261 psLogMsg(__func__,PS_LOG_WARN, 262 "Specified location, % d, is beyond the end of the list. "262 "Specified location, %ld, is beyond the end of the list. " 263 263 "Adding data item to tail.", 264 264 location); … … 485 485 if (! psListIteratorSet(iterator,location)) { 486 486 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 487 _("Specified location, % d, is invalid."),487 _("Specified location, %ld, is invalid."), 488 488 location); 489 489 return NULL; -
trunk/psLib/src/types/psLookupTable.c
r8483 r8627 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-08-2 3 01:56:15$9 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-26 04:34:28 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 20 20 #include <limits.h> 21 21 #include <math.h> 22 #include <inttypes.h> 22 23 23 24 #include "psMemory.h" … … 593 594 594 595 if (indexCol >= vectors->n) { 595 psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column, % d, is larger than number of columns, %d.",596 psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Index column, %ld, is larger than number of columns, %ld.", 596 597 indexCol, vectors->n); 597 598 return NULL; … … 814 815 if(hiIdx >= numRows) { 815 816 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 816 _("High index too big, % d."), hiIdx);817 _("High index too big, %" PRIu64 "."), hiIdx); 817 818 return NAN; 818 819 } … … 824 825 if(loIdx < 0) { 825 826 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 826 _("Low index too small, % d."), loIdx);827 _("Low index too small, %" PRIu64 "."), loIdx); 827 828 return NAN; 828 829 } -
trunk/psLib/src/types/psMetadata.c
r8605 r8627 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.12 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08-2 5 22:10:35$14 * @version $Revision: 1.129 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-26 04:34:28 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 733 733 if (entry == NULL) { 734 734 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 735 _("Could not find metadata item at index % d."), where);735 _("Could not find metadata item at index %ld."), where); 736 736 return false; 737 737 } … … 740 740 if (key == NULL) { 741 741 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 742 _("Failed to remove metadata item, at index % d, from metadata list."),742 _("Failed to remove metadata item, at index %ld, from metadata list."), 743 743 where); 744 744 return false; … … 959 959 } 960 960 if (!psMetadataIteratorSet(newIter, location)) { 961 psError(PS_ERR_UNKNOWN, false, "Unable to set location=% d for metadata iterator.\n", location);961 psError(PS_ERR_UNKNOWN, false, "Unable to set location=%ld for metadata iterator.\n", location); 962 962 psFree(newIter); 963 963 return NULL; … … 1229 1229 switch (item->type) { 1230 1230 case PS_DATA_STRING: 1231 fprintf(fd, "%s\n", (char*)(item->data.V));1231 fprintf(fd, "%s\n", item->data.str); 1232 1232 break; 1233 1233 case PS_DATA_BOOL: -
trunk/psLib/src/types/psMetadataConfig.c
r8610 r8627 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-08-26 0 0:32:39$12 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-26 04:34:28 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 539 539 case 's': 540 540 if (type == PS_DATA_STRING) { 541 fprintf(fd,format, (char*)item->data.V);541 fprintf(fd,format, item->data.str); 542 542 } else { 543 543 psError(PS_ERR_BAD_PARAMETER_TYPE,true, … … 1010 1010 break; 1011 1011 default: 1012 psError(PS_ERR_IO,true,_("Metadata type '%s', found on line %u of %s, is invalid."),1012 psError(PS_ERR_IO,true,_("Metadata of unknown type found on line %u of %s."), 1013 1013 lineCount,fileName); 1014 1014 break; … … 1346 1346 case PS_DATA_STRING: 1347 1347 psStringAppend(&content, "%-15s %-8s", item->name, "STR"); 1348 psStringAppend(&content, " %s", ((char *)(item->data.V)));1348 psStringAppend(&content, " %s", item->data.str); 1349 1349 if ( strncmp(item->comment,"",2) ) { 1350 1350 psStringAppend(&content, " #%s", item->comment); -
trunk/psLib/src/types/psMetadataItemCompare.c
r8245 r8627 67 67 return false; 68 68 } 69 psTrace("psLib.types", 10, "Comparing '%s' with '%s'\n", compare->data.V, template-> 70 data.V); 69 psTrace("psLib.types", 10, "Comparing '%s' with '%s'\n", 70 compare->data.str, template-> 71 data.str); 71 72 return (strcasecmp(compare->data.V, template-> 72 73 data.V) == 0) ? true : false;
Note:
See TracChangeset
for help on using the changeset viewer.
