IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 952


Ignore:
Timestamp:
Jun 9, 2004, 11:18:53 AM (22 years ago)
Author:
harman
Message:

Added more error control

Location:
trunk/psLib
Files:
3 edited

Legend:

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

    r836 r952  
    44 *
    55 *  Bit masks are useful tools for toggling various flags and options. This set of functions module provides
    6  *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary 
     6 *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary
    77 *  operations. A print function is also provided to display the entire set of bits in binary format as a
    88 *  string.
    99 *
    1010 *  @author Ross Harman, MHPCC
    11  *   
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-06-03 00:32:32 $
     11 *
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-06-09 21:18:24 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080
    8181    if(n <= 0) {
    82         psError(__func__, " : Line %d - Allocation size must be >= 0: size = %d\n", __LINE__, n);
     82        psError(__func__, " : Line %d - Allocation size must be > 0: size = %d\n", __LINE__, n);
    8383        return 0;
    8484    }
  • trunk/psLib/src/types/psBitSet.c

    r836 r952  
    44 *
    55 *  Bit masks are useful tools for toggling various flags and options. This set of functions module provides
    6  *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary 
     6 *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary
    77 *  operations. A print function is also provided to display the entire set of bits in binary format as a
    88 *  string.
    99 *
    1010 *  @author Ross Harman, MHPCC
    11  *   
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-06-03 00:32:32 $
     11 *
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-06-09 21:18:24 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080
    8181    if(n <= 0) {
    82         psError(__func__, " : Line %d - Allocation size must be >= 0: size = %d\n", __LINE__, n);
     82        psError(__func__, " : Line %d - Allocation size must be > 0: size = %d\n", __LINE__, n);
    8383        return 0;
    8484    }
  • trunk/psLib/test/collections/tst_psBitSet_06.c

    r717 r952  
    66 *     A)  Create two psBitSets
    77 *     B)  Perform invalid binary operation with psBitSets
    8  *     C)  Free psBitSets
     8 *     C)  Attempt to create negative size bitset
     9 *     D)  Free psBitSets
    910 *
    1011 *  @author  Ross Harman, MHPCC
    1112 *
    12  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-05-18 19:22:34 $
     13 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     14 *  @date  $Date: 2004-06-09 21:18:53 $
    1415 *
    1516 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4748
    4849
    49     // Test C - Free psBitSets
     50    // Test C - Attempt to create negative size bitset
     51    printNegativeTestHeader(stdout,"psBitSet", "Create negative size bitset",
     52                            "Allocation size must be >= 0: size = -4", 0);
     53    psBitSetAlloc(-4);
     54    printFooter(stdout, "psBitSet", "Create negative size bitset", true);
     55
     56
     57    // Test D - Free psBitSets
    5058    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
    5159    psBitSetFree(bs1);
Note: See TracChangeset for help on using the changeset viewer.