Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Routines for TABLES i/o


Defines

#define NUL_IVAL   2147483647
#define NUL_RVAL   1.701411e38
#define NUL_DVAL   1.70141183460469229e38
#define NUL_CVAL   '\0'

Functions

int create_table (TABLE *table, char *name, int nbrow, int nbcol, char mode, char *ident)
int open_table (TABLE *table, char *name, char *mode)
int close_table (TABLE *table)
int handle_select_flag (TABLE *table, char mode, char *selection)
int write_selection (TABLE *table, int *sel, char *selection)
int get_col_ref (TABLE *table, char *label)
int get_col_name (TABLE *table, int no_col, char *label)
int get_col_info (TABLE *table, int no_col, int *dtype, char *format, char *unit)
int create_col (TABLE *table, char *colname, short type, char mode, char *format, char *user_unit)
int delete_col (TABLE *table, int nocol)
int delete_row (TABLE *table, int nrow)
int RD_tbl (TABLE *table, int row, int col, void *value)
int RD_col (TABLE *table, int col, void *value)
int WR_tbl (TABLE *table, int row, int col, void *value)
int WR_null (TABLE *table, int row, int col)
int delete_table (TABLE *table)

Define Documentation

#define NUL_IVAL   2147483647
 

Definition at line 4838 of file iolib.c.

Referenced by WR_null().

#define NUL_RVAL   1.701411e38
 

Definition at line 4839 of file iolib.c.

Referenced by WR_null().

#define NUL_DVAL   1.70141183460469229e38
 

Definition at line 4840 of file iolib.c.

Referenced by WR_null().

#define NUL_CVAL   '\0'
 

Definition at line 4841 of file iolib.c.

Referenced by WR_null().


Function Documentation

int create_table TABLE table,
char *  name,
int  nbrow,
int  nbcol,
char  mode,
char *  ident
 

creates a new table-file according to specifications

Parameters:
table [TABLE *] table structure
name [char *] table filename
nbrow [int ] number of rows (-1 if unknown)
nbcol [int ] number of columns (-1 if u.)
mode [char ] mode = N(ew),I(nquiry),W(arning),Q(uiet)
ident [char *] identifier

Definition at line 3131 of file iolib.c.

References TABLE::allrow, append_tbl_extension(), IO_Format::basic_io, CHAR, TABLE::col, confirme_erase(), TABLE::data_format, delete_table(), ERR_BAD_PARAM, ERR_OPEN, ERR_REN_TBL, ERR_WRIT, exist(), TABLE::external_info, FALSE, TABLE::file_type, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), TABLE::ident, TABLE::imno, InputIO, TABLE::iomode, IRAF_FORMAT, lg_ident, lg_name, MAX, MIDAS_FORMAT, TABLE::name, O_MODE, OutputIO, print_msg(), print_warning(), TABLE::row, TABLE::sel_row, TABLE::select_flag, stop_by_user(), STSDAS_FORMAT, TBL_TYPE, tble_nb_row, TK, upper_strg(), and WR_desc().

Referenced by close_E3D_file(), convert_table(), create_E3D_file(), set_lens_coordinates(), and set_lenses_coord().

int open_table TABLE table,
char *  name,
char *  mode
 

opens an existing table-file and updates structure

Parameters:
table [TABLE *] table structure
name [char *] table name
mode [char *] opening mode (I,O,IO)

Definition at line 3341 of file iolib.c.

References TABLE::allrow, append_tbl_extension(), IO_Format::basic_io, CHAR, TABLE::col, TABLE::data_format, disable_user_warnings(), ERR_BAD_HEAD, ERR_NOTBL, ERR_OPEN, ERR_READ, exist(), TABLE::external_info, FALSE, TABLE::file_type, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), TABLE::history, I_MODE, TABLE::ident, TABLE::imno, InputIO, IO_MODE, TABLE::iomode, IRAF_FORMAT, lg_hist, lg_ident, lg_name, MIDAS_FORMAT, TABLE::name, O_MODE, RD_desc(), restore_user_warnings(), TABLE::row, TABLE::sel_row, TABLE::select_flag, STSDAS_FORMAT, and TBL_TYPE.

Referenced by close_E3D_file(), convert_table(), decode_open_tablexy(), get_ID_and_coordinates(), get_lens_coordinates(), get_lenses_coord(), get_lenses_coord_select(), get_lenses_no_from_table(), init_new_E3D_slice(), open_E3D_file(), set_ID_and_coordinates(), set_lens_coordinates(), and set_lenses_coord().

int close_table TABLE table  ) 
 

closes a currently active table

Parameters:
table [TABLE *] table structure

Definition at line 3490 of file iolib.c.

References CHAR, TABLE::data_format, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), I_MODE, TABLE::imno, IO_MODE, TABLE::iomode, IRAF_FORMAT, lg_name, MIDAS_FORMAT, TABLE::name, O_MODE, RD_desc(), TABLE::row, TABLE::sel_row, TABLE::select_flag, STSDAS_FORMAT, TK, WR_desc(), and WR_history().

