Changeset 34577
- Timestamp:
- Oct 25, 2012, 10:20:57 AM (14 years ago)
- Location:
- trunk/Ohana/src/libfits/header
- Files:
-
- 3 edited
-
F_create_H.c (modified) (1 diff)
-
F_modify.c (modified) (1 diff)
-
F_print.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/header/F_create_H.c
r28241 r34577 26 26 } 27 27 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); 30 30 gfits_modify (header, "BSCALE", "%lf", 1, header[0].bscale); 31 31 gfits_modify (header, "BZERO", "%lf", 1, header[0].bzero); -
trunk/Ohana/src/libfits/header/F_modify.c
r33648 r34577 68 68 if (!strcmp (mode, "%jd")) { snprintf (string, 81, "%-8s= %20jd / %-s ", field, va_arg (argp, intmax_t), comment); goto found_it; } 69 69 70 /* string value. Quotes must be at least 18 chars apart */70 /* string value. Quotes must be at least 8 chars apart */ 71 71 if (!strcmp (mode, "%s")) { 72 72 char *ptr = va_arg (argp, char *); 73 73 if (!ptr) goto invalid; 74 74 strncpy (data, ptr, 68); 75 snprintf (string, 81, "%-8s= '%- 18s' / %-s ", field, data, comment);75 snprintf (string, 81, "%-8s= '%-8s' / %-s ", field, data, comment); 76 76 goto found_it; 77 77 } -
trunk/Ohana/src/libfits/header/F_print.c
r33648 r34577 63 63 if (!strcmp (mode, "%jd")) { snprintf (string, 81, "%-8s= %20jd / %46s ", field, va_arg (argp, intmax_t), blank); goto found_it; } 64 64 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 */ 66 66 if (!strcmp (mode, "%s")) { 67 67 char *ptr = va_arg (argp, char *); … … 69 69 strcpy (line, ptr); 70 70 line[68] = 0; 71 snprintf (string, 81, "%-8s= '%- 18s' / %46s ", field, line, blank);71 snprintf (string, 81, "%-8s= '%-8s' / %46s ", field, line, blank); 72 72 goto found_it; 73 73 }
Note:
See TracChangeset
for help on using the changeset viewer.
