2018-04-25 19:30:49 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
2018-04-25 16:13:34 +02:00
|
|
|
#ifndef __TRANSLITERATION_H
|
|
|
|
#define __TRANSLITERATION_H
|
|
|
|
|
2018-04-25 18:54:47 +02:00
|
|
|
#include "syllable.h"
|
|
|
|
|
2018-04-25 18:11:56 +02:00
|
|
|
struct transliteration_letter {
|
|
|
|
unsigned long code;
|
|
|
|
const char *data;
|
|
|
|
};
|
|
|
|
|
2018-04-25 18:54:47 +02:00
|
|
|
typedef void (*syllable_modification_t)(struct syllable *syllable);
|
|
|
|
|
|
|
|
struct transliteration_modifier {
|
|
|
|
unsigned long code;
|
|
|
|
syllable_modification_t modifier;
|
|
|
|
};
|
|
|
|
|
2018-04-25 18:11:56 +02:00
|
|
|
struct transliteration_context {
|
|
|
|
const struct transliteration_letter *table_letters;
|
2018-04-25 18:54:47 +02:00
|
|
|
const struct transliteration_modifier *table_modifiers;
|
2018-04-25 18:11:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
char *transliterate_devanagari_to_latin(const char *text,
|
|
|
|
struct transliteration_context *context);
|
2018-04-25 16:13:34 +02:00
|
|
|
|
2018-04-27 11:59:32 +02:00
|
|
|
void transliteration_context_drop(struct transliteration_context *context);
|
|
|
|
|
2018-04-25 16:13:34 +02:00
|
|
|
#endif /* __TRANSLITERATION_H */
|