Referenced by close_E3D_file(), convert_table(), create_E3D_file(), get_ID_and_coordinates(), get_lens_coordinates(), get_lenses_coord(), get_lenses_coord_select(), get_lenses_no_from_table(), init_new_E3D_slice(), open_E3D_file(), set_ID_and_coordinates(), set_lens_coordinates(), and set_lenses_coord().

int handle_select_flag TABLE table,
char  mode,
char *  selection
 

restricts table read/write access to selected rows

Parameters:
table [TABLE *] table structure
mode [char ] 'W'(arning) or 'Q'(uiet)
selection [char *] returns current selection as a string (may be NULL)

Definition at line 3579 of file iolib.c.

References TABLE::allrow, CHAR, TABLE::data_format, disable_user_warnings(), first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, get_col_ref(), TABLE::imno, IRAF_FORMAT, MIDAS_FORMAT, print_warning(), RD_col(), RD_desc(), restore_user_warnings(), TABLE::row, TABLE::sel_row, TABLE::select_flag, STSDAS_FORMAT, and TRUE.

Referenced by convert_table(), get_lenses_coord_select(), and get_lenses_no_from_table().

int write_selection TABLE table,
int *  sel,
char *  selection
 

Save a selection in the table

Parameters:
table [TABLE *] table structure
sel [int *] selection array
selection [char *] new selection

Definition at line 3668 of file iolib.c.

References TABLE::allrow, CHAR, create_col(), TABLE::data_format, disable_user_warnings(), FITS_A_FORMAT, FITS_B_FORMAT, get_col_ref(), TABLE::imno, INT, IRAF_FORMAT, MIDAS_FORMAT, restore_user_warnings(), TABLE::row, TABLE::sel_row, TABLE::select_flag, STSDAS_FORMAT, TRUE, WR_desc(), and WR_tbl().

int get_col_ref TABLE table,
char *  label
 

returns column reference

Parameters:
table [TABLE *] table structure
label [char *] column label or #num

Definition at line 3747 of file iolib.c.

References TABLE::data_format, E3D_COL_ID, E3D_COL_XPOS, E3D_COL_YPOS, ERR_NOCOL, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_col_name(), get_tiger_errcode(), Handle_Error(), TABLE::imno, IRAF_FORMAT, LAB_COL_NO, LAB_COL_XLD, LAB_COL_YLD, MIDAS_FORMAT, TABLE::name, STSDAS_FORMAT, and upper_strg().

Referenced by create_col(), decode_open_tablexy(), get_ID_and_coordinates(), get_lens_coordinates(), get_lenses_coord(), get_lenses_coord_select(), get_lenses_no_from_table(), handle_select_flag(), open_E3D_file(), set_ID_and_coordinates(), set_lens_coordinates(), and write_selection().

int get_col_name TABLE table,
int  no_col,
char *  label
 

returns column name

Parameters:
table [TABLE *] table structure
no_col [int ] column id
label [char *] column label

Definition at line 3887 of file iolib.c.

References TABLE::data_format, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_tiger_errcode(), Handle_Error(), TABLE::imno, IRAF_FORMAT, lg_unit, MIDAS_FORMAT, and STSDAS_FORMAT.

Referenced by copy_col(), and get_col_ref().

int get_col_info TABLE table,
int  no_col,
int *  dtype,
char *  format,
char *  unit
 

returns informations about a column (type ...)

Parameters:
table [TABLE *] table structure
no_col [int ] column reference
dtype [int *] type (out)
format [char *] format (out)
unit [char *] unit (out)

Definition at line 3945 of file iolib.c.

References TABLE::data_format, decode_datatype(), TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_tiger_errcode(), Handle_Error(), TABLE::imno, IRAF_FORMAT, MIDAS_FORMAT, and STSDAS_FORMAT.

Referenced by copy_col(), open_E3D_file(), RD_col(), RD_tbl(), search_in_col(), WR_null(), and WR_tbl().

int create_col TABLE table,
char *  colname,
short  type,
char  mode,
char *  format,
char *  user_unit
 

creates a new column according to specifications

Parameters:
table [TABLE *] table structure
colname [char *] column label
type [short ] value type in column
mode [char ] mode = N(ew),R(ewrite),O(verwrite)
format [char *] column format
user_unit [char *] units

Definition at line 4044 of file iolib.c.

References CHAR, TABLE::col, TABLE::data_format, disable_user_warnings(), DOUBLE, ERR_BAD_COL, ERR_BAD_PARAM, ERR_BAD_TYPE, ERR_NOCOL, ERR_REN_TBL, TABLE::external_info, first_blk(), FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_col_ref(), get_datatype_code(), get_tiger_errcode(), Handle_Error(), TABLE::imno, INT, IRAF_FORMAT, lg_unit, LONG, MIDAS_FORMAT, TABLE::name, restore_user_warnings(), TABLE::row, SHORT, STSDAS_FORMAT, upper_strg(), WR_desc(), and WR_null().

