Changeset 41474 for trunk/Ohana/src/libfits/table/F_table_format.c
- Timestamp:
- Jan 24, 2021, 3:37:52 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/table/F_table_format.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/table/F_table_format.c
r41433 r41474 92 92 int gfits_table_format (char *format, char *type, int *Nval, int *Nbytes) { 93 93 94 char Fchar, Size[80] , Type;94 char Fchar, Size[80]; 95 95 int Nv; 96 96 … … 107 107 } 108 108 109 Type = 'x'; 110 if (Fchar == 'D') { *Nbytes = 1; strcpy (type, "double"); Type = 'e'; *Nval = Nv; } 109 int isLong = FALSE; 110 char Type = 'x'; 111 if (Fchar == 'D') { *Nbytes = 1; strcpy (type, "double"); Type = 'e'; *Nval = Nv; isLong = TRUE; } 111 112 if (Fchar == 'E') { *Nbytes = 1; strcpy (type, "float"); Type = 'e'; *Nval = Nv; } 112 113 if (Fchar == 'F') { *Nbytes = 1; strcpy (type, "float"); Type = 'f'; *Nval = Nv; } … … 115 116 if (!*Nbytes) { return (FALSE); } 116 117 117 sprintf (format, "%%-%s%c", Size, Type); // NOTE: this line is not used 118 if (0) { 119 // this format is appropriate for scanning, but not printing 120 if (isLong) { 121 sprintf (format, "%%%sl%c", Size, Type); 122 } else { 123 sprintf (format, "%%%s%c", Size, Type); 124 } 125 } 126 127 // this format is appropriate for printing, but not scanning 128 sprintf (format, "%%-%s%c", Size, Type); 118 129 119 130 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
