Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rkmaproma(3) [debian man page]

RKMAPROMA(3)						     Library Functions Manual						      RKMAPROMA(3)

NAME
RkMapRoma - perform Romaji-kana conversion by using a specified Romaji-kana conversion table SYNOPSIS
#include <canna/RK.h> int RkMapRoma(romaji, dst, maxdst, src, srclen, flags, status) struct RkRxDic *romaji; unsigned char *dst; int maxdst; unsigned char *src; int srclen; int flags; int *status; DESCRIPTION
RkMapRoma performs Romaji-kana conversion by using a specified Romaji-kana conversion table. romaji specifies a pointer to the Romaji-kana conversion table that has been returned by RkOpenRoma(3). RkMapRoma interprets the srclen bytes of contiguous data starting at the area src as a Romaji character string and searches through the Romaji-kana conversion table for the rule of Romaji-kana conversion that matches the beginning of the Romaji character string. If the corresponding conversion rule is found, the corresponding kana character string is stored in the area dst. The resulting character string is truncated when its byte length exceeds maxdst -1. dst is padded with null char- acters at the end if possible. flags is a combination of the following Romaji-kana conversion flags connected by or: RK_SOKUON Enables gemination, in which a sequence of two occurrences of the same character, xx, is converted to small kana character "tsu" only if it is not defined in the Romaji-kana conversion table file. RK_FLUSH Converts all Romaji characters compulsorily. Useful for handling n appearing at the end of a character string. The flags listed below specify the type of characters stored in src. These specified code conversion to be performed on the character string derived from the Romaji-kana conversion table. These flags can use one by one. RK_NFER No conversion RK_XFER Hiragana RK_HFER Single-byte character RK_KFER Katakana RK_ZFER Double-byte character status is set to the byte length of the character string set in the area dst. A negative value means that there is no matching Romaji character string. RETURN VALUE
This function returns the starting byte length of the Romaji character string matched by Romaji-kana conversion. RKMAPROMA(3)

Check Out this Related Man Page

wcsrtombs(3C)															     wcsrtombs(3C)

NAME
wcsrtombs() - convert a wide-character string to a character string (restartable) SYNOPSIS
DESCRIPTION
The function converts a sequence of wide-characters from the array indirectly pointed to by src into a sequence of corresponding charac- ters, beginning in the conversion state described by the object pointed to by ps. If dst is not a null pointer, the converted characters are then stored into the array pointed to by dst. Conversion continues up to and including a terminating null wide-character, which is also stored. Conversion stops earlier in the following cases: o When a code is reached that does not correspond to a valid character. o When the next character would exceed the limit of len total bytes to be stored in the array pointed to by dst (and dst is not a null pointer). Each conversion takes place as if by a call to the function. If dst is not a null pointer, the pointer object pointed to by src is assigned either a null pointer (if conversion stopped due to reaching a terminating null wide-character) or the address just past the last wide-character converted (if any). If conversion stopped due to reaching a terminating null wide-character, the resulting state described is the initial conversion state. If ps is a null pointer, the function uses its own internal object, which is initialized at program startup to the initial conversion state. Otherwise, the object pointed to by ps is used to completely describe the current conversion state of the associated character sequence. The implementation will behave as if no function defined in this specification calls APPLICATION USAGE
The prototype of this function is available to applications if they are: a. conformant. b. Compiled with macro with a value >=500. c. Compiled with macro with a value >= 200112. EXTERNAL INFLUENCES
Environment Variables The behavior of this function is affected by the category of the current locale. RETURN VALUE
If conversion stops because a code is reached that does not correspond to a valid character, an encoding error occurs. In this case, the function stores the value of the macro in and returns (size_t)-1; the conversion state is undefined. Otherwise, it returns the number of bytes in the resulting character sequence, not including the terminating null (if any). ERRORS
The function may fail if: A wide-character code does not correspond to a valid character. ps points to an object that contains an invalid conversion state. AUTHOR
was developed by HP and Mitsubishi Electric Corporation. SEE ALSO
mbsinit(3C), wcrtomb(3C). wcsrtombs(3C)
Man Page