sanskrit-iast/transliteration.h

31 lines
718 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
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);
void transliteration_context_drop(struct transliteration_context *context);
#endif /* __TRANSLITERATION_H */