w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

wc.h (2700B)


      1 
      2 #ifndef _WC_WC_H
      3 #define _WC_WC_H
      4 
      5 #include <Str.h>
      6 #include "wc_types.h"
      7 #include "ces.h"
      8 
      9 #define WC_FALSE 0
     10 #define WC_TRUE 1
     11 
     12 #define WC_OPT_DETECT_OFF	0
     13 #define WC_OPT_DETECT_ISO_2022	1
     14 #define WC_OPT_DETECT_ON	2
     15 
     16 #define WC_LOCALE_JA_JP	1
     17 #define WC_LOCALE_ZH_CN	2
     18 #define WC_LOCALE_ZH_TW	3
     19 #define WC_LOCALE_ZH_HK	4
     20 #define WC_LOCALE_KO_KR	5
     21 
     22 extern wc_uint8 WC_DETECT_MAP[];
     23 
     24 extern wc_ces_info WcCesInfo[];
     25 extern wc_option WcOption;
     26 extern wc_locale WcLocale;
     27 extern char *WcReplace;
     28 extern char *WcReplaceW;
     29 #define WC_REPLACE   WcReplace
     30 #define WC_REPLACE_W WcReplaceW
     31 
     32 #define wc_conv(is, f_ces, t_ces) \
     33 	wc_Str_conv(Strnew_charp((is)), (f_ces), (t_ces))
     34 #define wc_conv_n(is, n, f_ces, t_ces) \
     35 	wc_Str_conv(Strnew_charp_n((is), (n)), (f_ces), (t_ces))
     36 #define wc_conv_strict(is, f_ces, t_ces) \
     37 	wc_Str_conv_strict(Strnew_charp((is)), (f_ces), (t_ces))
     38 #define wc_conv_n_strict(is, n, f_ces, t_ces)\
     39 	wc_Str_conv_strict(Strnew_charp_n((is), (n)), (f_ces), (t_ces))
     40 #define wc_conv_with_detect(is, f_ces, hint, t_ces) \
     41 	wc_Str_conv_with_detect(Strnew_charp((is)), (f_ces), (hint), (t_ces))
     42 #define wc_conv_n_with_detect(is, n, f_ces, hint, t_ces)\
     43 	wc_Str_conv_with_detect(Strnew_charp_n((is), (n)), (f_ces), (hint), (t_ces))
     44 
     45 extern Str wc_Str_conv(Str is, wc_ces f_ces, wc_ces t_ces);
     46 extern Str wc_Str_conv_strict(Str is, wc_ces f_ces, wc_ces t_ces);
     47 extern Str wc_Str_conv_with_detect(Str is, wc_ces *f_ces, wc_ces hint, wc_ces t_ces);
     48 
     49 extern void wc_input_init(wc_ces ces, wc_status *st);
     50 extern void wc_output_init(wc_ces ces, wc_status *st);
     51 extern void wc_push_end(Str os, wc_status *st);
     52 extern wc_bool wc_ces_has_ccs(wc_ccs ccs, wc_status *st);
     53 
     54 extern void wc_char_conv_init(wc_ces f_ces, wc_ces t_ces);
     55 extern Str  wc_char_conv(char c);
     56 
     57 extern void wc_putc_init(wc_ces f_ces, wc_ces t_ces);
     58 extern void wc_putc(char *c, FILE *f);
     59 extern void wc_putc_end(FILE *f);
     60 extern void wc_putc_clear_status(void);
     61 
     62 extern void   wc_create_detect_map(wc_ces ces, wc_bool esc);
     63 extern wc_ces wc_auto_detect(char *is, size_t len, wc_ces hint);
     64 
     65 extern wc_ces       wc_guess_charset(char *charset, wc_ces orig);
     66 extern wc_ces       wc_guess_charset_short(char *charset, wc_ces orig);
     67 extern wc_ces       wc_guess_locale_charset(char *locale, wc_ces orig);
     68 extern wc_ces       wc_charset_to_ces(char *charset);
     69 extern wc_ces       wc_charset_short_to_ces(char *charset);
     70 extern wc_ces       wc_locale_to_ces(char *locale);
     71 extern wc_ces       wc_guess_8bit_charset(wc_ces orig);
     72 extern char        *wc_ces_to_charset(wc_ces ces);
     73 extern char        *wc_ces_to_charset_desc(wc_ces ces);
     74 extern wc_bool      wc_check_ces(wc_ces ces);
     75 extern wc_ces_list *wc_get_ces_list(void);
     76 
     77 #endif