Changeset 1581
- Timestamp:
- Aug 18, 2004, 4:10:27 PM (22 years ago)
- Location:
- trunk/archive/pslib/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psBitset.h
r753 r1581 22 22 ; 23 23 24 /** Destructor */25 void psBitsetFree(psBitset *restrict myBits) ///< bitset to destroy26 ;27 28 24 /************************************************************************************************************/ 29 25 30 26 /** Set a bitset */ 31 27 psBitset * 32 psBitsetSet(psBitset * restrict myBits,///< Input bitset33 int bit) ///< Bit to set28 psBitsetSet(psBitset *myBits, ///< Input bitset 29 int bit) ///< Bit to set 34 30 ; 35 31 36 32 /** Check a bitset. Returns true or false */ 37 int 38 psBitsetTest(const psBitset * restrictcheckBits, ///< bitset to check39 int bit) ///< Bit to check33 bool 34 psBitsetTest(const psBitset *checkBits, ///< bitset to check 35 int bit) ///< Bit to check 40 36 ; 41 37 … … 43 39 psBitset * 44 40 psBitsetOp(psBitset *outBits, ///< Output bitset or NULL 45 const psBitset *restrict inBits1,///< Input bitset 146 char *operator, ///< bitset operator (AND, OR, XOR)47 const psBitset *restrict inBits2)///< Input bitset 241 const psBitset *inBits1, ///< Input bitset 1 42 char *operator, ///< bitset operator (AND, OR, XOR) 43 const psBitset *inBits2) ///< Input bitset 2 48 44 ; 49 45 -
trunk/archive/pslib/include/psHash.h
r359 r1581 7 7 */ 8 8 9 /** DO WE NEED TO DEFINE HashTable? */ 10 typedef struct HashTable psHash; ///< Opaque type for a hash table 9 /** A hash table */ 10 typedef struct { 11 int nbucket; ///< number of buckets 12 psHashBucket **buckets; ///< the buckets themselves 13 } psHash; 14 15 /** The hash buckets, which compose the hash */ 16 typedef struct psHashBucket { 17 char *key; ///< key for this item of data 18 void *data; ///< the data itself 19 struct psHashBucket *next; ///< list of other possible keys 20 } psHashBucket; 11 21 12 22 /** Functions **************************************************************/ … … 15 25 */ 16 26 17 / // Allocate hash buckets in table.27 /** Allocate hash buckets in table. */ 18 28 psHash *psHashAlloc(void); 19 29 20 /// Free hash buckets from table. 21 void psHashFree(psHash *table, ///< hash table to be freed 22 void (*itemFree)(void *item) ///< how to free hashed data; or NULL 30 /** Add entry to table. */ 31 bool psHashAdd(psHash *table, ///< table to insert in 32 const char *key, ///< key to use 33 void *data ///< data to insert 23 34 ); 24 35 25 /// Insert entry into table. 26 void *psHashInsert(psHash *table, ///< table to insert in 27 const char *key, ///< key to use 28 void *data, ///< data to insert 29 void (*itemFree)(void *item) ///< how to free hashed data; or NULL 30 ); 31 32 /// Lookup key in table. 36 /** Lookup key in table. */ 33 37 void *psHashLookup(psHash *table, ///< table to lookup key in 34 38 const char *key ///< key to lookup 35 39 ); 36 40 37 / // Remove key from table.38 void *psHashRemove(psHash *table, ///< table to lookup key in39 const char *key ///< key to lookup41 /** Remove key from table. */ 42 bool psHashRemove(psHash *table, ///< table to lookup key in 43 const char *key ///< key to lookup 40 44 ); 45 46 /** Get list of keys */ 47 psList *psHashKeyList(psHash *table ///< table for which to get keys 48 ); 49 41 50 42 51 /* \} */ // End of DataGroup Functions -
trunk/archive/pslib/include/psSort.h
r671 r1581 15 15 psVector * 16 16 psSort(psVector *out, ///< Sorted array to return. May be NULL 17 const psVector * restrict in)///< Array to sort17 const psVector *in) ///< Array to sort 18 18 ; 19 19 20 20 /** Sort an array, along with some other stuff. Returns an index array */ 21 21 psVector * 22 psSortIndex(psVector * restrict out,///< Output index array (may be NULL)23 const psVector * restrict in)///< Array to sort22 psSortIndex(psVector *out, ///< Output index array (may be NULL) 23 const psVector *in) ///< Array to sort 24 24 ; 25 25
Note:
See TracChangeset
for help on using the changeset viewer.
