Changeset 18845
- Timestamp:
- Aug 1, 2008, 8:33:14 AM (18 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
pmSourceIO_CMP.c (modified) (5 diffs)
-
pmSourceIO_SX.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO_CMP.c
r15562 r18845 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-11-10 01:09:20$5 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-08-01 18:33:01 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 113 113 pmSource *source = (pmSource *) sources->data[i]; 114 114 115 // no difference between PSF and non-PSF model115 // no difference between PSF and non-PSF model 116 116 pmModel *model = pmSourceGetModel (NULL, source); 117 117 if (model == NULL) … … 140 140 psLineAdd (line, "%6.2f ", axes.minor); 141 141 psLineAdd (line, "%5.1f\n", axes.theta); 142 fwrite (line->line, 1, line->Nline, f); 142 if (fwrite(line->line, 1, line->Nline, f) < line->Nline) { 143 psError(PS_ERR_IO, true, "Unable to write CMP sources file (%s)", filename); 144 fclose(f); 145 psFree(line); 146 return false; 147 } 143 148 } 144 149 fclose (f); … … 233 238 int Nskip = c2 - c; 234 239 nbytes -= Nskip; 235 memset(buffer + nbytes, '\0', Nskip);240 memset(buffer + nbytes, '\0', Nskip); 236 241 psLogMsg (__func__, 4, "deleted line, %d extra chars\n", Nskip); 237 242 } else { … … 277 282 goto skip_source; 278 283 279 pmPSF_AxesToModel (PAR, axes);284 pmPSF_AxesToModel (PAR, axes); 280 285 281 286 psArrayAdd (sources, 100, source); -
trunk/psModules/src/objects/pmSourceIO_SX.c
r15562 r18845 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $6 * @date $Date: 200 7-11-10 01:09:20$5 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-08-01 18:33:14 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 pmSource *source = (pmSource *) sources->data[i]; 61 61 62 // no difference between PSF and non-PSF model62 // no difference between PSF and non-PSF model 63 63 pmModel *model = pmSourceGetModel (NULL, source); 64 64 if (model == NULL) … … 70 70 // pmSourceSextractType (source, &type, &flags); 71 71 72 axes = pmPSF_ModelToAxes (PAR, 20.0);72 axes = pmPSF_ModelToAxes (PAR, 20.0); 73 73 74 74 psLineInit (line); … … 85 85 psLineAdd (line, "%9.4f", source->apMag); 86 86 psLineAdd (line, "%4d\n", 0); // should be flags 87 fwrite (line->line, 1, line->Nline, f); 87 if (fwrite(line->line, 1, line->Nline, f) < line->Nline) { 88 psError(PS_ERR_IO, true, "Unable to write SX sources file (%s)", filename); 89 fclose(f); 90 psFree(line); 91 return false; 92 } 88 93 } 89 94 fclose (f);
Note:
See TracChangeset
for help on using the changeset viewer.
