|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T X
Length: 1709 (0x6ad) Types: TextFile Names: »Xlocale.doc«
└─⟦276d19d6e⟧ Bits:30007243 EUUGD5_I: X11R5 └─⟦4856bf7e7⟧ »./mit-4/mit-4.00« └─⟦635ff9e7e⟧ └─⟦this⟧ »mit/doc/I18N/Xsi/Xlc/Xlocale.doc«
$Header: Xlocale.doc,v 1.1 90/12/27 20:21:01 morisaki Exp $ $Date: 90/12/27 20:21:01 $ Explain of Data Structure: 1. Conversion The conversion is done by the table-driven method, and also can be done by procedure-driven method which is registered by application. The later method is not supported in this implementation. The value of cds_cnvproc is always set to NULL pointer. The table-driven method is defined with: int cds_cnvindex[MAXCHARSETS]; /* table-driven conversion */ Range *cds_cnvlist; /* conversion list */ The converstion list cds_cnvlist stores all pairs of starting and ending codepoint of all charsets. The all of pairs of each charset, say csid, is indexed from cds_cnvindex[csid] to cds_cnvindex[csid+1]-1. A pair is made of 4 elements which specify the range of conversion: unsigned int mb_start; /* starting code point of multibyte*/ unsigned int mb_end; /* ending code point of multibyte */ unsigned int cs_start; /* starting code point of charset */ unsigned int cs_end; /* ending code point of charset */ The range (mb_start, mb_end) of multibyte encoding is mapped to the range (cs_start, cs_end) of a charset with 1-to-1. 1. State-dependent & State-independent Codeset The differency between the 2 codesets is mapping a character to the correspondent charset id. For state-independent codeset: use mapping table. For state-dependent codeset: compare designation sequence. 2. X Locale struct { ... char * *lc_im_name; char * *lc_im; ... } XLocale; The lc_im will be malloc'ed to store the modifier from XSetLocaleModifers("im=value");