sanskrit-iast/transliteration.h

33 lines
541 B
C
Raw Normal View History

2018-04-25 19:30:49 +02:00
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __TRANSLITERATION_H
#define __TRANSLITERATION_H
enum translit_letter_type {
VOWEL,
CONSONANT,
CODA,
SPECIAL,
NUMBER,
VOWEL_SIGN
};
2018-04-25 18:54:47 +02:00
struct translit_letter {
unsigned int code;
enum translit_letter_type type;
2018-04-27 18:58:07 +02:00
const char *data;
2018-04-25 18:54:47 +02:00
};
struct translit_context {
struct translit_letter *table;
2018-04-25 18:11:56 +02:00
};
char *transliterate_devanagari_to_latin(const char *text);
static inline int is_devanagari(unsigned int code)
{
return code >= 0x0900 && code <= 0x097f;
}
#endif /* __TRANSLITERATION_H */