| 1 |
/* |
| 2 |
* Gregorio is a program that translates gabc files to GregorioTeX |
| 3 |
* This header prototypes the vowel handling data structures and entry points. |
| 4 |
* |
| 5 |
* Copyright (C) 2015-2025 The Gregorio Project (see CONTRIBUTORS.md) |
| 6 |
* |
| 7 |
* This file is part of Gregorio. |
| 8 |
* |
| 9 |
* This program is free software: you can redistribute it and/or modify it |
| 10 |
* under the terms of the GNU General Public License as published by the Free |
| 11 |
* Software Foundation, either version 3 of the License, or (at your option) |
| 12 |
* any later version. |
| 13 |
* |
| 14 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 16 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 17 |
* more details. |
| 18 |
* |
| 19 |
* You should have received a copy of the GNU General Public License along with |
| 20 |
* this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef _VOWEL_H |
| 24 |
#define _VOWEL_H |
| 25 |
|
| 26 |
#include <stdio.h> |
| 27 |
#include "bool.h" |
| 28 |
#include "unicode.h" |
| 29 |
|
| 30 |
/* Use unicode 0xfffe, which is guaranteed not to be a character */ |
| 31 |
#define GREVOWEL_ELISION_MARK ((grewchar)0xfffe) |
| 32 |
|
| 33 |
typedef enum rulefile_parse_status { |
| 34 |
RFPS_NOT_FOUND = 0, |
| 35 |
RFPS_FOUND, |
| 36 |
RFPS_ALIASED |
| 37 |
} rulefile_parse_status; |
| 38 |
|
| 39 |
int gregorio_vowel_rulefile_parse(const char *filename, char **language, |
| 40 |
rulefile_parse_status *status); |
| 41 |
int gregorio_vowel_rulefile_lex_destroy(void); |
| 42 |
void gregorio_vowel_tables_init(void); |
| 43 |
void gregorio_vowel_tables_load(const char *filename, char **language, |
| 44 |
rulefile_parse_status *status); |
| 45 |
void gregorio_vowel_tables_free(void); |
| 46 |
void gregorio_vowel_table_add(const char *vowels); |
| 47 |
void gregorio_prefix_table_add(const char *prefix); |
| 48 |
void gregorio_suffix_table_add(const char *suffix); |
| 49 |
void gregorio_secondary_table_add(const char *secondary); |
| 50 |
bool gregorio_find_vowel_group(const grewchar *subject, int *start, int *end); |
| 51 |
|
| 52 |
#endif |