#396 closed defect (fixed)
psFitsAlloc() needs a second mode argument (r/w/a)
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | IPP SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The current definition of psFItsAlloc doesn't specify if the file should be opened for read or write.
Additionally, if the file can be opened for append, we have a way to create multi-extension FITS
files when desireable.
If a non-existent file is opened for read the psFitsAlloc() call doesn't fail, but instead creates
a 2880-byte file; a later attempt to psFitsReadImage() the file fails as the file contains no
data (but we shouldn't get that far)
I propose that the prototype be changed to:
psFits *psFitsAlloc(const char *name, const char *mode);
where mode can be "r", "w", or "a" (by analogy to fopen)
The function should return NULL if it is unable to open the file in the desired mode.
Change History (3)
comment:1 by , 21 years ago
| op_sys: | MacOS X → All |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:2 by , 21 years ago
| rep_platform: | Macintosh → All |
|---|

this has been added to the SDRS (v.15)