summaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
authorunknown <monty@tramp.mysql.fi>2000-10-03 14:18:03 +0300
committerunknown <monty@tramp.mysql.fi>2000-10-03 14:18:03 +0300
commit7a0346e547dadca61940d71d6e866d75d3ef6ded (patch)
treec02cc6a9c6585038615c596332aae70354b44aac /readline
parent1a991bd16a05d3499a792a8cb79d9e8e9bde4541 (diff)
downloadmariadb-git-7a0346e547dadca61940d71d6e866d75d3ef6ded.tar.gz
First part of automatic repair of MyISAM tables.
Error on full disk on repair. SIGHUP signal handling. Update with keys on timestamp Portability fixes Docs/manual.texi: Added documentation about automatic repair of MyISAM tables client/mysql.cc: Remove usage of tempnam. include/my_sys.h: Added create_temp_file include/myisam.h: Fix for disk full on repair myisam/mi_check.c: Fix for disk full on repair myisam/sort.c: Fix for disk full on repair & removed usage of tempnam() mysys/mf_cache.c: Remove usage of tempnam() mysys/mf_dirname.c: Changed convert_dirname to return end 0 mysys/my_fopen.c: Security fixes mysys/my_tempnam.c: remove blanks readline/bind.c: Portability fixes readline/complete.c: Portability fixes readline/histexpand.c: Portability fixes readline/input.c: Portability fixes readline/search.c: Portability fixes readline/shell.c: Portability fixes readline/terminal.c: Portability fixes readline/tilde.c: Portability fixes readline/undo.c: Portability fixes regex/cname.h: Portability fixes regex/debug.c: Portability fixes regex/main.c: Portability fixes regex/regcomp.c: Portability fixes regex/regerror.c: Portability fixes sql/filesort.cc: Remove dummy code sql/ha_myisam.cc: Automatic repair of MyISAM tables sql/ha_myisam.h: Automatic repair of MyISAM tables sql/handler.cc: Automatic repair of MyISAM tables sql/handler.h: Automatic repair of MyISAM tables sql/key.cc: Fix for UPDATE with key on timestamp column sql/mysql_priv.h: Automatic repair of MyISAM tables sql/mysqld.cc: Automatic repair of MyISAM tables & signal SIGHUP handling sql/sql_base.cc: Automatic repair of MyISAM tables sql/sql_class.cc: Automatic repair of MyISAM tables sql/sql_class.h: Fix for insert with reference to columns sql/sql_insert.cc: Fix for insert with reference to columns sql/table.cc: Automatic repair of MyISAM tables BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'readline')
-rw-r--r--readline/bind.c8
-rw-r--r--readline/complete.c4
-rw-r--r--readline/histexpand.c2
-rw-r--r--readline/input.c2
-rw-r--r--readline/search.c2
-rw-r--r--readline/shell.c4
-rw-r--r--readline/terminal.c50
-rw-r--r--readline/tilde.c2
-rw-r--r--readline/undo.c2
9 files changed, 41 insertions, 35 deletions
diff --git a/readline/bind.c b/readline/bind.c
index 3b311a9e920..bbbbd1b15c4 100644
--- a/readline/bind.c
+++ b/readline/bind.c
@@ -351,7 +351,7 @@ rl_translate_keyseq (seq, array, len)
{
register int i, c, l, temp;
- for (i = l = 0; c = seq[i]; i++)
+ for (i = l = 0; (c = seq[i]); i++)
{
if (c == '\\')
{
@@ -1028,7 +1028,7 @@ rl_parse_and_bind (string)
{
int passc = 0;
- for (i = 1; c = string[i]; i++)
+ for (i = 1; (c = string[i]); i++)
{
if (passc)
{
@@ -1104,7 +1104,7 @@ rl_parse_and_bind (string)
{
int delimiter = string[i++], passc;
- for (passc = 0; c = string[i]; i++)
+ for (passc = 0; (c = string[i]); i++)
{
if (passc)
{
@@ -1721,7 +1721,7 @@ rl_function_dumper (print_readably)
fprintf (rl_outstream, "\n");
- for (i = 0; name = names[i]; i++)
+ for (i = 0; (name = names[i]); i++)
{
Function *function;
char **invokers;
diff --git a/readline/complete.c b/readline/complete.c
index dfb1ce0375c..ade317ff578 100644
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -1377,7 +1377,7 @@ completion_matches (text, entry_function)
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while (string = (*entry_function) (text, matches))
+ while ((string = (*entry_function) (text, matches)))
{
if (matches + 1 == match_list_size)
match_list = (char **)xrealloc
@@ -1427,7 +1427,7 @@ username_completion_function (text, state)
setpwent ();
}
- while (entry = getpwent ())
+ while ((entry = getpwent ()))
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
diff --git a/readline/histexpand.c b/readline/histexpand.c
index 392e6d38d9e..30c6131801d 100644
--- a/readline/histexpand.c
+++ b/readline/histexpand.c
@@ -200,7 +200,7 @@ get_history_event (string, caller_index, delimiting_quote)
}
/* Only a closing `?' or a newline delimit a substring search string. */
- for (local_index = i; c = string[i]; i++)
+ for (local_index = i; (c = string[i]); i++)
if ((!substring_okay && (whitespace (c) || c == ':' ||
(history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
string[i] == delimiting_quote)) ||
diff --git a/readline/input.c b/readline/input.c
index 3b48483d262..2813c1b9903 100644
--- a/readline/input.c
+++ b/readline/input.c
@@ -368,7 +368,7 @@ rl_read_key ()
else
{
/* If input is coming from a macro, then use that. */
- if (c = _rl_next_macro_key ())
+ if ((c = _rl_next_macro_key ()))
return (c);
/* If the user has an event function, then call it periodically. */
diff --git a/readline/search.c b/readline/search.c
index 6c76e1a1c96..f198e7409e5 100644
--- a/readline/search.c
+++ b/readline/search.c
@@ -174,7 +174,7 @@ noninc_search (dir, pchar)
#define SEARCH_RETURN rl_restore_prompt (); return
/* Read the search string. */
- while (c = rl_read_key ())
+ while ((c = rl_read_key ()))
{
switch (c)
{
diff --git a/readline/shell.c b/readline/shell.c
index 091ec08f645..4d9e0064d3f 100644
--- a/readline/shell.c
+++ b/readline/shell.c
@@ -38,6 +38,10 @@
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
+#if defined (HAVE_STDIO_H)
+# include <stdio.h>
+#endif /* HAVE_STDIO_H */
+
#if defined (HAVE_STRING_H)
# include <string.h>
#else
diff --git a/readline/terminal.c b/readline/terminal.c
index c22ec5170bd..6e94bdc4011 100644
--- a/readline/terminal.c
+++ b/readline/terminal.c
@@ -232,6 +232,8 @@ _rl_set_screen_size (rows, cols)
screenchars = screenwidth * screenheight;
}
+extern void _rl_redisplay_after_sigwinch();
+
void
rl_resize_terminal ()
{
@@ -251,32 +253,32 @@ struct _tc_string {
search algorithm to something smarter. */
static struct _tc_string tc_strings[] =
{
- "DC", &term_DC,
- "IC", &term_IC,
- "ce", &term_clreol,
- "cl", &term_clrpag,
- "cr", &term_cr,
- "dc", &term_dc,
- "ei", &term_ei,
- "ic", &term_ic,
- "im", &term_im,
- "kd", &term_kd,
- "kh", &term_kh, /* home */
- "kH", &term_kH, /* end */
- "kl", &term_kl,
- "kr", &term_kr,
- "ku", &term_ku,
- "ks", &term_ks,
- "ke", &term_ke,
- "le", &term_backspace,
- "mm", &term_mm,
- "mo", &term_mo,
+ {"DC", &term_DC},
+ {"IC", &term_IC},
+ {"ce", &term_clreol},
+ {"cl", &term_clrpag},
+ {"cr", &term_cr},
+ {"dc", &term_dc},
+ {"ei", &term_ei},
+ {"ic", &term_ic},
+ {"im", &term_im},
+ {"kd", &term_kd},
+ {"kh", &term_kh}, /* home */
+ {"kH", &term_kH}, /* end */
+ {"kl", &term_kl},
+ {"kr", &term_kr},
+ {"ku", &term_ku},
+ {"ks", &term_ks},
+ {"ke", &term_ke},
+ {"le", &term_backspace},
+ {"mm", &term_mm},
+ {"mo", &term_mo},
#if defined (HACK_TERMCAP_MOTION)
- "nd", &term_forward_char,
+ {"nd", &term_forward_char},
#endif
- "pc", &term_pc,
- "up", &term_up,
- "vb", &visible_bell,
+ {"pc", &term_pc},
+ {"up", &term_up},
+ {"vb", &visible_bell},
};
#define NUM_TC_STRINGS (sizeof (tc_strings) / sizeof (struct _tc_string))
diff --git a/readline/tilde.c b/readline/tilde.c
index d1853bd63d6..65a1e2f3902 100644
--- a/readline/tilde.c
+++ b/readline/tilde.c
@@ -182,7 +182,7 @@ tilde_expand (string)
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+ if ((result = strchr (string, '~')))
result = xmalloc (result_size = (strlen (string) + 16));
else
result = xmalloc (result_size = (strlen (string) + 1));
diff --git a/readline/undo.c b/readline/undo.c
index 28ebcc85b93..68710b667ed 100644
--- a/readline/undo.c
+++ b/readline/undo.c
@@ -106,7 +106,7 @@ rl_do_undo ()
{
UNDO_LIST *release;
int waiting_for_begin = 0;
- int start, end;
+ int start = 0, end = 0;
#define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i)))