IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2004, 1:04:35 PM (22 years ago)
Author:
gusciora
Message:

This is a fairly large checkin. I had been sitting on a lot of test code
that was not quite in sync with the current test harness. I modified it
somewhat so it mostly works with the test harness, though there are still
problems with the printFooter() function not having a status for "status
unknown". Also, the runTest is not correctly parsing my date strings in
psLogMsg calls. Also, I added an individual entry for each test in the
Makefile in the test directory. I did this because the generic rules were
failing, and I did not want to break the tests for those people who were
successfully using the generic rules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psHash.h

    r494 r560  
    88
    99/** DO WE NEED TO DEFINE HashTable? */
    10 typedef struct HashTable psHash; ///< Opaque type for a hash table
     10//typedef struct HashTable psHash; ///< Opaque type for a hash table
     11// An entire hash table
     12
     13// A bucket that holds an item of data
     14typedef struct psHashBucket
     15{
     16    char *key;                          // key for this item of data
     17    void *data;                         // the data itself
     18    struct psHashBucket *next;          // list of other possible keys
     19}
     20psHashBucket;
     21
     22typedef struct psHash
     23{
     24    int nbucket;
     25    psHashBucket **buckets;
     26}
     27psHash;
    1128
    1229/** Functions **************************************************************/
     
    1936
    2037/// Free hash buckets from table.
    21 void psHashFree(psHash *table,  ///< hash table to be freed
     38void psHashFree(psHash *table,               ///< hash table to be freed
    2239                void (*itemFree)(void *item) ///< how to free hashed data; or NULL
    2340               );
    2441
    2542/// 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
     43void *psHashInsert(psHash *table,               ///< table to insert in
     44                   const char *key,             ///< key to use
     45                   void *data,                  ///< data to insert
    2946                   void (*itemFree)(void *item) ///< how to free hashed data; or NULL
    3047                  );
Note: See TracChangeset for help on using the changeset viewer.