IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#396 closed defect (fixed)

psFitsAlloc() needs a second mode argument (r/w/a)

Reported by: rhl@… 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 eugene, 21 years ago

op_sys: MacOS XAll
Resolution: fixed
Status: newclosed

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

comment:2 by eugene, 21 years ago

rep_platform: MacintoshAll

comment:3 by Paul Price, 21 years ago

Now called psFitsOpen.

Note: See TracTickets for help on using tickets.