Changeset 38553 for trunk/Ohana/src/libfits/table/F_table_column.c
- Timestamp:
- Jun 25, 2015, 10:41:05 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/table/F_table_column.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/table/F_table_column.c
r7054 r38553 6 6 /* we expect one more field: the pointer to the array we read in */ 7 7 8 char string[ 80], this_field[80], form[80], temp[80];8 char string[256], this_field[256], form[256], temp[256]; 9 9 int i, j, N, start, end, width, M; 10 10 va_list argp; … … 18 18 /* find the correct field */ 19 19 for (i = 0; i < table[0].Nfields; i++) { 20 s printf (string, "TTYPE%d\0", i+1);20 snprintf (string, 256, "TTYPE%d\0", i+1); 21 21 gfits_scan (&table[0].header, string, "%s", 1, this_field); 22 22 if (!strcmp (field, this_field)) { … … 32 32 N = i + 1; 33 33 34 s printf (string, "TBCOL%d\0", N);34 snprintf (string, 256, "TBCOL%d\0", N); 35 35 gfits_scan (&table[0].header, string, "%d", 1, &start); 36 s printf (string, "TFORM%d\0", N);36 snprintf (string, 256, "TFORM%d\0", N); 37 37 gfits_scan (&table[0].header, string, "%s", 1, form); 38 38 /* we could use some error checking from the FITS table form, but … … 42 42 end = table[0].Naxis[0]; 43 43 } else { 44 s printf (string, "TBCOL%d\0", N+1);44 snprintf (string, 256, "TBCOL%d\0", N+1); 45 45 gfits_scan (&table[0].header, string, "%d", 1, &end); 46 46 }
Note:
See TracChangeset
for help on using the changeset viewer.
