Drop "protected"-define from bsd-compatibility header

* drop "protected" from bsd-compat header sys/cdefs.h, as that define
  pollutes the global namespace and at least FreeBSD doesn't provide
  it anymore
* remove all uses of that macro from libedit, which seems to be the
  only user in our tree
This commit is contained in:
Oliver Tappe
2012-11-05 09:37:55 +01:00
parent de4f3cf3a7
commit 73f7af4d6c
37 changed files with 442 additions and 446 deletions
+1 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010 Haiku Inc. All Rights Reserved.
* Copyright 2006-2012 Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BSD_SYS_CDEFS_H_
@@ -12,10 +12,6 @@
#define __FBSDID(x)
#define __unused
#ifndef __cplusplus
# define protected
#endif
#define __printflike(a, b) __attribute__ ((format (__printf__, (a), (b))))
#define __printf0like(a, b)
+24 -24
View File
@@ -54,7 +54,7 @@ private void ch__clearmacro(EditLine *);
/* cv_undo():
* Handle state for the vi undo command
*/
protected void
void
cv_undo(EditLine *el)
{
c_undo_t *vu = &el->el_chared.c_undo;
@@ -78,7 +78,7 @@ cv_undo(EditLine *el)
/* cv_yank():
* Save yank/delete data for paste
*/
protected void
void
cv_yank(EditLine *el, const char *ptr, int size)
{
c_kill_t *k = &el->el_chared.c_kill;
@@ -91,7 +91,7 @@ cv_yank(EditLine *el, const char *ptr, int size)
/* c_insert():
* Insert num characters
*/
protected void
void
c_insert(EditLine *el, int num)
{
char *cp;
@@ -113,7 +113,7 @@ c_insert(EditLine *el, int num)
/* c_delafter():
* Delete num characters after the cursor
*/
protected void
void
c_delafter(EditLine *el, int num)
{
@@ -139,7 +139,7 @@ c_delafter(EditLine *el, int num)
/* c_delafter1():
* Delete the character after the cursor, do not yank
*/
protected void
void
c_delafter1(EditLine *el)
{
char *cp;
@@ -154,7 +154,7 @@ c_delafter1(EditLine *el)
/* c_delbefore():
* Delete num characters before the cursor
*/
protected void
void
c_delbefore(EditLine *el, int num)
{
@@ -182,7 +182,7 @@ c_delbefore(EditLine *el, int num)
/* c_delbefore1():
* Delete the character before the cursor, do not yank
*/
protected void
void
c_delbefore1(EditLine *el)
{
char *cp;
@@ -197,7 +197,7 @@ c_delbefore1(EditLine *el)
/* ce__isword():
* Return if p is part of a word according to emacs
*/
protected int
int
ce__isword(int p)
{
return (isalnum(p) || strchr("*?_-.[]~=", p) != NULL);
@@ -207,7 +207,7 @@ ce__isword(int p)
/* cv__isword():
* Return if p is part of a word according to vi
*/
protected int
int
cv__isword(int p)
{
if (isalnum(p) || p == '_')
@@ -221,7 +221,7 @@ cv__isword(int p)
/* cv__isWord():
* Return if p is part of a big word according to vi
*/
protected int
int
cv__isWord(int p)
{
return (!isspace(p));
@@ -231,7 +231,7 @@ cv__isWord(int p)
/* c__prev_word():
* Find the previous word
*/
protected char *
char *
c__prev_word(char *p, char *low, int n, int (*wtest)(int))
{
p--;
@@ -255,7 +255,7 @@ c__prev_word(char *p, char *low, int n, int (*wtest)(int))
/* c__next_word():
* Find the next word
*/
protected char *
char *
c__next_word(char *p, char *high, int n, int (*wtest)(int))
{
while (n--) {
@@ -273,7 +273,7 @@ c__next_word(char *p, char *high, int n, int (*wtest)(int))
/* cv_next_word():
* Find the next word vi style
*/
protected char *
char *
cv_next_word(EditLine *el, char *p, char *high, int n, int (*wtest)(int))
{
int test;
@@ -302,7 +302,7 @@ cv_next_word(EditLine *el, char *p, char *high, int n, int (*wtest)(int))
/* cv_prev_word():
* Find the previous word vi style
*/
protected char *
char *
cv_prev_word(char *p, char *low, int n, int (*wtest)(int))
{
int test;
@@ -331,7 +331,7 @@ cv_prev_word(char *p, char *low, int n, int (*wtest)(int))
* A '$' by itself means a big number; "$-" is for negative; '^' means 1.
* Return p pointing to last char used.
*/
protected char *
char *
c__number(
char *p, /* character position */
int *num, /* Return value */
@@ -362,7 +362,7 @@ c__number(
/* cv_delfini():
* Finish vi delete action
*/
protected void
void
cv_delfini(EditLine *el)
{
int size;
@@ -401,7 +401,7 @@ cv_delfini(EditLine *el)
/* ce__endword():
* Go to the end of this word according to emacs
*/
protected char *
char *
ce__endword(char *p, char *high, int n)
{
p++;
@@ -422,7 +422,7 @@ ce__endword(char *p, char *high, int n)
/* cv__endword():
* Go to the end of this word according to vi
*/
protected char *
char *
cv__endword(char *p, char *high, int n, int (*wtest)(int))
{
int test;
@@ -444,7 +444,7 @@ cv__endword(char *p, char *high, int n, int (*wtest)(int))
/* ch_init():
* Initialize the character editor
*/
protected int
int
ch_init(EditLine *el)
{
c_macro_t *ma = &el->el_chared.c_macro;
@@ -500,7 +500,7 @@ ch_init(EditLine *el)
/* ch_reset():
* Reset the character editor
*/
protected void
void
ch_reset(EditLine *el, int mclear)
{
el->el_line.cursor = el->el_line.buffer;
@@ -541,7 +541,7 @@ ch__clearmacro(el)
* Enlarge line buffer to be able to hold twice as much characters.
* Returns 1 if successful, 0 if not.
*/
protected int
int
ch_enlargebufs(el, addlen)
EditLine *el;
size_t addlen;
@@ -627,7 +627,7 @@ ch_enlargebufs(el, addlen)
/* ch_end():
* Free the data structures used by the editor
*/
protected void
void
ch_end(EditLine *el)
{
el_free((ptr_t) el->el_line.buffer);
@@ -691,7 +691,7 @@ el_deletestr(EditLine *el, int n)
/* c_gets():
* Get a string
*/
protected int
int
c_gets(EditLine *el, char *buf, const char *prompt)
{
char ch;
@@ -756,7 +756,7 @@ c_gets(EditLine *el, char *buf, const char *prompt)
/* c_hpos():
* Return the current horizontal position of the cursor
*/
protected int
int
c_hpos(EditLine *el)
{
char *ptr;
+22 -22
View File
@@ -141,28 +141,28 @@ typedef struct el_chared_t {
#include "fcns.h"
protected int cv__isword(int);
protected int cv__isWord(int);
protected void cv_delfini(EditLine *);
protected char *cv__endword(char *, char *, int, int (*)(int));
protected int ce__isword(int);
protected void cv_undo(EditLine *);
protected void cv_yank(EditLine *, const char *, int);
protected char *cv_next_word(EditLine*, char *, char *, int, int (*)(int));
protected char *cv_prev_word(char *, char *, int, int (*)(int));
protected char *c__next_word(char *, char *, int, int (*)(int));
protected char *c__prev_word(char *, char *, int, int (*)(int));
protected void c_insert(EditLine *, int);
protected void c_delbefore(EditLine *, int);
protected void c_delbefore1(EditLine *);
protected void c_delafter(EditLine *, int);
protected void c_delafter1(EditLine *);
protected int c_gets(EditLine *, char *, const char *);
protected int c_hpos(EditLine *);
int cv__isword(int);
int cv__isWord(int);
void cv_delfini(EditLine *);
char *cv__endword(char *, char *, int, int (*)(int));
int ce__isword(int);
void cv_undo(EditLine *);
void cv_yank(EditLine *, const char *, int);
char *cv_next_word(EditLine*, char *, char *, int, int (*)(int));
char *cv_prev_word(char *, char *, int, int (*)(int));
char *c__next_word(char *, char *, int, int (*)(int));
char *c__prev_word(char *, char *, int, int (*)(int));
void c_insert(EditLine *, int);
void c_delbefore(EditLine *, int);
void c_delbefore1(EditLine *);
void c_delafter(EditLine *, int);
void c_delafter1(EditLine *);
int c_gets(EditLine *, char *, const char *);
int c_hpos(EditLine *);
protected int ch_init(EditLine *);
protected void ch_reset(EditLine *, int);
protected int ch_enlargebufs(EditLine *, size_t);
protected void ch_end(EditLine *);
int ch_init(EditLine *);
void ch_reset(EditLine *, int);
int ch_enlargebufs(EditLine *, size_t);
void ch_end(EditLine *);
#endif /* _h_el_chared */
+35 -35
View File
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: src/lib/libedit/common.c,v 1.11 2005/08/09 13:37:59 stefanf
* Indicate end of file
* [^D]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_end_of_file(EditLine *el, int c __unused)
{
@@ -63,7 +63,7 @@ ed_end_of_file(EditLine *el, int c __unused)
* Add character to the line
* Insert a character [bound to all insert keys]
*/
protected el_action_t
el_action_t
ed_insert(EditLine *el, int c)
{
int count = el->el_state.argument;
@@ -105,7 +105,7 @@ ed_insert(EditLine *el, int c)
* Delete from beginning of current word to cursor
* [M-^?] [^W]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_delete_prev_word(EditLine *el, int c __unused)
{
@@ -133,7 +133,7 @@ ed_delete_prev_word(EditLine *el, int c __unused)
* Delete character under cursor
* [^D] [x]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_delete_next_char(EditLine *el, int c __unused)
{
@@ -184,7 +184,7 @@ ed_delete_next_char(EditLine *el, int c __unused)
* Cut to the end of line
* [^K] [^K]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_kill_line(EditLine *el, int c __unused)
{
@@ -205,7 +205,7 @@ ed_kill_line(EditLine *el, int c __unused)
* Move cursor to the end of line
* [^E] [^E]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_move_to_end(EditLine *el, int c __unused)
{
@@ -228,7 +228,7 @@ ed_move_to_end(EditLine *el, int c __unused)
* Move cursor to the beginning of line
* [^A] [^A]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_move_to_beg(EditLine *el, int c __unused)
{
@@ -252,7 +252,7 @@ ed_move_to_beg(EditLine *el, int c __unused)
* Exchange the character to the left of the cursor with the one under it
* [^T] [^T]
*/
protected el_action_t
el_action_t
ed_transpose_chars(EditLine *el, int c)
{
@@ -277,7 +277,7 @@ ed_transpose_chars(EditLine *el, int c)
* Move to the right one character
* [^F] [^F]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_next_char(EditLine *el, int c __unused)
{
@@ -306,7 +306,7 @@ ed_next_char(EditLine *el, int c __unused)
* Move to the beginning of the current word
* [M-b] [b]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_prev_word(EditLine *el, int c __unused)
{
@@ -332,7 +332,7 @@ ed_prev_word(EditLine *el, int c __unused)
* Move to the left one character
* [^B] [^B]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_prev_char(EditLine *el, int c __unused)
{
@@ -357,7 +357,7 @@ ed_prev_char(EditLine *el, int c __unused)
* Add the next character typed verbatim
* [^V] [^V]
*/
protected el_action_t
el_action_t
ed_quoted_insert(EditLine *el, int c)
{
int num;
@@ -377,7 +377,7 @@ ed_quoted_insert(EditLine *el, int c)
/* ed_digit():
* Adds to argument or enters a digit
*/
protected el_action_t
el_action_t
ed_digit(EditLine *el, int c)
{
@@ -405,7 +405,7 @@ ed_digit(EditLine *el, int c)
* Digit that starts argument
* For ESC-n
*/
protected el_action_t
el_action_t
ed_argument_digit(EditLine *el, int c)
{
@@ -429,7 +429,7 @@ ed_argument_digit(EditLine *el, int c)
* Indicates unbound character
* Bound to keys that are not assigned
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_unassigned(EditLine *el, int c __unused)
{
@@ -446,7 +446,7 @@ ed_unassigned(EditLine *el, int c __unused)
* Tty interrupt character
* [^C]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_sigint(EditLine *el __unused,
int c __unused)
@@ -460,7 +460,7 @@ ed_tty_sigint(EditLine *el __unused,
* Tty delayed suspend character
* [^Y]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_dsusp(EditLine *el __unused,
int c __unused)
@@ -474,7 +474,7 @@ ed_tty_dsusp(EditLine *el __unused,
* Tty flush output characters
* [^O]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_flush_output(EditLine *el __unused,
int c __unused)
@@ -488,7 +488,7 @@ ed_tty_flush_output(EditLine *el __unused,
* Tty quit character
* [^\]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_sigquit(EditLine *el __unused,
int c __unused)
@@ -502,7 +502,7 @@ ed_tty_sigquit(EditLine *el __unused,
* Tty suspend character
* [^Z]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_sigtstp(EditLine *el __unused,
int c __unused)
@@ -516,7 +516,7 @@ ed_tty_sigtstp(EditLine *el __unused,
* Tty disallow output characters
* [^S]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_stop_output(EditLine *el __unused,
int c __unused)
@@ -530,7 +530,7 @@ ed_tty_stop_output(EditLine *el __unused,
* Tty allow output characters
* [^Q]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_tty_start_output(EditLine *el __unused,
int c __unused)
@@ -544,7 +544,7 @@ ed_tty_start_output(EditLine *el __unused,
* Execute command
* [^J]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_newline(EditLine *el, int c __unused)
{
@@ -560,7 +560,7 @@ ed_newline(EditLine *el, int c __unused)
* Delete the character to the left of the cursor
* [^?]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_delete_prev_char(EditLine *el, int c __unused)
{
@@ -580,7 +580,7 @@ ed_delete_prev_char(EditLine *el, int c __unused)
* Clear screen leaving current line at the top
* [^L]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_clear_screen(EditLine *el, int c __unused)
{
@@ -595,7 +595,7 @@ ed_clear_screen(EditLine *el, int c __unused)
* Redisplay everything
* ^R
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_redisplay(EditLine *el __unused,
int c __unused)
@@ -609,7 +609,7 @@ ed_redisplay(EditLine *el __unused,
* Erase current line and start from scratch
* [^G]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_start_over(EditLine *el, int c __unused)
{
@@ -623,7 +623,7 @@ ed_start_over(EditLine *el, int c __unused)
* First character in a bound sequence
* Placeholder for external keys
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_sequence_lead_in(EditLine *el __unused,
int c __unused)
@@ -637,7 +637,7 @@ ed_sequence_lead_in(EditLine *el __unused,
* Move to the previous history line
* [^P] [k]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_prev_history(EditLine *el, int c __unused)
{
@@ -675,7 +675,7 @@ ed_prev_history(EditLine *el, int c __unused)
* Move to the next history line
* [^N] [j]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_next_history(EditLine *el, int c __unused)
{
@@ -702,7 +702,7 @@ ed_next_history(EditLine *el, int c __unused)
* Search previous in history for a line matching the current
* next search history [M-P] [K]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_search_prev_history(EditLine *el, int c __unused)
{
@@ -770,7 +770,7 @@ ed_search_prev_history(EditLine *el, int c __unused)
* Search next in history for a line matching the current
* [M-N] [J]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_search_next_history(EditLine *el, int c __unused)
{
@@ -824,7 +824,7 @@ ed_search_next_history(EditLine *el, int c __unused)
* Move up one line
* Could be [k] [^p]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_prev_line(EditLine *el, int c __unused)
{
@@ -867,7 +867,7 @@ ed_prev_line(EditLine *el, int c __unused)
* Move down one line
* Could be [j] [^n]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_next_line(EditLine *el, int c __unused)
{
@@ -901,7 +901,7 @@ ed_next_line(EditLine *el, int c __unused)
* Editline extended command
* [M-X] [:]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
ed_command(EditLine *el, int c __unused)
{
+35 -35
View File
@@ -1,39 +1,39 @@
/* Automatically generated file, do not edit */
#ifndef _h_common_c
#define _h_common_c
protected el_action_t ed_end_of_file (EditLine *, int);
protected el_action_t ed_insert (EditLine *, int);
protected el_action_t ed_delete_prev_word (EditLine *, int);
protected el_action_t ed_delete_next_char (EditLine *, int);
protected el_action_t ed_kill_line (EditLine *, int);
protected el_action_t ed_move_to_end (EditLine *, int);
protected el_action_t ed_move_to_beg (EditLine *, int);
protected el_action_t ed_transpose_chars (EditLine *, int);
protected el_action_t ed_next_char (EditLine *, int);
protected el_action_t ed_prev_word (EditLine *, int);
protected el_action_t ed_prev_char (EditLine *, int);
protected el_action_t ed_quoted_insert (EditLine *, int);
protected el_action_t ed_digit (EditLine *, int);
protected el_action_t ed_argument_digit (EditLine *, int);
protected el_action_t ed_unassigned (EditLine *, int);
protected el_action_t ed_tty_sigint (EditLine *, int);
protected el_action_t ed_tty_dsusp (EditLine *, int);
protected el_action_t ed_tty_flush_output (EditLine *, int);
protected el_action_t ed_tty_sigquit (EditLine *, int);
protected el_action_t ed_tty_sigtstp (EditLine *, int);
protected el_action_t ed_tty_stop_output (EditLine *, int);
protected el_action_t ed_tty_start_output (EditLine *, int);
protected el_action_t ed_newline (EditLine *, int);
protected el_action_t ed_delete_prev_char (EditLine *, int);
protected el_action_t ed_clear_screen (EditLine *, int);
protected el_action_t ed_redisplay (EditLine *, int);
protected el_action_t ed_start_over (EditLine *, int);
protected el_action_t ed_sequence_lead_in (EditLine *, int);
protected el_action_t ed_prev_history (EditLine *, int);
protected el_action_t ed_next_history (EditLine *, int);
protected el_action_t ed_search_prev_history (EditLine *, int);
protected el_action_t ed_search_next_history (EditLine *, int);
protected el_action_t ed_prev_line (EditLine *, int);
protected el_action_t ed_next_line (EditLine *, int);
protected el_action_t ed_command (EditLine *, int);
el_action_t ed_end_of_file (EditLine *, int);
el_action_t ed_insert (EditLine *, int);
el_action_t ed_delete_prev_word (EditLine *, int);
el_action_t ed_delete_next_char (EditLine *, int);
el_action_t ed_kill_line (EditLine *, int);
el_action_t ed_move_to_end (EditLine *, int);
el_action_t ed_move_to_beg (EditLine *, int);
el_action_t ed_transpose_chars (EditLine *, int);
el_action_t ed_next_char (EditLine *, int);
el_action_t ed_prev_word (EditLine *, int);
el_action_t ed_prev_char (EditLine *, int);
el_action_t ed_quoted_insert (EditLine *, int);
el_action_t ed_digit (EditLine *, int);
el_action_t ed_argument_digit (EditLine *, int);
el_action_t ed_unassigned (EditLine *, int);
el_action_t ed_tty_sigint (EditLine *, int);
el_action_t ed_tty_dsusp (EditLine *, int);
el_action_t ed_tty_flush_output (EditLine *, int);
el_action_t ed_tty_sigquit (EditLine *, int);
el_action_t ed_tty_sigtstp (EditLine *, int);
el_action_t ed_tty_stop_output (EditLine *, int);
el_action_t ed_tty_start_output (EditLine *, int);
el_action_t ed_newline (EditLine *, int);
el_action_t ed_delete_prev_char (EditLine *, int);
el_action_t ed_clear_screen (EditLine *, int);
el_action_t ed_redisplay (EditLine *, int);
el_action_t ed_start_over (EditLine *, int);
el_action_t ed_sequence_lead_in (EditLine *, int);
el_action_t ed_prev_history (EditLine *, int);
el_action_t ed_next_history (EditLine *, int);
el_action_t ed_search_prev_history (EditLine *, int);
el_action_t ed_search_next_history (EditLine *, int);
el_action_t ed_prev_line (EditLine *, int);
el_action_t ed_next_line (EditLine *, int);
el_action_t ed_command (EditLine *, int);
#endif /* _h_common_c */
+1 -1
View File
@@ -531,7 +531,7 @@ el_beep(EditLine *el)
/* el_editmode()
* Set the state of EDIT_DISABLED from the `edit' command.
*/
protected int
int
/*ARGSUSED*/
el_editmode(EditLine *el, int argc, const char **argv)
{
+1 -1
View File
@@ -134,7 +134,7 @@ struct editline {
el_read_t el_read; /* Character reading stuff */
};
protected int el_editmode(EditLine *, int, const char **);
int el_editmode(EditLine *, int, const char **);
#ifdef DEBUG
#define EL_ABORT(a) do { \
+20 -20
View File
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD: src/lib/libedit/emacs.c,v 1.10 2005/08/09 13:37:59 stefanf E
* Delete character under cursor or list completions if at end of line
* [^D]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_delete_or_list(EditLine *el, int c __unused)
{
@@ -82,7 +82,7 @@ em_delete_or_list(EditLine *el, int c __unused)
* Cut from cursor to end of current word
* [M-d]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_delete_next_word(EditLine *el, int c __unused)
{
@@ -111,7 +111,7 @@ em_delete_next_word(EditLine *el, int c __unused)
* Paste cut buffer at cursor position
* [^Y]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_yank(EditLine *el, int c __unused)
{
@@ -146,7 +146,7 @@ em_yank(EditLine *el, int c __unused)
* Cut the entire line and save in cut buffer
* [^U]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_kill_line(EditLine *el, int c __unused)
{
@@ -168,7 +168,7 @@ em_kill_line(EditLine *el, int c __unused)
* Cut area between mark and cursor and save in cut buffer
* [^W]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_kill_region(EditLine *el, int c __unused)
{
@@ -201,7 +201,7 @@ em_kill_region(EditLine *el, int c __unused)
* Copy area between mark and cursor to cut buffer
* [M-W]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_copy_region(EditLine *el, int c __unused)
{
@@ -231,7 +231,7 @@ em_copy_region(EditLine *el, int c __unused)
* Exchange the two characters before the cursor
* Gosling emacs transpose chars [^T]
*/
protected el_action_t
el_action_t
em_gosmacs_transpose(EditLine *el, int c)
{
@@ -250,7 +250,7 @@ em_gosmacs_transpose(EditLine *el, int c)
* Move next to end of current word
* [M-f]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_next_word(EditLine *el, int c __unused)
{
@@ -275,7 +275,7 @@ em_next_word(EditLine *el, int c __unused)
* Uppercase the characters from cursor to end of current word
* [M-u]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_upper_case(EditLine *el, int c __unused)
{
@@ -299,7 +299,7 @@ em_upper_case(EditLine *el, int c __unused)
* Capitalize the characters from cursor to end of current word
* [M-c]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_capitol_case(EditLine *el, int c __unused)
{
@@ -331,7 +331,7 @@ em_capitol_case(EditLine *el, int c __unused)
* Lowercase the characters from cursor to end of current word
* [M-l]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_lower_case(EditLine *el, int c __unused)
{
@@ -355,7 +355,7 @@ em_lower_case(EditLine *el, int c __unused)
* Set the mark at cursor
* [^@]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_set_mark(EditLine *el, int c __unused)
{
@@ -369,7 +369,7 @@ em_set_mark(EditLine *el, int c __unused)
* Exchange the cursor and mark
* [^X^X]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_exchange_mark(EditLine *el, int c __unused)
{
@@ -386,7 +386,7 @@ em_exchange_mark(EditLine *el, int c __unused)
* Universal argument (argument times 4)
* [^U]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_universal_argument(EditLine *el, int c __unused)
{ /* multiply current argument by 4 */
@@ -403,7 +403,7 @@ em_universal_argument(EditLine *el, int c __unused)
* Add 8th bit to next character typed
* [<ESC>]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_meta_next(EditLine *el, int c __unused)
{
@@ -416,7 +416,7 @@ em_meta_next(EditLine *el, int c __unused)
/* em_toggle_overwrite():
* Switch from insert to overwrite mode or vice versa
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_toggle_overwrite(EditLine *el, int c __unused)
{
@@ -430,7 +430,7 @@ em_toggle_overwrite(EditLine *el, int c __unused)
/* em_copy_prev_word():
* Copy current word to cursor
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_copy_prev_word(EditLine *el, int c __unused)
{
@@ -457,7 +457,7 @@ em_copy_prev_word(EditLine *el, int c __unused)
/* em_inc_search_next():
* Emacs incremental next search
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_inc_search_next(EditLine *el, int c __unused)
{
@@ -470,7 +470,7 @@ em_inc_search_next(EditLine *el, int c __unused)
/* em_inc_search_prev():
* Emacs incremental reverse search
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_inc_search_prev(EditLine *el, int c __unused)
{
@@ -484,7 +484,7 @@ em_inc_search_prev(EditLine *el, int c __unused)
* Delete the character to the left of the cursor
* [^?]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
em_delete_prev_char(EditLine *el, int c __unused)
{
+20 -20
View File
@@ -1,24 +1,24 @@
/* Automatically generated file, do not edit */
#ifndef _h_emacs_c
#define _h_emacs_c
protected el_action_t em_delete_or_list (EditLine *, int);
protected el_action_t em_delete_next_word (EditLine *, int);
protected el_action_t em_yank (EditLine *, int);
protected el_action_t em_kill_line (EditLine *, int);
protected el_action_t em_kill_region (EditLine *, int);
protected el_action_t em_copy_region (EditLine *, int);
protected el_action_t em_gosmacs_transpose (EditLine *, int);
protected el_action_t em_next_word (EditLine *, int);
protected el_action_t em_upper_case (EditLine *, int);
protected el_action_t em_capitol_case (EditLine *, int);
protected el_action_t em_lower_case (EditLine *, int);
protected el_action_t em_set_mark (EditLine *, int);
protected el_action_t em_exchange_mark (EditLine *, int);
protected el_action_t em_universal_argument (EditLine *, int);
protected el_action_t em_meta_next (EditLine *, int);
protected el_action_t em_toggle_overwrite (EditLine *, int);
protected el_action_t em_copy_prev_word (EditLine *, int);
protected el_action_t em_inc_search_next (EditLine *, int);
protected el_action_t em_inc_search_prev (EditLine *, int);
protected el_action_t em_delete_prev_char (EditLine *, int);
el_action_t em_delete_or_list (EditLine *, int);
el_action_t em_delete_next_word (EditLine *, int);
el_action_t em_yank (EditLine *, int);
el_action_t em_kill_line (EditLine *, int);
el_action_t em_kill_region (EditLine *, int);
el_action_t em_copy_region (EditLine *, int);
el_action_t em_gosmacs_transpose (EditLine *, int);
el_action_t em_next_word (EditLine *, int);
el_action_t em_upper_case (EditLine *, int);
el_action_t em_capitol_case (EditLine *, int);
el_action_t em_lower_case (EditLine *, int);
el_action_t em_set_mark (EditLine *, int);
el_action_t em_exchange_mark (EditLine *, int);
el_action_t em_universal_argument (EditLine *, int);
el_action_t em_meta_next (EditLine *, int);
el_action_t em_toggle_overwrite (EditLine *, int);
el_action_t em_copy_prev_word (EditLine *, int);
el_action_t em_inc_search_next (EditLine *, int);
el_action_t em_inc_search_prev (EditLine *, int);
el_action_t em_delete_prev_char (EditLine *, int);
#endif /* _h_emacs_c */
+1 -1
View File
@@ -55,4 +55,4 @@ private const el_func_t el_func[] = {
vi_yank_end, vi_zero,
};
protected const el_func_t* func__get() { return el_func; }
const el_func_t* func__get() { return el_func; }
+1 -1
View File
@@ -105,5 +105,5 @@
#define VI_ZERO 101
#define EL_NUM_FCNS 102
typedef el_action_t (*el_func_t)(EditLine *, int);
protected const el_func_t* func__get(void);
const el_func_t* func__get(void);
#endif /* _h_fcns_c */
+1 -1
View File
@@ -208,4 +208,4 @@ private const struct el_bindings_t el_func_help[] = {
"Editline extended command" },
};
protected const el_bindings_t* help__get(){ return el_func_help; }
const el_bindings_t* help__get(){ return el_func_help; }
+1 -1
View File
@@ -1,5 +1,5 @@
/* Automatically generated file, do not edit */
#ifndef _h_help_c
#define _h_help_c
protected const el_bindings_t *help__get(void);
const el_bindings_t *help__get(void);
#endif /* _h_help_c */
+6 -6
View File
@@ -42,7 +42,7 @@
/* hist_init():
* Initialization function.
*/
protected int
int
hist_init(EditLine *el)
{
@@ -60,7 +60,7 @@ hist_init(EditLine *el)
/* hist_end():
* clean up history;
*/
protected void
void
hist_end(EditLine *el)
{
@@ -72,7 +72,7 @@ hist_end(EditLine *el)
/* hist_set():
* Set new history interface
*/
protected int
int
hist_set(EditLine *el, hist_fun_t fun, ptr_t ptr)
{
@@ -86,7 +86,7 @@ hist_set(EditLine *el, hist_fun_t fun, ptr_t ptr)
* Get a history line and update it in the buffer.
* eventno tells us the event to get.
*/
protected el_action_t
el_action_t
hist_get(EditLine *el)
{
const char *hp;
@@ -144,7 +144,7 @@ hist_get(EditLine *el)
/* hist_command()
* process a history command
*/
protected int
int
hist_command(EditLine *el, int argc, const char **argv)
{
const char *str;
@@ -181,7 +181,7 @@ hist_command(EditLine *el, int argc, const char **argv)
* Enlarge history buffer to specified value. Called from el_enlargebufs().
* Return 0 for failure, 1 for success.
*/
protected int
int
/*ARGSUSED*/
hist_enlargebuf(EditLine *el, size_t oldsz, size_t newsz)
{
+6 -6
View File
@@ -67,11 +67,11 @@ typedef struct el_history_t {
#define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname)
#define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname)
protected int hist_init(EditLine *);
protected void hist_end(EditLine *);
protected el_action_t hist_get(EditLine *);
protected int hist_set(EditLine *, hist_fun_t, ptr_t);
protected int hist_command(EditLine *, int, const char **);
protected int hist_enlargebuf(EditLine *, size_t, size_t);
int hist_init(EditLine *);
void hist_end(EditLine *);
el_action_t hist_get(EditLine *);
int hist_set(EditLine *, hist_fun_t, ptr_t);
int hist_command(EditLine *, int, const char **);
int hist_enlargebuf(EditLine *, size_t, size_t);
#endif /* _h_el_hist */
+12 -12
View File
@@ -93,7 +93,7 @@ private int key__decode_char(char *, int, int);
/* key_init():
* Initialize the key maps
*/
protected int
int
key_init(EditLine *el)
{
@@ -108,7 +108,7 @@ key_init(EditLine *el)
/* key_end():
* Free the key maps
*/
protected void
void
key_end(EditLine *el)
{
@@ -121,7 +121,7 @@ key_end(EditLine *el)
/* key_map_cmd():
* Associate cmd with a key value
*/
protected key_value_t *
key_value_t *
key_map_cmd(EditLine *el, int cmd)
{
@@ -133,7 +133,7 @@ key_map_cmd(EditLine *el, int cmd)
/* key_map_str():
* Associate str with a key value
*/
protected key_value_t *
key_value_t *
key_map_str(EditLine *el, char *str)
{
@@ -147,7 +147,7 @@ key_map_str(EditLine *el, char *str)
* initializes el->el_key.map with arrow keys
* [Always bind the ansi arrow keys?]
*/
protected void
void
key_reset(EditLine *el)
{
@@ -165,7 +165,7 @@ key_reset(EditLine *el)
* Returns NULL in val.str and XK_STR for no match.
* The last character read is returned in *ch.
*/
protected int
int
key_get(EditLine *el, char *ch, key_value_t *val)
{
@@ -179,7 +179,7 @@ key_get(EditLine *el, char *ch, key_value_t *val)
* existing key. Ntype specifies if code is a command, an
* out str or a unix command.
*/
protected void
void
key_add(EditLine *el, const char *key, key_value_t *val, int ntype)
{
@@ -207,7 +207,7 @@ key_add(EditLine *el, const char *key, key_value_t *val, int ntype)
/* key_clear():
*
*/
protected void
void
key_clear(EditLine *el, el_action_t *map, const char *in)
{
@@ -224,7 +224,7 @@ key_clear(EditLine *el, el_action_t *map, const char *in)
* Delete the key and all longer keys staring with key, if
* they exists.
*/
protected int
int
key_delete(EditLine *el, const char *key)
{
@@ -245,7 +245,7 @@ key_delete(EditLine *el, const char *key)
* Print the binding associated with key key.
* Print entire el->el_key.map if null
*/
protected void
void
key_print(EditLine *el, const char *key)
{
@@ -565,7 +565,7 @@ node_enum(EditLine *el, key_node_t *ptr, int cnt)
* Print the specified key and its associated
* function specified by val
*/
protected void
void
key_kprint(EditLine *el, const char *key, key_value_t *val, int ntype)
{
el_bindings_t *fp;
@@ -643,7 +643,7 @@ key__decode_char(char *buf, int cnt, int ch)
/* key__decode_str():
* Make a printable version of the ey
*/
protected char *
char *
key__decode_str(const char *str, char *buf, const char *sep)
{
char *b;
+12 -12
View File
@@ -64,18 +64,18 @@ typedef struct el_key_t {
#undef key_clear
#undef key_print
protected int key_init(EditLine *);
protected void key_end(EditLine *);
protected key_value_t *key_map_cmd(EditLine *, int);
protected key_value_t *key_map_str(EditLine *, char *);
protected void key_reset(EditLine *);
protected int key_get(EditLine *, char *, key_value_t *);
protected void key_add(EditLine *, const char *, key_value_t *, int);
protected void key_clear(EditLine *, el_action_t *, const char *);
protected int key_delete(EditLine *, const char *);
protected void key_print(EditLine *, const char *);
protected void key_kprint(EditLine *, const char *, key_value_t *,
int key_init(EditLine *);
void key_end(EditLine *);
key_value_t *key_map_cmd(EditLine *, int);
key_value_t *key_map_str(EditLine *, char *);
void key_reset(EditLine *);
int key_get(EditLine *, char *, key_value_t *);
void key_add(EditLine *, const char *, key_value_t *, int);
void key_clear(EditLine *, el_action_t *, const char *);
int key_delete(EditLine *, const char *);
void key_print(EditLine *, const char *);
void key_kprint(EditLine *, const char *, key_value_t *,
int);
protected char *key__decode_str(const char *, char *, const char *);
char *key__decode_str(const char *, char *, const char *);
#endif /* _h_el_key */
+8 -8
View File
@@ -884,7 +884,7 @@ private const el_action_t el_map_vi_command[] = {
/* map_init():
* Initialize and allocate the maps
*/
protected int
int
map_init(EditLine *el)
{
@@ -934,7 +934,7 @@ map_init(EditLine *el)
/* map_end():
* Free the space taken by the editor maps
*/
protected void
void
map_end(EditLine *el)
{
@@ -1012,7 +1012,7 @@ map_init_meta(EditLine *el)
/* map_init_vi():
* Initialize the vi bindings
*/
protected void
void
map_init_vi(EditLine *el)
{
int i;
@@ -1042,7 +1042,7 @@ map_init_vi(EditLine *el)
/* map_init_emacs():
* Initialize the emacs bindings
*/
protected void
void
map_init_emacs(EditLine *el)
{
int i;
@@ -1076,7 +1076,7 @@ map_init_emacs(EditLine *el)
/* map_set_editor():
* Set the editor
*/
protected int
int
map_set_editor(EditLine *el, char *editor)
{
@@ -1095,7 +1095,7 @@ map_set_editor(EditLine *el, char *editor)
/* map_get_editor():
* Retrieve the editor
*/
protected int
int
map_get_editor(EditLine *el, const char **editor)
{
@@ -1231,7 +1231,7 @@ map_print_all_keys(EditLine *el)
/* map_bind():
* Add/remove/change bindings
*/
protected int
int
map_bind(EditLine *el, int argc, const char **argv)
{
el_action_t *map;
@@ -1381,7 +1381,7 @@ map_bind(EditLine *el, int argc, const char **argv)
/* map_addfunc():
* add a user defined function
*/
protected int
int
map_addfunc(EditLine *el, const char *name, const char *help, el_func_t func)
{
void *p;
+8 -8
View File
@@ -63,13 +63,13 @@ typedef struct el_map_t {
#define MAP_EMACS 0
#define MAP_VI 1
protected int map_bind(EditLine *, int, const char **);
protected int map_init(EditLine *);
protected void map_end(EditLine *);
protected void map_init_vi(EditLine *);
protected void map_init_emacs(EditLine *);
protected int map_set_editor(EditLine *, char *);
protected int map_get_editor(EditLine *, const char **);
protected int map_addfunc(EditLine *, const char *, const char *, el_func_t);
int map_bind(EditLine *, int, const char **);
int map_init(EditLine *);
void map_end(EditLine *);
void map_init_vi(EditLine *);
void map_init_emacs(EditLine *);
int map_set_editor(EditLine *, char *);
int map_get_editor(EditLine *, const char **);
int map_addfunc(EditLine *, const char *, const char *, el_func_t);
#endif /* _h_el_map */
+4 -4
View File
@@ -73,7 +73,7 @@ private const struct {
/* parse_line():
* Parse a line and dispatch it
*/
protected int
int
parse_line(EditLine *el, const char *line)
{
const char **argv;
@@ -133,7 +133,7 @@ el_parse(EditLine *el, int argc, const char *argv[])
* Parse a string of the form ^<char> \<odigit> \<char> and return
* the appropriate character or -1 if the escape is not valid
*/
protected int
int
parse__escape(const char **ptr)
{
const char *p;
@@ -211,7 +211,7 @@ parse__escape(const char **ptr)
/* parse__string():
* Parse the escapes from in and put the raw string out
*/
protected char *
char *
parse__string(char *out, const char *in)
{
char *rv = out;
@@ -249,7 +249,7 @@ parse__string(char *out, const char *in)
* Return the command number for the command string given
* or -1 if one is not found
*/
protected int
int
parse_cmd(EditLine *el, const char *cmd)
{
el_bindings_t *b;
+4 -4
View File
@@ -40,9 +40,9 @@
#ifndef _h_el_parse
#define _h_el_parse
protected int parse_line(EditLine *, const char *);
protected int parse__escape(const char **);
protected char *parse__string(char *, const char *);
protected int parse_cmd(EditLine *, const char *);
int parse_line(EditLine *, const char *);
int parse__escape(const char **);
char *parse__string(char *, const char *);
int parse_cmd(EditLine *, const char *);
#endif /* _h_el_parse */
+5 -5
View File
@@ -77,7 +77,7 @@ prompt_default_r(EditLine *el __unused)
* literal escape sequences in the prompt and we want a
* bit to flag them
*/
protected void
void
prompt_print(EditLine *el, int op)
{
el_prompt_t *elp;
@@ -99,7 +99,7 @@ prompt_print(EditLine *el, int op)
/* prompt_init():
* Initialize the prompt stuff
*/
protected int
int
prompt_init(EditLine *el)
{
@@ -116,7 +116,7 @@ prompt_init(EditLine *el)
/* prompt_end():
* Clean up the prompt stuff
*/
protected void
void
/*ARGSUSED*/
prompt_end(EditLine *el __unused)
{
@@ -126,7 +126,7 @@ prompt_end(EditLine *el __unused)
/* prompt_set():
* Install a prompt printing function
*/
protected int
int
prompt_set(EditLine *el, el_pfunc_t prf, int op)
{
el_prompt_t *p;
@@ -151,7 +151,7 @@ prompt_set(EditLine *el, el_pfunc_t prf, int op)
/* prompt_get():
* Retrieve the prompt printing function
*/
protected int
int
prompt_get(EditLine *el, el_pfunc_t *prf, int op)
{
+5 -5
View File
@@ -49,10 +49,10 @@ typedef struct el_prompt_t {
coord_t p_pos; /* position in the line after prompt */
} el_prompt_t;
protected void prompt_print(EditLine *, int);
protected int prompt_set(EditLine *, el_pfunc_t, int);
protected int prompt_get(EditLine *, el_pfunc_t *, int);
protected int prompt_init(EditLine *);
protected void prompt_end(EditLine *);
void prompt_print(EditLine *, int);
int prompt_set(EditLine *, el_pfunc_t, int);
int prompt_get(EditLine *, el_pfunc_t *, int);
int prompt_init(EditLine *);
void prompt_end(EditLine *);
#endif /* _h_el_prompt */
+5 -5
View File
@@ -59,7 +59,7 @@ private int read_getcmd(EditLine *, el_action_t *, char *);
/* read_init():
* Initialize the read stuff
*/
protected int
int
read_init(EditLine *el)
{
/* builtin read_char */
@@ -72,7 +72,7 @@ read_init(EditLine *el)
* Set the read char function to the one provided.
* If it is set to EL_BUILTIN_GETCFN, then reset to the builtin one.
*/
protected int
int
el_read_setfn(EditLine *el, el_rfunc_t rc)
{
el->el_read.read_char = (rc == EL_BUILTIN_GETCFN) ? read_char : rc;
@@ -84,7 +84,7 @@ el_read_setfn(EditLine *el, el_rfunc_t rc)
* return the current read char function, or EL_BUILTIN_GETCFN
* if it is the default one
*/
protected el_rfunc_t
el_rfunc_t
el_read_getfn(EditLine *el)
{
return (el->el_read.read_char == read_char) ?
@@ -348,7 +348,7 @@ el_getc(EditLine *el, char *cp)
return (num_read);
}
protected void
void
read_prepare(EditLine *el)
{
if (el->el_flags & HANDLE_SIGNALS)
@@ -369,7 +369,7 @@ read_prepare(EditLine *el)
term__flush();
}
protected void
void
read_finish(EditLine *el)
{
if ((el->el_flags & UNBUFFERED) == 0)
+5 -5
View File
@@ -49,10 +49,10 @@ typedef struct el_read_t {
el_rfunc_t read_char; /* Function to read a character */
} el_read_t;
protected int read_init(EditLine *);
protected void read_prepare(EditLine *);
protected void read_finish(EditLine *);
protected int el_read_setfn(EditLine *, el_rfunc_t);
protected el_rfunc_t el_read_getfn(EditLine *);
int read_init(EditLine *);
void read_prepare(EditLine *);
void read_finish(EditLine *);
int el_read_setfn(EditLine *, el_rfunc_t);
el_rfunc_t el_read_getfn(EditLine *);
#endif /* _h_el_read */
+7 -7
View File
@@ -132,7 +132,7 @@ re_addc(EditLine *el, int c)
/* re_putc():
* Draw the character given
*/
protected void
void
re_putc(EditLine *el, int c, int shift)
{
@@ -180,7 +180,7 @@ re_putc(EditLine *el, int c, int shift)
* virtual image. The routine to re-draw a line can be replaced
* easily in hopes of a smarter one being placed there.
*/
protected void
void
re_refresh(EditLine *el)
{
int i, rhdiff;
@@ -316,7 +316,7 @@ re_refresh(EditLine *el)
/* re_goto_bottom():
* used to go to last used screen line
*/
protected void
void
re_goto_bottom(EditLine *el)
{
@@ -952,7 +952,7 @@ re__copy_and_pad(char *dst, const char *src, size_t width)
/* re_refresh_cursor():
* Move to the new cursor position
*/
protected void
void
re_refresh_cursor(EditLine *el)
{
char *cp, c;
@@ -1062,7 +1062,7 @@ re_fastputc(EditLine *el, int c)
* we added just one char, handle it fast.
* Assumes that screen cursor == real cursor
*/
protected void
void
re_fastaddc(EditLine *el)
{
char c;
@@ -1099,7 +1099,7 @@ re_fastaddc(EditLine *el)
/* re_clear_display():
* clear the screen buffers so that new new prompt starts fresh.
*/
protected void
void
re_clear_display(EditLine *el)
{
int i;
@@ -1115,7 +1115,7 @@ re_clear_display(EditLine *el)
/* re_clear_lines():
* Make sure all lines are *really* blank
*/
protected void
void
re_clear_lines(EditLine *el)
{
+7 -7
View File
@@ -48,12 +48,12 @@ typedef struct {
int r_newcv;
} el_refresh_t;
protected void re_putc(EditLine *, int, int);
protected void re_clear_lines(EditLine *);
protected void re_clear_display(EditLine *);
protected void re_refresh(EditLine *);
protected void re_refresh_cursor(EditLine *);
protected void re_fastaddc(EditLine *);
protected void re_goto_bottom(EditLine *);
void re_putc(EditLine *, int, int);
void re_clear_lines(EditLine *);
void re_clear_display(EditLine *);
void re_refresh(EditLine *);
void re_refresh_cursor(EditLine *);
void re_fastaddc(EditLine *);
void re_goto_bottom(EditLine *);
#endif /* _h_el_refresh */
+10 -10
View File
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD: src/lib/libedit/search.c,v 1.10 2005/08/07 20:51:52 stefanf
/* search_init():
* Initialize the search stuff
*/
protected int
int
search_init(EditLine *el)
{
@@ -79,7 +79,7 @@ search_init(EditLine *el)
/* search_end():
* Initialize the search stuff
*/
protected void
void
search_end(EditLine *el)
{
@@ -103,7 +103,7 @@ regerror(const char *msg)
/* el_match():
* Return if string matches pattern
*/
protected int
int
el_match(const char *str, const char *pat)
{
#if defined (REGEX)
@@ -148,7 +148,7 @@ el_match(const char *str, const char *pat)
/* c_hmatch():
* return True if the pattern matches the prefix
*/
protected int
int
c_hmatch(EditLine *el, const char *str)
{
#ifdef SDEBUG
@@ -163,7 +163,7 @@ c_hmatch(EditLine *el, const char *str)
/* c_setpat():
* Set the history seatch pattern
*/
protected void
void
c_setpat(EditLine *el)
{
if (el->el_state.lastcmd != ED_SEARCH_PREV_HISTORY &&
@@ -194,7 +194,7 @@ c_setpat(EditLine *el)
/* ce_inc_search():
* Emacs incremental search
*/
protected el_action_t
el_action_t
ce_inc_search(EditLine *el, int dir)
{
static const char STRfwd[] = {'f', 'w', 'd', '\0'},
@@ -440,7 +440,7 @@ ce_inc_search(EditLine *el, int dir)
/* cv_search():
* Vi search.
*/
protected el_action_t
el_action_t
cv_search(EditLine *el, int dir)
{
char ch;
@@ -514,7 +514,7 @@ cv_search(EditLine *el, int dir)
/* ce_search_line():
* Look for a pattern inside a line
*/
protected el_action_t
el_action_t
ce_search_line(EditLine *el, int dir)
{
char *cp = el->el_line.cursor;
@@ -556,7 +556,7 @@ ce_search_line(EditLine *el, int dir)
/* cv_repeat_srch():
* Vi repeat search
*/
protected el_action_t
el_action_t
cv_repeat_srch(EditLine *el, int c)
{
@@ -582,7 +582,7 @@ cv_repeat_srch(EditLine *el, int c)
/* cv_csearch():
* Vi character search
*/
protected el_action_t
el_action_t
cv_csearch(EditLine *el, int direction, int ch, int count, int tflag)
{
char *cp;
+10 -10
View File
@@ -52,15 +52,15 @@ typedef struct el_search_t {
} el_search_t;
protected int el_match(const char *, const char *);
protected int search_init(EditLine *);
protected void search_end(EditLine *);
protected int c_hmatch(EditLine *, const char *);
protected void c_setpat(EditLine *);
protected el_action_t ce_inc_search(EditLine *, int);
protected el_action_t cv_search(EditLine *, int);
protected el_action_t ce_search_line(EditLine *, int);
protected el_action_t cv_repeat_srch(EditLine *, int);
protected el_action_t cv_csearch(EditLine *, int, int, int, int);
int el_match(const char *, const char *);
int search_init(EditLine *);
void search_end(EditLine *);
int c_hmatch(EditLine *, const char *);
void c_setpat(EditLine *);
el_action_t ce_inc_search(EditLine *, int);
el_action_t cv_search(EditLine *, int);
el_action_t ce_search_line(EditLine *, int);
el_action_t cv_repeat_srch(EditLine *, int);
el_action_t cv_csearch(EditLine *, int, int, int, int);
#endif /* _h_el_search */
+4 -4
View File
@@ -103,7 +103,7 @@ sig_handler(int signo)
/* sig_init():
* Initialize all signal stuff
*/
protected int
int
sig_init(EditLine *el)
{
int i;
@@ -132,7 +132,7 @@ sig_init(EditLine *el)
/* sig_end():
* Clear all signal stuff
*/
protected void
void
sig_end(EditLine *el)
{
@@ -144,7 +144,7 @@ sig_end(EditLine *el)
/* sig_set():
* set all the signal handlers
*/
protected void
void
sig_set(EditLine *el)
{
int i;
@@ -170,7 +170,7 @@ sig_set(EditLine *el)
/* sig_clr():
* clear all the signal handlers
*/
protected void
void
sig_clr(EditLine *el)
{
int i;
+4 -4
View File
@@ -61,9 +61,9 @@
typedef void (*el_signalhandler_t)(int);
typedef el_signalhandler_t *el_signal_t;
protected void sig_end(EditLine*);
protected int sig_init(EditLine*);
protected void sig_set(EditLine*);
protected void sig_clr(EditLine*);
void sig_end(EditLine*);
int sig_init(EditLine*);
void sig_set(EditLine*);
void sig_clr(EditLine*);
#endif /* _h_el_sig */
+24 -24
View File
@@ -310,7 +310,7 @@ term_setflags(EditLine *el)
/* term_init():
* Initialize the terminal stuff
*/
protected int
int
term_init(EditLine *el)
{
@@ -341,7 +341,7 @@ term_init(EditLine *el)
/* term_end():
* Clean up the terminal stuff
*/
protected void
void
term_end(EditLine *el)
{
@@ -507,7 +507,7 @@ term_free_display(EditLine *el)
* move to line <where> (first line == 0)
* as efficiently as possible
*/
protected void
void
term_move_to_line(EditLine *el, int where)
{
int del;
@@ -563,7 +563,7 @@ term_move_to_line(EditLine *el, int where)
/* term_move_to_char():
* Move to the character position specified
*/
protected void
void
term_move_to_char(EditLine *el, int where)
{
int del, i;
@@ -652,7 +652,7 @@ mc_again:
/* term_overwrite():
* Overstrike num characters
*/
protected void
void
term_overwrite(EditLine *el, const char *cp, int n)
{
if (n <= 0)
@@ -694,7 +694,7 @@ term_overwrite(EditLine *el, const char *cp, int n)
/* term_deletechars():
* Delete num characters
*/
protected void
void
term_deletechars(EditLine *el, int num)
{
if (num <= 0)
@@ -736,7 +736,7 @@ term_deletechars(EditLine *el, int num)
* Puts terminal in insert character mode or inserts num
* characters in the line
*/
protected void
void
term_insertwrite(EditLine *el, char *cp, int num)
{
if (num <= 0)
@@ -797,7 +797,7 @@ term_insertwrite(EditLine *el, char *cp, int num)
/* term_clear_EOL():
* clear to end of line. There are num characters to clear
*/
protected void
void
term_clear_EOL(EditLine *el, int num)
{
int i;
@@ -815,7 +815,7 @@ term_clear_EOL(EditLine *el, int num)
/* term_clear_screen():
* Clear the screen
*/
protected void
void
term_clear_screen(EditLine *el)
{ /* clear the whole screen and home */
@@ -836,7 +836,7 @@ term_clear_screen(EditLine *el)
/* term_beep():
* Beep the way the terminal wants us
*/
protected void
void
term_beep(EditLine *el)
{
if (GoodStr(T_bl))
@@ -851,7 +851,7 @@ term_beep(EditLine *el)
/* term_clear_to_bottom():
* Clear to the bottom of the screen
*/
protected void
void
term_clear_to_bottom(EditLine *el)
{
if (GoodStr(T_cd))
@@ -861,7 +861,7 @@ term_clear_to_bottom(EditLine *el)
}
#endif
protected void
void
term_get(EditLine *el, const char **term)
{
*term = el->el_term.t_name;
@@ -871,7 +871,7 @@ term_get(EditLine *el, const char **term)
/* term_set():
* Read in the terminal capabilities from the requested terminal
*/
protected int
int
term_set(EditLine *el, const char *term)
{
int i;
@@ -960,7 +960,7 @@ term_set(EditLine *el, const char *term)
* Return the new window size in lines and cols, and
* true if the size was changed.
*/
protected int
int
term_get_size(EditLine *el, int *lins, int *cols)
{
@@ -996,7 +996,7 @@ term_get_size(EditLine *el, int *lins, int *cols)
/* term_change_size():
* Change the size of the terminal
*/
protected int
int
term_change_size(EditLine *el, int lins, int cols)
{
/*
@@ -1112,7 +1112,7 @@ term_reset_arrow(EditLine *el)
/* term_set_arrow():
* Set an arrow key binding
*/
protected int
int
term_set_arrow(EditLine *el, const char *name, key_value_t *fun, int type)
{
fkey_t *arrow = el->el_term.t_fkey;
@@ -1131,7 +1131,7 @@ term_set_arrow(EditLine *el, const char *name, key_value_t *fun, int type)
/* term_clear_arrow():
* Clear an arrow key binding
*/
protected int
int
term_clear_arrow(EditLine *el, const char *name)
{
fkey_t *arrow = el->el_term.t_fkey;
@@ -1149,7 +1149,7 @@ term_clear_arrow(EditLine *el, const char *name)
/* term_print_arrow():
* Print the arrow key bindings
*/
protected void
void
term_print_arrow(EditLine *el, const char *name)
{
int i;
@@ -1166,7 +1166,7 @@ term_print_arrow(EditLine *el, const char *name)
/* term_bind_arrow():
* Bind the arrow keys
*/
protected void
void
term_bind_arrow(EditLine *el)
{
el_action_t *map;
@@ -1223,7 +1223,7 @@ term_bind_arrow(EditLine *el)
/* term__putc():
* Add a character
*/
protected int
int
term__putc(int c)
{
@@ -1234,7 +1234,7 @@ term__putc(int c)
/* term__flush():
* Flush output
*/
protected void
void
term__flush(void)
{
@@ -1245,7 +1245,7 @@ term__flush(void)
/* term_telltc():
* Print the current termcap characteristics
*/
protected int
int
/*ARGSUSED*/
term_telltc(EditLine *el, int argc __unused,
const char **argv __unused)
@@ -1281,7 +1281,7 @@ term_telltc(EditLine *el, int argc __unused,
/* term_settc():
* Change the current terminal characteristics
*/
protected int
int
/*ARGSUSED*/
term_settc(EditLine *el, int argc __unused,
const char **argv)
@@ -1358,7 +1358,7 @@ term_settc(EditLine *el, int argc __unused,
/* term_echotc():
* Print the termcap string out with variable substitution
*/
protected int
int
/*ARGSUSED*/
term_echotc(EditLine *el, int argc __unused,
const char **argv)
+23 -23
View File
@@ -81,29 +81,29 @@ typedef struct {
#define A_K_EN 5
#define A_K_NKEYS 6
protected void term_move_to_line(EditLine *, int);
protected void term_move_to_char(EditLine *, int);
protected void term_clear_EOL(EditLine *, int);
protected void term_overwrite(EditLine *, const char *, int);
protected void term_insertwrite(EditLine *, char *, int);
protected void term_deletechars(EditLine *, int);
protected void term_clear_screen(EditLine *);
protected void term_beep(EditLine *);
protected int term_change_size(EditLine *, int, int);
protected int term_get_size(EditLine *, int *, int *);
protected int term_init(EditLine *);
protected void term_bind_arrow(EditLine *);
protected void term_print_arrow(EditLine *, const char *);
protected int term_clear_arrow(EditLine *, const char *);
protected int term_set_arrow(EditLine *, const char *, key_value_t *, int);
protected void term_end(EditLine *);
protected void term_get(EditLine *, const char **);
protected int term_set(EditLine *, const char *);
protected int term_settc(EditLine *, int, const char **);
protected int term_telltc(EditLine *, int, const char **);
protected int term_echotc(EditLine *, int, const char **);
protected int term__putc(int);
protected void term__flush(void);
void term_move_to_line(EditLine *, int);
void term_move_to_char(EditLine *, int);
void term_clear_EOL(EditLine *, int);
void term_overwrite(EditLine *, const char *, int);
void term_insertwrite(EditLine *, char *, int);
void term_deletechars(EditLine *, int);
void term_clear_screen(EditLine *);
void term_beep(EditLine *);
int term_change_size(EditLine *, int, int);
int term_get_size(EditLine *, int *, int *);
int term_init(EditLine *);
void term_bind_arrow(EditLine *);
void term_print_arrow(EditLine *, const char *);
int term_clear_arrow(EditLine *, const char *);
int term_set_arrow(EditLine *, const char *, key_value_t *, int);
void term_end(EditLine *);
void term_get(EditLine *, const char **);
int term_set(EditLine *, const char *);
int term_settc(EditLine *, int, const char **);
int term_telltc(EditLine *, int, const char **);
int term_echotc(EditLine *, int, const char **);
int term__putc(int);
void term__flush(void);
/*
* Easy access macros
+8 -8
View File
@@ -522,7 +522,7 @@ tty_setup(EditLine *el)
return (0);
}
protected int
int
tty_init(EditLine *el)
{
@@ -537,7 +537,7 @@ tty_init(EditLine *el)
/* tty_end():
* Restore the tty to its original settings
*/
protected void
void
/*ARGSUSED*/
tty_end(EditLine *el __unused)
{
@@ -834,7 +834,7 @@ tty__setchar(struct termios *td, unsigned char *s)
/* tty_bind_char():
* Rebind the editline functions
*/
protected void
void
tty_bind_char(EditLine *el, int force)
{
@@ -880,7 +880,7 @@ tty_bind_char(EditLine *el, int force)
/* tty_rawmode():
* Set terminal into 1 character at a time mode.
*/
protected int
int
tty_rawmode(EditLine *el)
{
@@ -1008,7 +1008,7 @@ tty_rawmode(EditLine *el)
/* tty_cookedmode():
* Set the tty back to normal mode
*/
protected int
int
tty_cookedmode(EditLine *el)
{ /* set tty in normal setup */
@@ -1034,7 +1034,7 @@ tty_cookedmode(EditLine *el)
/* tty_quotemode():
* Turn on quote mode
*/
protected int
int
tty_quotemode(EditLine *el)
{
if (el->el_tty.t_mode == QU_IO)
@@ -1069,7 +1069,7 @@ tty_quotemode(EditLine *el)
/* tty_noquotemode():
* Turn off quote mode
*/
protected int
int
tty_noquotemode(EditLine *el)
{
@@ -1090,7 +1090,7 @@ tty_noquotemode(EditLine *el)
/* tty_stty():
* Stty builtin
*/
protected int
int
/*ARGSUSED*/
tty_stty(EditLine *el, int argc __unused, const char **argv)
{
+8 -8
View File
@@ -456,14 +456,14 @@ typedef struct {
typedef unsigned char ttychar_t[NN_IO][C_NCC];
protected int tty_init(EditLine *);
protected void tty_end(EditLine *);
protected int tty_stty(EditLine *, int, const char **);
protected int tty_rawmode(EditLine *);
protected int tty_cookedmode(EditLine *);
protected int tty_quotemode(EditLine *);
protected int tty_noquotemode(EditLine *);
protected void tty_bind_char(EditLine *, int);
int tty_init(EditLine *);
void tty_end(EditLine *);
int tty_stty(EditLine *, int, const char **);
int tty_rawmode(EditLine *);
int tty_cookedmode(EditLine *);
int tty_quotemode(EditLine *);
int tty_noquotemode(EditLine *);
void tty_bind_char(EditLine *, int);
typedef struct {
ttyperm_t t_t;
+47 -47
View File
@@ -113,7 +113,7 @@ cv_paste(EditLine *el, int c)
* Vi paste previous deletion to the right of the cursor
* [p]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_paste_next(EditLine *el, int c __unused)
{
@@ -126,7 +126,7 @@ vi_paste_next(EditLine *el, int c __unused)
* Vi paste previous deletion to the left of the cursor
* [P]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_paste_prev(EditLine *el, int c __unused)
{
@@ -139,7 +139,7 @@ vi_paste_prev(EditLine *el, int c __unused)
* Vi move to the previous space delimited word
* [B]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_prev_big_word(EditLine *el, int c)
{
@@ -164,7 +164,7 @@ vi_prev_big_word(EditLine *el, int c)
* Vi move to the previous word
* [b]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_prev_word(EditLine *el, int c __unused)
{
@@ -189,7 +189,7 @@ vi_prev_word(EditLine *el, int c __unused)
* Vi move to the next space delimited word
* [W]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_next_big_word(EditLine *el, int c)
{
@@ -213,7 +213,7 @@ vi_next_big_word(EditLine *el, int c)
* Vi move to the next word
* [w]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_next_word(EditLine *el, int c __unused)
{
@@ -237,7 +237,7 @@ vi_next_word(EditLine *el, int c __unused)
* Vi change case of character under the cursor and advance one character
* [~]
*/
protected el_action_t
el_action_t
vi_change_case(EditLine *el, int c)
{
int i;
@@ -268,7 +268,7 @@ vi_change_case(EditLine *el, int c)
* Vi change prefix command
* [c]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_change_meta(EditLine *el, int c __unused)
{
@@ -285,7 +285,7 @@ vi_change_meta(EditLine *el, int c __unused)
* Vi enter insert mode at the beginning of line
* [I]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_insert_at_bol(EditLine *el, int c __unused)
{
@@ -301,7 +301,7 @@ vi_insert_at_bol(EditLine *el, int c __unused)
* Vi replace character under the cursor with the next character typed
* [r]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_replace_char(EditLine *el, int c __unused)
{
@@ -320,7 +320,7 @@ vi_replace_char(EditLine *el, int c __unused)
* Vi enter replace mode
* [R]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_replace_mode(EditLine *el, int c __unused)
{
@@ -336,7 +336,7 @@ vi_replace_mode(EditLine *el, int c __unused)
* Vi replace character under the cursor and enter insert mode
* [s]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_substitute_char(EditLine *el, int c __unused)
{
@@ -351,7 +351,7 @@ vi_substitute_char(EditLine *el, int c __unused)
* Vi substitute entire line
* [S]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_substitute_line(EditLine *el, int c __unused)
{
@@ -369,7 +369,7 @@ vi_substitute_line(EditLine *el, int c __unused)
* Vi change to end of line
* [C]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_change_to_eol(EditLine *el, int c __unused)
{
@@ -387,7 +387,7 @@ vi_change_to_eol(EditLine *el, int c __unused)
* Vi enter insert mode
* [i]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_insert(EditLine *el, int c __unused)
{
@@ -402,7 +402,7 @@ vi_insert(EditLine *el, int c __unused)
* Vi enter insert mode after the cursor
* [a]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_add(EditLine *el, int c __unused)
{
@@ -427,7 +427,7 @@ vi_add(EditLine *el, int c __unused)
* Vi enter insert mode at end of line
* [A]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_add_at_eol(EditLine *el, int c __unused)
{
@@ -443,7 +443,7 @@ vi_add_at_eol(EditLine *el, int c __unused)
* Vi delete prefix command
* [d]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_delete_meta(EditLine *el, int c __unused)
{
@@ -456,7 +456,7 @@ vi_delete_meta(EditLine *el, int c __unused)
* Vi move to the end of the current space delimited word
* [E]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_end_big_word(EditLine *el, int c)
{
@@ -480,7 +480,7 @@ vi_end_big_word(EditLine *el, int c)
* Vi move to the end of the current word
* [e]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_end_word(EditLine *el, int c __unused)
{
@@ -504,7 +504,7 @@ vi_end_word(EditLine *el, int c __unused)
* Vi undo last change
* [u]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_undo(EditLine *el, int c __unused)
{
@@ -530,7 +530,7 @@ vi_undo(EditLine *el, int c __unused)
* Vi enter command mode (use alternative key bindings)
* [<ESC>]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_command_mode(EditLine *el, int c __unused)
{
@@ -555,7 +555,7 @@ vi_command_mode(EditLine *el, int c __unused)
* Vi move to the beginning of line
* [0]
*/
protected el_action_t
el_action_t
vi_zero(EditLine *el, int c)
{
@@ -575,7 +575,7 @@ vi_zero(EditLine *el, int c)
* Vi move to previous character (backspace)
* [^H] in insert mode only
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_delete_prev_char(EditLine *el, int c __unused)
{
@@ -593,7 +593,7 @@ vi_delete_prev_char(EditLine *el, int c __unused)
* Vi list choices for completion or indicate end of file if empty line
* [^D]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_list_or_eof(EditLine *el, int c __unused)
{
@@ -631,7 +631,7 @@ vi_list_or_eof(EditLine *el, int c __unused)
* Vi cut from beginning of line to cursor
* [^U]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_kill_line_prev(EditLine *el, int c __unused)
{
@@ -652,7 +652,7 @@ vi_kill_line_prev(EditLine *el, int c __unused)
* Vi search history previous
* [?]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_search_prev(EditLine *el, int c __unused)
{
@@ -665,7 +665,7 @@ vi_search_prev(EditLine *el, int c __unused)
* Vi search history next
* [/]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_search_next(EditLine *el, int c __unused)
{
@@ -678,7 +678,7 @@ vi_search_next(EditLine *el, int c __unused)
* Vi repeat current search in the same search direction
* [n]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_repeat_search_next(EditLine *el, int c __unused)
{
@@ -695,7 +695,7 @@ vi_repeat_search_next(EditLine *el, int c __unused)
* [N]
*/
/*ARGSUSED*/
protected el_action_t
el_action_t
vi_repeat_search_prev(EditLine *el, int c __unused)
{
@@ -712,7 +712,7 @@ vi_repeat_search_prev(EditLine *el, int c __unused)
* Vi move to the character specified next
* [f]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_next_char(EditLine *el, int c __unused)
{
@@ -724,7 +724,7 @@ vi_next_char(EditLine *el, int c __unused)
* Vi move to the character specified previous
* [F]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_prev_char(EditLine *el, int c __unused)
{
@@ -736,7 +736,7 @@ vi_prev_char(EditLine *el, int c __unused)
* Vi move up to the character specified next
* [t]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_to_next_char(EditLine *el, int c __unused)
{
@@ -748,7 +748,7 @@ vi_to_next_char(EditLine *el, int c __unused)
* Vi move up to the character specified previous
* [T]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_to_prev_char(EditLine *el, int c __unused)
{
@@ -760,7 +760,7 @@ vi_to_prev_char(EditLine *el, int c __unused)
* Vi repeat current character search in the same search direction
* [;]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_repeat_next_char(EditLine *el, int c __unused)
{
@@ -774,7 +774,7 @@ vi_repeat_next_char(EditLine *el, int c __unused)
* Vi repeat current character search in the opposite search direction
* [,]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_repeat_prev_char(EditLine *el, int c __unused)
{
@@ -792,7 +792,7 @@ vi_repeat_prev_char(EditLine *el, int c __unused)
* Vi go to matching () {} or []
* [%]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_match(EditLine *el, int c)
{
@@ -839,7 +839,7 @@ vi_match(EditLine *el, int c)
* Vi undo all changes to line
* [U]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_undo_line(EditLine *el, int c)
{
@@ -853,7 +853,7 @@ vi_undo_line(EditLine *el, int c)
* [|]
* NB netbsd vi goes to screen column 'n', posix says nth character
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_to_column(EditLine *el, int c)
{
@@ -867,7 +867,7 @@ vi_to_column(EditLine *el, int c)
* Vi yank to end of line
* [Y]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_yank_end(EditLine *el, int c)
{
@@ -881,7 +881,7 @@ vi_yank_end(EditLine *el, int c)
* Vi yank
* [y]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_yank(EditLine *el, int c)
{
@@ -893,7 +893,7 @@ vi_yank(EditLine *el, int c)
* Vi comment out current command
* [#]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_comment_out(EditLine *el, int c)
{
@@ -911,7 +911,7 @@ vi_comment_out(EditLine *el, int c)
* NB: posix implies that we should enter insert mode, however
* this is against historical precedent...
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_alias(EditLine *el, int c)
{
@@ -943,7 +943,7 @@ vi_alias(EditLine *el, int c)
* Vi go to specified history file line.
* [G]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_to_history_line(EditLine *el, int c)
{
@@ -988,7 +988,7 @@ vi_to_history_line(EditLine *el, int c)
* Vi edit history line with vi
* [v]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_histedit(EditLine *el, int c)
{
@@ -1044,7 +1044,7 @@ vi_histedit(EditLine *el, int c)
* Who knows where this one came from!
* '_' in vi means 'entire current line', so 'cc' is a synonym for 'c_'
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_history_word(EditLine *el, int c)
{
@@ -1093,7 +1093,7 @@ vi_history_word(EditLine *el, int c)
* Vi redo last non-motion command
* [.]
*/
protected el_action_t
el_action_t
/*ARGSUSED*/
vi_redo(EditLine *el, int c)
{
+47 -47
View File
@@ -1,51 +1,51 @@
/* Automatically generated file, do not edit */
#ifndef _h_vi_c
#define _h_vi_c
protected el_action_t vi_paste_next (EditLine *, int);
protected el_action_t vi_paste_prev (EditLine *, int);
protected el_action_t vi_prev_big_word (EditLine *, int);
protected el_action_t vi_prev_word (EditLine *, int);
protected el_action_t vi_next_big_word (EditLine *, int);
protected el_action_t vi_next_word (EditLine *, int);
protected el_action_t vi_change_case (EditLine *, int);
protected el_action_t vi_change_meta (EditLine *, int);
protected el_action_t vi_insert_at_bol (EditLine *, int);
protected el_action_t vi_replace_char (EditLine *, int);
protected el_action_t vi_replace_mode (EditLine *, int);
protected el_action_t vi_substitute_char (EditLine *, int);
protected el_action_t vi_substitute_line (EditLine *, int);
protected el_action_t vi_change_to_eol (EditLine *, int);
protected el_action_t vi_insert (EditLine *, int);
protected el_action_t vi_add (EditLine *, int);
protected el_action_t vi_add_at_eol (EditLine *, int);
protected el_action_t vi_delete_meta (EditLine *, int);
protected el_action_t vi_end_big_word (EditLine *, int);
protected el_action_t vi_end_word (EditLine *, int);
protected el_action_t vi_undo (EditLine *, int);
protected el_action_t vi_command_mode (EditLine *, int);
protected el_action_t vi_zero (EditLine *, int);
protected el_action_t vi_delete_prev_char (EditLine *, int);
protected el_action_t vi_list_or_eof (EditLine *, int);
protected el_action_t vi_kill_line_prev (EditLine *, int);
protected el_action_t vi_search_prev (EditLine *, int);
protected el_action_t vi_search_next (EditLine *, int);
protected el_action_t vi_repeat_search_next (EditLine *, int);
protected el_action_t vi_repeat_search_prev (EditLine *, int);
protected el_action_t vi_next_char (EditLine *, int);
protected el_action_t vi_prev_char (EditLine *, int);
protected el_action_t vi_to_next_char (EditLine *, int);
protected el_action_t vi_to_prev_char (EditLine *, int);
protected el_action_t vi_repeat_next_char (EditLine *, int);
protected el_action_t vi_repeat_prev_char (EditLine *, int);
protected el_action_t vi_match (EditLine *, int);
protected el_action_t vi_undo_line (EditLine *, int);
protected el_action_t vi_to_column (EditLine *, int);
protected el_action_t vi_yank_end (EditLine *, int);
protected el_action_t vi_yank (EditLine *, int);
protected el_action_t vi_comment_out (EditLine *, int);
protected el_action_t vi_alias (EditLine *, int);
protected el_action_t vi_to_history_line (EditLine *, int);
protected el_action_t vi_histedit (EditLine *, int);
protected el_action_t vi_history_word (EditLine *, int);
protected el_action_t vi_redo (EditLine *, int);
el_action_t vi_paste_next (EditLine *, int);
el_action_t vi_paste_prev (EditLine *, int);
el_action_t vi_prev_big_word (EditLine *, int);
el_action_t vi_prev_word (EditLine *, int);
el_action_t vi_next_big_word (EditLine *, int);
el_action_t vi_next_word (EditLine *, int);
el_action_t vi_change_case (EditLine *, int);
el_action_t vi_change_meta (EditLine *, int);
el_action_t vi_insert_at_bol (EditLine *, int);
el_action_t vi_replace_char (EditLine *, int);
el_action_t vi_replace_mode (EditLine *, int);
el_action_t vi_substitute_char (EditLine *, int);
el_action_t vi_substitute_line (EditLine *, int);
el_action_t vi_change_to_eol (EditLine *, int);
el_action_t vi_insert (EditLine *, int);
el_action_t vi_add (EditLine *, int);
el_action_t vi_add_at_eol (EditLine *, int);
el_action_t vi_delete_meta (EditLine *, int);
el_action_t vi_end_big_word (EditLine *, int);
el_action_t vi_end_word (EditLine *, int);
el_action_t vi_undo (EditLine *, int);
el_action_t vi_command_mode (EditLine *, int);
el_action_t vi_zero (EditLine *, int);
el_action_t vi_delete_prev_char (EditLine *, int);
el_action_t vi_list_or_eof (EditLine *, int);
el_action_t vi_kill_line_prev (EditLine *, int);
el_action_t vi_search_prev (EditLine *, int);
el_action_t vi_search_next (EditLine *, int);
el_action_t vi_repeat_search_next (EditLine *, int);
el_action_t vi_repeat_search_prev (EditLine *, int);
el_action_t vi_next_char (EditLine *, int);
el_action_t vi_prev_char (EditLine *, int);
el_action_t vi_to_next_char (EditLine *, int);
el_action_t vi_to_prev_char (EditLine *, int);
el_action_t vi_repeat_next_char (EditLine *, int);
el_action_t vi_repeat_prev_char (EditLine *, int);
el_action_t vi_match (EditLine *, int);
el_action_t vi_undo_line (EditLine *, int);
el_action_t vi_to_column (EditLine *, int);
el_action_t vi_yank_end (EditLine *, int);
el_action_t vi_yank (EditLine *, int);
el_action_t vi_comment_out (EditLine *, int);
el_action_t vi_alias (EditLine *, int);
el_action_t vi_to_history_line (EditLine *, int);
el_action_t vi_histedit (EditLine *, int);
el_action_t vi_history_word (EditLine *, int);
el_action_t vi_redo (EditLine *, int);
#endif /* _h_vi_c */