Common subdirectories: editline-1.12.orig/debian and editline-1.12/debian diff -u editline-1.12.orig/editline.c editline-1.12/editline.c --- editline-1.12.orig/editline.c 2008-08-08 14:50:11.000000000 -0400 +++ editline-1.12/editline.c 2008-08-08 14:49:04.000000000 -0400 @@ -852,6 +852,33 @@ } STATIC STATUS +beg_line() +{ + if (Point) { + Point = 0; + return CSmove; + } + return CSstay; +} + +STATIC STATUS +del_char() +{ + return delete_string(Repeat == NO_ARG ? 1 : Repeat); +} + +STATIC STATUS +end_line() +{ + if (Point != End) { + Point = End; + return CSmove; + } + return CSstay; +} + + +STATIC STATUS meta() { unsigned int c; @@ -859,18 +886,27 @@ if ((c = TTYget()) == EOF) return CSeof; -#if defined(ANSI_ARROWS) +#if defined(ANSI_ARROWS) || defined(ANSI_MISC) /* Also include VT-100 arrows. */ if (c == '[' || c == 'O') switch ((int)(c = TTYget())) { default: return ring_bell(); case EOF: return CSeof; +#if defined(ANSI_ARROWS) case 'A': return h_prev(); case 'B': return h_next(); case 'C': return fd_char(); case 'D': return bk_char(); +#endif /* defined(ANSI_ARROWS) */ + +#if defined(ANSI_MISC) + case '1': TTYget(); return beg_line(); + case '3': TTYget(); return del_char(); + case '4': TTYget(); return end_line(); +#endif /* defined(ANSI_MISC) */ + } -#endif /* defined(ANSI_ARROWS) */ +#endif /* defined(ANSI_ARROWS) || defined(ANSI_MISC) */ if (isdigit(c)) { for (Repeat = c - '0'; (c = TTYget()) != EOF && isdigit(c); ) @@ -1150,31 +1186,7 @@ } -STATIC STATUS -beg_line() -{ - if (Point) { - Point = 0; - return CSmove; - } - return CSstay; -} - -STATIC STATUS -del_char() -{ - return delete_string(Repeat == NO_ARG ? 1 : Repeat); -} -STATIC STATUS -end_line() -{ - if (Point != End) { - Point = End; - return CSmove; - } - return CSstay; -} /* ** Return allocated copy of word under cursor, moving cursor after the diff -u editline-1.12.orig/Makefile editline-1.12/Makefile --- editline-1.12.orig/Makefile 2008-08-08 14:50:11.000000000 -0400 +++ editline-1.12/Makefile 2008-08-08 14:51:44.000000000 -0400 @@ -5,6 +5,7 @@ ## Set your options: ## -DANSI_ARROWS ANSI arrows keys work like emacs. +## -DANSI_MISC ANSI home/end/delete keys do the expected actions ## -DHAVE_STDLIB Have . ## -DHAVE_TCGETATTR Have tcgetattr(), tcsetattr(). ## -DHAVE_TERMIO Have "struct termio" and @@ -19,8 +20,8 @@ ## -DNEED_PERROR Don't have perror() (used in testit) ## -DDO_SIGTSTP Send SIGTSTP on "suspend" key -DEFS = -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DNEED_STRDUP -DEFS = -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX +DEFS = -DANSI_ARROWS -DANSI_MISC -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DNEED_STRDUP +DEFS = -DANSI_ARROWS -DANSI_MISC -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX ## Set your C compiler: WARN = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \