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