* ext/readline/extconf.rb: check rl_vi_editing_mode() and

rl_emacs_editing_mode().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2005-05-19 16:26:50 +00:00
Родитель 3fd16970f3
Коммит 327e957c73
3 изменённых файлов: 34 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri May 20 01:24:33 2005 Shugo Maeda <shugo@ruby-lang.org>
* ext/readline/extconf.rb: check rl_vi_editing_mode() and
rl_emacs_editing_mode().
Thu May 19 23:33:09 2005 Shugo Maeda <shugo@ruby-lang.org>
* ext/readline/readline.c: supported libedit. fixed: [ruby-core:4858]

Просмотреть файл

@ -55,6 +55,9 @@ have_readline_var("rl_library_version")
have_readline_var("rl_event_hook")
have_func("rl_cleanup_after_signal")
have_func("rl_clear_signals")
have_func("rl_vi_editing_mode")
have_func("rl_emacs_editing_mode")
have_func("rl_clear_signals")
have_func("replace_history_entry")
have_func("remove_history")
create_makefile("readline")

Просмотреть файл

@ -205,18 +205,28 @@ static VALUE
readline_s_vi_editing_mode(self)
VALUE self;
{
#ifdef HAVE_RL_VI_EDITING_MODE
rb_secure(4);
rl_vi_editing_mode(1,0);
return Qnil;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_VI_EDITING_MODE */
}
static VALUE
readline_s_emacs_editing_mode(self)
VALUE self;
{
#ifdef HAVE_RL_EMACS_EDITING_MODE
rb_secure(4);
rl_emacs_editing_mode(1,0);
return Qnil;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_EMACS_EDITING_MODE */
}
static VALUE
@ -236,10 +246,10 @@ readline_s_set_completion_append_character(self, str)
rl_completion_append_character = RSTRING(str)->ptr[0];
}
}
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */
}
@ -256,10 +266,10 @@ readline_s_get_completion_append_character(self)
str = rb_str_new("", 1);
RSTRING(str)->ptr[0] = rl_completion_append_character;
return str;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */
}
@ -283,10 +293,10 @@ readline_s_set_basic_word_break_characters(self, str)
RSTRING(str)->ptr, RSTRING(str)->len);
basic_word_break_characters[RSTRING(str)->len] = '\0';
rl_basic_word_break_characters = basic_word_break_characters;
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */
}
@ -301,6 +311,7 @@ readline_s_get_basic_word_break_characters(self, str)
return rb_tainted_str_new2(rl_basic_word_break_characters);
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */
}
@ -324,10 +335,10 @@ readline_s_set_completer_word_break_characters(self, str)
RSTRING(str)->ptr, RSTRING(str)->len);
completer_word_break_characters[RSTRING(str)->len] = '\0';
rl_completer_word_break_characters = completer_word_break_characters;
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */
}
@ -342,6 +353,7 @@ readline_s_get_completer_word_break_characters(self, str)
return rb_tainted_str_new2(rl_completer_word_break_characters);
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */
}
@ -369,6 +381,7 @@ readline_s_set_basic_quote_characters(self, str)
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */
}
@ -383,6 +396,7 @@ readline_s_get_basic_quote_characters(self, str)
return rb_tainted_str_new2(rl_basic_quote_characters);
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */
}
@ -410,6 +424,7 @@ readline_s_set_completer_quote_characters(self, str)
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */
}
@ -424,6 +439,7 @@ readline_s_get_completer_quote_characters(self, str)
return rb_tainted_str_new2(rl_completer_quote_characters);
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */
}
@ -451,6 +467,7 @@ readline_s_set_filename_quote_characters(self, str)
return self;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */
}
@ -465,6 +482,7 @@ readline_s_get_filename_quote_characters(self, str)
return rb_tainted_str_new2(rl_filename_quote_characters);
#else
rb_notimplement();
return Qnil; /* not reached */
#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */
}
@ -515,10 +533,11 @@ hist_set(self, index, str)
if (entry == NULL) {
rb_raise(rb_eIndexError, "invalid index");
}
return str;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif
return str;
}
static VALUE
@ -565,10 +584,11 @@ rb_remove_history(index)
free(entry);
return val;
}
return Qnil;
#else
rb_notimplement();
return Qnil; /* not reached */
#endif
return Qnil;
}
static VALUE