mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 22:38:33 +00:00
Create a C-based API in addition to the C++-based API in <ucd/ucd.h>.
This commit is contained in:
+16
-1
@@ -1,6 +1,6 @@
|
||||
/* Enumeration types to string.
|
||||
*
|
||||
* Copyright (C) 2012-2014 Reece H. Dunn
|
||||
* Copyright (C) 2012-2016 Reece H. Dunn
|
||||
*
|
||||
* This file is part of ucd-tools.
|
||||
*
|
||||
@@ -20,6 +20,11 @@
|
||||
|
||||
#include "ucd/ucd.h"
|
||||
|
||||
const char *ucd_get_category_group_string(ucd_category_group c)
|
||||
{
|
||||
return ucd::get_category_group_string((ucd::category_group)c);
|
||||
}
|
||||
|
||||
const char *ucd::get_category_group_string(category_group c)
|
||||
{
|
||||
switch (c)
|
||||
@@ -36,6 +41,11 @@ const char *ucd::get_category_group_string(category_group c)
|
||||
}
|
||||
}
|
||||
|
||||
const char *ucd_get_category_string(ucd_category c)
|
||||
{
|
||||
return ucd::get_category_string((ucd::category)c);
|
||||
}
|
||||
|
||||
const char *ucd::get_category_string(category c)
|
||||
{
|
||||
switch (c)
|
||||
@@ -75,6 +85,11 @@ const char *ucd::get_category_string(category c)
|
||||
}
|
||||
}
|
||||
|
||||
const char *ucd_get_script_string(ucd_script s)
|
||||
{
|
||||
return ucd::get_script_string((ucd::script)s);
|
||||
}
|
||||
|
||||
const char *ucd::get_script_string(script s)
|
||||
{
|
||||
static const char *scripts[] =
|
||||
|
||||
Reference in New Issue
Block a user