Changeset 14608
- Timestamp:
- Aug 22, 2007, 2:49:43 PM (19 years ago)
- Location:
- branches/eam_branch_20070817/psModules/src/camera
- Files:
-
- 3 edited
-
pmFPAfile.c (modified) (2 diffs)
-
pmFPAfile.h (modified) (2 diffs)
-
pmFPAfileDefine.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070817/psModules/src/camera/pmFPAfile.c
r14202 r14608 32 32 psFree (file->camera); 33 33 psFree (file->format); 34 psFree (file->formatName); 34 35 psFree (file->name); 35 36 … … 73 74 file->camera = NULL; 74 75 file->format = NULL; 76 file->formatName = NULL; 75 77 file->name = NULL; 76 78 -
branches/eam_branch_20070817/psModules/src/camera/pmFPAfile.h
r14202 r14608 4 4 * @author EAM, IfA 5 5 * 6 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $7 * @date $Date: 2007-0 7-14 03:17:44$6 * @version $Revision: 1.19.4.1 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-08-23 00:49:43 $ 8 8 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 9 9 */ … … 91 91 psMetadata *camera; // Camera configuration 92 92 psMetadata *format; // Camera format 93 char *formatName; // name of the camera format 93 94 } 94 95 pmFPAfile; -
branches/eam_branch_20070817/psModules/src/camera/pmFPAfileDefine.c
r14595 r14608 203 203 } 204 204 file->format = psMemIncrRefCounter(format); 205 file->formatName = psStringCopy(formatName); 205 206 206 207 if (fpa) { … … 351 352 psFree (format); 352 353 file->format = psMemIncrRefCounter(format); 354 file->formatName = psStringCopy(config->formatName); 353 355 354 356 // adjust the rules to identify these files in the file->names data … … 440 442 // save the pmFPAfile on config->files 441 443 // return the pmFPAfile (a view to the one saved on config->files) 442 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, constpmConfig *config, const char *filename, const char *argname)444 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname) 443 445 { 444 446 PS_ASSERT_PTR_NON_NULL(input, NULL); … … 511 513 512 514 if (!format) { 513 format = pmConfigCameraFormatFromHeader( (pmConfig*)config, phu, true);515 format = pmConfigCameraFormatFromHeader(config, phu, true); 514 516 if (!format) { 515 517 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName); … … 562 564 psFree(file->format); 563 565 file->format = format; 566 file->formatName = psStringCopy(config->formatName); 564 567 565 568 if (success) *success = true; … … 639 642 psFree (file->format); 640 643 file->format = format; 644 file->formatName = psStringCopy(config->formatName); 641 645 642 646 // adjust the rules to identify these files in the file->names data … … 925 929 pmFPAfile *file = pmFPAfileDefineOutput (config, fpa, filename); 926 930 if (!file) { 927 psError StackPrint(stderr, "file %s not defined\n", filename);931 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 928 932 return NULL; 929 933 } … … 944 948 pmFPAfile *file = pmFPAfileDefineOutput (config, NULL, filename); 945 949 if (!file) { 946 psError StackPrint(stderr, "file %s not defined\n", filename);950 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 947 951 return NULL; 948 952 } 949 953 if (!file->camera) { 950 psError StackPrint(stderr, "file %s does not define a new camera\n", filename);954 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s does not define a new camera\n", filename); 951 955 return NULL; 952 956 } … … 987 991 } 988 992 if (!file) { 989 psError StackPrint(stderr, "file %s not defined\n", filename);993 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 990 994 return NULL; 991 995 } … … 1026 1030 // Find the correct camera configuration 1027 1031 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, newCameraName, config->formatName); 1032 psFree(newCameraName); 1028 1033 psFree(cameraName); 1029 1034 } 1030 1035 if (!file) { 1031 psError StackPrint(stderr, "file %s not defined\n", filename);1036 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 1032 1037 return NULL; 1033 1038 } … … 1070 1075 psFree(original); 1071 1076 1072 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, newCameraName, config->formatName);1077 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, cameraName, config->formatName); 1073 1078 psFree(cameraName); 1074 1079 } 1075 1080 if (!file) { 1076 psError StackPrint(stderr, "file %s not defined\n", filename);1081 psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename); 1077 1082 return NULL; 1078 1083 }
Note:
See TracChangeset
for help on using the changeset viewer.
