2003-01-18 02:36:24 +01:00
|
|
|
/* Copyright (C) 2000 MySQL AB
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2006-12-23 20:17:15 +01:00
|
|
|
the Free Software Foundation; version 2 of the License.
|
2003-01-18 02:36:24 +01:00
|
|
|
|
|
|
|
This program 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 this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _typelib_h
|
|
|
|
#define _typelib_h
|
|
|
|
|
2006-12-14 18:58:07 +01:00
|
|
|
#include "my_alloc.h"
|
|
|
|
|
2003-01-18 02:36:24 +01:00
|
|
|
typedef struct st_typelib { /* Different types saved here */
|
2003-01-18 23:04:34 +01:00
|
|
|
unsigned int count; /* How many types */
|
2003-01-18 02:36:24 +01:00
|
|
|
const char *name; /* Name of typelib */
|
|
|
|
const char **type_names;
|
2004-10-25 14:51:26 +02:00
|
|
|
unsigned int *type_lengths;
|
2003-01-18 02:36:24 +01:00
|
|
|
} TYPELIB;
|
|
|
|
|
2007-03-02 17:43:45 +01:00
|
|
|
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
|
2007-03-19 10:19:51 +01:00
|
|
|
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
|
|
|
|
const char *option);
|
2007-04-04 20:25:39 +02:00
|
|
|
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
|
2003-01-18 23:04:34 +01:00
|
|
|
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
|
|
|
|
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
|
2006-12-14 18:58:07 +01:00
|
|
|
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
|
2003-01-18 02:36:24 +01:00
|
|
|
|
|
|
|
extern TYPELIB sql_protocol_typelib;
|
2002-11-14 20:16:30 +01:00
|
|
|
|
2009-12-22 10:35:56 +01:00
|
|
|
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
|
|
|
|
my_ulonglong cur_set, my_ulonglong default_set,
|
|
|
|
const char *str, uint length,
|
|
|
|
char **err_pos, uint *err_len);
|
|
|
|
|
2002-11-14 20:16:30 +01:00
|
|
|
#endif /* _typelib_h */
|