Changeset 2204 for trunk/psLib/src/collections/psBitSet.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psBitSet.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psBitSet.c
r1842 r2204 11 11 * @author Robert DeSonia, MHPCC 12 12 * 13 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2004- 09-21 23:17:52$13 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-10-27 00:57:31 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include <ctype.h> 22 22 #include <math.h> 23 #include <stdbool.h>24 23 25 24 #include "psBitSet.h" … … 48 47 * @return char*: Pointer to byte in which bit is contained. 49 48 */ 50 static char mask( intbit)49 static char mask(psS32 bit) 51 50 { 52 51 char mask = (char)0x01; … … 67 66 } 68 67 69 psBitSet* psBitSetAlloc( intn)70 { 71 intnumBytes = 0;68 psBitSet* psBitSetAlloc(psS32 n) 69 { 70 psS32 numBytes = 0; 72 71 psBitSet* newObj = NULL; 73 72 … … 95 94 96 95 psBitSet* psBitSetSet(psBitSet* inBitSet, 97 intbit)96 psS32 bit) 98 97 { 99 98 char *byte = NULL; … … 120 119 121 120 psBitSet* psBitSetClear(psBitSet* inBitSet, 122 intbit)121 psS32 bit) 123 122 { 124 123 char *byte = NULL; … … 144 143 } 145 144 146 bool psBitSetTest(const psBitSet* inBitSet,147 intbit)145 psBool psBitSetTest(const psBitSet* inBitSet, 146 psS32 bit) 148 147 { 149 148 char *byte = NULL; … … 173 172 const psBitSet* restrict inBitSet2) 174 173 { 175 inti = 0;176 intn = 0;174 psS32 i = 0; 175 psS32 n = 0; 177 176 char* outBits = NULL; 178 177 char* inBits1 = NULL; 179 178 char* inBits2 = NULL; 180 intop = UNKNOWN_OP;179 psS32 op = UNKNOWN_OP; 181 180 182 181 if (inBitSet1 == NULL) { … … 198 197 199 198 // make operator all caps 200 inttempStrLen = strlen(operator);199 psS32 tempStrLen = strlen(operator); 201 200 char* tempStr = psAlloc(tempStrLen+1); 202 201 203 for ( intlcv=0;lcv<tempStrLen;lcv++) {202 for (psS32 lcv=0;lcv<tempStrLen;lcv++) { 204 203 tempStr[lcv] = (char)toupper(operator[lcv]); 205 204 } … … 308 307 char *psBitSetToString(const psBitSet* restrict inBitSet) 309 308 { 310 inti = 0;311 intnumBits = inBitSet->n * 8;309 psS32 i = 0; 310 psS32 numBits = inBitSet->n * 8; 312 311 char *outString = psAlloc((size_t) numBits + 1); 313 312
Note:
See TracChangeset
for help on using the changeset viewer.