Referenced by close_E3D_file(), copy_col(), create_E3D_file(), set_lens_coordinates(), set_lenses_coord(), and write_selection().

int delete_col TABLE table,
int  nocol
 

deletes the specified column

Parameters:
table [TABLE *] table structure
nocol [int ] column reference

Definition at line 4292 of file iolib.c.

References TABLE::allrow, TABLE::col, TABLE::data_format, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_tiger_errcode(), Handle_Error(), TABLE::imno, IRAF_FORMAT, MIDAS_FORMAT, STSDAS_FORMAT, and WR_null().

int delete_row TABLE table,
int  nrow
 

deletes the specified row

Parameters:
table [TABLE *] table structure
nrow [int ] row number

Definition at line 4343 of file iolib.c.

References TABLE::data_format, ERR_NOIMPL, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_tiger_errcode(), Handle_Error(), TABLE::imno, IRAF_FORMAT, MIDAS_FORMAT, TABLE::sel_row, TABLE::select_flag, and STSDAS_FORMAT.

int RD_tbl TABLE table,
int  row,
int  col,
void *  value
 

reads a value in table(line,column)

Parameters:
table [TABLE *] table structure
row [int ] row number
col [int ] column reference
value [(type) *] value (out)

Definition at line 4394 of file iolib.c.

References CHAR, TABLE::data_format, DOUBLE, ERR_NODATA, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_col_info(), get_datatype_code(), get_tiger_errcode(), Handle_Error(), TABLE::imno, INT, IRAF_FORMAT, last_char(), lg_unit, LONG, MIDAS_FORMAT, TABLE::name, TABLE::sel_row, TABLE::select_flag, SHORT, and STSDAS_FORMAT.

Referenced by copy_col(), get_ID_and_coordinates(), get_lens_coordinates(), get_lenses_coord(), get_lenses_coord_select(), get_lenses_no_from_table(), and open_E3D_file().

int RD_col TABLE table,
int  col,
void *  value
 

reads all a column values in table

Parameters:
table [TABLE *] table structure
col [int ] column reference
value [(type) *] array of values (out)

Definition at line 4526 of file iolib.c.

References TABLE::allrow, CHAR, TABLE::data_format, DOUBLE, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_col_info(), get_datatype_code(), get_tiger_errcode(), Handle_Error(), TABLE::imno, INT, IRAF_FORMAT, last_char(), lg_unit, LONG, MIDAS_FORMAT, TABLE::name, TABLE::row, TABLE::sel_row, TABLE::select_flag, SHORT, sizeof_item(), and STSDAS_FORMAT.

Referenced by get_lenses_coord(), get_lenses_coord_select(), handle_select_flag(), and search_in_col().

int WR_tbl TABLE table,
int  row,
int  col,
void *  value
 

writes a value into table

Parameters:
table [TABLE *] table structure
row [int ] row number
col [int ] column reference
value [(type) *] value to write

Definition at line 4706 of file iolib.c.

References TABLE::allrow, CHAR, TABLE::data_format, DOUBLE, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_col_info(), get_datatype_code(), get_tiger_errcode(), Handle_Error(), TABLE::imno, INT, IRAF_FORMAT, lg_unit, LONG, MIDAS_FORMAT, TABLE::name, TABLE::row, TABLE::sel_row, TABLE::select_flag, SHORT, and STSDAS_FORMAT.

Referenced by close_E3D_file(), copy_col(), set_ID_and_coordinates(), set_lens_coordinates(), set_lenses_coord(), WR_null(), and write_selection().

int WR_null TABLE table,
int  row,
int  col
 

write a NULL value into table(line,column)

Parameters:
table [TABLE *] table structure
row [int ] row number
col [int ] column reference

Definition at line 4854 of file iolib.c.

References CHAR, TABLE::data_format, DOUBLE, FITS_A_FORMAT, FITS_B_FORMAT, FLOAT, get_col_info(), get_tiger_errcode(), Handle_Error(), TABLE::imno, INT, IRAF_FORMAT, lg_unit, LONG, MIDAS_FORMAT, NUL_CVAL, NUL_DVAL, NUL_IVAL, NUL_RVAL, TABLE::sel_row, TABLE::select_flag, SHORT, STSDAS_FORMAT, and WR_tbl().

Referenced by create_col(), and delete_col().

int delete_table TABLE table  ) 
 

delete a currently active table

Parameters:
table [TABLE *] table structure

Definition at line 4925 of file iolib.c.

References IO_Format::basic_io, TABLE::data_format, TABLE::external_info, FITS_A_FORMAT, FITS_B_FORMAT, get_iomode_code(), get_tiger_errcode(), Handle_Error(), I_MODE, InputIO, IRAF_FORMAT, lg_name, MIDAS_FORMAT, TABLE::name, TABLE::sel_row, TABLE::select_flag, and STSDAS_FORMAT.

Referenced by create_table().


Generated on Tue Jul 1 17:35:48 2003 for IFU_C_iolibs by doxygen1.3