summaryrefslogtreecommitdiffstats
path: root/lib/libedit/editline.3
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2007-06-10 19:06:09 +0000
committerstefanf <stefanf@FreeBSD.org>2007-06-10 19:06:09 +0000
commitce047ca5eeaa67687d3b47fc9efb30d6bd34d8eb (patch)
treef27a090c796f4ade2d63452e9542fdbe365a55ec /lib/libedit/editline.3
parentdac62e7ff2f6d9dbbc83623d558cd1169444ce35 (diff)
downloadFreeBSD-src-ce047ca5eeaa67687d3b47fc9efb30d6bd34d8eb.zip
FreeBSD-src-ce047ca5eeaa67687d3b47fc9efb30d6bd34d8eb.tar.gz
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)
Diffstat (limited to 'lib/libedit/editline.3')
-rw-r--r--lib/libedit/editline.368
1 files changed, 58 insertions, 10 deletions
diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3
index d1baa84..7ed5e38 100644
--- a/lib/libedit/editline.3
+++ b/lib/libedit/editline.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: editline.3,v 1.51 2006/08/21 12:45:30 christos Exp $
+.\" $NetBSD: editline.3,v 1.55 2007/01/12 16:31:13 christos Exp $
.\"
.\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 4, 2005
+.Dd January 12, 2007
.Os
.Dt EDITLINE 3
.Sh NAME
@@ -80,7 +80,7 @@
.Ft int
.Fn el_set "EditLine *e" "int op" "..."
.Ft int
-.Fn el_get "EditLine *e" "int op" "void *result"
+.Fn el_get "EditLine *e" "int op" "..."
.Ft int
.Fn el_source "EditLine *e" "const char *file"
.Ft void
@@ -404,6 +404,25 @@ to be associated with this EditLine structure.
It can be retrieved with the corresponding
.Fn el_get
call.
+.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 .
.El
.It Fn el_get
Get
@@ -428,15 +447,24 @@ Return the name of the editor, which will be one of
.Dq emacs
or
.Dq vi .
+.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.
.It Dv EL_SIGNAL , Fa "int *"
Return non-zero if
.Nm
has installed private signal handlers (see
.Fn el_get
above).
-.It Dv EL_EDITMODE, Fa "int *"
+.It Dv EL_EDITMODE , Fa "int *"
Return non-zero if editing is enabled.
-.It Dv EL_GETCFN, Fa "int (**f)(EditLine *, char *)"
+.It Dv EL_GETCFN , Fa "int (**f)(EditLine *, char *)"
Return a pointer to the function that read characters, which is equal to
.Dv EL_BUILTIN_GETCFN
in the case of the default builtin function.
@@ -446,13 +474,32 @@ Retrieve
previously registered with the corresponding
.Fn el_set
call.
-.It Dv EL_UNBUFFERED, Fa "int"
+.It Dv EL_UNBUFFERED , Fa "int"
Sets or clears unbuffered mode.
In this mode,
.Fn el_gets
will return immediately after processing a single character.
-.It Dv EL_PREP_TERM, Fa "int"
+.It Dv EL_PREP_TERM , Fa "int"
Sets or clears terminal editing mode.
+.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 .
.El
.It Fn el_source
Initialise
@@ -514,7 +561,7 @@ Returns \-1 if
is empty or will not fit, and 0 otherwise.
.It Fn el_deletestr
Delete
-.Fa num
+.Fa count
characters before the cursor.
.El
.Sh HISTORY LIST FUNCTIONS
@@ -638,7 +685,7 @@ into the history.
.It Dv H_GETUNIQUE
Retrieve the current setting if adjacent identical elements should
be entered into the history.
-.It Dv H_DEL , Fa "int num"
+.It Dv H_DEL , Fa "int e"
Delete the event numbered
.Fa e .
This function is only provided for
@@ -733,7 +780,8 @@ is a NUL terminated string to tokenize.
.Xr sh 1 ,
.Xr signal 3 ,
.Xr termcap 3 ,
-.Xr editrc 5
+.Xr editrc 5 ,
+.Xr termcap 5
.Sh HISTORY
The
.Nm
OpenPOWER on IntegriCloud