Changeset 31016 for trunk/ippToPsps/src/Config.c
- Timestamp:
- Mar 23, 2011, 9:53:44 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/Config.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/Config.c
r31015 r31016 4 4 * 5 5 * @author IfA 6 * Copyright 20 09Institute for Astronomy, University of Hawaii6 * Copyright 2011 Institute for Astronomy, University of Hawaii 7 7 */ 8 8 … … 13 13 14 14 #include "Fits.h" 15 16 /**17 Gets PS type from string TODO FITS types? should be in Fits class18 */19 static int ippToPsps_GetDataType(char *typename) {20 21 if (!strncmp(typename, "TBYTE", 5)) return TBYTE;22 if (!strncmp(typename, "TSHORT", 6)) return TSHORT;23 if (!strncmp(typename, "TLONGLONG", 9)) return TLONGLONG;24 if (!strncmp(typename, "TLONG", 5)) return TLONG;25 if (!strncmp(typename, "TFLOAT", 6)) return TFLOAT;26 if (!strncmp(typename, "TDOUBLE", 7)) return TDOUBLE;27 if (!strncmp(typename, "TSTRING", 7)) return TSTRING;28 29 psError(PS_ERR_IO, false, "Don't understand type '%s'", typename);30 31 return 0;32 }33 15 34 16 /** … … 385 367 // column type 386 368 getAttribute(node, "type", buffer); 387 table->columns[columnNum].pspsType = ippToPsps_GetDataType(buffer);369 table->columns[columnNum].pspsType = Fits_getDataType(buffer); 388 370 389 371 // default value … … 514 496 // IPP type 515 497 getAttribute(node, "ippType", buffer); 516 column->ippType = ippToPsps_GetDataType(buffer);498 column->ippType = Fits_getDataType(buffer); 517 499 518 500 column->usingDefault = false;
Note:
See TracChangeset
for help on using the changeset viewer.
