Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.\" $NetBSD: editline.3,v 1.55 2007/01/12 16:31:13 christos Exp $
|
1997-06-25 08:14:24 +00:00
|
|
|
.\"
|
2005-08-07 20:55:59 +00:00
|
|
|
.\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
|
1997-06-25 08:14:24 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
2001-10-01 08:41:27 +00:00
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
1997-06-25 08:14:24 +00:00
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2001-10-01 15:53:07 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.Dd January 12, 2007
|
1997-06-25 08:14:24 +00:00
|
|
|
.Dt EDITLINE 3
|
2010-04-14 19:08:06 +00:00
|
|
|
.Os
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm editline ,
|
|
|
|
.Nm el_init ,
|
|
|
|
.Nm el_end ,
|
|
|
|
.Nm el_reset ,
|
|
|
|
.Nm el_gets ,
|
|
|
|
.Nm el_getc ,
|
|
|
|
.Nm el_push ,
|
|
|
|
.Nm el_parse ,
|
|
|
|
.Nm el_set ,
|
2005-10-20 08:26:03 +00:00
|
|
|
.Nm el_get ,
|
1997-06-25 08:14:24 +00:00
|
|
|
.Nm el_source ,
|
|
|
|
.Nm el_resize ,
|
|
|
|
.Nm el_line ,
|
|
|
|
.Nm el_insertstr ,
|
|
|
|
.Nm el_deletestr ,
|
|
|
|
.Nm history_init ,
|
|
|
|
.Nm history_end ,
|
2005-08-07 20:55:59 +00:00
|
|
|
.Nm history ,
|
|
|
|
.Nm tok_init ,
|
|
|
|
.Nm tok_end ,
|
|
|
|
.Nm tok_reset ,
|
|
|
|
.Nm tok_line ,
|
|
|
|
.Nm tok_str
|
|
|
|
.Nd line editor, history and tokenization functions
|
2000-04-22 16:01:33 +00:00
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libedit
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-10-01 15:53:07 +00:00
|
|
|
.In histedit.h
|
1997-06-25 08:14:24 +00:00
|
|
|
.Ft EditLine *
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fn el_init "const char *prog" "FILE *fin" "FILE *fout" "FILE *ferr"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Ft void
|
|
|
|
.Fn el_end "EditLine *e"
|
|
|
|
.Ft void
|
|
|
|
.Fn el_reset "EditLine *e"
|
|
|
|
.Ft const char *
|
|
|
|
.Fn el_gets "EditLine *e" "int *count"
|
|
|
|
.Ft int
|
|
|
|
.Fn el_getc "EditLine *e" "char *ch"
|
|
|
|
.Ft void
|
2005-11-24 10:32:39 +00:00
|
|
|
.Fn el_push "EditLine *e" "char *str"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Ft int
|
2005-08-07 20:55:59 +00:00
|
|
|
.Fn el_parse "EditLine *e" "int argc" "const char *argv[]"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Ft int
|
|
|
|
.Fn el_set "EditLine *e" "int op" "..."
|
|
|
|
.Ft int
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.Fn el_get "EditLine *e" "int op" "..."
|
2001-10-01 08:41:27 +00:00
|
|
|
.Ft int
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fn el_source "EditLine *e" "const char *file"
|
|
|
|
.Ft void
|
|
|
|
.Fn el_resize "EditLine *e"
|
|
|
|
.Ft const LineInfo *
|
|
|
|
.Fn el_line "EditLine *e"
|
|
|
|
.Ft int
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fn el_insertstr "EditLine *e" "const char *str"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Ft void
|
|
|
|
.Fn el_deletestr "EditLine *e" "int count"
|
|
|
|
.Ft History *
|
|
|
|
.Fn history_init
|
|
|
|
.Ft void
|
|
|
|
.Fn history_end "History *h"
|
2001-10-01 08:41:27 +00:00
|
|
|
.Ft int
|
|
|
|
.Fn history "History *h" "HistEvent *ev" "int op" "..."
|
2005-08-07 20:55:59 +00:00
|
|
|
.Ft Tokenizer *
|
|
|
|
.Fn tok_init "const char *IFS"
|
|
|
|
.Ft void
|
|
|
|
.Fn tok_end "Tokenizer *t"
|
|
|
|
.Ft void
|
|
|
|
.Fn tok_reset "Tokenizer *t"
|
|
|
|
.Ft int
|
2005-11-17 13:00:00 +00:00
|
|
|
.Fo tok_line
|
|
|
|
.Fa "Tokenizer *t" "const LineInfo *li" "int *argc" "const char **argv[]"
|
|
|
|
.Fa "int *cursorc" "int *cursoro"
|
|
|
|
.Fc
|
2005-08-07 20:55:59 +00:00
|
|
|
.Ft int
|
|
|
|
.Fn tok_str "Tokenizer *t" "const char *str" "int *argc" "const char **argv[]"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2005-08-07 20:55:59 +00:00
|
|
|
library provides generic line editing, history and tokenization functions,
|
1997-06-25 08:14:24 +00:00
|
|
|
similar to those found in
|
|
|
|
.Xr sh 1 .
|
|
|
|
.Pp
|
|
|
|
These functions are available in the
|
|
|
|
.Nm libedit
|
|
|
|
library (which needs the
|
|
|
|
.Nm libtermcap
|
|
|
|
library).
|
|
|
|
Programs should be linked with
|
|
|
|
.Fl ledit ltermcap .
|
|
|
|
.Sh LINE EDITING FUNCTIONS
|
|
|
|
The line editing functions use a common data structure,
|
|
|
|
.Fa EditLine ,
|
|
|
|
which is created by
|
|
|
|
.Fn el_init
|
|
|
|
and freed by
|
|
|
|
.Fn el_end .
|
|
|
|
.Pp
|
|
|
|
The following functions are available:
|
|
|
|
.Bl -tag -width 4n
|
|
|
|
.It Fn el_init
|
|
|
|
Initialise the line editor, and return a data structure
|
|
|
|
to be used by all other line editing functions.
|
|
|
|
.Fa prog
|
|
|
|
is the name of the invoking program, used when reading the
|
|
|
|
.Xr editrc 5
|
|
|
|
file to determine which settings to use.
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fa fin ,
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fa fout
|
2001-10-01 08:41:27 +00:00
|
|
|
and
|
|
|
|
.Fa ferr
|
|
|
|
are the input, output, and error streams (respectively) to use.
|
1997-06-25 08:14:24 +00:00
|
|
|
In this documentation, references to
|
|
|
|
.Dq the tty
|
|
|
|
are actually to this input/output stream combination.
|
|
|
|
.It Fn el_end
|
|
|
|
Clean up and finish with
|
|
|
|
.Fa e ,
|
|
|
|
assumed to have been created with
|
|
|
|
.Fn el_init .
|
|
|
|
.It Fn el_reset
|
|
|
|
Reset the tty and the parser.
|
|
|
|
This should be called after an error which may have upset the tty's
|
|
|
|
state.
|
|
|
|
.It Fn el_gets
|
|
|
|
Read a line from the tty.
|
|
|
|
.Fa count
|
|
|
|
is modified to contain the number of characters read.
|
|
|
|
Returns the line read if successful, or
|
|
|
|
.Dv NULL
|
|
|
|
if no characters were read or if an error occurred.
|
|
|
|
.It Fn el_getc
|
|
|
|
Read a character from the tty.
|
|
|
|
.Fa ch
|
|
|
|
is modified to contain the character read.
|
2005-08-07 20:55:59 +00:00
|
|
|
Returns the number of characters read if successful, \-1 otherwise.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Fn el_push
|
|
|
|
Pushes
|
|
|
|
.Fa str
|
|
|
|
back onto the input stream.
|
|
|
|
This is used by the macro expansion mechanism.
|
|
|
|
Refer to the description of
|
|
|
|
.Ic bind
|
|
|
|
.Fl s
|
|
|
|
in
|
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Fn el_parse
|
|
|
|
Parses the
|
|
|
|
.Fa argv
|
|
|
|
array (which is
|
|
|
|
.Fa argc
|
|
|
|
elements in size)
|
|
|
|
to execute builtin
|
|
|
|
.Nm
|
|
|
|
commands.
|
|
|
|
If the command is prefixed with
|
2005-11-17 13:00:00 +00:00
|
|
|
.Dq prog:
|
1997-06-25 08:14:24 +00:00
|
|
|
then
|
|
|
|
.Fn el_parse
|
|
|
|
will only execute the command if
|
|
|
|
.Dq prog
|
|
|
|
matches the
|
|
|
|
.Fa prog
|
|
|
|
argument supplied to
|
|
|
|
.Fn el_init .
|
|
|
|
The return value is
|
2005-08-07 20:55:59 +00:00
|
|
|
\-1 if the command is unknown,
|
1997-06-25 08:14:24 +00:00
|
|
|
0 if there was no error or
|
|
|
|
.Dq prog
|
2005-02-13 22:25:33 +00:00
|
|
|
did not match, or
|
1997-06-25 08:14:24 +00:00
|
|
|
1 if the command returned an error.
|
|
|
|
Refer to
|
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Fn el_set
|
|
|
|
Set
|
|
|
|
.Nm
|
|
|
|
parameters.
|
|
|
|
.Fa op
|
|
|
|
determines which parameter to set, and each operation has its
|
|
|
|
own parameter list.
|
|
|
|
.Pp
|
|
|
|
The following values for
|
|
|
|
.Fa op
|
|
|
|
are supported, along with the required argument list:
|
|
|
|
.Bl -tag -width 4n
|
|
|
|
.It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
|
|
|
|
Define prompt printing function as
|
|
|
|
.Fa f ,
|
|
|
|
which is to return a string that contains the prompt.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
|
|
|
|
Define right side prompt printing function as
|
|
|
|
.Fa f ,
|
|
|
|
which is to return a string that contains the prompt.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv EL_TERMINAL , Fa "const char *type"
|
|
|
|
Define terminal type of the tty to be
|
|
|
|
.Fa type ,
|
|
|
|
or to
|
|
|
|
.Ev TERM
|
|
|
|
if
|
|
|
|
.Fa type
|
|
|
|
is
|
|
|
|
.Dv NULL .
|
|
|
|
.It Dv EL_EDITOR , Fa "const char *mode"
|
|
|
|
Set editing mode to
|
|
|
|
.Fa mode ,
|
|
|
|
which must be one of
|
|
|
|
.Dq emacs
|
|
|
|
or
|
|
|
|
.Dq vi .
|
|
|
|
.It Dv EL_SIGNAL , Fa "int flag"
|
|
|
|
If
|
|
|
|
.Fa flag
|
|
|
|
is non-zero,
|
|
|
|
.Nm
|
|
|
|
will install its own signal handler for the following signals when
|
|
|
|
reading command input:
|
|
|
|
.Dv SIGCONT ,
|
|
|
|
.Dv SIGHUP ,
|
|
|
|
.Dv SIGINT ,
|
|
|
|
.Dv SIGQUIT ,
|
|
|
|
.Dv SIGSTOP ,
|
|
|
|
.Dv SIGTERM ,
|
|
|
|
.Dv SIGTSTP ,
|
|
|
|
and
|
|
|
|
.Dv SIGWINCH .
|
|
|
|
Otherwise, the current signal handlers will be used.
|
|
|
|
.It Dv EL_BIND , Xo
|
|
|
|
.Fa "const char *" ,
|
|
|
|
.Fa "..." ,
|
|
|
|
.Dv NULL
|
|
|
|
.Xc
|
|
|
|
Perform the
|
|
|
|
.Ic bind
|
|
|
|
builtin command.
|
2001-07-15 07:53:42 +00:00
|
|
|
Refer to
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Dv EL_ECHOTC , Xo
|
|
|
|
.Fa "const char *" ,
|
|
|
|
.Fa "..." ,
|
|
|
|
.Dv NULL
|
|
|
|
.Xc
|
|
|
|
Perform the
|
|
|
|
.Ic echotc
|
|
|
|
builtin command.
|
2001-07-15 07:53:42 +00:00
|
|
|
Refer to
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Dv EL_SETTC , Xo
|
|
|
|
.Fa "const char *" ,
|
|
|
|
.Fa "..." ,
|
|
|
|
.Dv NULL
|
|
|
|
.Xc
|
|
|
|
Perform the
|
|
|
|
.Ic settc
|
|
|
|
builtin command.
|
2001-07-15 07:53:42 +00:00
|
|
|
Refer to
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Dv EL_SETTY , Xo
|
|
|
|
.Fa "const char *" ,
|
|
|
|
.Fa "..." ,
|
|
|
|
.Dv NULL
|
|
|
|
.Xc
|
|
|
|
Perform the
|
|
|
|
.Ic setty
|
|
|
|
builtin command.
|
2001-07-15 07:53:42 +00:00
|
|
|
Refer to
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Dv EL_TELLTC , Xo
|
|
|
|
.Fa "const char *" ,
|
|
|
|
.Fa "..." ,
|
|
|
|
.Dv NULL
|
|
|
|
.Xc
|
|
|
|
Perform the
|
|
|
|
.Ic telltc
|
|
|
|
builtin command.
|
2001-07-15 07:53:42 +00:00
|
|
|
Refer to
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xr editrc 5
|
|
|
|
for more information.
|
|
|
|
.It Dv EL_ADDFN , Xo
|
|
|
|
.Fa "const char *name" ,
|
|
|
|
.Fa "const char *help" ,
|
2005-08-07 20:55:59 +00:00
|
|
|
.Fa "unsigned char (*func)(EditLine *e, int ch)"
|
1997-06-25 08:14:24 +00:00
|
|
|
.Xc
|
|
|
|
Add a user defined function,
|
|
|
|
.Fn func ,
|
|
|
|
referred to as
|
|
|
|
.Fa name
|
|
|
|
which is invoked when a key which is bound to
|
|
|
|
.Fa name
|
|
|
|
is entered.
|
|
|
|
.Fa help
|
|
|
|
is a description of
|
|
|
|
.Fa name .
|
|
|
|
At invocation time,
|
|
|
|
.Fa ch
|
|
|
|
is the key which caused the invocation.
|
|
|
|
The return value of
|
|
|
|
.Fn func
|
|
|
|
should be one of:
|
|
|
|
.Bl -tag -width "CC_REDISPLAY"
|
|
|
|
.It Dv CC_NORM
|
|
|
|
Add a normal character.
|
|
|
|
.It Dv CC_NEWLINE
|
|
|
|
End of line was entered.
|
|
|
|
.It Dv CC_EOF
|
|
|
|
EOF was entered.
|
|
|
|
.It Dv CC_ARGHACK
|
|
|
|
Expecting further command input as arguments, do nothing visually.
|
|
|
|
.It Dv CC_REFRESH
|
|
|
|
Refresh display.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv CC_REFRESH_BEEP
|
|
|
|
Refresh display, and beep.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv CC_CURSOR
|
|
|
|
Cursor moved, so update and perform
|
2001-10-01 15:53:07 +00:00
|
|
|
.Dv CC_REFRESH .
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv CC_REDISPLAY
|
|
|
|
Redisplay entire input line.
|
|
|
|
This is useful if a key binding outputs extra information.
|
|
|
|
.It Dv CC_ERROR
|
|
|
|
An error occurred.
|
|
|
|
Beep, and flush tty.
|
|
|
|
.It Dv CC_FATAL
|
|
|
|
Fatal error, reset tty to known state.
|
|
|
|
.El
|
|
|
|
.It Dv EL_HIST , Xo
|
|
|
|
.Fa "History *(*func)(History *, int op, ...)" ,
|
|
|
|
.Fa "const char *ptr"
|
|
|
|
.Xc
|
|
|
|
Defines which history function to use, which is usually
|
|
|
|
.Fn history .
|
|
|
|
.Fa ptr
|
|
|
|
should be the value returned by
|
|
|
|
.Fn history_init .
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv EL_EDITMODE , Fa "int flag"
|
|
|
|
If
|
|
|
|
.Fa flag
|
|
|
|
is non-zero,
|
|
|
|
editing is enabled (the default).
|
|
|
|
Note that this is only an indication, and does not
|
|
|
|
affect the operation of
|
2001-10-01 15:53:07 +00:00
|
|
|
.Nm .
|
2001-10-01 08:41:27 +00:00
|
|
|
At this time, it is the caller's responsibility to
|
|
|
|
check this
|
|
|
|
(using
|
|
|
|
.Fn el_get )
|
|
|
|
to determine if editing should be enabled or not.
|
2005-08-07 20:55:59 +00:00
|
|
|
.It Dv EL_GETCFN , Fa "int (*f)(EditLine *, char *c)"
|
|
|
|
Define the character reading function as
|
|
|
|
.Fa f ,
|
|
|
|
which is to return the number of characters read and store them in
|
|
|
|
.Fa c .
|
|
|
|
This function is called internally by
|
|
|
|
.Fn el_gets
|
|
|
|
and
|
|
|
|
.Fn el_getc .
|
|
|
|
The builtin function can be set or restored with the special function
|
2005-11-17 13:00:00 +00:00
|
|
|
name
|
|
|
|
.Dv EL_BUILTIN_GETCFN .
|
2005-08-07 20:55:59 +00:00
|
|
|
.It Dv EL_CLIENTDATA , Fa "void *data"
|
|
|
|
Register
|
|
|
|
.Fa data
|
|
|
|
to be associated with this EditLine structure.
|
|
|
|
It can be retrieved with the corresponding
|
|
|
|
.Fn el_get
|
|
|
|
call.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_SETFP , Fa "int fd" , Fa "FILE *fp"
|
|
|
|
Set the current
|
|
|
|
.Nm editline
|
|
|
|
file pointer for
|
|
|
|
.Dq input
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 0 ,
|
|
|
|
.Dq output
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 1 ,
|
|
|
|
or
|
|
|
|
.Dq error
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 2
|
|
|
|
from
|
|
|
|
.Fa fp .
|
2001-10-01 08:41:27 +00:00
|
|
|
.El
|
|
|
|
.It Fn el_get
|
|
|
|
Get
|
|
|
|
.Nm
|
|
|
|
parameters.
|
|
|
|
.Fa op
|
|
|
|
determines which parameter to retrieve into
|
|
|
|
.Fa result .
|
2005-08-07 20:55:59 +00:00
|
|
|
Returns 0 if successful, \-1 otherwise.
|
2001-10-01 08:41:27 +00:00
|
|
|
.Pp
|
|
|
|
The following values for
|
|
|
|
.Fa op
|
|
|
|
are supported, along with actual type of
|
|
|
|
.Fa result :
|
|
|
|
.Bl -tag -width 4n
|
|
|
|
.It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
|
|
|
|
Return a pointer to the function that displays the prompt.
|
|
|
|
.It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
|
|
|
|
Return a pointer to the function that displays the rightside prompt.
|
|
|
|
.It Dv EL_EDITOR , Fa "const char *"
|
|
|
|
Return the name of the editor, which will be one of
|
|
|
|
.Dq emacs
|
|
|
|
or
|
|
|
|
.Dq vi .
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_GETTC , Fa "const char *name" , Fa "void *value"
|
|
|
|
Return non-zero if
|
|
|
|
.Fa name
|
|
|
|
is a valid
|
|
|
|
.Xr termcap 5
|
|
|
|
capability
|
|
|
|
and set
|
|
|
|
.Fa value
|
|
|
|
to the current value of that capability.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv EL_SIGNAL , Fa "int *"
|
|
|
|
Return non-zero if
|
|
|
|
.Nm
|
|
|
|
has installed private signal handlers (see
|
|
|
|
.Fn el_get
|
|
|
|
above).
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_EDITMODE , Fa "int *"
|
2001-10-01 08:41:27 +00:00
|
|
|
Return non-zero if editing is enabled.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_GETCFN , Fa "int (**f)(EditLine *, char *)"
|
2005-08-07 20:55:59 +00:00
|
|
|
Return a pointer to the function that read characters, which is equal to
|
2005-11-17 13:00:00 +00:00
|
|
|
.Dv EL_BUILTIN_GETCFN
|
|
|
|
in the case of the default builtin function.
|
2005-08-07 20:55:59 +00:00
|
|
|
.It Dv EL_CLIENTDATA , Fa "void **data"
|
|
|
|
Retrieve
|
|
|
|
.Fa data
|
|
|
|
previously registered with the corresponding
|
|
|
|
.Fn el_set
|
|
|
|
call.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_UNBUFFERED , Fa "int"
|
2005-08-07 20:55:59 +00:00
|
|
|
Sets or clears unbuffered mode.
|
|
|
|
In this mode,
|
|
|
|
.Fn el_gets
|
|
|
|
will return immediately after processing a single character.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_PREP_TERM , Fa "int"
|
2005-08-07 20:55:59 +00:00
|
|
|
Sets or clears terminal editing mode.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv EL_GETFP , Fa "int fd", Fa "FILE **fp"
|
|
|
|
Return in
|
|
|
|
.Fa fp
|
|
|
|
the current
|
|
|
|
.Nm editline
|
|
|
|
file pointer for
|
|
|
|
.Dq input
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 0 ,
|
|
|
|
.Dq output
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 1 ,
|
|
|
|
or
|
|
|
|
.Dq error
|
|
|
|
.Fa fd
|
|
|
|
=
|
|
|
|
.Dv 2 .
|
1997-06-25 08:14:24 +00:00
|
|
|
.El
|
|
|
|
.It Fn el_source
|
|
|
|
Initialise
|
|
|
|
.Nm
|
2001-07-15 07:53:42 +00:00
|
|
|
by reading the contents of
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fa file .
|
|
|
|
.Fn el_parse
|
|
|
|
is called for each line in
|
|
|
|
.Fa file .
|
|
|
|
If
|
|
|
|
.Fa file
|
|
|
|
is
|
|
|
|
.Dv NULL ,
|
|
|
|
try
|
2001-10-01 08:41:27 +00:00
|
|
|
.Pa $PWD/.editrc
|
|
|
|
then
|
1997-06-25 08:14:24 +00:00
|
|
|
.Pa $HOME/.editrc .
|
|
|
|
Refer to
|
|
|
|
.Xr editrc 5
|
|
|
|
for details on the format of
|
|
|
|
.Fa file .
|
|
|
|
.It Fn el_resize
|
|
|
|
Must be called if the terminal size changes.
|
|
|
|
If
|
|
|
|
.Dv EL_SIGNAL
|
|
|
|
has been set with
|
|
|
|
.Fn el_set ,
|
|
|
|
then this is done automatically.
|
2005-02-13 23:45:54 +00:00
|
|
|
Otherwise, it is the responsibility of the application to call
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fn el_resize
|
|
|
|
on the appropriate occasions.
|
|
|
|
.It Fn el_line
|
|
|
|
Return the editing information for the current line in a
|
|
|
|
.Fa LineInfo
|
|
|
|
structure, which is defined as follows:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct lineinfo {
|
|
|
|
const char *buffer; /* address of buffer */
|
|
|
|
const char *cursor; /* address of cursor */
|
|
|
|
const char *lastchar; /* address of last character */
|
|
|
|
} LineInfo;
|
|
|
|
.Ed
|
2005-08-07 20:55:59 +00:00
|
|
|
.Pp
|
|
|
|
.Fa buffer
|
|
|
|
is not NUL terminated.
|
|
|
|
This function may be called after
|
|
|
|
.Fn el_gets
|
|
|
|
to obtain the
|
|
|
|
.Fa LineInfo
|
|
|
|
structure pertaining to line returned by that function,
|
|
|
|
and from within user defined functions added with
|
|
|
|
.Dv EL_ADDFN .
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Fn el_insertstr
|
|
|
|
Insert
|
|
|
|
.Fa str
|
|
|
|
into the line at the cursor.
|
2005-08-07 20:55:59 +00:00
|
|
|
Returns \-1 if
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fa str
|
2005-02-13 22:25:33 +00:00
|
|
|
is empty or will not fit, and 0 otherwise.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Fn el_deletestr
|
|
|
|
Delete
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.Fa count
|
1997-06-25 08:14:24 +00:00
|
|
|
characters before the cursor.
|
|
|
|
.El
|
|
|
|
.Sh HISTORY LIST FUNCTIONS
|
|
|
|
The history functions use a common data structure,
|
|
|
|
.Fa History ,
|
|
|
|
which is created by
|
|
|
|
.Fn history_init
|
|
|
|
and freed by
|
|
|
|
.Fn history_end .
|
|
|
|
.Pp
|
|
|
|
The following functions are available:
|
|
|
|
.Bl -tag -width 4n
|
|
|
|
.It Fn history_init
|
|
|
|
Initialise the history list, and return a data structure
|
|
|
|
to be used by all other history list functions.
|
|
|
|
.It Fn history_end
|
|
|
|
Clean up and finish with
|
|
|
|
.Fa h ,
|
|
|
|
assumed to have been created with
|
|
|
|
.Fn history_init .
|
|
|
|
.It Fn history
|
|
|
|
Perform operation
|
|
|
|
.Fa op
|
|
|
|
on the history list, with optional arguments as needed by the
|
|
|
|
operation.
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fa ev
|
|
|
|
is changed accordingly to operation.
|
1997-06-25 08:14:24 +00:00
|
|
|
The following values for
|
|
|
|
.Fa op
|
|
|
|
are supported, along with the required argument list:
|
|
|
|
.Bl -tag -width 4n
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv H_SETSIZE , Fa "int size"
|
1997-06-25 08:14:24 +00:00
|
|
|
Set size of history to
|
|
|
|
.Fa size
|
|
|
|
elements.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv H_GETSIZE
|
|
|
|
Get number of events currently in history.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv H_END
|
|
|
|
Cleans up and finishes with
|
|
|
|
.Fa h ,
|
|
|
|
assumed to be created with
|
|
|
|
.Fn history_init .
|
|
|
|
.It Dv H_CLEAR
|
|
|
|
Clear the history.
|
|
|
|
.It Dv H_FUNC , Xo
|
|
|
|
.Fa "void *ptr" ,
|
|
|
|
.Fa "history_gfun_t first" ,
|
|
|
|
.Fa "history_gfun_t next" ,
|
|
|
|
.Fa "history_gfun_t last" ,
|
|
|
|
.Fa "history_gfun_t prev" ,
|
|
|
|
.Fa "history_gfun_t curr" ,
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fa "history_sfun_t set" ,
|
1997-06-25 08:14:24 +00:00
|
|
|
.Fa "history_vfun_t clear" ,
|
|
|
|
.Fa "history_efun_t enter" ,
|
|
|
|
.Fa "history_efun_t add"
|
|
|
|
.Xc
|
|
|
|
Define functions to perform various history operations.
|
|
|
|
.Fa ptr
|
2005-02-13 23:45:54 +00:00
|
|
|
is the argument given to a function when it is invoked.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv H_FIRST
|
|
|
|
Return the first element in the history.
|
|
|
|
.It Dv H_LAST
|
|
|
|
Return the last element in the history.
|
|
|
|
.It Dv H_PREV
|
|
|
|
Return the previous element in the history.
|
|
|
|
.It Dv H_NEXT
|
|
|
|
Return the next element in the history.
|
|
|
|
.It Dv H_CURR
|
|
|
|
Return the current element in the history.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv H_SET
|
|
|
|
Set the cursor to point to the requested element.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv H_ADD , Fa "const char *str"
|
|
|
|
Append
|
|
|
|
.Fa str
|
2005-08-07 20:55:59 +00:00
|
|
|
to the current element of the history, or perform the
|
|
|
|
.Dv H_ENTER
|
|
|
|
operation with argument
|
|
|
|
.Fa str
|
|
|
|
if there is no current element.
|
2001-10-01 08:41:27 +00:00
|
|
|
.It Dv H_APPEND , Fa "const char *str"
|
|
|
|
Append
|
|
|
|
.Fa str
|
|
|
|
to the last new element of the history.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv H_ENTER , Fa "const char *str"
|
|
|
|
Add
|
|
|
|
.Fa str
|
2001-07-15 07:53:42 +00:00
|
|
|
as a new element to the history, and, if necessary,
|
1997-06-25 08:14:24 +00:00
|
|
|
removing the oldest entry to keep the list to the created size.
|
2005-08-07 20:55:59 +00:00
|
|
|
If
|
|
|
|
.Dv H_SETUNIQUE
|
|
|
|
was has been called with a non-zero arguments, the element
|
|
|
|
will not be entered into the history if its contents match
|
|
|
|
the ones of the current history element.
|
|
|
|
If the element is entered
|
|
|
|
.Fn history
|
|
|
|
returns 1, if it is ignored as a duplicate returns 0.
|
|
|
|
Finally
|
|
|
|
.Fn history
|
|
|
|
returns \-1 if an error occurred.
|
1997-06-25 08:14:24 +00:00
|
|
|
.It Dv H_PREV_STR , Fa "const char *str"
|
|
|
|
Return the closest previous event that starts with
|
|
|
|
.Fa str .
|
|
|
|
.It Dv H_NEXT_STR , Fa "const char *str"
|
|
|
|
Return the closest next event that starts with
|
|
|
|
.Fa str .
|
|
|
|
.It Dv H_PREV_EVENT , Fa "int e"
|
|
|
|
Return the previous event numbered
|
|
|
|
.Fa e .
|
|
|
|
.It Dv H_NEXT_EVENT , Fa "int e"
|
|
|
|
Return the next event numbered
|
|
|
|
.Fa e .
|
|
|
|
.It Dv H_LOAD , Fa "const char *file"
|
|
|
|
Load the history list stored in
|
|
|
|
.Fa file .
|
|
|
|
.It Dv H_SAVE , Fa "const char *file"
|
|
|
|
Save the history list to
|
|
|
|
.Fa file .
|
2005-08-07 20:55:59 +00:00
|
|
|
.It Dv H_SETUNIQUE , Fa "int unique"
|
2005-10-04 21:51:26 +00:00
|
|
|
Set flag that adjacent identical event strings should not be entered
|
|
|
|
into the history.
|
2005-08-07 20:55:59 +00:00
|
|
|
.It Dv H_GETUNIQUE
|
2005-10-04 21:51:26 +00:00
|
|
|
Retrieve the current setting if adjacent identical elements should
|
|
|
|
be entered into the history.
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.It Dv H_DEL , Fa "int e"
|
2005-08-07 20:55:59 +00:00
|
|
|
Delete the event numbered
|
|
|
|
.Fa e .
|
|
|
|
This function is only provided for
|
|
|
|
.Xr readline 3
|
|
|
|
compatibility.
|
|
|
|
The caller is responsible for free'ing the string in the returned
|
|
|
|
.Fa HistEvent .
|
1997-06-25 08:14:24 +00:00
|
|
|
.El
|
2001-10-01 08:41:27 +00:00
|
|
|
.Pp
|
2003-02-06 11:25:03 +00:00
|
|
|
The
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fn history
|
2005-11-17 13:00:00 +00:00
|
|
|
function returns \*[Ge] 0 if the operation
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fa op
|
2001-10-01 15:53:07 +00:00
|
|
|
succeeds.
|
|
|
|
Otherwise, \-1 is returned and
|
2001-10-01 08:41:27 +00:00
|
|
|
.Fa ev
|
|
|
|
is updated to contain more details about the error.
|
1997-06-25 08:14:24 +00:00
|
|
|
.El
|
2005-08-07 20:55:59 +00:00
|
|
|
.Sh TOKENIZATION FUNCTIONS
|
|
|
|
The tokenization functions use a common data structure,
|
|
|
|
.Fa Tokenizer ,
|
|
|
|
which is created by
|
|
|
|
.Fn tok_init
|
|
|
|
and freed by
|
|
|
|
.Fn tok_end .
|
|
|
|
.Pp
|
|
|
|
The following functions are available:
|
|
|
|
.Bl -tag -width 4n
|
|
|
|
.It Fn tok_init
|
|
|
|
Initialise the tokenizer, and return a data structure
|
|
|
|
to be used by all other tokenizer functions.
|
|
|
|
.Fa IFS
|
|
|
|
contains the Input Field Separators, which defaults to
|
|
|
|
.Aq space ,
|
|
|
|
.Aq tab ,
|
|
|
|
and
|
|
|
|
.Aq newline
|
|
|
|
if
|
|
|
|
.Dv NULL .
|
|
|
|
.It Fn tok_end
|
|
|
|
Clean up and finish with
|
|
|
|
.Fa t ,
|
|
|
|
assumed to have been created with
|
|
|
|
.Fn tok_init .
|
|
|
|
.It Fn tok_reset
|
|
|
|
Reset the tokenizer state.
|
|
|
|
Use after a line has been successfully tokenized
|
|
|
|
by
|
|
|
|
.Fn tok_line
|
|
|
|
or
|
|
|
|
.Fn tok_str
|
|
|
|
and before a new line is to be tokenized.
|
|
|
|
.It Fn tok_line
|
|
|
|
Tokenize
|
|
|
|
.Fa li ,
|
2010-08-16 15:18:30 +00:00
|
|
|
if successful, modify
|
2005-08-07 20:55:59 +00:00
|
|
|
.Fa argv
|
|
|
|
to contain the words,
|
|
|
|
.Fa argc
|
|
|
|
to contain the number of words,
|
|
|
|
.Fa cursorc
|
|
|
|
(if not
|
|
|
|
.Dv NULL )
|
|
|
|
to contain the index of the word containing the cursor,
|
|
|
|
and
|
|
|
|
.Fa cursoro
|
|
|
|
(if not
|
|
|
|
.Dv NULL )
|
|
|
|
to contain the offset within
|
|
|
|
.Fa argv[cursorc]
|
|
|
|
of the cursor.
|
|
|
|
.Pp
|
|
|
|
Returns
|
|
|
|
0 if successful,
|
|
|
|
\-1 for an internal error,
|
|
|
|
1 for an unmatched single quote,
|
|
|
|
2 for an unmatched double quote,
|
|
|
|
and
|
|
|
|
3 for a backslash quoted
|
|
|
|
.Aq newline .
|
|
|
|
A positive exit code indicates that another line should be read
|
|
|
|
and tokenization attempted again.
|
|
|
|
.It Fn tok_str
|
|
|
|
A simpler form of
|
|
|
|
.Fn tok_line ;
|
|
|
|
.Fa str
|
|
|
|
is a NUL terminated string to tokenize.
|
|
|
|
.El
|
1997-06-25 08:14:24 +00:00
|
|
|
.\"XXX.Sh EXAMPLES
|
|
|
|
.\"XXX: provide some examples
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr sh 1 ,
|
|
|
|
.Xr signal 3 ,
|
2001-10-01 15:53:07 +00:00
|
|
|
.Xr termcap 3 ,
|
Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.
el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.
Note: The latter change breaks the ABI of the el_get() function.
Approved by: re (kensmith)
2007-06-10 19:06:09 +00:00
|
|
|
.Xr editrc 5 ,
|
|
|
|
.Xr termcap 5
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
library first appeared in
|
|
|
|
.Bx 4.4 .
|
2001-10-01 08:41:27 +00:00
|
|
|
.Dv CC_REDISPLAY
|
|
|
|
appeared in
|
|
|
|
.Nx 1.3 .
|
2002-10-13 08:46:57 +00:00
|
|
|
.Dv CC_REFRESH_BEEP
|
|
|
|
and
|
2001-10-01 08:41:27 +00:00
|
|
|
.Dv EL_EDITMODE
|
2002-10-13 08:46:57 +00:00
|
|
|
appeared in
|
2001-10-01 08:41:27 +00:00
|
|
|
.Nx 1.4 .
|
|
|
|
.Dv EL_RPROMPT
|
|
|
|
appeared in
|
|
|
|
.Nx 1.5 .
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh AUTHORS
|
2001-10-01 15:53:07 +00:00
|
|
|
.An -nosplit
|
1997-06-25 08:14:24 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2001-10-01 15:53:07 +00:00
|
|
|
library was written by
|
|
|
|
.An Christos Zoulas .
|
|
|
|
.An Luke Mewburn
|
|
|
|
wrote this manual and implemented
|
2001-10-01 08:41:27 +00:00
|
|
|
.Dv CC_REDISPLAY ,
|
|
|
|
.Dv CC_REFRESH_BEEP ,
|
|
|
|
.Dv EL_EDITMODE ,
|
|
|
|
and
|
|
|
|
.Dv EL_RPROMPT .
|
1997-06-25 08:14:24 +00:00
|
|
|
.Sh BUGS
|
2001-10-01 08:41:27 +00:00
|
|
|
At this time, it is the responsibility of the caller to
|
|
|
|
check the result of the
|
|
|
|
.Dv EL_EDITMODE
|
|
|
|
operation of
|
|
|
|
.Fn el_get
|
|
|
|
(after an
|
|
|
|
.Fn el_source
|
|
|
|
or
|
|
|
|
.Fn el_parse )
|
|
|
|
to determine if
|
|
|
|
.Nm
|
|
|
|
should be used for further input.
|
|
|
|
I.e.,
|
|
|
|
.Dv EL_EDITMODE
|
|
|
|
is purely an indication of the result of the most recent
|
|
|
|
.Xr editrc 5
|
|
|
|
.Ic edit
|
|
|
|
command.
|