home *** CD-ROM | disk | FTP | other *** search
- #ifndef ORI_RC_LIB_READ
- # define ORI_RC_LIB_READ
- # include <lib/ori_bool.h>
- # include <lib/ori_add_lib.h>
- /*{{{}}}*/
- /*{{{ filenames*/
- extern char *get_prg_name(char *);
- extern boolean path_file_test
- ( char*const,
- char**,
- char const*const,
- char const*const
- );
- extern char *get_system_filename
- ( char const*const,
- char const*,
- char const*const,
- char *const
- );
- /*}}} */
- /*{{{ length of rc coding for int and char*/
- # define rc_c_lg 1
- # define rc_w_lg 2
- /*}}} */
- /*{{{ read rc*/
- # define rc_get_c(f) fgetc(f)
- extern int rc_get_w(FILE*const);
- # define rc_skip_cw(f,c,n) fseek(f,(c)*rc_c_lg+(n)*rc_w_lg,SEEK_CUR)
-
- # define rc_nget_c(f,n,s) fread(s,(size_t)n,1,f)
- extern void rc_nget_w(FILE*const,int,int*);
- extern void rc_get_s(FILE*const,char*,int);
- /*}}} */
- /*{{{ write rc*/
- # define rc_put_c(c,f) fputc(c,f)
- extern void rc_put_w(int,FILE*);
- /*}}} */
- /*{{{ binding tags*/
- # define REF_TAG_LG 3
- extern void ref_code_tag(char*,int);
- extern int ref_decode_tag(unsigned char const*);
- /*}}} */
- /*{{{ read text compression*/
- extern void ref_uncompress_text(char const*,char*);
- char *ref_read_comp_data(FILE*const);
- void ref_free_comp_data(void);
- # define ref_skip_comp_data(f) rc_skip_cw(f,rc_get_w(f),0)
- /*}}} */
- /*{{{ write text compression*/
- extern void ref_compress_text(unsigned char*);
- extern void ref_put_comp_data(FILE*);
- extern boolean ref_add_word(char*);
- extern boolean ref_init_comp_data(int);
- /*}}} */
- #endif
-