diff options
author | horchi <vdr@jwendel.de> | 2017-03-05 16:39:28 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-05 16:39:28 +0100 |
commit | e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 (patch) | |
tree | 726f70554b4ca985a09ef6e30a7fdc8df089993c /epglv/src/epglv.h | |
download | vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.gz vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.bz2 |
git init1.1.103
Diffstat (limited to 'epglv/src/epglv.h')
-rw-r--r-- | epglv/src/epglv.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/epglv/src/epglv.h b/epglv/src/epglv.h new file mode 100644 index 0000000..39554b8 --- /dev/null +++ b/epglv/src/epglv.h @@ -0,0 +1,52 @@ +/* + +EPG2VDR Levenshtein Distance UDF for MySQL +Supports UTF-8 throught iconv. + +Copyright (C) 2013 Jörg Wendel + +*/ + +#ifndef __EPGLV_H +#define __EPGLV_H + +#ifdef STANDARD +# include <string.h> +#else +# include <my_global.h> +# include <my_sys.h> +#endif + +#include <mysql.h> +#include <m_ctype.h> +#include <m_string.h> + +#include <locale.h> +#include <stdio.h> +#include <string.h> +#include <wchar.h> +#include <stdlib.h> +#include <stdarg.h> +#include <iconv.h> +#include <errno.h> +#include <stdint.h> +#include <assert.h> + +#define LENGTH_MAX 1000 + +#define debug_print(fmt, ...) \ + do { if (DEBUG_MYSQL) fprintf(stderr, "%s():%d> " fmt "\n", \ + __func__, __LINE__, __VA_ARGS__); fflush(stderr); } while (0) + +#define print(fmt, ...) \ + do { fprintf(stderr, "%s():%d> " fmt "\n", \ + __func__, __LINE__, __VA_ARGS__); fflush(stderr); } while (0) + +#define MIN(a,b) (((a)<(b))?(a):(b)) + +#endif // __EPGLV_H + +my_bool base_epglv_init(UDF_INIT* init, UDF_ARGS* args, char* message); +void base_epglv_deinit(UDF_INIT* init); +long long base_epglv(UDF_INIT* init, UDF_ARGS* args, char* is_null, + char* error, long long* l1, long long* l2); |