home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / Sources / src / lib / ori_rc_lib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-27  |  1.6 KB  |  56 lines

  1. #ifndef ORI_RC_LIB_READ
  2. #  define ORI_RC_LIB_READ
  3. #  include <lib/ori_bool.h>
  4. #  include <lib/ori_add_lib.h>
  5.    /*{{{}}}*/
  6.    /*{{{  filenames*/
  7.    extern char *get_prg_name(char *);
  8.    extern boolean path_file_test
  9.     ( char*const,
  10.       char**,
  11.       char const*const,
  12.       char const*const
  13.     );
  14.    extern char *get_system_filename
  15.     ( char const*const,
  16.       char const*,
  17.       char const*const,
  18.       char *const
  19.     );
  20.    /*}}}  */
  21.    /*{{{  length of rc coding for int and char*/
  22. #   define rc_c_lg 1
  23. #   define rc_w_lg 2
  24.    /*}}}  */
  25.    /*{{{  read rc*/
  26. #   define rc_get_c(f) fgetc(f)
  27.    extern int rc_get_w(FILE*const);
  28. #   define rc_skip_cw(f,c,n) fseek(f,(c)*rc_c_lg+(n)*rc_w_lg,SEEK_CUR)
  29.  
  30. #   define rc_nget_c(f,n,s) fread(s,(size_t)n,1,f)
  31.    extern void rc_nget_w(FILE*const,int,int*);
  32.    extern void rc_get_s(FILE*const,char*,int);
  33.    /*}}}  */
  34.    /*{{{  write rc*/
  35. #   define rc_put_c(c,f) fputc(c,f)
  36.    extern void rc_put_w(int,FILE*);
  37.    /*}}}  */
  38.    /*{{{  binding tags*/
  39. #   define REF_TAG_LG 3
  40.    extern void ref_code_tag(char*,int);
  41.    extern int ref_decode_tag(unsigned char const*);
  42.    /*}}}  */
  43.    /*{{{  read text compression*/
  44.    extern void ref_uncompress_text(char const*,char*);
  45.    char *ref_read_comp_data(FILE*const);
  46.    void ref_free_comp_data(void);
  47. #   define ref_skip_comp_data(f) rc_skip_cw(f,rc_get_w(f),0)
  48.    /*}}}  */
  49.    /*{{{  write text compression*/
  50.    extern void ref_compress_text(unsigned char*);
  51.    extern void ref_put_comp_data(FILE*);
  52.    extern boolean ref_add_word(char*);
  53.    extern boolean ref_init_comp_data(int);
  54.    /*}}}  */
  55. #endif
  56.