IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

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

Legend:

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

    r1920 r2204  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-28 23:26:48 $
     11 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-27 00:57:31 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242
    4343/*****************************************************************************/
    44 psArray* psArrayAlloc(unsigned int nalloc)
     44psArray* psArrayAlloc(psU32 nalloc)
    4545{
    4646    psArray* psArr = NULL;
     
    5454
    5555    // Create vector data array
    56     psArr->data = psAlloc(nalloc * sizeof(psPTR));
     56    psArr->data = psAlloc(nalloc * sizeof(psPtr));
    5757
    5858    return psArr;
    5959}
    6060
    61 psArray* psArrayRealloc(psArray* restrict in, unsigned int nalloc)
     61psArray* psArrayRealloc(psArray* restrict in, psU32 nalloc)
    6262{
    6363    if (in == NULL) {
     
    6565    } else if (in->nalloc != nalloc) {     // No need to realloc to same size
    6666        if (nalloc < in->n) {
    67             for (int i = nalloc; i < in->n; i++) {      // For reduction in vector size
     67            for (psS32 i = nalloc; i < in->n; i++) {      // For reduction in vector size
    6868                psFree(in->data[i]);
    6969            }
     
    7171        }
    7272        // Realloc after decrementation to avoid accessing freed array elements
    73         in->data = psRealloc(in->data, nalloc * sizeof(psPTR));
     73        in->data = psRealloc(in->data, nalloc * sizeof(psPtr));
    7474        in->nalloc = nalloc;
    7575    }
     
    8989}
    9090
    91 bool psArrayRemove(psArray* psArr,
    92                    psPTR data)
     91psBool psArrayRemove(psArray* psArr,
     92                     psPtr data)
    9393{
    94     bool success = false;
     94    psBool success = false;
    9595
    9696    if (psArr == NULL) {
     
    9898    }
    9999
    100     int n = psArr->n;
    101     psPTR* psArrData = psArr->data;
    102     for (int i = n-1; i<0; i--) {
     100    psS32 n = psArr->n;
     101    psPtr* psArrData = psArr->data;
     102    for (psS32 i = n-1; i<0; i--) {
    103103        if (psArrData[i] == data) {
    104             memmove(psArrData[i],psArrData[i+1],(n-i-1)*sizeof(psPTR));
     104            memmove(psArrData[i],psArrData[i+1],(n-i-1)*sizeof(psPtr));
    105105            n--;
    106106            success = true;
     
    119119    }
    120120
    121     for (int i = 0; i < psArr->n; i++) {
     121    for (psS32 i = 0; i < psArr->n; i++) {
    122122        psFree(psArr->data[i]);
    123123        psArr->data[i] = NULL;
     
    131131    }
    132132
    133     qsort(in->data, in->n, sizeof(psPTR), (int (*)(const void *, const void *))compare);
     133    qsort(in->data, in->n, sizeof(psPtr), (int (*)(const void* , const void*))compare);
    134134
    135135    return in;
  • trunk/psLib/src/collections/psArray.h

    r1920 r2204  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-09-28 23:26:48 $
     14 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-10-27 00:57:31 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020#ifndef PS_ARRAY_H
    2121#define PS_ARRAY_H
    22 
    23 #include<stdbool.h>
    2422
    2523#include "psType.h"
     
    3634typedef struct
    3735{
    38     unsigned int nalloc;        ///< Total number of elements available.
    39     unsigned int n;             ///< Number of elements in use.
    40     psPTR* data;                ///< An Array of pointer elements
     36    psU32 nalloc;        ///< Total number of elements available.
     37    psU32 n;             ///< Number of elements in use.
     38    psPtr* data;                ///< An Array of pointer elements
    4139}
    4240psArray;
     
    5755 */
    5856psArray* psArrayAlloc(
    59     unsigned int nalloc                ///< Total number of elements to make available.
     57    psU32 nalloc                ///< Total number of elements to make available.
    6058);
    6159
     
    7068psArray* psArrayRealloc(
    7169    psArray* restrict psArr,           ///< array to reallocate.
    72     unsigned int nalloc                ///< Total number of elements to make available.
     70    psU32 nalloc                ///< Total number of elements to make available.
    7371);
    7472
     
    8179 *
    8280 */
    83 bool psArrayRemove(
     81psBool psArrayRemove(
    8482    psArray* psArr,                    ///< array to operate on
    85     psPTR data                         ///< the data pointer to remove from psArray
     83    psPtr data                         ///< the data pointer to remove from psArray
    8684);
    8785
  • trunk/psLib/src/collections/psBitSet.c

    r1842 r2204  
    1111 *  @author Robert DeSonia, MHPCC
    1212 *
    13  *  @version $Revision: 1.18 $ $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 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2121#include <ctype.h>
    2222#include <math.h>
    23 #include <stdbool.h>
    2423
    2524#include "psBitSet.h"
     
    4847 *  @return  char*: Pointer to byte in which bit is contained.
    4948 */
    50 static char mask(int bit)
     49static char mask(psS32 bit)
    5150{
    5251    char mask = (char)0x01;
     
    6766}
    6867
    69 psBitSet* psBitSetAlloc(int n)
    70 {
    71     int numBytes = 0;
     68psBitSet* psBitSetAlloc(psS32 n)
     69{
     70    psS32 numBytes = 0;
    7271    psBitSet* newObj = NULL;
    7372
     
    9594
    9695psBitSet* psBitSetSet(psBitSet* inBitSet,
    97                       int bit)
     96                      psS32 bit)
    9897{
    9998    char *byte = NULL;
     
    120119
    121120psBitSet* psBitSetClear(psBitSet* inBitSet,
    122                         int bit)
     121                        psS32 bit)
    123122{
    124123    char *byte = NULL;
     
    144143}
    145144
    146 bool psBitSetTest(const psBitSet* inBitSet,
    147                   int bit)
     145psBool psBitSetTest(const psBitSet* inBitSet,
     146                    psS32 bit)
    148147{
    149148    char *byte = NULL;
     
    173172                     const psBitSet* restrict inBitSet2)
    174173{
    175     int i = 0;
    176     int n = 0;
     174    psS32 i = 0;
     175    psS32 n = 0;
    177176    char* outBits = NULL;
    178177    char* inBits1 = NULL;
    179178    char* inBits2 = NULL;
    180     int op = UNKNOWN_OP;
     179    psS32 op = UNKNOWN_OP;
    181180
    182181    if (inBitSet1 == NULL) {
     
    198197
    199198    // make operator all caps
    200     int tempStrLen = strlen(operator);
     199    psS32 tempStrLen = strlen(operator);
    201200    char* tempStr = psAlloc(tempStrLen+1);
    202201
    203     for (int lcv=0;lcv<tempStrLen;lcv++) {
     202    for (psS32 lcv=0;lcv<tempStrLen;lcv++) {
    204203        tempStr[lcv] = (char)toupper(operator[lcv]);
    205204    }
     
    308307char *psBitSetToString(const psBitSet* restrict inBitSet)
    309308{
    310     int i = 0;
    311     int numBits = inBitSet->n * 8;
     309    psS32 i = 0;
     310    psS32 numBits = inBitSet->n * 8;
    312311    char *outString = psAlloc((size_t) numBits + 1);
    313312
  • trunk/psLib/src/collections/psBitSet.h

    r1807 r2204  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-09-14 20:01:52 $
     14 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-10-27 00:57:31 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020#ifndef PSBITSET_H
    2121#define PSBITSET_H
     22
     23#include "psType.h"
    2224
    2325/// @addtogroup BitSet
     
    3537typedef struct
    3638{
    37     int n;                             ///< Number of bytes in the array
     39    psS32 n;                             ///< Number of bytes in the array
    3840    char *bits;                        ///< Aray of bytes holding bits
    3941}
     
    5456/*@null@*/
    5557psBitSet* psBitSetAlloc(
    56     int n                              ///< Number of bits in psBitSet array
     58    psS32 n                              ///< Number of bits in psBitSet array
    5759);
    5860
     
    6870    /* @returned@ */
    6971    psBitSet* restrict inMask,         ///< Pointer to psBitSet to be set.
    70     int bit                            ///< Bit to be set.
     72    psS32 bit                            ///< Bit to be set.
    7173);
    7274
     
    8284    /* @returned@ */
    8385    psBitSet* restrict inMask,         ///< Pointer to psBitSet to be cleared.
    84     int bit                            ///< Bit to be cleared.
     86    psS32 bit                            ///< Bit to be cleared.
    8587);
    8688
     
    9597 */
    9698
    97 bool psBitSetTest(
     99psBool psBitSetTest(
    98100    const psBitSet* restrict inMask,   ///< Pointer psBitSet to be tested.
    99     int bit                            ///< Bit to be tested.
     101    psS32 bit                            ///< Bit to be tested.
    100102);
    101103
  • trunk/psLib/src/collections/psCompare.c

    r1407 r2204  
    77 *  @author Robert Daniel DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-08-07 00:06:06 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-10-27 00:57:31 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1313 */
    1414
    15 #include "psType.h"
    1615#include "psCompare.h"
    1716
  • trunk/psLib/src/collections/psCompare.h

    r1473 r2204  
     1/** @file psCompare.h
     2 *  @brief Comparison functions for sorting routines
     3 *
     4 *  @author Robert Daniel DeSonia, MHPCC
     5 *
     6 *  @ingroup Compare
     7 *
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 00:57:31 $
     10 *
     11 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     12 */
     13
    114#if !defined(PS_COMPARE_H)
    215#define PS_COMPARE_H
    316
    4 /** @file psCompare.h
    5  *  @brief Comparison functions for sorting routines
    6  *
    7  *  @author Robert Daniel DeSonia, MHPCC
    8  *
    9  *  @ingroup Compare
    10  *
    11  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-08-11 19:58:11 $
    13  *
    14  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    15  */
     17#include "psType.h"
    1618
    1719/** @addtogroup Compare
  • trunk/psLib/src/collections/psHash.c

    r1842 r2204  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-09-21 23:17:53 $
     13*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-10-27 00:57:31 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include <stdio.h>
    2020#include <string.h>
    21 #include <stdbool.h>
    2221#include "psHash.h"
    2322#include "psMemory.h"
     
    2928#include "psCollectionsErrors.h"
    3029
    31 static psHashBucket* hashBucketAlloc(const char *key, void *data, psHashBucket* next);
     30static psHashBucket* hashBucketAlloc(const char *key, psPtr data, psHashBucket* next);
    3231static void hashBucketFree(psHashBucket* bucket);
    33 static void *doHashWork(psHash* table, const char *key, void *data, bool remove
     32static psPtr doHashWork(psHash* table, const char *key, psPtr data, psBool remove
    3433                           );
    3534static void hashFree(psHash* table);
     
    4544psList* psHashKeyList(psHash* table)
    4645{
    47     int i = 0;                  // Loop index variable
     46    psS32 i = 0;                  // Loop index variable
    4847    psList* myLinkList = NULL;  // The output data structure
    4948    psHashBucket* ptr = NULL;   // Used to step thru linked list.
     
    8584 *****************************************************************************/
    8685static psHashBucket* hashBucketAlloc(const char *key,
    87                                      void *data,
     86                                     psPtr data,
    8887                                     psHashBucket* next)
    8988{
     
    135134    The new hash table.
    136135 *****************************************************************************/
    137 psHash* psHashAlloc(int nbucket)        // initial number of buckets
    138 {
    139     int i = 0;                  // loop index variable
     136psHash* psHashAlloc(psS32 nbucket)        // initial number of buckets
     137{
     138    psS32 i = 0;                  // loop index variable
    140139
    141140    // Create the new hash table.
     
    172171static void hashFree(psHash* table)
    173172{
    174     int i = 0;                  // Loop index variable.
     173    psS32 i = 0;                  // Loop index variable.
    175174
    176175    if (table == NULL) {
     
    212211there is little common code between those functions.
    213212  *****************************************************************************/
    214 static void *doHashWork(psHash* table,
     213static psPtr doHashWork(psHash* table,
    215214                        const char *key,
    216                         void *data, bool remove
     215                        psPtr data, psBool remove
    217216                           )
    218217{
    219     long int hash = 1;          // This will contain an integer value
     218    psS64 hash = 1;          // This will contain an integer value
    220219
    221220    // "hashed" from the key.
     
    236235    }
    237236    // NOTE: This is the originally supplied hash function.
    238     // for (int i = 0, len = strlen(key); i < len; i++) {
     237    // for (psS32 i = 0, len = strlen(key); i < len; i++) {
    239238    // hash = (hash << 1) ^ key[i];
    240239    // }
     
    273272                    // of removing an item from a single-linked list.
    274273
    275                     void *data = ptr->data;
     274                    psPtr data = ptr->data;
    276275
    277276                    optr->next = ptr->next;
     
    344343    boolean value defining success or failure
    345344 *****************************************************************************/
    346 bool psHashAdd(psHash* table,
    347                const char *key,
    348                void *data)
     345psBool psHashAdd(psHash* table,
     346                 const char *key,
     347                 psPtr data)
    349348{
    350349    if (table == NULL) {
     
    380379    The data associated with that key.
    381380 *****************************************************************************/
    382 void *psHashLookup(psHash* table,      // table to lookup key in
     381psPtr psHashLookup(psHash* table,      // table to lookup key in
    383382                   const char *key)     // key to lookup
    384383{
     
    409408    boolean value defining success or failure
    410409 *****************************************************************************/
    411 bool psHashRemove(psHash* table,
    412                   const char *key)
    413 {
    414     void *data = NULL;
    415     bool retVal = false;
     410psBool psHashRemove(psHash* table,
     411                    const char *key)
     412{
     413    psPtr data = NULL;
     414    psBool retVal = false;
    416415
    417416    if (table == NULL) {
  • trunk/psLib/src/collections/psHash.h

    r1441 r2204  
    1111 *  @author George Gusciora, MHPCC
    1212 *   
    13  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 23:40:55 $
     13 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-10-27 00:57:31 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222 *  \{
    2323 */
    24 #include<stdbool.h>
    2524
    2625#include "psList.h"
     
    3029{
    3130    char *key;                  ///< key for this item of data
    32     void *data;                 ///< the data itself
     31    psPtr data;                 ///< the data itself
    3332    struct psHashBucket* next;  ///< list of other possible keys
    3433}
     
    4039typedef struct psHash
    4140{
    42     int nbucket;                ///< Number of buckets in hash table.
     41    psS32 nbucket;                ///< Number of buckets in hash table.
    4342    psHashBucket* *buckets;     ///< The bucket data.
    4443}
     
    4645
    4746/// Allocate hash buckets in table.
    48 psHash* psHashAlloc(int nbucket ///< The number of buckets to allocate.
     47psHash* psHashAlloc(psS32 nbucket ///< The number of buckets to allocate.
    4948                   );
    5049
    5150/// Insert entry into table.
    52 bool psHashAdd(psHash* table,  ///< table to insert in
    53                const char *key, ///< key to use
    54                void *data       ///< data to insert
    55               );
     51psBool psHashAdd(psHash* table,  ///< table to insert in
     52                 const char *key, ///< key to use
     53                 psPtr data       ///< data to insert
     54                );
    5655
    5756/// Lookup key in table.
    58 void *psHashLookup(psHash* table,      ///< table to lookup key in
     57psPtr psHashLookup(psHash* table,      ///< table to lookup key in
    5958                   const char *key      ///< key to lookup
    6059                  );
    6160
    6261/// Remove key from table.
    63 bool psHashRemove(psHash* table,       ///< table to lookup key in
    64                   const char *key       ///< key to lookup
    65                  );
     62psBool psHashRemove(psHash* table,       ///< table to lookup key in
     63                    const char *key       ///< key to lookup
     64                   );
    6665
    6766/// List all keys in table.
  • trunk/psLib/src/collections/psList.c

    r1807 r2204  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-09-14 20:01:52 $
     8 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 00:57:31 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1313
    1414#include <stdlib.h>
    15 #include <stdbool.h>
    1615#include <stdio.h>
    1716#include <pthread.h>                       // we need a mutex to make this stuff thread safe.
     
    2625#include "psCollectionsErrors.h"
    2726
    28 #define ITER_INIT_HEAD ((void *)1)         // next iteration should return head
    29 #define ITER_INIT_TAIL ((void *)2)         // next iteration should return tail
     27#define ITER_INIT_HEAD ((psPtr )1)         // next iteration should return head
     28#define ITER_INIT_TAIL ((psPtr )2)         // next iteration should return tail
    3029
    3130// private functions.
    3231static psListElem* listGetIterator(psList* list);
    33 static int listGetIteratorIndex(psList* list);
    34 static void listSetIterator(psList* list, int where, bool lockList);
     32static psS32 listGetIteratorIndex(psList* list);
     33static void listSetIterator(psList* list, psS32 where, psBool lockList);
    3534static void listFree(psList* list);
    3635
    37 psList* psListAlloc(void *data)
     36psList* psListAlloc(psPtr data)
    3837{
    3938    psList* list = psAlloc(sizeof(psList));
     
    8281}
    8382
    84 bool psListAdd(psList* list, int location, void *data)
     83psBool psListAdd(psList* list, psS32 location, psPtr data)
    8584{
    8685    psListElem* position;
    8786    psListElem* elem;
    88     int cursorIndex = 0;
     87    psS32 cursorIndex = 0;
    8988
    9089    if (list == NULL) {
     
    168167 * Remove an element from a list
    169168 */
    170 bool psListRemove(psList* list, int location, void *data)
     169psBool psListRemove(psList* list, psS32 location, psPtr data)
    171170{
    172171    psListElem* elem = NULL;    // element to remove
    173     int cursorIndex = 0;
     172    psS32 cursorIndex = 0;
    174173
    175174    if (list == NULL) {
     
    184183        // search list for the data item.
    185184
    186         int i = 0;              // index
     185        psS32 i = 0;              // index
    187186
    188187        for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
     
    247246}
    248247
    249 void psListSetIterator(psList* list, int where)
     248void psListSetIterator(psList* list, psS32 where)
    250249{
    251250    listSetIterator(list, where, true);
    252251}
    253252
    254 static void listSetIterator(psList* list, int where, bool lockList)
     253static void listSetIterator(psList* list, psS32 where, psBool lockList)
    255254{
    256255    psListElem* cursor;
    257     int position;
     256    psS32 position;
    258257
    259258    if (list == NULL) {
     
    272271    }
    273272
    274     if (where >= (int)list->size) {
     273    if (where >= (psS32)list->size) {
    275274        list->iter = NULL;
    276275        if (lockList) {
     
    323322            }
    324323
    325             int position = listGetIteratorIndex(list);
     324            psS32 position = listGetIteratorIndex(list);
    326325
    327326            if (where < position) {
    328                 int diff = position - where;
    329 
    330                 for (int count = 0; count < diff; count++) {
     327                psS32 diff = position - where;
     328
     329                for (psS32 count = 0; count < diff; count++) {
    331330                    listSetIterator(list, PS_LIST_PREVIOUS, false);
    332331                }
    333332            } else {
    334                 int diff = where - position;
    335 
    336                 for (int count = 0; count < diff; count++) {
     333                psS32 diff = where - position;
     334
     335                for (psS32 count = 0; count < diff; count++) {
    337336                    listSetIterator(list, PS_LIST_NEXT, false);
    338337                }
     
    363362}
    364363
    365 int listGetIteratorIndex(psList* list)
     364psS32 listGetIteratorIndex(psList* list)
    366365{
    367366    if (list->iter == ITER_INIT_HEAD) {
     
    374373}
    375374
    376 void *psListGet(psList* list, int location)
     375psPtr psListGet(psList* list, psS32 location)
    377376{
    378377    psListElem* element;
     
    391390 * and now return the previous/next element of the list
    392391 */
    393 void *psListGetNext(psList* list)
     392psPtr psListGetNext(psList* list)
    394393{
    395394    return psListGet(list, PS_LIST_NEXT);
    396395}
    397396
    398 void *psListGetPrevious(psList* list)
     397psPtr psListGetPrevious(psList* list)
    399398{
    400399    return psListGet(list, PS_LIST_PREVIOUS);
    401400}
    402401
    403 void *psListGetCurrent(psList* list)
     402psPtr psListGetCurrent(psList* list)
    404403{
    405404    return psListGet(list, PS_LIST_CURRENT);
     
    412411{
    413412    psListElem* ptr;
    414     unsigned int n;
     413    psU32 n;
    415414    psArray* restrict arr;
    416415
     
    429428    ptr = list->head;
    430429    n = list->size;
    431     for (int i = 0; i < n; i++) {
     430    for (psS32 i = 0; i < n; i++) {
    432431        arr->data[i] = psMemIncrRefCounter(ptr->data);
    433432        ptr = ptr->next;
     
    439438psList* psArrayToList(psArray* arr)
    440439{
    441     unsigned int n;
     440    psU32 n;
    442441    psList* list;               // list of elements
    443442
     
    448447    list = psListAlloc(NULL);
    449448    n = arr->n;
    450     for (int i = 0; i < n; i++) {
     449    for (psS32 i = 0; i < n; i++) {
    451450        psListAdd(list, PS_LIST_TAIL, arr->data[i]);
    452451    }
  • trunk/psLib/src/collections/psList.h

    r1747 r2204  
    1010 *  @ingroup LinkedList
    1111 *
    12  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-09-09 02:23:27 $
     12 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-10-27 00:57:31 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717
    1818#include <pthread.h>                   // we need a mutex to make this stuff thread safe.
    19 #include <stdbool.h>                   // we use the bool type.
    2019
    2120#include "psCompare.h"
     
    4645    struct psListElem* prev;           ///< previous link in list
    4746    struct psListElem* next;           ///< next link in list
    48     void *data;                        ///< real data item
     47    psPtr data;                        ///< real data item
    4948}
    5049psListElem;
     
    5756typedef struct
    5857{
    59     unsigned int size;                 ///< number of elements on list
     58    psU32 size;                 ///< number of elements on list
    6059    psListElem* head;                  ///< first element on list (may be NULL)
    6160    psListElem* tail;                  ///< last element on list (may be NULL)
    6261    psListElem* iter;                  ///< iteration cursor
    63     unsigned int iterIndex;            ///< the numeric position of the iteration cursor in the list
     62    psU32 iterIndex;            ///< the numeric position of the iteration cursor in the list
    6463    pthread_mutex_t lock;              ///< mutex to lock a node during changes
    6564}
     
    7170 */
    7271psList* psListAlloc(
    73     void *data
     72    psPtr data
    7473    ///< initial data item; may be NULL if no an empty psList is desired
    7574)
     
    8180 *                      NULL, the return value will also be NULL.
    8281 */
    83 bool psListAdd(
     82psBool psListAdd(
    8483    psList* restrict list,             ///< list to add to (if NULL, nothing is done)
    85     int location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
    86     void *data                         ///< data item to add.  If NULL, list is not modified.
     84    psS32 location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     85    psPtr data                         ///< data item to add.  If NULL, list is not modified.
    8786);
    8887
    8988/** Remove an item from a list.  If location parameter is PS_LIST_UNKNOWN,
    9089 *
    91  *  @return bool        TRUE if element is successfully removed, otherwise FALSE.
     90 *  @return psBool        TRUE if element is successfully removed, otherwise FALSE.
    9291 */
    93 bool psListRemove(
     92psBool psListRemove(
    9493    psList* restrict list,
    9594    ///< list to remove element from
    96     int location,
     95    psS32 location,
    9796    ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
    98     void *data
     97    psPtr data
    9998    ///< if location is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
    10099);
     
    102101/** Retrieve an item from a list.
    103102 *
    104  *  @return void*       the item corresponding to the location parameter.  If
     103 *  @return psPtr       the item corresponding to the location parameter.  If
    105104 *                      location is invalid (e.g., a numbered index greater
    106105 *                      than the list size or if the list is empty), a
    107106 *                      NULL is returned.
    108107 */
    109 void *psListGet(
     108psPtr psListGet(
    110109    psList* restrict list,             ///< list to retrieve element from
    111     int location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
     110    psS32 location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
    112111);
    113112
     
    118117void psListSetIterator(
    119118    psList* restrict list,             ///< list to retrieve element from
    120     int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
     119    psS32 location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    121120);
    122121
     
    124123 *  the next list position.
    125124 *
    126  *  @return void*       the data item next on the list or NULL if the iterator
     125 *  @return psPtr       the data item next on the list or NULL if the iterator
    127126 *                      is already pointing to the last element or the list
    128127 *                      parameter was NULL.
    129128 */
    130 void *psListGetNext(
     129psPtr psListGetNext(
    131130    psList* restrict list              ///< list to retrieve element from
    132131);
     
    135134 *  not move the iterator location.
    136135 *
    137  *  @return void*       the data item cooresponding to current iterator
     136 *  @return psPtr       the data item cooresponding to current iterator
    138137 *                      cursor position of the list, or NULL if either the
    139138 *                      iterator is not valid or list parameter was NULL.
    140139 */
    141 void *psListGetCurrent(
     140psPtr psListGetCurrent(
    142141    psList* restrict list              ///< list to retrieve element from
    143142);
     
    146145 *  iterator to the previous list position.
    147146 *
    148  *  @return void*       the data item previous on the list or NULL if the iterator
     147 *  @return psPtr       the data item previous on the list or NULL if the iterator
    149148 *                      is already pointing to the first element or the list
    150149 *                      parameter was NULL.
    151150 */
    152 void *psListGetPrevious(
     151psPtr psListGetPrevious(
    153152    psList* restrict list              ///< list to retrieve element from
    154153);
  • trunk/psLib/src/collections/psMetadata.c

    r2040 r2204  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-10-09 03:05:53 $
     14*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-10-27 00:57:30 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5959/*****************************************************************************/
    6060
    61 static int metadataId = 0;
     61static psS32 metadataId = 0;
    6262
    6363/*****************************************************************************/
     
    143143
    144144    // Set metadata item unique id
    145     *(int *)(&metadataItem->id) = ++metadataId;
     145    *(psS32 *)(&metadataItem->id) = ++metadataId;
    146146
    147147    // Set metadata item type
     
    154154        break;
    155155    case PS_META_BOOL:
    156         metadataItem->data.B = (bool)va_arg(argPtr, int);
     156        metadataItem->data.B = (psBool)va_arg(argPtr, psS32);
    157157        break;
    158158    case PS_META_S32:
     
    215215}
    216216
    217 bool psMetadataAddItem( psMetadata *restrict md, psMetadataItem *restrict metadataItem, int location )
     217psBool psMetadataAddItem( psMetadata *restrict md, psMetadataItem *restrict metadataItem, psS32 location )
    218218{
    219219    char * key = NULL;
     
    337337}
    338338
    339 bool psMetadataAdd(psMetadata* restrict md, int where, const char *name, psMetadataType type,
    340                    const char *comment, ...)
     339psBool psMetadataAdd(psMetadata* restrict md, psS32 where, const char *name, psMetadataType type,
     340                     const char *comment, ...)
    341341{
    342342    va_list argPtr;
     
    359359}
    360360
    361 bool psMetadataRemove(psMetadata* restrict md, int where, const char *restrict key)
    362 {
    363     int numChildren = 0;
     361psBool psMetadataRemove(psMetadata* restrict md, psS32 where, const char *restrict key)
     362{
     363    psS32 numChildren = 0;
    364364    psList* mdList = NULL;
    365365    psHash* mdTable = NULL;
     
    471471}
    472472
    473 psMetadataItem* psMetadataGet(psMetadata* restrict md, int where)
     473psMetadataItem* psMetadataGet(psMetadata* restrict md, psS32 where)
    474474{
    475475    psList* mdList = NULL;
     
    497497}
    498498
    499 bool psMetadataSetIterator(psMetadata* restrict md, int where)
     499psBool psMetadataSetIterator(psMetadata* restrict md, psS32 where)
    500500{
    501501    psList* mdList = NULL;
     
    517517}
    518518
    519 psMetadataItem* psMetadataGetNext(psMetadata* restrict md, const char *restrict match, int which)
     519psMetadataItem* psMetadataGetNext(psMetadata* restrict md, const char *restrict match, psS32 which)
    520520{
    521521    psList* mdList = NULL;
     
    553553}
    554554
    555 psMetadataItem* psMetadataGetPrevious(psMetadata* restrict md, const char *restrict match, int which)
     555psMetadataItem* psMetadataGetPrevious(psMetadata* restrict md, const char *restrict match, psS32 which)
    556556{
    557557    psList* mdList = NULL;
  • trunk/psLib/src/collections/psMetadata.h

    r1970 r2204  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-10-06 01:06:27 $
     13*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-10-27 00:57:30 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3838    PS_META_F32,                       ///< Single-precision float data.
    3939    PS_META_F64,                       ///< Double-precision float data.
    40     PS_META_STR,                       ///< String data (Stored in as void *).
    41     PS_META_VEC,                       ///< Vector data (Stored in as void *).
    42     PS_META_IMG,                       ///< Image data (Stored in as void *).
    43     PS_META_JPEG,                      ///< JPEG data (Stored in as void *).
    44     PS_META_PNG,                       ///< PNG data (Stored in as void *).
    45     PS_META_ASTROM,                    ///< Astrometric coefficients (Stored in as void *).
    46     PS_META_UNKNOWN,                   ///< Other data (Stored in as void *).
     40    PS_META_STR,                       ///< String data (Stored in as psPtr ).
     41    PS_META_VEC,                       ///< Vector data (Stored in as psPtr ).
     42    PS_META_IMG,                       ///< Image data (Stored in as psPtr ).
     43    PS_META_JPEG,                      ///< JPEG data (Stored in as psPtr ).
     44    PS_META_PNG,                       ///< PNG data (Stored in as psPtr ).
     45    PS_META_ASTROM,                    ///< Astrometric coefficients (Stored in as psPtr ).
     46    PS_META_UNKNOWN,                   ///< Other data (Stored in as psPtr ).
    4747    PS_META_NTYPE                      ///< Number of types. Must be last.
    4848} psMetadataType;
     
    5555typedef struct psMetadataItem
    5656{
    57     const int id;                      ///< Unique ID for metadata item.
     57    const psS32 id;                      ///< Unique ID for metadata item.
    5858    char *restrict name;               ///< Name of metadata item.
    5959    psMetadataType type;               ///< Type of metadata item.
    6060    union {
    61         bool B;                        ///< boolean data
     61        psBool B;                        ///< boolean data
    6262        psS32 S32;                     ///< Signed 32-bit integer data.
    6363        psF32 F32;                     ///< Single-precision float data.
    6464        psF64 F64;                     ///< Double-precision float data.
    65         psPTR V;                       ///< Pointer to other type of data.
     65        psPtr V;                       ///< Pointer to other type of data.
    6666    } data;                            ///< Union for data types.
    6767    char *comment;                     ///< Optional comment ("", not NULL).
     
    144144 *  @return bool: True for success, false for failure.
    145145 */
    146 bool psMetadataAddItem(
     146psBool psMetadataAddItem(
    147147    psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
    148148    psMetadataItem* restrict item,     ///< Metadata item to be added.
    149     int location                       ///< Location to be added.
     149    psS32 location                       ///< Location to be added.
    150150);
    151151
     
    156156 * @return bool: True for success, false for failure.
    157157 */
    158 bool psMetadataAdd(
    159     psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
    160     int where,                         ///< Location to be added.
     158psBool psMetadataAdd(
     159    psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
     160    psS32 where,                         ///< Location to be added.
    161161    const char *name,                  ///< Name of metadata item.
    162162    psMetadataType type,               ///< Type of metadata item.
     
    175175 * @return bool: True for success, false for failure.
    176176 */
    177 bool psMetadataRemove(
    178     psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
    179     int where,                         ///< Location to be removed.
     177psBool psMetadataRemove(
     178    psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
     179    psS32 where,                         ///< Location to be removed.
    180180    const char *restrict key           ///< Name of metadata key.
    181181);
     
    203203psMetadataItem* psMetadataGet(
    204204    psMetadata* restrict md,           ///< Metadata collection to insert metadat item.
    205     int where                          ///< Location to be retrieved.
     205    psS32 where                          ///< Location to be retrieved.
    206206);
    207207
     
    213213 * @return void: void.
    214214 */
    215 bool psMetadataSetIterator(
     215psBool psMetadataSetIterator(
    216216    psMetadata* restrict md,           ///< Metadata collection to iterate.
    217     int where                          ///< Location of iterator.
     217    psS32 where                          ///< Location of iterator.
    218218);
    219219
     
    227227    psMetadata* restrict md,           ///< Metadata collection to iterate.
    228228    const char *restrict match,        ///< Beginning of key name.
    229     int which                          ///< Iterator to be used.
     229    psS32 which                          ///< Iterator to be used.
    230230);
    231231
     
    239239    psMetadata* restrict md,           ///< Metadata collection to iterate.
    240240    const char *restrict match,        ///< Beginning of key name.
    241     int which                          ///< Iterator to be used.
     241    psS32 which                          ///< Iterator to be used.
    242242);
    243243
  • trunk/psLib/src/collections/psMetadataIO.c

    r2014 r2204  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-08 00:43:12 $
     11*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-27 00:57:30 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    104104/** Determines if a line is blank (whitespace only) or a commentline. It returns true if so. The input string
    105105 *  must be null terminated. */
    106 bool ignoreLine(char *inString)
     106psBool ignoreLine(char *inString)
    107107{
    108108    while(*inString!='\0' && *inString!='#') {
     
    119119/** Removes leading and trailing whitespace and # characters from a string. The cleaned string is a new null
    120120 *  terminated copy of the original input string. */
    121 char *cleanString(char *inString, int sLen)
     121char *cleanString(char *inString, psS32 sLen)
    122122{
    123123    char *ptrB = NULL;
     
    149149
    150150/** Count repeat occurances of a single character within a line. The input string must be null terminated. */
    151 int repeatedChars(char *inString, char ch)
    152 {
    153     int count = 0;
     151psS32 repeatedChars(char *inString, char ch)
     152{
     153    psS32 count = 0;
    154154
    155155
     
    166166/** Returns cleaned token based on delimiter, but not including delimiter. Also changes the pointer location
    167167 * the beginning of the string. Tokens are newly allocated null terminated strings. */
    168 char* getToken(char **inString, char *delimiter, int *status)
     168char* getToken(char **inString, char *delimiter, psS32 *status)
    169169{
    170170    char *cleanToken = NULL;
    171     int sLen = 0;
     171    psS32 sLen = 0;
    172172
    173173
     
    195195/** Returns single parsed value as a double precision number. The input string must be cleaned and null
    196196 * terminated. */
    197 double parseValue(char *inString, int *status)
     197double parseValue(char *inString, psS32 *status)
    198198{
    199199    char *end = NULL;
     
    212212
    213213/** Returns true or false. 'T', 't', '1', 'F', 'f', and '0' are acceptable, parsable variations. */
    214 bool parseBool(char *inString, int *status)
    215 {
    216     bool value = false;
     214psBool parseBool(char *inString, psS32 *status)
     215{
     216    psBool value = false;
    217217
    218218
     
    229229
    230230/** Returns parsed vector filled with with data. The input string must be null terminated. */
    231 psVector* parseVector(char *inString, psElemType elemType, int *status)
     231psVector* parseVector(char *inString, psElemType elemType, psS32 *status)
    232232{
    233233    char *end = NULL;
    234234    char *saveValue = NULL;
    235     int i = 0;
    236     int numValues = 0;
     235    psS32 i = 0;
     236    psS32 numValues = 0;
    237237    double value = 0.0;
    238238    psVector *vec = NULL;
     
    341341
    342342
    343 psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, int extNum, char *fileName)
    344 {
    345     bool tempBool;
    346     bool success;
     343psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, psS32 extNum, char *fileName)
     344{
     345    psBool tempBool;
     346    psBool success;
    347347    char keyType;
    348348    char keyName[FITS_LINE_SIZE];
     
    350350    char keyComment[FITS_LINE_SIZE];
    351351    char fitsErr[MAX_STRING_LENGTH];
    352     int i;
    353     int hduType = 0;
    354     int status = 0;
    355     int numKeys = 0;
    356     int keyNum = 0;
     352    psS32 i;
     353    psS32 hduType = 0;
     354    psS32 status = 0;
     355    psS32 numKeys = 0;
     356    psS32 keyNum = 0;
    357357    psMetadataType metadataItemType;
    358358    fitsfile *fd = NULL;
     
    449449
    450450
    451 int psMetadataParseConfig(psMetadata** md, char *fileName, bool overwrite)
    452 {
    453     bool tempBool;
     451psS32 psMetadataParseConfig(psMetadata** md, char *fileName, psBool overwrite)
     452{
     453    psBool tempBool;
    454454    char *line = NULL;
    455455    char *strName = NULL;
     
    458458    char *strComment = NULL;
    459459    char *linePtr = NULL;
    460     int status = 0;
    461     int lineCount = 0;
    462     int failedLines = 0;
     460    psS32 status = 0;
     461    psS32 lineCount = 0;
     462    psS32 failedLines = 0;
    463463    psF64 tempDbl = 0.0;
    464464    psS32 tempInt = 0.0;
  • trunk/psLib/src/collections/psMetadataIO.h

    r1973 r2204  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-06 01:17:39 $
     11*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-27 00:57:30 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5050    psMetadata* output,                ///< Resulting metadata from read.
    5151    char *extName,                     ///< File name extension string.
    52     int extNum,                        ///< File name extension number. Starts at 1.
     52    psS32 extNum,                        ///< File name extension number. Starts at 1.
    5353    char *fileName                     ///< Name of file to read.
    5454);
     
    5858 *  Loads pre-defined settings by parsing a configuration file into a psMetadata structure.
    5959 *
    60  *  @return int : Number of lines that failed to be read.
     60 *  @return psS32 : Number of lines that failed to be read.
    6161 */
    62 int psMetadataParseConfig(
     62psS32 psMetadataParseConfig(
    6363    psMetadata** md,                   ///< Resulting metadata from read.
    6464    char *fileName,                    ///< Name of file to read.
    65     bool overwrite                     ///< Allow overwrite of duplicate specifications.
     65    psBool overwrite                     ///< Allow overwrite of duplicate specifications.
    6666);
    6767
  • trunk/psLib/src/collections/psVector.c

    r2006 r2204  
    1010*  @author Robert DeSonia, MHPCC
    1111*
    12 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-10-07 19:51:30 $
     12*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-10-27 00:57:31 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242// FUNCTION IMPLEMENTATION - PUBLIC
    4343
    44 psVector* psVectorAlloc(unsigned int nalloc, psElemType elemType)
     44psVector* psVectorAlloc(psU32 nalloc, psElemType elemType)
    4545{
    4646    psVector* psVec = NULL;
    47     int elementSize = 0;
     47    psS32 elementSize = 0;
    4848
    4949    elementSize = PSELEMTYPE_SIZEOF(elemType);
     
    6464}
    6565
    66 psVector* psVectorRealloc(psVector* restrict in, unsigned int nalloc)
    67 {
    68     int elementSize = 0;
     66psVector* psVectorRealloc(psVector* restrict in, psU32 nalloc)
     67{
     68    psS32 elementSize = 0;
    6969    psElemType elemType;
    7070
     
    8888}
    8989
    90 psVector* psVectorRecycle(psVector* restrict in, unsigned int n, psElemType type)
    91 {
    92     int byteSize;
     90psVector* psVectorRecycle(psVector* restrict in, psU32 n, psElemType type)
     91{
     92    psS32 byteSize;
    9393
    9494    if (in == NULL) {
     
    129129    }
    130130
    131     int nElements = in->n;
     131    psS32 nElements = in->n;
    132132
    133133    out = psVectorRecycle(out, nElements, type);
     
    136136        ps##INTYPE *inVec = in->data.INTYPE; \
    137137        ps##OUTTYPE *outVec = out->data.OUTTYPE; \
    138         for (int col=0;col<nElements;col++) { \
     138        for (psS32 col=0;col<nElements;col++) { \
    139139            *(outVec++) = *(inVec++); \
    140140        } \
     
    225225psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector)
    226226{
    227     int N = 0;
    228     int elSize = 0;
    229     void *inVec = NULL;
    230     void *outVec = NULL;
     227    psS32 N = 0;
     228    psS32 elSize = 0;
     229    psPtr inVec = NULL;
     230    psPtr outVec = NULL;
    231231    psElemType inType = 0;
    232232
     
    311311psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector)
    312312{
    313     int N = 0;
     313    psS32 N = 0;
    314314    psVector* tmpVector = NULL;
    315315    psElemType inType = 0;
     
    350350        ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
    351351        ps##TYPE  diff;                                                       \
    352         for(int i=0; i<N; i++) {                                              \
    353             for(int j=0; j<N; j++) {                                          \
     352        for(psS32 i=0; i<N; i++) {                                              \
     353            for(psS32 j=0; j<N; j++) {                                          \
    354354                diff = absfcn(tmpVec[i] - inVec[j]);                          \
    355355                if(diff < maxError) {                                         \
  • trunk/psLib/src/collections/psVector.h

    r1982 r2204  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-10-06 21:30:52 $
     13 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-10-27 00:57:31 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333{
    3434    psType type;                ///< Type of data.
    35     unsigned int nalloc;        ///< Total number of elements available.
    36     unsigned int n;             ///< Number of elements in use.
     35    psU32 nalloc;        ///< Total number of elements available.
     36    psU32 n;             ///< Number of elements in use.
    3737
    3838    union {
     
    4949        psC32* C32;             ///< Single-precision complex data.
    5050        psC64* C64;             ///< Double-precision complex data.
    51         psPTR V;                ///< Pointer to data.
     51        psPtr V;                ///< Pointer to data.
    5252    } data;                     ///< Union for data types.
    5353}
     
    6969 */
    7070psVector* psVectorAlloc(
    71     unsigned int nalloc,               ///< Total number of elements to make available.
     71    psU32 nalloc,               ///< Total number of elements to make available.
    7272    psElemType dataType                ///< Type of data to be held by vector.
    7373);
     
    8484psVector* psVectorRealloc(
    8585    psVector* restrict psVec,          ///< Vector to reallocate.
    86     unsigned int nalloc                ///< Total number of elements to make available.
     86    psU32 nalloc                ///< Total number of elements to make available.
    8787);
    8888
     
    101101    ///< taken to preserve the values.
    102102
    103     unsigned int nalloc,               ///< Total number of elements to make available.
     103    psU32 nalloc,               ///< Total number of elements to make available.
    104104    psElemType type                    ///< the datatype of the returned vector
    105105);
Note: See TracChangeset for help on using the changeset viewer.