IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2004, 2:06:06 PM (22 years ago)
Author:
desonia
Message:

another attempt to get astyle to get it right.

File:
1 edited

Legend:

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

    r1406 r1407  
     1
    12/** @file  psHash.h
    23 *  @brief Contains support for basic hashing functions.
     
    1011 *  @author George Gusciora, MHPCC
    1112 *   
    12  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-06 22:34:05 $
     13 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-07 00:06:06 $
    1415 *
    1516 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1617 */
    1718#if !defined(PS_HASH_H)
    18 #define PS_HASH_H
     19#    define PS_HASH_H
    1920
    2021/** \addtogroup HashTable
    2122 *  \{
    2223 */
    23 #include<stdbool.h>
     24#    include<stdbool.h>
    2425
    25 #include "psList.h"
     26#    include "psList.h"
    2627
    2728/** A bucket that holds an item of data. */
    2829typedef struct psHashBucket
    2930{
    30     char *key;                          ///< key for this item of data
    31     void *data;                         ///< the data itself
    32     struct psHashBucket *next;          ///< list of other possible keys
     31    char *key;                  // /< key for this item of data
     32    void *data;                 // /< the data itself
     33    struct psHashBucket *next;  // /< list of other possible keys
    3334}
    3435psHashBucket;
    3536
    3637//typedef struct HashTable psHash; ///< Opaque type for a hash table
     38
    3739/** The hash-table itself. */
    3840typedef struct psHash
    3941{
    40     int nbucket;                        ///< Number of buckets in hash table.
    41     psHashBucket **buckets;             ///< The bucket data.
     42    int nbucket;                // /< Number of buckets in hash table.
     43    psHashBucket **buckets;     // /< The bucket data.
    4244}
    4345psHash;
    4446
    4547/// Allocate hash buckets in table.
    46 psHash *psHashAlloc(int nbucket       ///< The number of buckets to allocate.
     48psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.
    4749                   );
    4850
    4951/// Insert entry into table.
    50 bool psHashAdd(psHash *table,               ///< table to insert in
    51                const char *key,             ///< key to use
    52                void *data                   ///< data to insert
     52bool psHashAdd(psHash * table,  // /< table to insert in
     53               const char *key, // /< key to use
     54               void *data       // /< data to insert
    5355              );
    5456
    5557/// Lookup key in table.
    56 void *psHashLookup(psHash *table,      ///< table to lookup key in
    57                    const char *key     ///< key to lookup
     58void *psHashLookup(psHash * table,      // /< table to lookup key in
     59                   const char *key      // /< key to lookup
    5860                  );
    5961
    6062/// Remove key from table.
    61 bool psHashRemove(psHash *table,      ///< table to lookup key in
    62                   const char *key     ///< key to lookup
     63bool psHashRemove(psHash * table,       // /< table to lookup key in
     64                  const char *key       // /< key to lookup
    6365                 );
    6466
    6567/// List all keys in table.
    66 psList *psHashKeyList(psHash *table  ///< table to list keys from.
     68psList *psHashKeyList(psHash * table    // /< table to list keys from.
    6769                     );
    6870
    69 /* \} */ // End of DataGroup Functions
     71/* \} */// End of DataGroup Functions
    7072
    7173#endif
Note: See TracChangeset for help on using the changeset viewer.