Changeset 3671
- Timestamp:
- Apr 5, 2005, 3:12:58 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 23 edited
-
astronomy/psDB.c (modified) (11 diffs)
-
astronomy/psMetadata.h (modified) (2 diffs)
-
astronomy/psMetadataIO.c (modified) (3 diffs)
-
collections/psMetadata.h (modified) (2 diffs)
-
collections/psMetadataIO.c (modified) (3 diffs)
-
dataIO/psDB.c (modified) (11 diffs)
-
dataIO/psFits.c (modified) (3 diffs)
-
dataManip/psFunctions.c (modified) (4 diffs)
-
db/psDB.c (modified) (11 diffs)
-
fft/psImageFFT.c (modified) (4 diffs)
-
fileUtils/psDB.c (modified) (11 diffs)
-
fileUtils/psFits.c (modified) (3 diffs)
-
fits/psFits.c (modified) (3 diffs)
-
image/psImage.c (modified) (4 diffs)
-
image/psImageFFT.c (modified) (4 diffs)
-
math/psPolynomial.c (modified) (4 diffs)
-
math/psSpline.c (modified) (4 diffs)
-
mathtypes/psImage.c (modified) (4 diffs)
-
sys/psType.h (modified) (5 diffs)
-
sysUtils/psType.h (modified) (5 diffs)
-
types/psMetadata.h (modified) (2 diffs)
-
types/psMetadataConfig.c (modified) (3 diffs)
-
xml/psXML.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psDB.c
r3591 r3671 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 3-31 02:54:27$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-04-06 01:12:58 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 360 360 // valid for psVector? 361 361 break; 362 case PS_TYPE_PTR:363 // valid for psVector?364 break;365 362 } 366 363 … … 448 445 449 446 // copy field data and convert NULLs to the appropriate NaN value 450 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {447 if (pType == PS_META_STR) { 451 448 psMetadataAddStr(md, 0, field[i].name, "", data); 452 449 } else if (pType == PS_META_S32) { … … 621 618 // column as an psArray of strings; otherwise fetch the column as a 622 619 // psVector. 623 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {620 if (pType == PS_META_STR) { 624 621 // PS_META_UNKNOWN -> PS_META_ARRAY ? 625 622 column = psDBSelectColumn(dbh, tableName, field[i].name, 0); … … 821 818 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 822 819 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 823 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {820 (item->type == PS_META_UNKNOWN)) { 824 821 825 822 bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V); … … 881 878 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 882 879 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 883 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {880 (item->type == PS_META_UNKNOWN)) { 884 881 // + column name + _ + varchar( + length + ) 885 882 psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V); … … 1271 1268 psDBAddToLookupTable(lookupTable, PS_TYPE_C64, "PS_TYPE_C64 is not supported"); 1272 1269 psDBAddToLookupTable(lookupTable, PS_TYPE_BOOL,"BOOLEAN"); 1273 psDBAddToLookupTable(lookupTable, PS_TYPE_PTR, "BLOB");1274 1270 psDBAddToLookupTable(lookupTable, PS_META_STR, "BLOB"); 1275 1271 } … … 1324 1320 1325 1321 // DECIMAL does not exist in the pType to SQL table 1326 value = psDBIntToString( (psU64)PS_TYPE_PTR);1322 value = psDBIntToString(0); 1327 1323 psHashAdd(lookupTable, "DECIMAL", value); 1328 1324 psFree(value); … … 1416 1412 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_C64, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1417 1413 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_BOOL, psDBMySQLTypeAlloc(MYSQL_TYPE_TINY, true)); 1418 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1414 // XXX: removed PS_TYPE_PTR, can this be removed too? 1415 // psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1419 1416 1420 1417 psDBAddVoidToLookupTable(lookupTable, PS_META_STR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); … … 1538 1535 // what is NaN for a bool? 1539 1536 break; 1540 case PS_TYPE_PTR:1541 PS_NAN_ALLOC(myNaN, char, '\0');1542 break;1543 1537 } 1544 1538 … … 1593 1587 case PS_TYPE_BOOL: 1594 1588 // what is NaN for a bool? 1595 break;1596 case PS_TYPE_PTR:1597 isNaN = PS_IS_NAN(char, data, '\0');1598 1589 break; 1599 1590 } -
trunk/psLib/src/astronomy/psMetadata.h
r3544 r3671 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 3-29 22:13:53$13 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-04-06 01:12:58 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 (METATYPE==PS_META_F32) ? PS_TYPE_F32 : \ 65 65 (METATYPE==PS_META_F64) ? PS_TYPE_F64 : \ 66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : PS_TYPE_PTR)66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : 0 ) 67 67 68 68 /** Option flags for psMetadata functions -
trunk/psLib/src/astronomy/psMetadataIO.c
r3441 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-17 19:01:01$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 509 509 char *strComment = NULL; 510 510 char *linePtr = NULL; 511 psElemType vecType = PS_TYPE_PTR;511 psElemType vecType = 0; 512 512 psS32 status = 0; 513 513 psU32 lineCount = 0; … … 956 956 psS32 status = 0; 957 957 psU32 lineNumber = 0; 958 psElemType pType = PS_TYPE_PTR;958 psElemType pType = 0; 959 959 char *strName = NULL; 960 960 char *strType = NULL; -
trunk/psLib/src/collections/psMetadata.h
r3544 r3671 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 3-29 22:13:53$13 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-04-06 01:12:58 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 (METATYPE==PS_META_F32) ? PS_TYPE_F32 : \ 65 65 (METATYPE==PS_META_F64) ? PS_TYPE_F64 : \ 66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : PS_TYPE_PTR)66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : 0 ) 67 67 68 68 /** Option flags for psMetadata functions -
trunk/psLib/src/collections/psMetadataIO.c
r3441 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-17 19:01:01$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 509 509 char *strComment = NULL; 510 510 char *linePtr = NULL; 511 psElemType vecType = PS_TYPE_PTR;511 psElemType vecType = 0; 512 512 psS32 status = 0; 513 513 psU32 lineCount = 0; … … 956 956 psS32 status = 0; 957 957 psU32 lineNumber = 0; 958 psElemType pType = PS_TYPE_PTR;958 psElemType pType = 0; 959 959 char *strName = NULL; 960 960 char *strType = NULL; -
trunk/psLib/src/dataIO/psDB.c
r3591 r3671 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 3-31 02:54:27$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-04-06 01:12:58 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 360 360 // valid for psVector? 361 361 break; 362 case PS_TYPE_PTR:363 // valid for psVector?364 break;365 362 } 366 363 … … 448 445 449 446 // copy field data and convert NULLs to the appropriate NaN value 450 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {447 if (pType == PS_META_STR) { 451 448 psMetadataAddStr(md, 0, field[i].name, "", data); 452 449 } else if (pType == PS_META_S32) { … … 621 618 // column as an psArray of strings; otherwise fetch the column as a 622 619 // psVector. 623 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {620 if (pType == PS_META_STR) { 624 621 // PS_META_UNKNOWN -> PS_META_ARRAY ? 625 622 column = psDBSelectColumn(dbh, tableName, field[i].name, 0); … … 821 818 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 822 819 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 823 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {820 (item->type == PS_META_UNKNOWN)) { 824 821 825 822 bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V); … … 881 878 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 882 879 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 883 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {880 (item->type == PS_META_UNKNOWN)) { 884 881 // + column name + _ + varchar( + length + ) 885 882 psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V); … … 1271 1268 psDBAddToLookupTable(lookupTable, PS_TYPE_C64, "PS_TYPE_C64 is not supported"); 1272 1269 psDBAddToLookupTable(lookupTable, PS_TYPE_BOOL,"BOOLEAN"); 1273 psDBAddToLookupTable(lookupTable, PS_TYPE_PTR, "BLOB");1274 1270 psDBAddToLookupTable(lookupTable, PS_META_STR, "BLOB"); 1275 1271 } … … 1324 1320 1325 1321 // DECIMAL does not exist in the pType to SQL table 1326 value = psDBIntToString( (psU64)PS_TYPE_PTR);1322 value = psDBIntToString(0); 1327 1323 psHashAdd(lookupTable, "DECIMAL", value); 1328 1324 psFree(value); … … 1416 1412 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_C64, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1417 1413 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_BOOL, psDBMySQLTypeAlloc(MYSQL_TYPE_TINY, true)); 1418 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1414 // XXX: removed PS_TYPE_PTR, can this be removed too? 1415 // psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1419 1416 1420 1417 psDBAddVoidToLookupTable(lookupTable, PS_META_STR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); … … 1538 1535 // what is NaN for a bool? 1539 1536 break; 1540 case PS_TYPE_PTR:1541 PS_NAN_ALLOC(myNaN, char, '\0');1542 break;1543 1537 } 1544 1538 … … 1593 1587 case PS_TYPE_BOOL: 1594 1588 // what is NaN for a bool? 1595 break;1596 case PS_TYPE_PTR:1597 isNaN = PS_IS_NAN(char, data, '\0');1598 1589 break; 1599 1590 } -
trunk/psLib/src/dataIO/psFits.c
r3661 r3671 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-04-0 5 19:33:30$9 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #define MAX_STRING_LENGTH 256 // maximum length string for FITS routines 28 28 29 // list of FITS header keys to ignore. 29 30 static char* standardFitsKeys[] = { 30 31 NULL … … 72 73 "Unknown FITS datatype, %d.", 73 74 datatype); 74 return PS_TYPE_PTR;75 return 0; 75 76 } 76 77 } -
trunk/psLib/src/dataManip/psFunctions.c
r3405 r3671 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 3-10 22:33:57$9 * @version $Revision: 1.95 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1985 1985 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1986 1986 strType); 1987 return 0; 1987 1988 case PS_TYPE_C64: 1988 1989 PS_TYPE_NAME(strType,x->type.type); … … 1990 1991 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1991 1992 strType); 1992 case PS_TYPE_PTR: 1993 PS_TYPE_NAME(strType,x->type.type); 1994 psError(PS_ERR_BAD_PARAMETER_TYPE, 1995 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1996 strType); 1993 return 0; 1997 1994 case PS_TYPE_BOOL: 1998 1995 PS_TYPE_NAME(strType,x->type.type); … … 2000 1997 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 2001 1998 strType); 1999 return 0; 2002 2000 } 2003 2001 return(-3); -
trunk/psLib/src/db/psDB.c
r3591 r3671 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 3-31 02:54:27$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-04-06 01:12:58 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 360 360 // valid for psVector? 361 361 break; 362 case PS_TYPE_PTR:363 // valid for psVector?364 break;365 362 } 366 363 … … 448 445 449 446 // copy field data and convert NULLs to the appropriate NaN value 450 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {447 if (pType == PS_META_STR) { 451 448 psMetadataAddStr(md, 0, field[i].name, "", data); 452 449 } else if (pType == PS_META_S32) { … … 621 618 // column as an psArray of strings; otherwise fetch the column as a 622 619 // psVector. 623 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {620 if (pType == PS_META_STR) { 624 621 // PS_META_UNKNOWN -> PS_META_ARRAY ? 625 622 column = psDBSelectColumn(dbh, tableName, field[i].name, 0); … … 821 818 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 822 819 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 823 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {820 (item->type == PS_META_UNKNOWN)) { 824 821 825 822 bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V); … … 881 878 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 882 879 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 883 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {880 (item->type == PS_META_UNKNOWN)) { 884 881 // + column name + _ + varchar( + length + ) 885 882 psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V); … … 1271 1268 psDBAddToLookupTable(lookupTable, PS_TYPE_C64, "PS_TYPE_C64 is not supported"); 1272 1269 psDBAddToLookupTable(lookupTable, PS_TYPE_BOOL,"BOOLEAN"); 1273 psDBAddToLookupTable(lookupTable, PS_TYPE_PTR, "BLOB");1274 1270 psDBAddToLookupTable(lookupTable, PS_META_STR, "BLOB"); 1275 1271 } … … 1324 1320 1325 1321 // DECIMAL does not exist in the pType to SQL table 1326 value = psDBIntToString( (psU64)PS_TYPE_PTR);1322 value = psDBIntToString(0); 1327 1323 psHashAdd(lookupTable, "DECIMAL", value); 1328 1324 psFree(value); … … 1416 1412 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_C64, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1417 1413 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_BOOL, psDBMySQLTypeAlloc(MYSQL_TYPE_TINY, true)); 1418 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1414 // XXX: removed PS_TYPE_PTR, can this be removed too? 1415 // psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1419 1416 1420 1417 psDBAddVoidToLookupTable(lookupTable, PS_META_STR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); … … 1538 1535 // what is NaN for a bool? 1539 1536 break; 1540 case PS_TYPE_PTR:1541 PS_NAN_ALLOC(myNaN, char, '\0');1542 break;1543 1537 } 1544 1538 … … 1593 1587 case PS_TYPE_BOOL: 1594 1588 // what is NaN for a bool? 1595 break;1596 case PS_TYPE_PTR:1597 isNaN = PS_IS_NAN(char, data, '\0');1598 1589 break; 1599 1590 } -
trunk/psLib/src/fft/psImageFFT.c
r3301 r3671 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 2-22 19:38:44$7 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-04-06 01:12:58 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 126 126 127 127 /* if not a complex number, this is logically just a copy then */ 128 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {128 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 129 129 return psImageCopy(out, in, type); 130 130 } … … 186 186 187 187 /* if not a complex image type, this is logically just zeroed image of same size */ 188 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {188 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 189 189 out = psImageRecycle(out, numCols, numRows, type); 190 190 memset(out->data.V[0], 0, PSELEMTYPE_SIZEOF(type) * numCols * numRows); … … 327 327 328 328 /* if not a complex image, this is logically just a image copy */ 329 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {329 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 330 330 return psImageCopy(out, in, type); 331 331 } -
trunk/psLib/src/fileUtils/psDB.c
r3591 r3671 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 3-31 02:54:27$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-04-06 01:12:58 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 360 360 // valid for psVector? 361 361 break; 362 case PS_TYPE_PTR:363 // valid for psVector?364 break;365 362 } 366 363 … … 448 445 449 446 // copy field data and convert NULLs to the appropriate NaN value 450 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {447 if (pType == PS_META_STR) { 451 448 psMetadataAddStr(md, 0, field[i].name, "", data); 452 449 } else if (pType == PS_META_S32) { … … 621 618 // column as an psArray of strings; otherwise fetch the column as a 622 619 // psVector. 623 if ( (pType == PS_TYPE_PTR) || (pType == PS_META_STR)) {620 if (pType == PS_META_STR) { 624 621 // PS_META_UNKNOWN -> PS_META_ARRAY ? 625 622 column = psDBSelectColumn(dbh, tableName, field[i].name, 0); … … 821 818 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 822 819 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 823 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {820 (item->type == PS_META_UNKNOWN)) { 824 821 825 822 bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V); … … 881 878 (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG) || 882 879 (item->type == PS_META_PNG) || (item->type == PS_META_ASTROM) || 883 (item->type == PS_META_UNKNOWN) || (item->type == PS_TYPE_PTR)) {880 (item->type == PS_META_UNKNOWN)) { 884 881 // + column name + _ + varchar( + length + ) 885 882 psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V); … … 1271 1268 psDBAddToLookupTable(lookupTable, PS_TYPE_C64, "PS_TYPE_C64 is not supported"); 1272 1269 psDBAddToLookupTable(lookupTable, PS_TYPE_BOOL,"BOOLEAN"); 1273 psDBAddToLookupTable(lookupTable, PS_TYPE_PTR, "BLOB");1274 1270 psDBAddToLookupTable(lookupTable, PS_META_STR, "BLOB"); 1275 1271 } … … 1324 1320 1325 1321 // DECIMAL does not exist in the pType to SQL table 1326 value = psDBIntToString( (psU64)PS_TYPE_PTR);1322 value = psDBIntToString(0); 1327 1323 psHashAdd(lookupTable, "DECIMAL", value); 1328 1324 psFree(value); … … 1416 1412 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_C64, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1417 1413 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_BOOL, psDBMySQLTypeAlloc(MYSQL_TYPE_TINY, true)); 1418 psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1414 // XXX: removed PS_TYPE_PTR, can this be removed too? 1415 // psDBAddVoidToLookupTable(lookupTable, PS_TYPE_PTR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); 1419 1416 1420 1417 psDBAddVoidToLookupTable(lookupTable, PS_META_STR, psDBMySQLTypeAlloc(MYSQL_TYPE_VAR_STRING, false)); … … 1538 1535 // what is NaN for a bool? 1539 1536 break; 1540 case PS_TYPE_PTR:1541 PS_NAN_ALLOC(myNaN, char, '\0');1542 break;1543 1537 } 1544 1538 … … 1593 1587 case PS_TYPE_BOOL: 1594 1588 // what is NaN for a bool? 1595 break;1596 case PS_TYPE_PTR:1597 isNaN = PS_IS_NAN(char, data, '\0');1598 1589 break; 1599 1590 } -
trunk/psLib/src/fileUtils/psFits.c
r3661 r3671 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-04-0 5 19:33:30$9 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #define MAX_STRING_LENGTH 256 // maximum length string for FITS routines 28 28 29 // list of FITS header keys to ignore. 29 30 static char* standardFitsKeys[] = { 30 31 NULL … … 72 73 "Unknown FITS datatype, %d.", 73 74 datatype); 74 return PS_TYPE_PTR;75 return 0; 75 76 } 76 77 } -
trunk/psLib/src/fits/psFits.c
r3661 r3671 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-04-0 5 19:33:30$9 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #define MAX_STRING_LENGTH 256 // maximum length string for FITS routines 28 28 29 // list of FITS header keys to ignore. 29 30 static char* standardFitsKeys[] = { 30 31 NULL … … 72 73 "Unknown FITS datatype, %d.", 73 74 datatype); 74 return PS_TYPE_PTR;75 return 0; 75 76 } 76 77 } -
trunk/psLib/src/image/psImage.c
r3446 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.6 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-18 02:35:14$11 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 35 35 if (image == NULL) { 36 36 return; 37 }38 39 if (image->type.type == PS_TYPE_PTR) {40 // 2-D array of pointers -- must dereference elements41 psU32 oldNumRows = image->numRows;42 psU32 oldNumCols = image->numCols;43 psPtr* rowPtr;44 45 for (psU32 row = 0; row < oldNumRows; row++) {46 rowPtr = image->data.PTR[row];47 for (psU32 col = 0; col < oldNumCols; col++) {48 psMemDecrRefCounter(rowPtr[col]);49 }50 }51 37 } 52 38 … … 188 174 } 189 175 190 if (old->type.type == PS_TYPE_PTR) {191 // 2-D array of pointers -- must192 // dereference193 psU32 oldNumRows = old->numRows;194 psU32 oldNumCols = old->numCols;195 psPtr* rowPtr;196 197 for (psU32 row = 0; row < oldNumRows; row++) {198 rowPtr = old->data.PTR[row];199 for (psU32 col = 0; col < oldNumCols; col++) {200 psMemDecrRefCounter(rowPtr[col]);201 rowPtr[col] = NULL;202 }203 }204 }205 206 176 /* image already the right size/type? */ 207 177 if (numCols == old->numCols && numRows == old->numRows && … … 263 233 elements = numRows * numCols; 264 234 elementSize = PSELEMTYPE_SIZEOF(inDatatype); 265 266 if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {267 psError(PS_ERR_BAD_PARAMETER_TYPE, true,268 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,269 PS_TYPE_PTR_NAME);270 psFree(output);271 return NULL;272 }273 235 274 236 output = psImageRecycle(output, numCols, numRows, type); -
trunk/psLib/src/image/psImageFFT.c
r3301 r3671 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 2-22 19:38:44$7 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-04-06 01:12:58 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 126 126 127 127 /* if not a complex number, this is logically just a copy then */ 128 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {128 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 129 129 return psImageCopy(out, in, type); 130 130 } … … 186 186 187 187 /* if not a complex image type, this is logically just zeroed image of same size */ 188 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {188 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 189 189 out = psImageRecycle(out, numCols, numRows, type); 190 190 memset(out->data.V[0], 0, PSELEMTYPE_SIZEOF(type) * numCols * numRows); … … 327 327 328 328 /* if not a complex image, this is logically just a image copy */ 329 if (!PS_IS_PSELEMTYPE_COMPLEX(type) && type != PS_TYPE_PTR) {329 if (!PS_IS_PSELEMTYPE_COMPLEX(type)) { 330 330 return psImageCopy(out, in, type); 331 331 } -
trunk/psLib/src/math/psPolynomial.c
r3405 r3671 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 3-10 22:33:57$9 * @version $Revision: 1.95 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1985 1985 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1986 1986 strType); 1987 return 0; 1987 1988 case PS_TYPE_C64: 1988 1989 PS_TYPE_NAME(strType,x->type.type); … … 1990 1991 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1991 1992 strType); 1992 case PS_TYPE_PTR: 1993 PS_TYPE_NAME(strType,x->type.type); 1994 psError(PS_ERR_BAD_PARAMETER_TYPE, 1995 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1996 strType); 1993 return 0; 1997 1994 case PS_TYPE_BOOL: 1998 1995 PS_TYPE_NAME(strType,x->type.type); … … 2000 1997 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 2001 1998 strType); 1999 return 0; 2002 2000 } 2003 2001 return(-3); -
trunk/psLib/src/math/psSpline.c
r3405 r3671 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 3-10 22:33:57$9 * @version $Revision: 1.95 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-04-06 01:12:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1985 1985 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1986 1986 strType); 1987 return 0; 1987 1988 case PS_TYPE_C64: 1988 1989 PS_TYPE_NAME(strType,x->type.type); … … 1990 1991 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1991 1992 strType); 1992 case PS_TYPE_PTR: 1993 PS_TYPE_NAME(strType,x->type.type); 1994 psError(PS_ERR_BAD_PARAMETER_TYPE, 1995 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 1996 strType); 1993 return 0; 1997 1994 case PS_TYPE_BOOL: 1998 1995 PS_TYPE_NAME(strType,x->type.type); … … 2000 1997 PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED, 2001 1998 strType); 1999 return 0; 2002 2000 } 2003 2001 return(-3); -
trunk/psLib/src/mathtypes/psImage.c
r3446 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.6 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-18 02:35:14$11 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 35 35 if (image == NULL) { 36 36 return; 37 }38 39 if (image->type.type == PS_TYPE_PTR) {40 // 2-D array of pointers -- must dereference elements41 psU32 oldNumRows = image->numRows;42 psU32 oldNumCols = image->numCols;43 psPtr* rowPtr;44 45 for (psU32 row = 0; row < oldNumRows; row++) {46 rowPtr = image->data.PTR[row];47 for (psU32 col = 0; col < oldNumCols; col++) {48 psMemDecrRefCounter(rowPtr[col]);49 }50 }51 37 } 52 38 … … 188 174 } 189 175 190 if (old->type.type == PS_TYPE_PTR) {191 // 2-D array of pointers -- must192 // dereference193 psU32 oldNumRows = old->numRows;194 psU32 oldNumCols = old->numCols;195 psPtr* rowPtr;196 197 for (psU32 row = 0; row < oldNumRows; row++) {198 rowPtr = old->data.PTR[row];199 for (psU32 col = 0; col < oldNumCols; col++) {200 psMemDecrRefCounter(rowPtr[col]);201 rowPtr[col] = NULL;202 }203 }204 }205 206 176 /* image already the right size/type? */ 207 177 if (numCols == old->numCols && numRows == old->numRows && … … 263 233 elements = numRows * numCols; 264 234 elementSize = PSELEMTYPE_SIZEOF(inDatatype); 265 266 if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {267 psError(PS_ERR_BAD_PARAMETER_TYPE, true,268 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,269 PS_TYPE_PTR_NAME);270 psFree(output);271 return NULL;272 }273 235 274 236 output = psImageRecycle(output, numCols, numRows, type); -
trunk/psLib/src/sys/psType.h
r3381 r3671 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 3-07 20:58:50$12 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-04-06 01:12:58 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 83 83 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point. 84 84 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 85 PS_TYPE_BOOL = 0x1301, ///< Boolean. 86 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 85 PS_TYPE_BOOL = 0x1301 ///< Boolean. 87 86 } psElemType; 88 87 … … 133 132 #define PS_TYPE_C32_NAME "psC32" 134 133 #define PS_TYPE_C64_NAME "psC64" 135 #define PS_TYPE_PTR_NAME "psPtr"136 134 137 135 #define PS_TYPE_NAME(value,type) \ … … 175 173 case PS_TYPE_C64: \ 176 174 value = PS_TYPE_C64_NAME; \ 177 break; \178 case PS_TYPE_PTR: \179 value = PS_TYPE_PTR_NAME; \180 175 break; \ 181 176 default: \ … … 206 201 #define PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000) 207 202 /// Macro to determine the storage size, in bytes, of the psElemType. 208 #define PSELEMTYPE_SIZEOF(x) ( (x==(PS_TYPE_PTR&0xFFFF)) ? sizeof(psPtr) :(x & 0xFF))203 #define PSELEMTYPE_SIZEOF(x) (x & 0xFF) 209 204 210 205 /** Dimensions of a data type. -
trunk/psLib/src/sysUtils/psType.h
r3381 r3671 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 3-07 20:58:50$12 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-04-06 01:12:58 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 83 83 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point. 84 84 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 85 PS_TYPE_BOOL = 0x1301, ///< Boolean. 86 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 85 PS_TYPE_BOOL = 0x1301 ///< Boolean. 87 86 } psElemType; 88 87 … … 133 132 #define PS_TYPE_C32_NAME "psC32" 134 133 #define PS_TYPE_C64_NAME "psC64" 135 #define PS_TYPE_PTR_NAME "psPtr"136 134 137 135 #define PS_TYPE_NAME(value,type) \ … … 175 173 case PS_TYPE_C64: \ 176 174 value = PS_TYPE_C64_NAME; \ 177 break; \178 case PS_TYPE_PTR: \179 value = PS_TYPE_PTR_NAME; \180 175 break; \ 181 176 default: \ … … 206 201 #define PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000) 207 202 /// Macro to determine the storage size, in bytes, of the psElemType. 208 #define PSELEMTYPE_SIZEOF(x) ( (x==(PS_TYPE_PTR&0xFFFF)) ? sizeof(psPtr) :(x & 0xFF))203 #define PSELEMTYPE_SIZEOF(x) (x & 0xFF) 209 204 210 205 /** Dimensions of a data type. -
trunk/psLib/src/types/psMetadata.h
r3544 r3671 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 3-29 22:13:53$13 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-04-06 01:12:58 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 (METATYPE==PS_META_F32) ? PS_TYPE_F32 : \ 65 65 (METATYPE==PS_META_F64) ? PS_TYPE_F64 : \ 66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : PS_TYPE_PTR)66 (METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : 0 ) 67 67 68 68 /** Option flags for psMetadata functions -
trunk/psLib/src/types/psMetadataConfig.c
r3441 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-17 19:01:01$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 509 509 char *strComment = NULL; 510 510 char *linePtr = NULL; 511 psElemType vecType = PS_TYPE_PTR;511 psElemType vecType = 0; 512 512 psS32 status = 0; 513 513 psU32 lineCount = 0; … … 956 956 psS32 status = 0; 957 957 psU32 lineNumber = 0; 958 psElemType pType = PS_TYPE_PTR;958 psElemType pType = 0; 959 959 char *strName = NULL; 960 960 char *strType = NULL; -
trunk/psLib/src/xml/psXML.c
r3441 r3671 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 3-17 19:01:01$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-06 01:12:58 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 509 509 char *strComment = NULL; 510 510 char *linePtr = NULL; 511 psElemType vecType = PS_TYPE_PTR;511 psElemType vecType = 0; 512 512 psS32 status = 0; 513 513 psU32 lineCount = 0; … … 956 956 psS32 status = 0; 957 957 psU32 lineNumber = 0; 958 psElemType pType = PS_TYPE_PTR;958 psElemType pType = 0; 959 959 char *strName = NULL; 960 960 char *strType = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
