int cfits_get_colunits (char *col_units, const char *col_name, cfitsfile *fptr) { int status = 0; int colnum; if (NULL == col_units || NULL == col_name || NULL == fptr) return -1; if (-1 == cfits_get_colnum (&colnum, col_name, fptr)) return -1; col_units[0] = 0; (void) fits_get_bcolparms ((fitsfile *) fptr, colnum, NULL, col_units, NULL, NULL, NULL, NULL, NULL, NULL, &status); cfits_report_error (status); if (status != 0) return -1; if (col_units[0] == 0) { isis_vmesg (FAIL, I_WARNING, __FILE__, __LINE__, "column %d '%s' lacks a TUNIT keyword", colnum, col_name); return -1; } return 0; }
long get_repeat_count_for_column(fitsfile * fptr, int column_num) { long repeat_count; fits_get_bcolparms(fptr, column_num, NULL, NULL, /* ttype, tunit */ NULL, /* typechar */ &repeat_count, NULL, NULL, /* scale, zero */ NULL, NULL, /* nulval, disp */ &fitsio_status); return repeat_count; }