IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2004, 1:34:58 PM (22 years ago)
Author:
desonia
Message:

cleanup of some indent-induced madness.

Location:
trunk/psLib/src/collections
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psArray.c

    r1407 r1440  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-08-07 00:06:06 $
     11 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-08-09 23:34:57 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232
    3333/*****************************************************************************/
    34 static void arrayFree(psArray * restrict psArr);
     34static void arrayFree(psArray* restrict psArr);
    3535
    3636/*****************************************************************************/
     
    3939
    4040/*****************************************************************************/
    41 psArray *psArrayAlloc(unsigned int nalloc)
     41psArray* psArrayAlloc(unsigned int nalloc)
    4242{
    43     psArray *psArr = NULL;
     43    psArray* psArr = NULL;
    4444
    4545    // Invalid nalloc
     
    4949    }
    5050    // Create vector struct
    51     psArr = (psArray *) psAlloc(sizeof(psArray));
     51    psArr = (psArray* ) psAlloc(sizeof(psArray));
    5252    p_psMemSetDeallocator(psArr, (psFreeFcn) arrayFree);
    5353
     
    6161}
    6262
    63 psArray *psArrayRealloc(unsigned int nalloc, psArray * restrict in)
     63psArray* psArrayRealloc(unsigned int nalloc, psArray* restrict in)
    6464{
    6565    // Invalid nalloc
     
    8787}
    8888
    89 static void arrayFree(psArray * restrict psArr)
     89static void arrayFree(psArray* restrict psArr)
    9090{
    9191    if (psArr == NULL) {
     
    9898}
    9999
    100 void psArrayElementFree(psArray * restrict psArr)
     100void psArrayElementFree(psArray* restrict psArr)
    101101{
    102102
     
    111111}
    112112
    113 psArray *psArraySort(psArray * in, psComparePtrFcn compare)
     113psArray* psArraySort(psArray* in, psComparePtrFcn compare)
    114114{
    115115    if (in == NULL) {
  • trunk/psLib/src/collections/psArray.h

    r1426 r1440  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-09 22:44:25 $
     14 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 23:34:57 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636    unsigned int nalloc;        ///< Total number of elements available.
    3737    unsigned int n;             ///< Number of elements in use.
    38     psPTR *data;                ///< An Array of pointer elements
     38    psPTR* data;                ///< An Array of pointer elements
    3939}
    4040psArray;
     
    5151 * data
    5252 *
    53  * @return psArray*: Pointer to psArray.
     53 * @return psArray* : Pointer to psArray.
    5454 *
    5555 */
    56 psArray *psArrayAlloc(unsigned int nalloc       ///< Total number of elements to make available.
     56psArray* psArrayAlloc(unsigned int nalloc       ///< Total number of elements to make available.
    5757                     );
    5858
     
    6262 * of data.
    6363 *
    64  * @return psArray*: Pointer to psArray.
     64 * @return psArray* : Pointer to psArray.
    6565 *
    6666 */
    67 psArray *psArrayRealloc(unsigned int nalloc,    ///< Total number of elements to make available.
    68                         psArray * restrict psArr        ///< array to reallocate.
     67psArray* psArrayRealloc(unsigned int nalloc,    ///< Total number of elements to make available.
     68                        psArray* restrict psArr        ///< array to reallocate.
    6969                       );
    7070
     
    7676 *
    7777 */
    78 void psArrayElementFree(psArray * restrict psArr        ///< Void pointer array to destroy.
     78void psArrayElementFree(psArray* restrict psArr        ///< Void pointer array to destroy.
    7979                       );
    8080
     
    8484 *  to specify how the objects on the array should be sorted.
    8585 *
    86  *  @return psArray*       The sorted array.
     86 *  @return psArray* The sorted array.
    8787 */
    88 psArray *psArraySort(psArray * in, psComparePtrFcn compare);
     88psArray* psArraySort(psArray* in, psComparePtrFcn compare);
    8989
    9090/// @}
  • trunk/psLib/src/collections/psBitSet.c

    r1407 r1440  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-07 00:06:06 $
     13 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 23:34:57 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7070
    7171/*****************************************************************************/
    72 static void psBitSetFree(psBitSet * restrict inBitSet);
     72static void psBitSetFree(psBitSet* restrict inBitSet);
    7373
    7474/** Private function to create a mask.
     
    9595
    9696/*****************************************************************************/
    97 psBitSet *psBitSetAlloc(int n)
     97psBitSet* psBitSetAlloc(int n)
    9898{
    9999    int numBytes = 0;
    100     psBitSet *newObj = NULL;
     100    psBitSet* newObj = NULL;
    101101
    102102    if (n <= 0) {
     
    125125}
    126126
    127 static void psBitSetFree(psBitSet * restrict inBitSet)
     127static void psBitSetFree(psBitSet* restrict inBitSet)
    128128{
    129129    if (inBitSet == NULL) {
     
    134134}
    135135
    136 psBitSet *psBitSetSet(psBitSet * inBitSet, int bit)
     136psBitSet* psBitSetSet(psBitSet* inBitSet, int bit)
    137137{
    138138    char *byte = NULL;
     
    155155}
    156156
    157 bool psBitSetTest(const psBitSet * inBitSet, int bit)
     157bool psBitSetTest(const psBitSet* inBitSet, int bit)
    158158{
    159159    char *byte = NULL;
     
    178178}
    179179
    180 psBitSet *psBitSetOp(psBitSet * outBitSet, const psBitSet * restrict inBitSet1, char *operator,
    181                      const psBitSet * restrict inBitSet2)
     180psBitSet* psBitSetOp(psBitSet* outBitSet, const psBitSet* restrict inBitSet1, char *operator,
     181                     const psBitSet* restrict inBitSet2)
    182182{
    183183    int i = 0;
     
    241241}
    242242
    243 psBitSet *psBitSetNot(psBitSet * outBitSet, const psBitSet * restrict inBitSet)
     243psBitSet* psBitSetNot(psBitSet* outBitSet, const psBitSet* restrict inBitSet)
    244244{
    245245    int i = 0;
     
    278278}
    279279
    280 char *psBitSetToString(const psBitSet * restrict inBitSet)
     280char *psBitSetToString(const psBitSet* restrict inBitSet)
    281281{
    282282    int i = 0;
  • trunk/psLib/src/collections/psBitSet.h

    r1407 r1440  
    1313 *  @author Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-09 23:34:57 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5656 *  allocation.
    5757 *
    58  *  @return  psBitSet*: Pointer to struct containing array of bits and size of array.
     58 *  @return  psBitSet* : Pointer to struct containing array of bits and size of array.
    5959 */
    6060
    6161/*@null@*/
    6262
    63 psBitSet *psBitSetAlloc(int n
     63psBitSet* psBitSetAlloc(int n
    6464                        /**< Number of bits in psBitSet array */
    6565                       );
     
    7171 *  an array with two elements would result in an psBitSet that looks like 00000000 00001000.
    7272 *
    73  *  @return  psBitSet*: Pointer to struct containing psBitSet.
     73 *  @return  psBitSet* : Pointer to struct containing psBitSet.
    7474 */
    75 psBitSet *psBitSetSet(
     75psBitSet* psBitSetSet(
    7676
    77     /* @returned@ */ psBitSet * restrict inMask,
     77    /* @returned@ */ psBitSet* restrict inMask,
    7878    /**< Pointer to psBitSet to be set. */
    7979
     
    9191 */
    9292
    93 bool psBitSetTest(const psBitSet * restrict inMask,
     93bool psBitSetTest(const psBitSet* restrict inMask,
    9494                  /**< Pointer psBitSet to be tested. */
    9595
     
    102102 *  be performed and an error message will be logged.
    103103 *
    104  *  @return  psBitSet*: Pointer to struct containing result of binary operation.
     104 *  @return  psBitSet* : Pointer to struct containing result of binary operation.
    105105 */
    106 psBitSet *psBitSetOp(
     106psBitSet* psBitSetOp(
    107107
    108     /* @returned@ */ psBitSet * restrict outMask,
     108    /* @returned@ */ psBitSet* restrict outMask,
    109109    /**< Resulting psBitSet from binary operation */
    110110
    111     const psBitSet * restrict inMask1,
     111    const psBitSet* restrict inMask1,
    112112    /**< First psBitSet on which to operate */
    113113
    114114    char *operator,         /**< Bit operation */
    115115
    116     const psBitSet * restrict inMask2
     116    const psBitSet* restrict inMask2
    117117    /**< First psBitSet on which to operate */
    118118);
     
    122122 *  Toggles bits in a psBitset. All zero bits are set to one and all one bits are set to zero.
    123123 *
    124  *  @return  psBitSet*: Pointer to struct containing result of operation.
     124 *  @return  psBitSet* : Pointer to struct containing result of operation.
    125125 */
    126126
    127 psBitSet *psBitSetNot(psBitSet * outBitSet,
     127psBitSet* psBitSetNot(psBitSet* outBitSet,
    128128                      /**< Resulting psBitSet from operation */
    129129
    130                       const psBitSet * restrict inBitSet
     130                      const psBitSet* restrict inBitSet
    131131                      /**< Input psBitSet */
    132132                     );
     
    140140 */
    141141
    142 char *psBitSetToString(const psBitSet * restrict inMask
     142char *psBitSetToString(const psBitSet* restrict inMask
    143143                       /**< psBitSet to convert */
    144144                      );
  • trunk/psLib/src/collections/psHash.c

    r1420 r1440  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-09 20:29:43 $
     13*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 23:34:57 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2626#include "psAbort.h"
    2727
    28 static psHashBucket *hashBucketAlloc(const char *key, void *data, psHashBucket * next);
    29 static void hashBucketFree(psHashBucket * bucket);
    30 static void *doHashWork(psHash * table, const char *key, void *data, bool remove
     28static psHashBucket* hashBucketAlloc(const char *key, void *data, psHashBucket* next);
     29static void hashBucketFree(psHashBucket* bucket);
     30static void *doHashWork(psHash* table, const char *key, void *data, bool remove
    3131                           );
    32 static void hashFree(psHash * table);
     32static void hashFree(psHash* table);
    3333
    3434/******************************************************************************
     
    4040    The linked list
    4141 *****************************************************************************/
    42 psList *psHashKeyList(psHash * table)
     42psList* psHashKeyList(psHash* table)
    4343{
    4444    int i = 0;                  // Loop index variable
    45     psList *myLinkList = NULL;  // The output data structure
    46     psHashBucket *ptr = NULL;   // Used to step thru linked list.
     45    psList* myLinkList = NULL;  // The output data structure
     46    psHashBucket* ptr = NULL;   // Used to step thru linked list.
    4747
    4848    if (table == NULL) {
     
    8181    the new hash bucket.
    8282 *****************************************************************************/
    83 static psHashBucket *hashBucketAlloc(const char *key, void *data, psHashBucket * next)
     83static psHashBucket* hashBucketAlloc(const char *key, void *data, psHashBucket* next)
    8484{
    8585    if (key == NULL) {
     
    8787    }
    8888    // Allocate memory for the new hash bucket.
    89     psHashBucket *bucket = psAlloc(sizeof(psHashBucket));
     89    psHashBucket* bucket = psAlloc(sizeof(psHashBucket));
    9090
    9191    p_psMemSetDeallocator(bucket, (psFreeFcn) hashBucketFree);
     
    114114    NONE
    115115 *****************************************************************************/
    116 static void hashBucketFree(psHashBucket * bucket)
     116static void hashBucketFree(psHashBucket* bucket)
    117117{
    118118    if (bucket == NULL) {
     
    133133    The new hash table.
    134134 *****************************************************************************/
    135 psHash *psHashAlloc(int nbucket)        // initial number of buckets
     135psHash* psHashAlloc(int nbucket)        // initial number of buckets
    136136{
    137137    int i = 0;                  // loop index variable
    138138
    139139    // Create the new hash table.
    140     psHash *table = psAlloc(sizeof(psHash));
     140    psHash* table = psAlloc(sizeof(psHash));
    141141
    142142    p_psMemSetDeallocator(table, (psFreeFcn) hashFree);
    143143
    144144    // Allocate memory for the buckets.
    145     table->buckets = psAlloc(nbucket * sizeof(psHashBucket *));
     145    table->buckets = psAlloc(nbucket * sizeof(psHashBucket* ));
    146146    table->nbucket = nbucket;
    147147
     
    168168    NONE
    169169 *****************************************************************************/
    170 static void hashFree(psHash * table)
     170static void hashFree(psHash* table)
    171171{
    172172    int i = 0;                  // Loop index variable.
     
    210210there is little common code between those functions.
    211211  *****************************************************************************/
    212 static void *doHashWork(psHash * table, const char *key, void *data, bool remove
     212static void *doHashWork(psHash* table, const char *key, void *data, bool remove
    213213                           )
    214214{
     
    217217    // "hashed" from the key.
    218218    char *tmpchar = NULL;       // Used in computing the hash function.
    219     psHashBucket *ptr = NULL;   // Used to retrieve the hash bucket.
    220     psHashBucket *optr = NULL;  // "original pointer": used to step
     219    psHashBucket* ptr = NULL;   // Used to retrieve the hash bucket.
     220    psHashBucket* optr = NULL;  // "original pointer": used to step
    221221
    222222    // thru the linked list for a bucket.
     
    338338    boolean value defining success or failure
    339339 *****************************************************************************/
    340 bool psHashAdd(psHash * table, const char *key, void *data)
     340bool psHashAdd(psHash* table, const char *key, void *data)
    341341{
    342342    if (table == NULL) {
     
    364364    The data associated with that key.
    365365 *****************************************************************************/
    366 void *psHashLookup(psHash * table,      // table to lookup key in
     366void *psHashLookup(psHash* table,      // table to lookup key in
    367367                   const char *key)     // key to lookup
    368368{
     
    387387    boolean value defining success or failure
    388388 *****************************************************************************/
    389 bool psHashRemove(psHash * table, const char *key)
     389bool psHashRemove(psHash* table, const char *key)
    390390{
    391391    void *data = NULL;
  • trunk/psLib/src/collections/psHash.h

    r1426 r1440  
    1111 *  @author George Gusciora, MHPCC
    1212 *   
    13  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 22:44:25 $
     13 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 23:34:57 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131    char *key;                  ///< key for this item of data
    3232    void *data;                 ///< the data itself
    33     struct psHashBucket *next;  ///< list of other possible keys
     33    struct psHashBucket* next;  ///< list of other possible keys
    3434}
    3535psHashBucket;
     
    4141{
    4242    int nbucket;                ///< Number of buckets in hash table.
    43     psHashBucket **buckets;     ///< The bucket data.
     43    psHashBucket* *buckets;     ///< The bucket data.
    4444}
    4545psHash;
    4646
    4747/// Allocate hash buckets in table.
    48 psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate.
     48psHash* psHashAlloc(int nbucket ///< The number of buckets to allocate.
    4949                   );
    5050
    5151/// Insert entry into table.
    52 bool psHashAdd(psHash * table,  ///< table to insert in
     52bool psHashAdd(psHash* table,  ///< table to insert in
    5353               const char *key, ///< key to use
    5454               void *data       ///< data to insert
     
    5656
    5757/// Lookup key in table.
    58 void *psHashLookup(psHash * table,      ///< table to lookup key in
     58void *psHashLookup(psHash* table,      ///< table to lookup key in
    5959                   const char *key      ///< key to lookup
    6060                  );
    6161
    6262/// Remove key from table.
    63 bool psHashRemove(psHash * table,       ///< table to lookup key in
     63bool psHashRemove(psHash* table,       ///< table to lookup key in
    6464                  const char *key       ///< key to lookup
    6565                 );
    6666
    6767/// List all keys in table.
    68 psList *psHashKeyList(psHash * table    ///< table to list keys from.
     68psList* psHashKeyList(psHash* table    ///< table to list keys from.
    6969                     );
    7070
  • trunk/psLib/src/collections/psList.c

    r1407 r1440  
    77 *  @author Robert Daniel DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-08-07 00:06:06 $
     9 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-08-09 23:34:57 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929
    3030// private functions.
    31 static psListElem *listGetIterator(psList * list);
    32 static int listGetIteratorIndex(psList * list);
    33 static void listSetIterator(psList * list, int where, bool lockList);
    34 static void listFree(psList * list);
    35 
    36 psList *psListAlloc(void *data)
    37 {
    38     psList *list = psAlloc(sizeof(psList));
     31static psListElem* listGetIterator(psList* list);
     32static int listGetIteratorIndex(psList* list);
     33static void listSetIterator(psList* list, int where, bool lockList);
     34static void listFree(psList* list);
     35
     36psList* psListAlloc(void *data)
     37{
     38    psList* list = psAlloc(sizeof(psList));
    3939
    4040    p_psMemSetDeallocator(list, (psFreeFcn) listFree);
     
    5555}
    5656
    57 static void listFree(psList * list)
     57static void listFree(psList* list)
    5858{
    5959    if (list == NULL) {
     
    6464    ;
    6565
    66     for (psListElem * ptr = list->head; ptr != NULL;) {
    67         psListElem *next = ptr->next;
     66    for (psListElem* ptr = list->head; ptr != NULL;) {
     67        psListElem* next = ptr->next;
    6868
    6969        psFree(ptr->data);
     
    8181}
    8282
    83 bool psListAdd(psList * list, void *data, int where)
    84 {
    85     psListElem *position;
    86     psListElem *elem;
     83bool psListAdd(psList* list, void *data, int where)
     84{
     85    psListElem* position;
     86    psListElem* elem;
    8787    int cursorIndex = 0;
    8888
     
    168168 * Remove an element from a list
    169169 */
    170 bool psListRemove(psList * list, void *data, int which)
    171 {
    172     psListElem *elem = NULL;    // element to remove
     170bool psListRemove(psList* list, void *data, int which)
     171{
     172    psListElem* elem = NULL;    // element to remove
    173173    int cursorIndex = 0;
    174174
     
    186186        int i = 0;              // index
    187187
    188         for (psListElem * ptr = list->head; ptr != NULL; ptr = ptr->next) {
     188        for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
    189189            if (ptr->data == data) {
    190190                which = i;
     
    243243}
    244244
    245 void psListSetIterator(psList * list, int where)
     245void psListSetIterator(psList* list, int where)
    246246{
    247247    listSetIterator(list, where, true);
    248248}
    249249
    250 void listSetIterator(psList * list, int where, bool lockList)
    251 {
    252     psListElem *cursor;
     250void listSetIterator(psList* list, int where, bool lockList)
     251{
     252    psListElem* cursor;
    253253    int position;
    254254
     
    340340}
    341341
    342 psListElem *listGetIterator(psList * list)
     342psListElem* listGetIterator(psList* list)
    343343{
    344344    if (list == NULL) {
     
    355355}
    356356
    357 int listGetIteratorIndex(psList * list)
     357int listGetIteratorIndex(psList* list)
    358358{
    359359    if (list->iter == ITER_INIT_HEAD) {
     
    366366}
    367367
    368 void *psListGet(psList * list, int which)
    369 {
    370     psListElem *element;
     368void *psListGet(psList* list, int which)
     369{
     370    psListElem* element;
    371371
    372372    psListSetIterator(list, which);
     
    383383 * and now return the previous/next element of the list
    384384 */
    385 void *psListGetNext(psList * list)
     385void *psListGetNext(psList* list)
    386386{
    387387    return psListGet(list, PS_LIST_NEXT);
    388388}
    389389
    390 void *psListGetPrevious(psList * list)
     390void *psListGetPrevious(psList* list)
    391391{
    392392    return psListGet(list, PS_LIST_PREVIOUS);
    393393}
    394394
    395 void *psListGetCurrent(psList * list)
     395void *psListGetCurrent(psList* list)
    396396{
    397397    return psListGet(list, PS_LIST_CURRENT);
     
    401401 * Convert a psList to/from a psVoidPtrArray
    402402 */
    403 psArray *psListToArray(psList * restrict list)
    404 {
    405     psListElem *ptr;
     403psArray* psListToArray(psList* restrict list)
     404{
     405    psListElem* ptr;
    406406    unsigned int n;
    407     psArray *restrict arr;
     407    psArray* restrict arr;
    408408
    409409    if (list == NULL) {
     
    429429}
    430430
    431 psList *psArrayToList(psArray * arr)
     431psList* psArrayToList(psArray* arr)
    432432{
    433433    unsigned int n;
    434     psList *list;               // list of elements
     434    psList* list;               // list of elements
    435435
    436436    if (arr == NULL) {
     
    447447}
    448448
    449 psList *psListSort(psList * list, psComparePtrFcn compare)
    450 {
    451     psArray *arr;
     449psList* psListSort(psList* list, psComparePtrFcn compare)
     450{
     451    psArray* arr;
    452452
    453453    if (list == NULL) {
  • trunk/psLib/src/collections/psList.h

    r1426 r1440  
    1010 *  @ingroup LinkedList
    1111 *
    12  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-09 22:44:25 $
     12 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 23:34:57 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4444typedef struct psListElem
    4545{
    46     struct psListElem *prev;    ///< previous link in list
    47     struct psListElem *next;    ///< next link in list
     46    struct psListElem* prev;    ///< previous link in list
     47    struct psListElem* next;    ///< next link in list
    4848    void *data;                 ///< real data item
    4949}
     
    5858{
    5959    unsigned int size;          ///< number of elements on list
    60     psListElem *head;           ///< first element on list (may be NULL)
    61     psListElem *tail;           ///< last element on list (may be NULL)
    62     psListElem *iter;           ///< iteration cursor
     60    psListElem* head;           ///< first element on list (may be NULL)
     61    psListElem* tail;           ///< last element on list (may be NULL)
     62    psListElem* iter;           ///< iteration cursor
    6363    unsigned int iterIndex;     ///< the numeric position of the iteration cursor in the list
    6464    pthread_mutex_t lock;       ///< mutex to lock a node during changes
     
    6868/** Creates a psList linked list object.
    6969 *
    70  *  @return psList*     A new psList object.
     70 *  @return psList* A new psList object.
    7171 */
    72 psList *psListAlloc(void *data
     72psList* psListAlloc(void *data
    7373                    ///< initial data item; may be NULL if no an empty psList is desired
    7474                   )
     
    7777/** Adds an element to a psList at position given.
    7878 *
    79  *  @return psList*     The psList with added data item.  If list parameter is
     79 *  @return psList* The psList with added data item.  If list parameter is
    8080 *                      NULL, the return value will also be NULL.
    8181 */
    82 bool psListAdd(psList * restrict list,  ///< list to add to (if NULL, nothing is done)
     82bool psListAdd(psList* restrict list,  ///< list to add to (if NULL, nothing is done)
    8383               void *data,      ///< data item to add.  If NULL, list is not modified.
    8484               int where        ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     
    8989 *  @return bool        TRUE if element is successfully removed, otherwise FALSE.
    9090 */
    91 bool psListRemove(psList * restrict list,
     91bool psListRemove(psList* restrict list,
    9292                  ///< list to remove element from
    9393                  void *data,
     
    104104 *                      NULL is returned.
    105105 */
    106 void *psListGet(psList * restrict list, ///< list to retrieve element from
     106void *psListGet(psList* restrict list, ///< list to retrieve element from
    107107                int which       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
    108108               );
     
    112112 *
    113113 */
    114 void psListSetIterator(psList * restrict list,  ///< list to retrieve element from
     114void psListSetIterator(psList* restrict list,  ///< list to retrieve element from
    115115                       int where        ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    116116                      );
     
    123123 *                      parameter was NULL.
    124124 */
    125 void *psListGetNext(psList * restrict list      ///< list to retrieve element from
     125void *psListGetNext(psList* restrict list      ///< list to retrieve element from
    126126                   );
    127127
     
    133133 *                      iterator is not valid or list parameter was NULL.
    134134 */
    135 void *psListGetCurrent(psList * restrict list   ///< list to retrieve element from
     135void *psListGetCurrent(psList* restrict list   ///< list to retrieve element from
    136136                      );
    137137
     
    143143 *                      parameter was NULL.
    144144 */
    145 void *psListGetPrevious(psList * restrict list  ///< list to retrieve element from
     145void *psListGetPrevious(psList* restrict list  ///< list to retrieve element from
    146146                       );
    147147
    148148/** Convert a linked list to an array
    149149 *
    150  *  @return psArray*   A new psArray populated with elements from the list,
     150 *  @return psArray* A new psArray populated with elements from the list,
    151151 *                      or NULL if the given dlist parameter is NULL.
    152152 */
    153 psArray *psListToArray(psList * dlist   ///< List to convert
     153psArray* psListToArray(psList* dlist   ///< List to convert
    154154                      );
    155155
    156156/** Convert array to a doubly-linked list
    157157 *
    158  *  @return psList*     A new psList populated with elements formt the psArray,
     158 *  @return psList* A new psList populated with elements formt the psArray,
    159159 *                      or NULL is the given arr parameter is NULL.
    160160 */
    161 psList *psArrayToList(psArray * arr     ///< vector to convert
     161psList* psArrayToList(psArray* arr     ///< vector to convert
    162162                     );
    163163
    164 psList *psListSort(psList * list, psComparePtrFcn compare);
     164psList* psListSort(psList* list, psComparePtrFcn compare);
    165165
    166166/// @} End of DataGroup Functions
  • trunk/psLib/src/collections/psMetadata.c

    r1432 r1440  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-08-09 23:06:10 $
     14*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-08-09 23:34:57 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8888
    8989/*****************************************************************************/
    90 static void metadataItemFree(psMetadataItem * metadataItem)
     90static void metadataItemFree(psMetadataItem* metadataItem)
    9191{
    9292    psMetadataType type;
     
    109109}
    110110
    111 static void metadataFree(psMetadata * metadata)
     111static void metadataFree(psMetadata* metadata)
    112112{
    113113    if (metadata == NULL) {
     
    124124/*****************************************************************************/
    125125
    126 psMetadataItem *psMetadataItemAlloc(const char *name, psMetadataType type, const char *comment, ...)
     126psMetadataItem* psMetadataItemAlloc(const char *name, psMetadataType type, const char *comment, ...)
    127127{
    128128    va_list argPtr;
    129     psMetadataItem *metadataItem = NULL;
     129    psMetadataItem* metadataItem = NULL;
    130130
    131131    // Get the variable list parameters to pass to allocation function
     
    141141}
    142142
    143 psMetadataItem *psMetadataItemAllocV(const char *name, psMetadataType type, const char *comment,
     143psMetadataItem* psMetadataItemAllocV(const char *name, psMetadataType type, const char *comment,
    144144                                     va_list argPtr)
    145145{
    146     psMetadataItem *metadataItem = NULL;
     146    psMetadataItem* metadataItem = NULL;
    147147
    148148    if (name == NULL) {
     
    151151    }
    152152    // Allocate metadata item
    153     metadataItem = (psMetadataItem *) psAlloc(sizeof(psMetadataItem));
     153    metadataItem = (psMetadataItem* ) psAlloc(sizeof(psMetadataItem));
    154154    if (metadataItem == NULL) {
    155155        psAbort(__func__, "Failed to allocate memory");
     
    211211}
    212212
    213 psMetadata *psMetadataAlloc(void)
    214 {
    215     psList *list = NULL;
    216     psHash *table = NULL;
    217     psMetadata *metadata = NULL;
     213psMetadata* psMetadataAlloc(void)
     214{
     215    psList* list = NULL;
     216    psHash* table = NULL;
     217    psMetadata* metadata = NULL;
    218218
    219219    // Allocate metadata
    220     metadata = (psMetadata *) psAlloc(sizeof(psMetadata));
     220    metadata = (psMetadata* ) psAlloc(sizeof(psMetadata));
    221221    if (metadata == NULL) {
    222222        psAbort(__func__, "Failed to allocate metadata");
     
    226226
    227227    // Allocate metadata's internal containers
    228     list = (psList *) psListAlloc(NULL);
     228    list = (psList* ) psListAlloc(NULL);
    229229    if (list == NULL) {
    230230        psAbort(__func__, "Failed to allocate list");
    231231    }
    232232
    233     table = (psHash *) psHashAlloc(10);
     233    table = (psHash* ) psHashAlloc(10);
    234234    if (table == NULL) {
    235235        psAbort(__func__, "Failed to allocate table");
     
    242242}
    243243
    244 bool psMetadataAddItem(psMetadata * restrict md, int where, psMetadataItem * restrict metadataItem)
     244bool psMetadataAddItem(psMetadata* restrict md, int where, psMetadataItem* restrict metadataItem)
    245245{
    246246    char *key = NULL;
    247     psHash *mdTable = NULL;
    248     psList *mdList = NULL;
    249     psMetadataItem *value = NULL;
     247    psHash* mdTable = NULL;
     248    psList* mdList = NULL;
     249    psMetadataItem* value = NULL;
    250250    psMetadataType type = PS_META_ITEM_SET;
    251251
     
    280280    }
    281281    // Check if key is already in table
    282     value = (psMetadataItem *) psHashLookup(mdTable, key);
     282    value = (psMetadataItem* ) psHashLookup(mdTable, key);
    283283    if (value != NULL && type != PS_META_ITEM_SET) {
    284284
     
    316316}
    317317
    318 bool psMetadataAdd(psMetadata * restrict md, int where, const char *name, psMetadataType type,
     318bool psMetadataAdd(psMetadata* restrict md, int where, const char *name, psMetadataType type,
    319319                   const char *comment, ...)
    320320{
    321321    va_list argPtr;
    322     psMetadataItem *metadataItem = NULL;
     322    psMetadataItem* metadataItem = NULL;
    323323
    324324    va_start(argPtr, comment);
     
    339339}
    340340
    341 bool psMetadataRemove(psMetadata * restrict md, int where, const char *restrict key)
     341bool psMetadataRemove(psMetadata* restrict md, int where, const char *restrict key)
    342342{
    343343    int numChildren = 0;
    344     psList *mdList = NULL;
    345     psHash *mdTable = NULL;
    346     psMetadataItem *entry = NULL;
    347     psMetadataItem *entryChild = NULL;
     344    psList* mdList = NULL;
     345    psHash* mdTable = NULL;
     346    psMetadataItem* entry = NULL;
     347    psMetadataItem* entryChild = NULL;
    348348
    349349
     
    368368
    369369        // Remove by key name
    370         entry = (psMetadataItem *) psHashLookup(mdTable, key);
     370        entry = (psMetadataItem* ) psHashLookup(mdTable, key);
    371371        if (entry == NULL) {
    372372            psError(__func__, "Couldn't find metadata item. Name: %s", key);
     
    419419}
    420420
    421 psMetadataItem *psMetadataLookup(psMetadata * restrict md, const char *restrict key)
    422 {
    423     psHash *mdTable = NULL;
    424     psMetadataItem *entry = NULL;
     421psMetadataItem* psMetadataLookup(psMetadata* restrict md, const char *restrict key)
     422{
     423    psHash* mdTable = NULL;
     424    psMetadataItem* entry = NULL;
    425425
    426426
     
    441441    }
    442442
    443     entry = (psMetadataItem *) psHashLookup(mdTable, key);
     443    entry = (psMetadataItem* ) psHashLookup(mdTable, key);
    444444    if (entry == NULL) {
    445445        psError(__func__, "Could not find metadata item. Key: %s", key);
     
    450450}
    451451
    452 psMetadataItem *psMetadataGet(psMetadata * restrict md, int where)
    453 {
    454     psList *mdList = NULL;
    455     psMetadataItem *entry = NULL;
     452psMetadataItem* psMetadataGet(psMetadata* restrict md, int where)
     453{
     454    psList* mdList = NULL;
     455    psMetadataItem* entry = NULL;
    456456
    457457
     
    467467    }
    468468
    469     entry = (psMetadataItem *) psListGet(mdList, where);
     469    entry = (psMetadataItem* ) psListGet(mdList, where);
    470470    if (entry == NULL) {
    471471        psError(__func__, "Couldn't find metadata item with given index. Index: %d", where);
     
    476476}
    477477
    478 bool psMetadataSetIterator(psMetadata * restrict md, int where)
    479 {
    480     psList *mdList = NULL;
     478bool psMetadataSetIterator(psMetadata* restrict md, int where)
     479{
     480    psList* mdList = NULL;
    481481
    482482    if (md == NULL) {
     
    496496}
    497497
    498 psMetadataItem *psMetadataGetNext(psMetadata * restrict md, const char *restrict match, int which)
    499 {
    500     psList *mdList = NULL;
    501     psMetadataItem *entry = NULL;
     498psMetadataItem* psMetadataGetNext(psMetadata* restrict md, const char *restrict match, int which)
     499{
     500    psList* mdList = NULL;
     501    psMetadataItem* entry = NULL;
    502502
    503503    mdList = md->list;
     
    532532}
    533533
    534 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, const char *restrict match, int which)
    535 {
    536     psList *mdList = NULL;
    537     psMetadataItem *entry = NULL;
     534psMetadataItem* psMetadataGetPrevious(psMetadata* restrict md, const char *restrict match, int which)
     535{
     536    psList* mdList = NULL;
     537    psMetadataItem* entry = NULL;
    538538
    539539    mdList = md->list;
     
    568568}
    569569
    570 void psMetadataItemPrint(FILE * fd, const char *format, const psMetadataItem * restrict metadataItem)
     570void psMetadataItemPrint(FILE * fd, const char *format, const psMetadataItem* restrict metadataItem)
    571571{
    572572    psMetadataType type;
     
    616616}
    617617
    618 psMetadata *psMetadataFReadHeader(psMetadata * output, char *extName, int extNum, fitsfile * fd)
     618psMetadata* psMetadataFReadHeader(psMetadata* output, char *extName, int extNum, fitsfile * fd)
    619619{
    620620    bool tempBool;
  • trunk/psLib/src/collections/psMetadata.h

    r1426 r1440  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-09 22:44:25 $
     13*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 23:34:57 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6666    } data;                     ///< Union for data types.
    6767    char *comment;              ///< Optional comment ("", not NULL).
    68     psList *restrict items;     ///< List of psMetadataItems with same name.
     68    psList* restrict items;     ///< List of psMetadataItems with same name.
    6969}
    7070psMetadataItem;
     
    7878typedef struct psMetadata
    7979{
    80     psList *restrict list;
    81     psHash *restrict table;
     80    psList* restrict list;
     81    psHash* restrict table;
    8282}
    8383psMetadata;
     
    100100 * specified size and type.
    101101 *
    102  * @return psMetadataItem*: Pointer metadata item.
    103  */
    104 psMetadataItem *psMetadataItemAlloc(const char *name,   ///< Name of metadata item.
     102 * @return psMetadataItem* : Pointer metadata item.
     103 */
     104psMetadataItem* psMetadataItemAlloc(const char *name,   ///< Name of metadata item.
    105105                                    psMetadataType type,        ///< Type of metadata item.
    106106                                    const char *comment,        ///< Comment for metadata item.
     
    119119 * specified size and type.
    120120 *
    121  * @return psMetadataItem*: Pointer metadata item.
    122  */
    123 psMetadataItem *psMetadataItemAllocV(const char *name,  ///< Name of metadata item.
     121 * @return psMetadataItem* : Pointer metadata item.
     122 */
     123psMetadataItem* psMetadataItemAllocV(const char *name,  ///< Name of metadata item.
    124124                                     psMetadataType type,       ///< Type of metadata item.
    125125                                     const char *comment,       ///< Comment for metadata item.
     
    132132 * Returns an empty metadata container with fully allocated internal metadata containers.
    133133 *
    134  * @return psMetadata*: Pointer metadata.
    135  */
    136 psMetadata *psMetadataAlloc(void        ///< Void.
     134 * @return psMetadata* : Pointer metadata.
     135 */
     136psMetadata* psMetadataAlloc(void        ///< Void.
    137137                           );
    138138
     
    143143 * @return bool: True for success, false for failure.
    144144 */
    145 bool psMetadataAddItem(psMetadata * restrict md,        ///< Metadata collection to insert metadat item.
     145bool psMetadataAddItem(psMetadata* restrict md,        ///< Metadata collection to insert metadat item.
    146146                       int where,       ///< Location to be added.
    147                        psMetadataItem * restrict item   ///< Metadata item to be added.
     147                       psMetadataItem* restrict item   ///< Metadata item to be added.
    148148                      );
    149149
     
    154154 * @return bool: True for success, false for failure.
    155155 */
    156 bool psMetadataAdd(psMetadata * restrict md,    ///< Metadata collection to insert metadat item.
     156bool psMetadataAdd(psMetadata* restrict md,    ///< Metadata collection to insert metadat item.
    157157                   int where,   ///< Location to be added.
    158158                   const char *name,    ///< Name of metadata item.
     
    171171 * @return bool: True for success, false for failure.
    172172 */
    173 bool psMetadataRemove(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     173bool psMetadataRemove(psMetadata* restrict md, ///< Metadata collection to insert metadat item.
    174174                      int where,        ///< Location to be removed.
    175175                      const char *restrict key  ///< Name of metadata key.
     
    181181 * returned. If the item is not found, null is returned.
    182182 *
    183  * @return psMetadataItem*: Pointer metadata item.
    184  */
    185 psMetadataItem *psMetadataLookup(psMetadata * restrict md,      ///< Metadata collection to insert metadat
     183 * @return psMetadataItem* : Pointer metadata item.
     184 */
     185psMetadataItem* psMetadataLookup(psMetadata* restrict md,      ///< Metadata collection to insert metadat
    186186                                 // item.
    187187                                 const char *restrict key       ///< Name of metadata key.
     
    192192 * Items may be found in the metadata by their entry position in the list container.
    193193 *
    194  * @return psMetadataItem*: Pointer metadata item.
    195  */
    196 psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     194 * @return psMetadataItem* : Pointer metadata item.
     195 */
     196psMetadataItem* psMetadataGet(psMetadata* restrict md, ///< Metadata collection to insert metadat item.
    197197                              int where ///< Location to be retrieved.
    198198                             );
     
    204204 * @return void: void.
    205205 */
    206 bool psMetadataSetIterator(psMetadata * restrict md,    ///< Metadata collection to iterate.
     206bool psMetadataSetIterator(psMetadata* restrict md,    ///< Metadata collection to iterate.
    207207                           int where    ///< Location of iterator.
    208208                          );
     
    212212 * Get next metadata item in iterator list.
    213213 *
    214  * @return psMetadataItem*: Pointer metadata item.
    215  */
    216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     ///< Metadata collection to iterate.
     214 * @return psMetadataItem* : Pointer metadata item.
     215 */
     216psMetadataItem* psMetadataGetNext(psMetadata* restrict md,     ///< Metadata collection to iterate.
    217217                                  const char *restrict match,   ///< Beginning of key name.
    218218                                  int which     ///< Iterator to be used.
     
    223223 * Get previous metadata item in iterator list.
    224224 *
    225  * @return psMetadataItem*: Pointer metadata item.
    226  */
    227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, ///< Metadata collection to iterate.
     225 * @return psMetadataItem* : Pointer metadata item.
     226 */
     227psMetadataItem* psMetadataGetPrevious(psMetadata* restrict md, ///< Metadata collection to iterate.
    228228                                      const char *restrict match,       ///< Beginning of key name.
    229229                                      int which ///< Iterator to be used.
     
    238238 * metadata type is any other data type, printing is not allowed.
    239239 *
    240  * @return psMetadataItem*: Pointer metadata item.
     240 * @return psMetadataItem* : Pointer metadata item.
    241241 */
    242242void psMetadataItemPrint(FILE * fd,     ///< Pointer to file to write metadata item.
    243243                         const char *format,    ///< Format to print metadata item.
    244                          const psMetadataItem * restrict metadataItem   ///< Metadata item to print.
     244                         const psMetadataItem* restrict metadataItem   ///< Metadata item to print.
    245245                        );
    246246
     
    250250 * unimplemented.
    251251 *
    252  * @return psMetadata*: Pointer metadata.
    253  */
    254 psMetadata *psMetadataReadHeader(psMetadata * output,   ///< Resulting metadata from read.
     252 * @return psMetadata* : Pointer metadata.
     253 */
     254psMetadata* psMetadataReadHeader(psMetadata* output,   ///< Resulting metadata from read.
    255255                                 char *extname, ///< File name extension string.
    256256                                 int extnum,    ///< File name extension number. Starts at 1.
     
    262262 * Read a metadata header from file. If the file is not found, an error is reported.
    263263 *
    264  * @return psMetadata*: Pointer metadata.
    265  */
    266 psMetadata *psMetadataFReadHeader(psMetadata * output,  ///< Resulting metadata from read.
     264 * @return psMetadata* : Pointer metadata.
     265 */
     266psMetadata* psMetadataFReadHeader(psMetadata* output,  ///< Resulting metadata from read.
    267267                                  char *extName,        ///< File name extension string.
    268268                                  int extNum,   ///< File name extension number.
  • trunk/psLib/src/collections/psScalar.c

    r1407 r1440  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-08-07 00:06:06 $
     11 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-08-09 23:34:57 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7171
    7272/*****************************************************************************/
    73 psScalar *psScalarAlloc(psC64 value, psElemType dataType)
     73psScalar* psScalarAlloc(psC64 value, psElemType dataType)
    7474{
    75     psScalar *scalar = NULL;
     75    psScalar* scalar = NULL;
    7676
    7777    // Create scalar
    78     scalar = (psScalar *) psAlloc(sizeof(psScalar));
     78    scalar = (psScalar* ) psAlloc(sizeof(psScalar));
    7979    if (scalar == NULL) {
    8080        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
     
    128128}
    129129
    130 void psScalarFree(psScalar * restrict scalar)
     130void psScalarFree(psScalar* restrict scalar)
    131131{
    132132    if (scalar == NULL) {
  • trunk/psLib/src/collections/psScalar.h

    r1426 r1440  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 22:44:25 $
     13 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 23:34:57 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6262 * Accepts a complex 64 bit float for input value, as max size, but resizes according to
    6363 * correct type.
    64  * @return psScalar*: Pointer to psScalar.
     64 * @return psScalar* : Pointer to psScalar.
    6565 *
    6666 */
    67 psScalar *psScalarAlloc(psC64 value,    ///< Data to be put into psScalar.
     67psScalar* psScalarAlloc(psC64 value,    ///< Data to be put into psScalar.
    6868                        psElemType dataType     ///< Type of data to be held by psScalar.
    6969                       );
     
    7676 *
    7777 */
    78 void psScalarFree(psScalar * restrict scalar    ///< Scalar to free.
     78void psScalarFree(psScalar* restrict scalar    ///< Scalar to free.
    7979                 );
    8080
  • trunk/psLib/src/collections/psVector.c

    r1407 r1440  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-08-07 00:06:06 $
     11*  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-08-09 23:34:57 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6767
    6868/*****************************************************************************/
    69 static void vectorFree(psVector * restrict psVec);
     69static void vectorFree(psVector* restrict psVec);
    7070
    7171/*****************************************************************************/
     
    7474
    7575/*****************************************************************************/
    76 psVector *psVectorAlloc(unsigned int nalloc, psElemType elemType)
    77 {
    78     psVector *psVec = NULL;
     76psVector* psVectorAlloc(unsigned int nalloc, psElemType elemType)
     77{
     78    psVector* psVec = NULL;
    7979    int elementSize = 0;
    8080
     
    8888
    8989    // Create vector struct
    90     psVec = (psVector *) psAlloc(sizeof(psVector));
     90    psVec = (psVector* ) psAlloc(sizeof(psVector));
    9191    p_psMemSetDeallocator(psVec, (psFreeFcn) vectorFree);
    9292
     
    102102}
    103103
    104 psVector *psVectorRealloc(unsigned int nalloc, psVector * restrict in)
     104psVector* psVectorRealloc(unsigned int nalloc, psVector* restrict in)
    105105{
    106106    int elementSize = 0;
     
    130130}
    131131
    132 psVector *psVectorRecycle(psVector * restrict in, unsigned int nalloc, psElemType type)
     132psVector* psVectorRecycle(psVector* restrict in, unsigned int nalloc, psElemType type)
    133133{
    134134    psElemType elemType;
     
    160160}
    161161
    162 psVector *psVectorSort(psVector * restrict outVector, const psVector * restrict inVector)
     162psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector)
    163163{
    164164    int inN = 0;
     
    261261}
    262262
    263 psVector *psVectorSortIndex(psVector * restrict outVector, const psVector * restrict inVector)
     263psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector)
    264264{
    265265    int inN = 0;
     
    270270    int *outVec = NULL;
    271271    double diff = 0.0f;
    272     psVector *tmpVector = NULL;
     272    psVector* tmpVector = NULL;
    273273    psElemType inType = 0;
    274274
     
    348348}
    349349
    350 static void vectorFree(psVector * restrict psVec)
     350static void vectorFree(psVector* restrict psVec)
    351351{
    352352    if (psVec == NULL) {
  • trunk/psLib/src/collections/psVector.h

    r1426 r1440  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-09 22:44:25 $
     14 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 23:34:57 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3838
    3939    union {
    40         psU8 *U8;               ///< Unsigned 8-bit integer data.
    41         psU16 *U16;             ///< Unsigned 16-bit integer data.
    42         psU32 *U32;             ///< Unsigned 32-bit integer data.
    43         psU64 *U64;             ///< Unsigned 64-bit integer data.
    44         psS8 *S8;               ///< Signed 8-bit integer data.
    45         psS16 *S16;             ///< Signed 16-bit integer data.
    46         psS32 *S32;             ///< Signed 32-bit integer data.
    47         psS64 *S64;             ///< Signed 64-bit integer data.
    48         psF32 *F32;             ///< Single-precision float data.
    49         psF64 *F64;             ///< Double-precision float data.
    50         psC32 *C32;             ///< Single-precision complex data.
    51         psC64 *C64;             ///< Double-precision complex data.
     40        psU8* U8;               ///< Unsigned 8-bit integer data.
     41        psU16* U16;             ///< Unsigned 16-bit integer data.
     42        psU32* U32;             ///< Unsigned 32-bit integer data.
     43        psU64* U64;             ///< Unsigned 64-bit integer data.
     44        psS8* S8;               ///< Signed 8-bit integer data.
     45        psS16* S16;             ///< Signed 16-bit integer data.
     46        psS32* S32;             ///< Signed 32-bit integer data.
     47        psS64* S64;             ///< Signed 64-bit integer data.
     48        psF32* F32;             ///< Single-precision float data.
     49        psF64* F64;             ///< Double-precision float data.
     50        psC32* C32;             ///< Single-precision complex data.
     51        psC64* C64;             ///< Double-precision complex data.
    5252        psPTR V;                ///< Pointer to data.
    5353    } data;                     ///< Union for data types.
     
    6565 * Uses psLib memory allocation functions to create a vector collection of data as defined by the psType type.
    6666 *
    67  * @return psVector*: Pointer to psVector.
     67 * @return psVector* : Pointer to psVector.
    6868 *
    6969 */
    70 psVector *psVectorAlloc(unsigned int nalloc,    ///< Total number of elements to make available.
     70psVector* psVectorAlloc(unsigned int nalloc,    ///< Total number of elements to make available.
    7171                        psElemType dataType     ///< Type of data to be held by vector.
    7272                       );
     
    7777 * according to the psType type member contained within the vector.
    7878 *
    79  * @return psVector*: Pointer to psVector.
     79 * @return psVector* : Pointer to psVector.
    8080 *
    8181 */
    82 psVector *psVectorRealloc(unsigned int nalloc,  ///< Total number of elements to make available.
    83                           psVector * restrict psVec     ///< Vector to reallocate.
     82psVector* psVectorRealloc(unsigned int nalloc,  ///< Total number of elements to make available.
     83                          psVector* restrict psVec     ///< Vector to reallocate.
    8484                         );
    8585
     
    8989 * according to the psElemType type parameter.
    9090 *
    91  * @return psVector*: Pointer to psVector.
     91 * @return psVector* : Pointer to psVector.
    9292 *
    9393 */
    94 psVector *psVectorRecycle(psVector * restrict psVec,
     94psVector* psVectorRecycle(psVector* restrict psVec,
    9595                          ///< Vector to recycle.  If NULL, a new vector is created.  No effort taken to
    9696                          // preserve the values.
     
    104104 *  all non-complex data types.
    105105 *
    106  *  @return  psFloatArray*: Pointer to sorted psFloatArray.
     106 *  @return  psFloatArray* : Pointer to sorted psFloatArray.
    107107 */
    108108
    109 psVector *psVectorSort(psVector * restrict outVector,   ///< the output vector to recycle, or NULL if new
     109psVector* psVectorSort(psVector* restrict outVector,   ///< the output vector to recycle, or NULL if new
    110110                       // vector desired.
    111                        const psVector * restrict inVector       ///< the vector to sort.
     111                       const psVector* restrict inVector       ///< the vector to sort.
    112112                      );
    113113
     
    117117 *  sorted float values based on pre-sort index positions. 
    118118 *
    119  *  @return  psIntArray*: Pointer to psIntArray of sorted indices.
     119 *  @return  psIntArray* : Pointer to psIntArray of sorted indices.
    120120 */
    121121
    122 psVector *psVectorSortIndex(psVector * restrict outVector, const psVector * restrict inVector);
     122psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector);
    123123
    124124/// @}
Note: See TracChangeset for help on using the changeset viewer.