IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 3, 2006, 12:01:09 PM (20 years ago)
Author:
eugene
Message:

converted fits_ to gfits_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/header/F_modify.c

    r7039 r7054  
    22# include <gfitsio.h>
    33
    4 char *fits_keyword_start (char *line);
    5 char *fits_keyword_end (char *line);
     4char *gfits_keyword_start (char *line);
     5char *gfits_keyword_end (char *line);
    66void pad_ending (char *line, char value, int Nbyte);
    77
    8 int fits_modify (Header *header, char *field, char *mode, int N,...) {
     8int gfits_modify (Header *header, char *field, char *mode, int N,...) {
    99 
    1010  /* this function expects one more argument, the value to be written */
    11   /* this function is extremely similar to fits_print, except it allows for changing an existing field. */
     11  /* this function is extremely similar to gfits_print, except it allows for changing an existing field. */
    1212
    1313  char comment[82], string[82], data[82];
     
    2121
    2222  if (mode[0] != '%') {
    23     fprintf (stderr, "fits_print: weird mode:  %s\n", mode);
     23    fprintf (stderr, "gfits_print: weird mode:  %s\n", mode);
    2424    return (FALSE);
    2525  }
    2626
    2727  /* find location of desired entry */
    28   p = fits_header_field (header, field, N);
     28  p = gfits_header_field (header, field, N);
    2929  if (p == NULL)  {
    3030    /* new entry, find the END of the header */
    31     p = fits_header_field (header, "END", 1);
     31    p = gfits_header_field (header, "END", 1);
    3232    if (p == NULL) return (FALSE);
    3333   
     
    3636      header[0].size += FT_RECORD_SIZE;
    3737      REALLOCATE (header[0].buffer, char, header[0].size);
    38       p = fits_header_field (header, "END", 1);
     38      p = gfits_header_field (header, "END", 1);
    3939      if (p == NULL) return (FALSE);
    4040      memset (p + FT_LINE_LENGTH, ' ', FT_RECORD_SIZE);
     
    4646  } else {
    4747    /* old entry, save the comment region (is this skipping a character for non-strings?) */
    48     qe = fits_keyword_end (p);
     48    qe = gfits_keyword_end (p);
    4949    qe += 3;
    5050    qe = MIN (p + 80, qe);
     
    8787  /* just a comment associated with a value.  this is assumes a fixed format position for the comment */
    8888  if (!strcmp (mode, "%C")) {
    89     qe = fits_keyword_end (p);
    90     qs = fits_keyword_start (p);
     89    qe = gfits_keyword_end (p);
     90    qs = gfits_keyword_start (p);
    9191
    9292    /* keep ' on ends, if there */
     
    108108
    109109/* given a FITS card line, return pointer to the start of the data area */
    110 char *fits_keyword_start (char *line) {
     110char *gfits_keyword_start (char *line) {
    111111
    112112  char *c;
     
    127127
    128128/* given a FITS card line, return pointer to the end of the data area */
    129 char *fits_keyword_end (char *line) {
     129char *gfits_keyword_end (char *line) {
    130130
    131131  int done;
Note: See TracChangeset for help on using the changeset viewer.