blob: f86d6d2c5b2c7ec15fdf8fb85750b06259faa468 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/***
*mbtokata.c - Converts character to katakana.
*
* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Converts a character from hiragana to katakana.
*
*Revision History:
* 11-19-92 KRS Ported from 16-bit sources.
* 08-20-93 CFW Change short params to int for 32-bit tree.
*
*******************************************************************************/
#ifdef _MBCS
#ifdef _KANJI
#include <cruntime.h>
#include <mbdata.h>
#include <mbstring.h>
/***
*unsigned short _mbctokata(c) - Converts character to katakana.
*
*Purpose:
* If the character c is hiragana, convert to katakana.
*
*Entry:
* unsigned int c - Character to convert.
*
*Exit:
* Returns converted character.
*
*Exceptions:
*
*******************************************************************************/
unsigned int _CRTAPI1 _mbctokata(
unsigned int c
)
{
if (_ismbchira(c)) {
c += 0xa1;
if (c >= 0x837f)
c++;
}
return(c);
}
#endif /* _KANJI */
#endif /* _MBCS */
|