"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/plugin/extra_charsets/cp1251.c" (23 Jun 2003, 1758 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


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 "cp1251.c" see the Fossies "Dox" file reference documentation.

    1 #include "translate.h"
    2 
    3 static const t_unicode cp1251_c1_chars[] = {
    4 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, /* 0x80-0x87 */
    5 0xFFFF, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, /* 0x88-0x8F */
    6 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, /* 0x90-0x97 */
    7 0xFFFF, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, /* 0x98-0x9F */
    8 };
    9 
   10 struct char_set cp1251_c1 = {
   11     1,
   12     CHARS(cp1251_c1_chars),
   13     0, "", 0, 32,
   14 };
   15 
   16 static const t_unicode cp1251_g1_chars[] = {
   17 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, /* 0xA0-0xA7 */
   18 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, /* 0xA8-0xAF */
   19 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, /* 0xB0-0xB7 */
   20 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, /* 0xB8-0xBF */
   21 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0xC0-0xC7 */
   22 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, /* 0xC8-0xCF */
   23 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0xD0-0xD7 */
   24 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, /* 0xD8-0xDF */
   25 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xE0-0xE7 */
   26 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, /* 0xE8-0xEF */
   27 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xF0-0xF7 */
   28 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, /* 0xF8-0xFF */
   29 };
   30 
   31 struct char_set cp1251_g1 = {
   32     1,
   33     CHARS(cp1251_g1_chars),
   34     0, "", 1, 96,
   35 };
   36 
   37 struct char_set cp1251 = {
   38     .c0 = &ascii_c0,
   39     .g0 = &ascii_g0,
   40     .c1 = &cp1251_c1,
   41     .g1 = &cp1251_g1,
   42     .names = { "cp1251", 0 },
   43 };
   44 
   45 CONSTRUCTOR(static void init(void))
   46 {
   47     register_charset(&cp1251);
   48 }