add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / net / samba / patches / 102-cp1251.patch
1 diff -ruN samba-2.0.10/source/lib/charcnv.c samba-2.2.10/source/lib/charcnv.c
2 --- samba-2.0.10/source/lib/charcnv.c   2000-03-16 17:59:14.000000000 -0500
3 +++ samba-2.2.10/source/lib/charcnv.c   2004-07-21 11:04:42.000000000 -0400
4 @@ -191,6 +191,39 @@
5  update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232");
6  }
7  
8 +/* Init for Bulgarian, Belarussian, and variants of Russian and Ukrainian locales */
9 +/* Patch from Alexander Bokovoy. */
10 +
11 +static void init_1251(int codepage)
12 +{
13 +       setupmaps();
14 +
15 +       if (codepage == 866) {
16 +/* MSDOS Code Page 866 -> 1251 */
17 +update_map ("\240\377\241\366\242\367\244\375");
18 +update_map ("\250\360\252\362\257\364");
19 +update_map ("\260\370\267\372");
20 +update_map ("\270\361\271\374\272\363\277\365");
21 +update_map ("\300\200\301\201\302\202\303\203\304\204\305\205\306\206\307\207");
22 +update_map ("\310\210\311\211\312\212\313\213\314\214\315\215\316\216\317\217");
23 +update_map ("\320\220\321\221\322\222\323\223\324\224\325\225\326\226\327\227");
24 +update_map ("\330\230\331\231\332\232\333\233\334\234\335\235\336\236\337\237");
25 +update_map ("\340\240\341\241\342\242\343\243\344\244\345\245\346\246\347\247");
26 +update_map ("\350\250\351\251\352\252\353\253\354\254\355\255\356\256\357\257");
27 +update_map ("\360\340\361\341\362\342\363\343\364\344\365\345\366\346\367\347");
28 +update_map ("\370\350\371\351\372\352\373\353\374\354\375\355\376\356\377\357");
29 +       } else {
30 +/* MSDOS Code Page 1125 (Ukranian) -> 1251 */
31 +update_map ("\271\374\270\361\360\340\361\341\340\240\362\342\341\241\320\220");
32 +update_map ("\272\365\363\343\342\242\321\221\300\200\364\344\343\243\322\222");
33 +update_map ("\301\201\263\367\250\360\365\345\344\244\323\223\302\202\277\371");
34 +update_map ("\366\346\345\245\324\224\303\203\367\347\346\246\325\225\304\204");
35 +update_map ("\252\364\370\350\347\247\326\226\305\205\371\351\350\250\327\227");
36 +update_map ("\306\206\262\366\351\251\330\230\307\207\257\370\331\231\310\210");
37 +update_map ("\311\211\245\362\264\363");
38 +       }
39 +}
40 +
41  
42  /* Init for ROMAN-8 (HP-UX) */
43  
44 @@ -275,6 +308,10 @@
45          init_iso8859_7();
46      } else if (strequal (str, "koi8-r")) {
47          init_koi8_r();
48 +    } else if (strequal (str, "1251u")) {
49 +        init_1251(1125);
50 +    } else if (strequal (str, "1251")) {
51 +        init_1251(866);
52      } else if (strequal (str, "roman8")) {
53          init_roman8();
54      } else {