"Fossies" - the Fresh Open Source Software Archive

Member "lynx2.9.0dev.1/src/LYCharSets.h" (10 Feb 2012, 4361 Bytes) of package /linux/www/lynx2.9.0dev.1.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "LYCharSets.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * $LynxId: LYCharSets.h,v 1.34 2012/02/10 18:43:40 tom Exp $
    3  */
    4 #ifndef LYCHARSETS_H
    5 #define LYCHARSETS_H
    6 
    7 #ifndef HTUTILS_H
    8 #include <HTUtils.h>
    9 #endif
   10 
   11 #include <UCDefs.h>
   12 
   13 #ifndef UCMAP_H
   14 #include <UCMap.h>
   15 #endif /* !UCMAP_H */
   16 
   17 #include <HTCJK.h>
   18 
   19 #ifdef __cplusplus
   20 extern "C" {
   21 #endif
   22     extern BOOL HTPassEightBitRaw;
   23     extern BOOL HTPassEightBitNum;
   24     extern BOOL HTPassHighCtrlRaw;
   25     extern BOOL HTPassHighCtrlNum;
   26     extern BOOLEAN LYHaveCJKCharacterSet;
   27     extern BOOLEAN DisplayCharsetMatchLocale;
   28 
   29     extern HTkcode kanji_code;
   30 
   31 /*
   32  *  currently active character set (internal handler)
   33  */
   34     extern int current_char_set;
   35 /*
   36  *  character set where it is safe to draw lines on boxes.
   37  */
   38     extern int linedrawing_char_set;
   39 
   40 /*
   41  *  Initializer, calls initialization function for the
   42  *  CHARTRANS handling. - KW
   43  */
   44     extern int LYCharSetsDeclared(void);
   45 
   46     extern STRING2PTR LYCharSets[];
   47     extern const char *SevenBitApproximations[];
   48     extern STRING2PTR p_entity_values;
   49     extern const char *LYchar_set_names[];  /* Full name, not MIME */
   50     extern int LYlowest_eightbit[];
   51     extern int LYNumCharsets;
   52     extern LYUCcharset LYCharSet_UC[];
   53     extern int UCGetLYhndl_byAnyName(char *value);
   54     extern void HTMLSetCharacterHandling(int i);
   55     extern void HTMLSetUseDefaultRawMode(int i, int modeflag);
   56     extern void HTMLUseCharacterSet(int i);
   57     extern UCode_t HTMLGetEntityUCValue(const char *name);
   58     extern void Set_HTCJK(const char *inMIMEname, const char *outMIMEname);
   59 
   60     extern const char *HTMLGetEntityName(UCode_t code);
   61 
   62     UCode_t LYcp1252ToUnicode(UCode_t code);
   63 
   64 /*
   65  * HTMLGetEntityName calls LYEntityNames for iso-8859-1 entity names only. 
   66  * This is an obsolete technique but widely used in the code.  Note that
   67  * unicode number in general may have several equivalent entity names because
   68  * of synonyms.
   69  */
   70     extern BOOL force_old_UCLYhndl_on_reload;
   71     extern int forced_UCLYhdnl;
   72 
   73 #ifndef  USE_CHARSET_CHOICE
   74 # define ALL_CHARSETS_IN_O_MENU_SCREEN 1
   75 #endif
   76 
   77 #ifdef USE_CHARSET_CHOICE
   78     typedef struct {
   79     BOOL hide_display;  /* if FALSE, show in "display-charset" menu */
   80     BOOL hide_assumed;  /* if FALSE, show in "assumed-charset" menu */
   81 #ifndef ALL_CHARSETS_IN_O_MENU_SCREEN
   82     int assumed_idx;    /* only this field is needed */
   83 #endif
   84     } charset_subset_t;
   85 
   86 /* each element corresponds to charset in LYCharSets */
   87     extern charset_subset_t charset_subsets[];
   88 
   89 /* all zeros by default - i.e., all charsets allowed */
   90 
   91 /*
   92  * true if the charset choices for display charset were requested by user via
   93  * lynx.cfg.  It will remain FALSE if no "display_charset_choice" settings were
   94  * encountered in lynx.cfg
   95  */
   96     extern BOOL custom_display_charset;
   97 
   98 /* similar to custom_display_charset */
   99     extern BOOL custom_assumed_doc_charset;
  100 
  101 #ifndef ALL_CHARSETS_IN_O_MENU_SCREEN
  102 
  103 /* this stuff is initialized after reading lynx.cfg and .lynxrc */
  104 
  105 /*
  106  * These arrays map index of charset shown in menu to the index in LYCharsets[]
  107  */
  108     extern int display_charset_map[];
  109     extern int assumed_doc_charset_map[];
  110 
  111 /* these arrays are NULL terminated */
  112     extern const char *display_charset_choices[];
  113     extern const char *assumed_charset_choices[];
  114 
  115     extern int displayed_display_charset_idx;
  116 
  117 #endif
  118 /* this will be called after lynx.cfg and .lynxrc are read */
  119     extern void init_charset_subsets(void);
  120 #endif              /* USE_CHARSET_CHOICE */
  121 
  122 #if !defined(NO_AUTODETECT_DISPLAY_CHARSET)
  123 #  ifdef __EMX__
  124 #    define CAN_AUTODETECT_DISPLAY_CHARSET
  125 #    ifdef EXP_CHARTRANS_AUTOSWITCH
  126 #      define CAN_SWITCH_DISPLAY_CHARSET
  127 #    endif
  128 #  endif
  129 #endif
  130 
  131 #ifdef CAN_AUTODETECT_DISPLAY_CHARSET
  132     extern int auto_display_charset;
  133 #endif
  134 
  135 #ifdef CAN_SWITCH_DISPLAY_CHARSET
  136     enum switch_display_charset_t {
  137     SWITCH_DISPLAY_CHARSET_MAYBE,
  138     SWITCH_DISPLAY_CHARSET_REALLY,
  139     SWITCH_DISPLAY_CHARSET_RESIZE
  140     };
  141     extern int Switch_Display_Charset(int ord, enum switch_display_charset_t really);
  142     extern int Find_Best_Display_Charset(int ord);
  143     extern char *charsets_directory;
  144     extern char *charset_switch_rules;
  145     extern int switch_display_charsets;
  146     extern int auto_other_display_charset;
  147     extern int codepages[2];
  148     extern int real_charsets[2];    /* Non "auto-" charsets for the codepages */
  149 #endif
  150 
  151 #ifdef __cplusplus
  152 }
  153 #endif
  154 #endif              /* LYCHARSETS_H */