HEASARC Menu Bar

next up previous contents FITSIO Home
Next: Specialized Read Keyword Routines Up: Specialized Header Keyword Routines Previous: Specialized Write Keyword Routines

Insert Keyword Routines

These insert routines are somewhat less efficient than the `update' or `write' keyword routines because the following keywords in the header must be shifted down to make room for the inserted keyword.

1
Insert a new keyword record into the CHU at the specified position (i.e., immediately preceding the (keynum)th keyword in the header.)  
  int fits_insert_record / ffirec
      (fitsfile *fptr, int keynum, char *card, > int *status)
2
Insert a new keyword into the CHU. The new keyword is inserted immediately following the last keyword that has been read from the header. A null pointer may be entered for the comment parameter which will cause the comment field to be left blank.  
  int fits_insert_key_str / ffikys
      (fitsfile *fptr, char *keyname, char *value, char *comment,
       > int *status)

  int fits_insert_key_[log, lng] / ffiky[lj]
      (fitsfile *fptr, char *keyname, DTYPE numval, char *comment,
       > int *status)

  int fits_insert_key_[flt, fixflt, dbl, fixdbl] / ffiky[edfg]
      (fitsfile *fptr, char *keyname, DTYPE numval, int decimals,
       char *comment, > int *status)

  int fits_insert_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffik[yc,ym,fc,fm]
      (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals,
       char *comment, > int *status)
3
Insert a new keyword with an undefined, or null, value into the CHU. The value string of the keyword is left blank in this case.  
  int fits_insert_key_null / ffikyu
      (fitsfile *fptr, char *keyname, char *comment, > int *status)