RLE_GET_SETUP(3) UNIX Programmer's Manual RLE_GET_SETUP(3) NAME rle_get_setup - Read the header from an RLE file. rle_get_setup_ok - Print error message and exit if rle_get_setup fails. rle_get_error - Print error message for rle_get_setup failure. rle_debug - Turn on or off debugging messages. SYNOPSIS #include rle_get_setup( the_hdr ); rle_hdr * the_hdr; rle_get_setup_ok( the_hdr, prog_name, file_name ); rle_hdr * the_hdr; char * prog_name, * file_name; rle_get_error( code, prog_name, file_name ) int code; char *prog_name, *file_name; rle_debug( on_off ) int on_off; DESCRIPTION _R_l_e__g_e_t__s_e_t_u_p is called to initialize the process of reading an _R_L_E(5) file. It will fill in _t_h_e__h_d_r with the header information from the _R_L_E file, and will initialize state for _r_l_e__g_e_t_r_o_w(3) and _r_l_e__g_e_t_r_a_w(3). The _r_l_e__f_i_l_e field of _t_h_e__h_d_r should be initialized to the input stream before calling _r_l_e__g_e_t__s_e_t_u_p. The _b_i_t_s field is initialized by _r_l_e__g_e_t__s_e_t_u_p to enable reading of all the channels present in the input file. To prevent _r_l_e__g_e_t_r_o_w or _r_l_e__g_e_t_r_a_w from reading certain channels (e.g., the alpha channel), the appropriate bits should be cleared before calling them. The error codes returned by _r_l_e__g_e_t__s_e_t_u_p are defined in _r_l_e._h. _R_l_e__g_e_t__s_e_t_u_p__o_k invokes _r_l_e__g_e_t__s_e_t_u_p and checks the return code. If an error occurred, it calls _r_l_e__g_e_t__e_r_r_o_r( _e_r_r__c_o_d_e, _p_r_o_g__n_a_m_e, _f_i_l_e__n_a_m_e ) to print the appropriate error message on _s_t_d_e_r_r, and the program exits with the status code set. _R_l_e__g_e_t__e_r_r_o_r can be called to print an appropriate error message on the standard error output for the failure code returned by _r_l_e__g_e_t__s_e_t_u_p. The _p_r_o_g__n_a_m_e and _f_i_l_e__n_a_m_e parameters are used for the error message. If _f_i_l_e__n_a_m_e is NULL or "-", the string "Standard input" is substituted. The function _r_l_e__d_e_b_u_g is used to enable or disable debug printing for the _r_l_e__g_e_t functions. If _o_n__o_f_f is non-zero, Printed 5/12/93 2/2/87 1 RLE_GET_SETUP(3) UNIX Programmer's Manual RLE_GET_SETUP(3) all input read from any _R_L_E file will be printed in a read- able form on the standard error output. Calling _r_l_e__d_e_b_u_g(_0) will turn off this activity. SEE ALSO _r_l_e__h_d_r(3), _r_l_e__g_e_t_r_o_w(3), _r_l_e__g_e_t_r_a_w(3), _l_i_b_r_l_e(3), _R_L_E(5). AUTHOR Spencer W. Thomas, Todd Fuqua University of Utah Printed 5/12/93 2/2/87 2