summaryrefslogtreecommitdiff
path: root/vkext_flex.h
diff options
context:
space:
mode:
authorDmitry Kondratyev <kondratyevdev@gmail.com>2016-08-25 18:49:23 +0300
committerDmitry Kondratyev <kondratyevdev@gmail.com>2016-08-25 18:49:23 +0300
commitffdbf53fd437d3a53754f14598c3233230495e04 (patch)
treee4d54851b8400f2ddde91943e050525d533e587c /vkext_flex.h
first commit
Diffstat (limited to 'vkext_flex.h')
-rw-r--r--vkext_flex.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/vkext_flex.h b/vkext_flex.h
new file mode 100644
index 0000000..48de3c2
--- /dev/null
+++ b/vkext_flex.h
@@ -0,0 +1,66 @@
+/*
+ This file is part of VK/KittenPHP-DB-Engine.
+
+ VK/KittenPHP-DB-Engine is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ VK/KittenPHP-DB-Engine is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with VK/KittenPHP-DB-Engine. If not, see <http://www.gnu.org/licenses/>.
+
+ This program is released under the GPL with the additional exemption
+ that compiling, linking, and/or using OpenSSL is allowed.
+ You are free to remove this exemption from derived works.
+
+ Copyright 2011-2013 Vkontakte Ltd
+ 2011-2013 Vitaliy Valtman
+*/
+
+#ifndef __VKEXT_FLEX_H__
+#define __VKEXT_FLEX_H__
+
+#define CASE_NUMBER 8
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+
+struct vk_node {
+ short tail_len;
+ short hyphen;
+ int male_endings;
+ int female_endings;
+ int children_start;
+ int children_end;
+};
+
+struct lang {
+ const char *flexible_symbols;
+ int names_start;
+ int surnames_start;
+ int cases_num;
+ const int *children;
+ const char **endings;
+ struct vk_node nodes[];
+};
+
+char *do_flex (const char *name, int name_len, const char *case_name, int case_name_len, int sex, const char *type, int type_len, int lang_id);
+
+#if defined __cplusplus
+};
+#endif
+
+
+#endif
+
+
+