summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:14:35 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:14:35 -0300
commit7a221fc9a30888fc30bd0ef79445829896572d97 (patch)
tree34993c1eeb34970e4c3ffef7f0a41b6e14095d89 /include
parente7dd11f0bef0e31fad7063ac8b2c6df3bb575436 (diff)
downloadmariadb-git-7a221fc9a30888fc30bd0ef79445829896572d97.tar.gz
WL#5498: Remove dead and unused source code
Remove unused source code and associated paraphernalia.
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am4
-rw-r--r--include/my_net.h7
-rw-r--r--include/my_sys.h21
-rw-r--r--include/my_trie.h141
-rw-r--r--include/my_vle.h38
5 files changed, 2 insertions, 209 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index aa6ffa78ee5..e30588de065 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -38,11 +38,11 @@ noinst_HEADERS = lf.h my_bit.h \
myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
- my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
+ my_aes.h my_tree.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
my_handler.h my_time.h service_versions.h \
my_rdtsc.h mysql/psi/psi_abi_v1.h mysql/psi/psi_abi_v2.h \
- my_vle.h my_user.h my_atomic.h atomic/nolock.h \
+ my_user.h my_atomic.h atomic/nolock.h \
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
atomic/solaris.h mysql/innodb_priv.h my_compiler.h
diff --git a/include/my_net.h b/include/my_net.h
index 1b8425984ae..5762f5da06e 100644
--- a/include/my_net.h
+++ b/include/my_net.h
@@ -14,9 +14,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
- thread safe version of some common functions:
- my_inet_ntoa
-
This file is also used to make handling of sockets and ioctl()
portable accross systems.
@@ -76,10 +73,6 @@ C_MODE_START
#define in_addr_t uint32
#endif
-/* Thread safe or portable version of some functions */
-
-void my_inet_ntoa(struct in_addr in, char *buf);
-
/*
Handling of gethostbyname_r()
*/
diff --git a/include/my_sys.h b/include/my_sys.h
index c5702ec7395..369a6b5b82b 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -101,10 +101,6 @@ extern int my_errno; /* Last error in mysys */
#define MY_GIVE_INFO 2 /* Give time info about process*/
#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
-#define MY_REMOVE_NONE 0 /* Params for modify_defaults_file */
-#define MY_REMOVE_OPTION 1
-#define MY_REMOVE_SECTION 2
-
#define ME_HIGHBYTE 8 /* Shift for colours */
#define ME_NOCUR 1 /* Don't use curses message */
#define ME_OLDWIN 2 /* Use old window */
@@ -266,13 +262,6 @@ extern const char *my_defaults_file;
extern my_bool timed_mutexes;
-typedef struct wild_file_pack /* Struct to hold info when selecting files */
-{
- uint wilds; /* How many wildcards */
- uint not_pos; /* Start of not-theese-files */
- char * *wild; /* Pointer to wildcards */
-} WF_PACK;
-
enum loglevel {
ERROR_LEVEL,
WARNING_LEVEL,
@@ -568,7 +557,6 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
/* Prototypes for mysys and my_func functions */
extern int my_copy(const char *from,const char *to,myf MyFlags);
-extern int my_append(const char *from,const char *to,myf MyFlags);
extern int my_delete(const char *name,myf MyFlags);
extern int my_getwd(char * buf,size_t size,myf MyFlags);
extern int my_setwd(const char *dir,myf MyFlags);
@@ -584,7 +572,6 @@ extern File my_register_filename(File fd, const char *FileName,
extern File my_create(const char *FileName,int CreateFlags,
int AccessFlags, myf MyFlags);
extern int my_close(File Filedes,myf MyFlags);
-extern File my_dup(File file, myf MyFlags);
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
extern int my_readlink(char *to, const char *filename, myf MyFlags);
extern int my_is_symlink(const char *filename);
@@ -713,9 +700,6 @@ extern char * my_load_path(char * to, const char *path,
const char *own_path_prefix);
extern int wild_compare(const char *str,const char *wildstr,
pbool str_is_pattern);
-extern WF_PACK *wf_comp(char * str);
-extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
-extern void wf_end(struct wild_file_pack *buffer);
extern my_bool array_append_string_unique(const char *str,
const char **array, size_t size);
extern void get_date(char * to,int timeflag,time_t use_time);
@@ -729,8 +713,6 @@ extern int end_record_cache(RECORD_CACHE *info);
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
const uchar *record,size_t length);
extern int flush_write_cache(RECORD_CACHE *info);
-extern long my_clock(void);
-extern sig_handler sigtstp_handler(int signal_number);
extern void handle_recived_signals(void);
extern sig_handler my_set_alarm_variable(int signo);
@@ -852,9 +834,6 @@ extern int my_load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv, const char ***);
extern int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv);
-extern int modify_defaults_file(const char *file_location, const char *option,
- const char *option_value,
- const char *section_name, int remove_option);
extern int my_search_option_files(const char *conf_file, int *argc,
char ***argv, uint *args_used,
Process_option_func func, void *func_ctx,
diff --git a/include/my_trie.h b/include/my_trie.h
deleted file mode 100644
index 72dd485af04..00000000000
--- a/include/my_trie.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright (C) 2005 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
- the Free Software Foundation; version 2 of the License.
-
- 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 _trie_h
-#define _trie_h
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct st_trie_node
-{
- uint16 leaf; /* Depth from root node if match, 0 else */
- uchar c; /* Label on this edge */
- struct st_trie_node *next; /* Next label */
- struct st_trie_node *links; /* Array of edges leaving this node */
- struct st_trie_node *fail; /* AC failure function */
-} TRIE_NODE;
-
-typedef struct st_trie
-{
- TRIE_NODE root;
- MEM_ROOT mem_root;
- CHARSET_INFO *charset;
- uint32 nnodes;
- uint32 nwords;
-} TRIE;
-
-typedef struct st_ac_trie_state
-{
- TRIE *trie;
- TRIE_NODE *node;
-} AC_TRIE_STATE;
-
-extern TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset);
-extern void trie_free (TRIE *trie);
-extern my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen);
-extern my_bool ac_trie_prepare (TRIE *trie);
-extern void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state);
-
-
-/* `trie_goto' is internal function and shouldn't be used. */
-
-static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, uchar c)
-{
- TRIE_NODE *next;
- DBUG_ENTER("trie_goto");
- for (next= node->links; next; next= next->next)
- if (next->c == c)
- DBUG_RETURN(next);
- if (root == node)
- DBUG_RETURN(root);
- DBUG_RETURN(NULL);
-}
-
-
-/*
- SYNOPSIS
- int ac_trie_next (AC_TRIE_STATE *state, uchar *c);
- state - valid pointer to `AC_TRIE_STATE'
- c - character to lookup
-
- DESCRIPTION
- Implementation of search using Aho-Corasick automaton.
- Performs char-by-char search.
-
- RETURN VALUE
- `ac_trie_next' returns length of matched word or 0.
-*/
-
-static inline int ac_trie_next (AC_TRIE_STATE *state, uchar *c)
-{
- TRIE_NODE *root, *node;
- DBUG_ENTER("ac_trie_next");
- DBUG_ASSERT(state && c);
- root= &state->trie->root;
- node= state->node;
- while (! (state->node= trie_goto(root, node, *c)))
- node= node->fail;
- DBUG_RETURN(state->node->leaf);
-}
-
-
-/*
- SYNOPSIS
- my_bool trie_search (TRIE *trie, const uchar *key, uint keylen);
- trie - valid pointer to `TRIE'
- key - valid pointer to key to insert
- keylen - non-0 key length
-
- DESCRIPTION
- Performs key lookup in trie.
-
- RETURN VALUE
- `trie_search' returns `true' if key is in `trie'. Otherwise,
- `false' is returned.
-
- NOTES
- Consecutive search here is "best by test". arrays are very short, so
- binary search or hashing would add too much complexity that would
- overweight speed gain. Especially because compiler can optimize simple
- consecutive loop better (tested)
-*/
-
-static inline my_bool trie_search (TRIE *trie, const uchar *key, uint keylen)
-{
- TRIE_NODE *node;
- uint k;
- DBUG_ENTER("trie_search");
- DBUG_ASSERT(trie && key && keylen);
- node= &trie->root;
-
- for (k= 0; k < keylen; k++)
- {
- uchar p;
- if (! (node= node->links))
- DBUG_RETURN(FALSE);
- p= key[k];
- while (p != node->c)
- if (! (node= node->next))
- DBUG_RETURN(FALSE);
- }
-
- DBUG_RETURN(node->leaf > 0);
-}
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/include/my_vle.h b/include/my_vle.h
deleted file mode 100644
index c09f82229c4..00000000000
--- a/include/my_vle.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2005 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 the Free Software Foundation; version 2 of the License.
-
- 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 VLE_H
-#define VLE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "my_global.h"
-
-/*
- The size (in bytes) required to store the object ITEM, which can be
- either an expression or a type (since sizeof() is used on the item).
-*/
-#define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7)
-
-uchar *my_vle_encode(uchar *vle, size_t max, ulong value);
-uchar const *my_vle_decode(ulong *value_ptr, uchar const *vle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif