typelib.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright (C) 2000 MySQL AB
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. #ifndef _typelib_h
  13. #define _typelib_h
  14. #include "my_alloc.h"
  15. typedef struct st_typelib { /* Different types saved here */
  16. unsigned int count; /* How many types */
  17. const char *name; /* Name of typelib */
  18. const char **type_names;
  19. unsigned int *type_lengths;
  20. } TYPELIB;
  21. extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
  22. extern int find_type_or_exit(const char *x, TYPELIB *typelib,
  23. const char *option);
  24. extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
  25. extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
  26. extern const char *get_type(TYPELIB *typelib,unsigned int nr);
  27. extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
  28. extern TYPELIB sql_protocol_typelib;
  29. #endif /* _typelib_h */