Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenjistojms.c
Go to the documentation of this file.
00001 /* 00002 * MSVCRT string functions 00003 * 00004 * Copyright 1996,1998 Marcus Meissner 00005 * Copyright 1996 Jukka Iivonen 00006 * Copyright 1997,2000 Uwe Bonnes 00007 * Copyright 2000 Jon Griffiths 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00022 */ 00023 00024 00025 #include <precomp.h> 00026 #include <mbstring.h> 00027 #include <locale.h> 00028 00029 /* 00030 * @implemented 00031 */ 00032 unsigned int _mbcjistojms(unsigned int c) 00033 { 00034 /* Conversion takes place only when codepage is 932. 00035 In all other cases, c is returned unchanged */ 00036 if(MSVCRT___lc_codepage == 932) 00037 { 00038 if(HIBYTE(c) >= 0x21 && HIBYTE(c) <= 0x7e && 00039 LOBYTE(c) >= 0x21 && LOBYTE(c) <= 0x7e) 00040 { 00041 if(HIBYTE(c) % 2) 00042 c += 0x1f; 00043 else 00044 c += 0x7d; 00045 00046 if(LOBYTE(c) > 0x7F) 00047 c += 0x1; 00048 00049 c = (((HIBYTE(c) - 0x21)/2 + 0x81) << 8) | LOBYTE(c); 00050 00051 if(HIBYTE(c) > 0x9f) 00052 c += 0x4000; 00053 } 00054 else 00055 return 0; /* Codepage is 932, but c can't be converted */ 00056 } 00057 00058 return c; 00059 } 00060 Generated on Sat May 26 2012 04:35:27 for ReactOS by
1.7.6.1
|