IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 25, 2006, 4:19:32 PM (20 years ago)
Author:
Paul Price
Message:

Adding booleans for psVectorInit, needed for writing FITS tables with boolean columns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psVector.c

    r7914 r7979  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-07-15 02:57:12 $
     11*  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-07-26 02:19:32 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    668668
    669669    switch (vector->type.type) {
     670    case PS_TYPE_BOOL: {
     671            // This is a little ugly, because psVector doesn't have a boolean type yet.
     672            int temp = va_arg(argp, int);
     673            psBool value = temp;
     674            if (!value) {
     675                memset(vector->data.U8, 0, vector->n * sizeof(psBool));
     676            } else {
     677                for (long i = 0; i < vector->n; i++) {
     678                    vector->data.U8[i] = value;
     679                }
     680            }
     681            return true;
     682        }
    670683    case PS_TYPE_U8:
    671684        temp = va_arg (argp, psU32);
Note: See TracChangeset for help on using the changeset viewer.