Update of /cvsroot/winbash/winbash/lib/readline
In directory usw-pr-cvs1:/tmp/cvs-serv6262/lib/readline
Modified Files:
Makefile complete.c display.c emacs_keymap.c readline.c
vi_mode.c
Log Message:
Major realignment to 1.14.7
Index: Makefile
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Makefile 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ Makefile 11 Mar 2002 14:32:16 -0000 1.2
@@ -98,10 +98,6 @@
cd $(incdir)/readline && ${RM} -f ${INSTALLED_HEADERS}
cd $(libdir) && ${RM} -f libreadline.a libreadline.old
-clean:
- rm -f $(OBJECTS) *.a
- (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS) $@; fi)
-
tags: force
etags $(CSOURCES) $(HSOURCES)
@@ -114,7 +110,12 @@
$(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
keymaps.o -ltermcap
-realclean distclean mostlyclean: clean
+clean:
+ $(RM) -f $(OBJECTS) libreadline.a libhistory.a
+ (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS) $@; fi)
+
+maintainer-clean realclean distclean mostlyclean: clean
+ (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS) $@; fi)
# Dependencies
readline.o: readline.c readline.h rldefs.h rlconf.h chardefs.h
Index: complete.c
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/complete.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- complete.c 11 Mar 2002 04:50:29 -0000 1.4
+++ complete.c 11 Mar 2002 14:32:16 -0000 1.5
@@ -596,12 +596,12 @@
/* Sort the items. */
/* It is safe to sort this array, because the lowest common
denominator found in matches[0] will remain in place. */
- for (i = 0; matches[i]; i++)
- ;
- /* Try sorting the array without matches[0], since we need it to
- stay in place no matter what. */
- if (i)
- qsort (matches+1, i-1, sizeof (char *), compare_strings);
+ for (i = 0; matches[i]; i++)
+ ;
+ /* Try sorting the array without matches[0], since we need it to
+ stay in place no matter what. */
+ if (i)
+ qsort (matches+1, i-1, sizeof (char *), compare_strings);
/* Remember the lowest common denominator for it may be unique. */
lowest_common = savestring (matches[0]);
Index: display.c
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/display.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- display.c 11 Mar 2002 01:47:05 -0000 1.3
+++ display.c 11 Mar 2002 14:32:16 -0000 1.4
@@ -698,7 +698,7 @@
putc (' ', rl_outstream);
_rl_last_c_pos = 1; /* XXX */
_rl_last_v_pos++;
- if (old[0])
+ if (old[0] && new[0])
old[0] = new[0];
}
Index: emacs_keymap.c
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/emacs_keymap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- emacs_keymap.c 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ emacs_keymap.c 11 Mar 2002 14:32:16 -0000 1.2
@@ -430,7 +430,7 @@
{ ISFUNC, rl_do_lowercase_version }, /* Meta-Z */
/* Some more punctuation. */
- { ISFUNC, rl_arrow_keys }, /* Meta-[ */ /* was rl_arrow_keys */
+ { ISFUNC, (Function *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */
{ ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */
{ ISFUNC, (Function *)0x0 }, /* Meta-] */
{ ISFUNC, (Function *)0x0 }, /* Meta-^ */
@@ -452,7 +452,7 @@
{ ISFUNC, rl_downcase_word }, /* Meta-l */
{ ISFUNC, (Function *)0x0 }, /* Meta-m */
{ ISFUNC, rl_noninc_forward_search }, /* Meta-n */
- { ISFUNC, rl_arrow_keys }, /* Meta-o */ /* was rl_arrow_keys */
+ { ISFUNC, (Function *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */
{ ISFUNC, rl_noninc_reverse_search }, /* Meta-p */
{ ISFUNC, (Function *)0x0 }, /* Meta-q */
{ ISFUNC, rl_revert_line }, /* Meta-r */
Index: readline.c
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/readline.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- readline.c 11 Mar 2002 01:47:05 -0000 1.3
+++ readline.c 11 Mar 2002 14:32:16 -0000 1.4
@@ -285,7 +285,7 @@
return ((char *)NULL);
}
- rl_visible_prompt_length = (rl_prompt && *rl_prompt) ? rl_expand_prompt (rl_prompt) : 0;
+ rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
rl_initialize ();
rl_prep_terminal (_rl_meta_flag);
@@ -629,8 +629,8 @@
{
if (map[ESC].type == ISKMAP)
{
- if (defining_kbd_macro)
- add_macro_char (ESC);
+ if (defining_kbd_macro)
+ add_macro_char (ESC);
map = FUNCTION_TO_KEYMAP (map, ESC);
key = UNMETA (key);
rl_key_sequence_length += 2;
@@ -643,7 +643,7 @@
if (defining_kbd_macro)
add_macro_char (key);
-
+
switch (map[key].type)
{
case ISFUNC:
@@ -1001,7 +1001,7 @@
_rl_convert_meta_chars_to_ascii = 0;
_rl_output_meta_chars = 1;
}
-
+
/* Read in the init file. */
rl_read_init_file ((char *)NULL);
@@ -1016,16 +1016,6 @@
inputrc file. */
rl_set_keymap_from_edit_mode ();
- /* Check for LC_CTYPE and use its value to decide the defaults for
- 8-bit character input and output. */
- t = getenv ("LC_CTYPE");
- if (t && (strcmp (t, "iso-8859-1") == 0 || strcmp (t, "iso_8859_1") == 0))
- {
- _rl_meta_flag = 1;
- _rl_convert_meta_chars_to_ascii = 0;
- _rl_output_meta_chars = 1;
- }
-
/* Try to bind a common arrow key prefix, if not already bound. */
bind_arrow_keys ();
@@ -1630,9 +1620,9 @@
#endif
/* FALLTHROUGH */
case AUDIBLE_BELL:
- PlaySound("SystemBeep", NULL, SND_ASYNC);
- /*fprintf (stderr, "\007");
- fflush (stderr);*/
+ PlaySound("SystemBeep", NULL, SND_ASYNC);
+ //fprintf (stderr, "\007");
+ //fflush (stderr);
break;
}
#else /* __GO32__ */
@@ -1756,10 +1746,10 @@
from = to;
to = t;
}
-
+
if (to > rl_end)
to = rl_end;
-
+
text = rl_copy_text (from, to);
/* Some versions of strncpy() can't handle overlapping arguments. */
@@ -2314,19 +2304,18 @@
{
int orig_point = rl_point;
if (count <= 0)
- count = 1;
-
+ count = 1;
+
while (count--)
- {
- while (rl_point && whitespace (the_line[rl_point - 1]))
- rl_point--;
-
- while (rl_point && !whitespace (the_line[rl_point - 1]))
- rl_point--;
- }
-
+ {
+ while (rl_point && whitespace (the_line[rl_point - 1]))
+ rl_point--;
+
+ while (rl_point && !whitespace (the_line[rl_point - 1]))
+ rl_point--;
+ }
+
rl_kill_text (orig_point, rl_point);
-
}
return 0;
}
Index: vi_mode.c
===================================================================
RCS file: /cvsroot/winbash/winbash/lib/readline/vi_mode.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- vi_mode.c 11 Mar 2002 01:47:05 -0000 1.2
+++ vi_mode.c 11 Mar 2002 14:32:16 -0000 1.3
@@ -824,7 +824,7 @@
/* These are the motion commands that do not require adjusting the
mark. c[wW] are handled by special-case code in rl_vi_domove(),
and already leave the mark at the correct location. */
- if ((strchr (" l|hwW^0%bB", c) == 0) && (rl_mark < rl_end))
+ if ((strchr (" l|hwW^0bB", c) == 0) && (rl_mark < rl_end))
rl_mark++;
/* The cursor never moves with c[wW]. */
@@ -857,7 +857,7 @@
/* These are the motion commands that do not require adjusting the
mark. */
- if ((strchr (" l|h^0bB", c) == 0) && (rl_mark < rl_end))
+ if ((strchr (" l|h^0%bB", c) == 0) && (rl_mark < rl_end))
rl_mark++;
rl_begin_undo_group ();
@@ -1149,7 +1149,7 @@
rl_kill_line (1);
}
else
- rl_delete (count, key);
+ rl_delete_text (rl_point, rl_point+count);
rl_end_undo_group ();
@@ -1232,7 +1232,7 @@
{
vi_replace_map = rl_make_bare_keymap ();
- for (i = ' '; i < 127; i++)
+ for (i = ' '; i < KEYMAP_SIZE; i++)
vi_replace_map[i].function = rl_vi_overstrike;
vi_replace_map[RUBOUT].function = rl_vi_overstrike_delete;
|