IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34577


Ignore:
Timestamp:
Oct 25, 2012, 10:20:57 AM (14 years ago)
Author:
eugene
Message:

fix some minor syntax issues creating non-standard FITS files

Location:
trunk/Ohana/src/libfits/header
Files:
3 edited

Legend:

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

    r28241 r34577  
    2626  }
    2727
    28   gfits_modify (header, "PCOUNT", "%d",  1, header[0].pcount);
    29   gfits_modify (header, "GCOUNT", "%d",  1, header[0].gcount);
     28  // gfits_modify (header, "PCOUNT", "%d",  1, header[0].pcount);
     29  // gfits_modify (header, "GCOUNT", "%d",  1, header[0].gcount);
    3030  gfits_modify (header, "BSCALE", "%lf", 1, header[0].bscale);
    3131  gfits_modify (header, "BZERO",  "%lf", 1, header[0].bzero);
  • trunk/Ohana/src/libfits/header/F_modify.c

    r33648 r34577  
    6868  if (!strcmp (mode, "%jd"))  { snprintf (string, 81, "%-8s= %20jd / %-s ",   field, va_arg (argp, intmax_t),           comment); goto found_it; }
    6969
    70   /* string value.  Quotes must be at least 18 chars apart */
     70  /* string value.  Quotes must be at least 8 chars apart */
    7171  if (!strcmp (mode, "%s")) {
    7272    char *ptr = va_arg (argp, char *);
    7373    if (!ptr) goto invalid;
    7474    strncpy (data, ptr, 68);
    75     snprintf (string, 81, "%-8s= '%-18s' / %-s ", field, data, comment);
     75    snprintf (string, 81, "%-8s= '%-8s' / %-s ", field, data, comment);
    7676    goto found_it;
    7777  }
  • trunk/Ohana/src/libfits/header/F_print.c

    r33648 r34577  
    6363  if (!strcmp (mode, "%jd")) { snprintf (string, 81, "%-8s= %20jd / %46s ",   field, va_arg (argp, intmax_t),           blank); goto found_it; }
    6464
    65   /* string value.  Quotes must be at least 18 chars apart.  Longer lines will this should be fixed to allow arbitrary string lengths, up to 69 chars */
     65  /* string value.  Quotes must be at least 8 chars apart.  Longer lines will this should be fixed to allow arbitrary string lengths, up to 69 chars */
    6666  if (!strcmp (mode, "%s")) {
    6767    char *ptr = va_arg (argp, char *);
     
    6969    strcpy (line, ptr);
    7070    line[68] = 0;
    71     snprintf (string, 81, "%-8s= '%-18s' / %46s ", field, line, blank);
     71    snprintf (string, 81, "%-8s= '%-8s' / %46s ", field, line, blank);
    7272    goto found_it;
    7373  }
Note: See TracChangeset for help on using the changeset viewer.