IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9143 for trunk/psLib/src/types


Ignore:
Timestamp:
Oct 2, 2006, 8:51:47 PM (20 years ago)
Author:
drobbin
Message:

Made several changes. Finished bitSet testing, list testing. Minor changes to psList.c. Added lookupTable test to Makefile. minor changes to LookupTable.c

Location:
trunk/psLib/src/types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psList.c

    r9086 r9143  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-10-02 06:05:53 $
     8 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-10-03 06:51:47 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    574574    }
    575575
    576     if (list->n > 0) {
    577         arr = psArrayAlloc(list->n);
    578     } else {
    579         arr = psArrayAlloc(1);
    580     }
    581 
     576    //XXX: Following is unnecessary as a list->n = 0 should do ArrayAlloc(0) I believe.
     577    /*    if (list->n > 0) {
     578            arr = psArrayAlloc(list->n);
     579        } else {
     580            arr = psArrayAlloc(1);
     581        }
     582    */
     583    arr = psArrayAlloc(list->n);
    582584    arr->n = list->n;
    583585
     
    618620        return NULL;
    619621    }
     622    if (func == NULL) {
     623        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     624                _("Specified psComparePtrFunc is NULL."));
     625        return list;
     626    }
    620627    // convert to indexable vector for use by qsort.
    621628    arr = psListToArray(list);
  • trunk/psLib/src/types/psLookupTable.c

    r8627 r9143  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-08-26 04:34:28 $
     9*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-10-03 06:51:47 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    253253static void lookupTableFree(psLookupTable* table)
    254254{
    255     if (table == NULL) {
    256         return;
    257     }
    258 
    259255    psFree(table->values);
    260256    psFree(table->filename);
     
    279275                                  long indexCol)
    280276{
    281     psLookupTable *outTable = NULL;
    282 
    283277    // Can't read table if you don't know its name
    284278    PS_ASSERT_PTR_NON_NULL(filename,NULL);
     
    286280    // Can't read table if you don't know its format
    287281    PS_ASSERT_PTR_NON_NULL(format,NULL);
     282
     283    psLookupTable *outTable = NULL;
    288284
    289285    // Allocate lookup table
Note: See TracChangeset for help on using the changeset viewer.