"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libedit/editline.3" between
tnftp-20151004.tar.gz and tnftp-20200705.tar.gz

About: tnftp is an enhanced ftp client (prior name "lukemftp").

editline.3  (tnftp-20151004):editline.3  (tnftp-20200705)
EDITLINE(3) BSD Library Functions Manual EDITLINE(3) EDITLINE(3) BSD Library Functions Manual EDITLINE(3)
NAME NAME
editline, el_init, el_end, el_reset, el_gets, el_getc, el_push, el_parse, e editline, el_init, el_init_fd, el_end, el_reset, el_gets, el_wgets, el_getc
l_set, el_source, el_resize, , el_wgetc, el_push, el_wpush,
el_line, el_insertstr, el_deletestr, history_init, history_end, history, to el_parse, el_wparse, el_set, el_wset, el_get, el_wget, el_source, el_resize
k_init, tok_end, tok_reset, , el_cursor, el_line, el_wline,
tok_line, tok_str — line editor, history and tokenization functions el_insertstr, el_winsertstr, el_deletestr, el_wdeletestr, history_init, his
tory_winit, history_end,
history_wend, history, history_w, tok_init, tok_winit, tok_end, tok_wend, t
ok_reset, tok_wreset, tok_line,
tok_wline, tok_str, tok_wstr — line editor, history and tokenization functi
ons
LIBRARY LIBRARY
Command Line Editor Library (libedit, -ledit) Command Line Editor Library (libedit, -ledit)
SYNOPSIS SYNOPSIS
#include <histedit.h> #include <histedit.h>
EditLine * EditLine *
el_init(const char *prog, FILE *fin, FILE *fout, FILE *ferr); el_init(const char *prog, FILE *fin, FILE *fout, FILE *ferr);
EditLine *
el_init_fd(const char *prog, FILE *fin, FILE *fout, FILE *ferr, int fdin, i
nt fdout, int fderr);
void void
el_end(EditLine *e); el_end(EditLine *e);
void void
el_reset(EditLine *e); el_reset(EditLine *e);
const char * const char *
el_gets(EditLine *e, int *count); el_gets(EditLine *e, int *count);
const wchar_t *
el_wgets(EditLine *e, int *count);
int int
el_getc(EditLine *e, char *ch); el_getc(EditLine *e, char *ch);
int
el_wgetc(EditLine *e, wchar_t *wc);
void
el_push(EditLine *e, const char *mbs);
void void
el_push(EditLine *e, const char *str); el_wpush(EditLine *e, const wchar_t *wcs);
int int
el_parse(EditLine *e, int argc, const char *argv[]); el_parse(EditLine *e, int argc, const char *argv[]);
int int
el_wparse(EditLine *e, int argc, const wchar_t *argv[]);
int
el_set(EditLine *e, int op, ...); el_set(EditLine *e, int op, ...);
int int
el_get(EditLine *e, int op, void *result); el_wset(EditLine *e, int op, ...);
int
el_get(EditLine *e, int op, ...);
int
el_wget(EditLine *e, int op, ...);
int int
el_source(EditLine *e, const char *file); el_source(EditLine *e, const char *file);
void void
el_resize(EditLine *e); el_resize(EditLine *e);
int
el_cursor(EditLine *e, int count);
const LineInfo * const LineInfo *
el_line(EditLine *e); el_line(EditLine *e);
const LineInfoW *
el_wline(EditLine *e);
int int
el_insertstr(EditLine *e, const char *str); el_insertstr(EditLine *e, const char *str);
int
el_winsertstr(EditLine *e, const wchar_t *str);
void void
el_deletestr(EditLine *e, int count); el_deletestr(EditLine *e, int count);
void
el_wdeletestr(EditLine *e, int count);
History * History *
history_init(); history_init(void);
HistoryW *
history_winit(void);
void void
history_end(History *h); history_end(History *h);
void
history_wend(HistoryW *h);
int int
history(History *h, HistEvent *ev, int op, ...); history(History *h, HistEvent *ev, int op, ...);
int
history_w(HistoryW *h, HistEventW *ev, int op, ...);
Tokenizer * Tokenizer *
tok_init(const char *IFS); tok_init(const char *IFS);
TokenizerW *
tok_winit(const wchar_t *IFS);
void void
tok_end(Tokenizer *t); tok_end(Tokenizer *t);
void void
tok_wend(TokenizerW *t);
void
tok_reset(Tokenizer *t); tok_reset(Tokenizer *t);
void
tok_wreset(TokenizerW *t);
int int
tok_line(Tokenizer *t, const LineInfo *li, int *argc, const char **argv[], int *cursorc, int *cursoro); tok_line(Tokenizer *t, const LineInfo *li, int *argc, const char **argv[], int *cursorc, int *cursoro);
int int
tok_wline(TokenizerW *t, const LineInfoW *li, int *argc, const wchar_t **ar
gv[], int *cursorc,
int *cursoro);
int
tok_str(Tokenizer *t, const char *str, int *argc, const char **argv[]); tok_str(Tokenizer *t, const char *str, int *argc, const char **argv[]);
int
tok_wstr(TokenizerW *t, const wchar_t *str, int *argc, const wchar_t **argv
[]);
DESCRIPTION DESCRIPTION
The editline library provides generic line editing, history and tokenizatio n functions, similar to those The editline library provides generic line editing, history and tokenizatio n functions, similar to those
found in sh(1). found in sh(1).
These functions are available in the libedit library (which needs the libte rmcap library). Programs These functions are available in the libedit library (which needs the libte rmcap library). Programs
should be linked with -ledit -ltermcap. should be linked with -ledit -ltermcap.
The editline library respects the LC_CTYPE locale set by the application pr
ogram and never uses
setlocale(3) to change the locale.
LINE EDITING FUNCTIONS LINE EDITING FUNCTIONS
The line editing functions use a common data structure, EditLine, which is The line editing functions use a common data structure, EditLine, which is
created by el_init() and freed created by el_init() or
by el_end(). el_init_fd() and freed by el_end().
The wide-character functions behave the same way as their narrow counterpar
ts.
The following functions are available: The following functions are available:
el_init() el_init()
Initialise the line editor, and return a data structure to be used by Initialize the line editor, and return a data structure to be used by
all other line editing func- all other line editing func-
tions. prog is the name of the invoking program, used when reading t tions, or NULL on failure. prog is the name of the invoking program,
he editrc(5) file to determine used when reading the
which settings to use. fin, fout and ferr are the input, output, and editrc(5) file to determine which settings to use. fin, fout and fer
error streams (respectively) r are the input, output, and
to use. In this documentation, references to “the tty” are actually error streams (respectively) to use. In this documentation, referenc
to this input/output stream es to “the tty” are actually to
combination. this input/output stream combination.
el_init_fd()
Like el_init() but allows specifying file descriptors for the stdio(3
) corresponding streams, in
case those were created with funopen(3).
el_end() el_end()
Clean up and finish with e, assumed to have been created with el_init (). Clean up and finish with e, assumed to have been created with el_init () or el_init_fd().
el_reset() el_reset()
Reset the tty and the parser. This should be called after an error w hich may have upset the tty's Reset the tty and the parser. This should be called after an error w hich may have upset the tty's
state. state.
el_gets() el_gets()
Read a line from the tty. count is modified to contain the number of characters read. Returns the Read a line from the tty. count is modified to contain the number of characters read. Returns the
line read if successful, or NULL if no characters were read or if an line read if successful, or NULL if no characters were read or if an
error occurred. error occurred. If an error
occurred, count is set to -1 and errno contains the error code that c
aused it. The return value may
not remain valid across calls to el_gets() and must be copied if the
data is to be retained.
el_wgetc()
Read a wide character from the tty, respecting the current locale, or
from the input queue described
in editline(7) if that is not empty, and store it in wc. If an inval
id or incomplete character is
found, it is discarded, errno is set to EILSEQ, and the next characte
r is read and stored in wc.
Returns 1 if a valid character was read, 0 on end of file, or -1 on r
ead(2) failure. In the latter
case, errno is set to indicate the error.
el_getc() el_getc()
Read a character from the tty. ch is modified to contain the charact Read a wide character as described for el_wgetc() and return 0 on end
er read. Returns the number of of file or -1 on failure. If
characters read if successful, -1 otherwise. the wide character can be represented as a single-byte character, con
vert it with wctob(3), store
the result in ch, and return 1; otherwise, set errno to ERANGE and re
turn -1. In the C or POSIX
locale, this simply reads a byte, but for any other locale, including
UTF-8, this is rarely useful.
el_wpush()
Push the wide character string wcs back onto the input queue describe
d in editline(7). If the queue
overflows, for example due to a recursive macro, or if an error occur
s, for example because wcs is
NULL or memory allocation fails, the function beeps at the user, but
does not report the problem to
the caller.
el_push() el_push()
Pushes str back onto the input stream. This is used by the macro exp Use the current locale to convert the multibyte string mbs to a wide
ansion mechanism. Refer to the character string, and pass the
description of bind -s in editrc(5) for more information. result to el_wpush().
el_parse() el_parse()
Parses the argv array (which is argc elements in size) to execute bui ltin editline commands. If the Parses the argv array (which is argc elements in size) to execute bui ltin editline commands. If the
command is prefixed with “prog”: then el_parse() will only execute th e command if “prog” matches the command is prefixed with “prog”: then el_parse() will only execute th e command if “prog” matches the
prog argument supplied to el_init(). The return value is -1 if the c ommand is unknown, 0 if there prog argument supplied to el_init(). The return value is -1 if the c ommand is unknown, 0 if there
was no error or “prog” didn't match, or 1 if the command returned an error. Refer to editrc(5) for was no error or “prog” didn't match, or 1 if the command returned an error. Refer to editrc(5) for
more information. more information.
el_set() el_set()
Set editline parameters. op determines which parameter to set, and e ach operation has its own Set editline parameters. op determines which parameter to set, and e ach operation has its own
parameter list. parameter list. Returns 0 on success, -1 on failure.
The following values for op are supported, along with the required ar gument list: The following values for op are supported, along with the required ar gument list:
EL_PROMPT, char *(*f)(EditLine *) EL_PROMPT, char *(*f)(EditLine *)
Define prompt printing function as f, which is to return a stri ng that contains the prompt. Define prompt printing function as f, which is to return a stri ng that contains the prompt.
EL_PROMPT_ESC, char *(*f)(EditLine *), char c
Same as EL_PROMPT, but the c argument indicates the start/stop
literal prompt character.
If a start/stop literal character is found in the prompt, the c
haracter itself is not printed,
but characters after it are printed directly to the terminal wi
thout affecting the state of
the current line. A subsequent second start/stop literal chara
cter ends this behavior. This
is typically used to embed literal escape sequences that change
the color/style of the termi-
nal in the prompt. Note that the literal escape character cann
ot be the last character in the
prompt, as the escape sequence is attached to the next characte
r in the prompt. 0 unsets it.
EL_REFRESH
Re-display the current line on the next terminal line.
EL_RPROMPT, char *(*f)(EditLine *) EL_RPROMPT, char *(*f)(EditLine *)
Define right side prompt printing function as f, which is to re turn a string that contains the Define right side prompt printing function as f, which is to re turn a string that contains the
prompt. prompt.
EL_RPROMPT_ESC, char *(*f)(EditLine *), char c
Define the right prompt printing function but with a literal es
cape character.
EL_TERMINAL, const char *type EL_TERMINAL, const char *type
Define terminal type of the tty to be type, or to TERM if type is NULL. Define terminal type of the tty to be type, or to TERM if type is NULL.
EL_EDITOR, const char *mode EL_EDITOR, const char *mode
Set editing mode to mode, which must be one of “emacs” or “vi”. Set editing mode to mode, which must be one of “emacs” or “vi”.
EL_SIGNAL, int flag EL_SIGNAL, int flag
If flag is non-zero, editline will install its own signal handl er for the following signals If flag is non-zero, editline will install its own signal handl er for the following signals
when reading command input: SIGCONT, SIGHUP, SIGINT, SIGQUIT, S IGSTOP, SIGTERM, SIGTSTP, and when reading command input: SIGCONT, SIGHUP, SIGINT, SIGQUIT, S IGSTOP, SIGTERM, SIGTSTP, and
SIGWINCH. Otherwise, the current signal handlers will be used. SIGWINCH. Otherwise, the current signal handlers will be used.
skipping to change at line 201 skipping to change at line 303
EL_HIST, History *(*func)(History *, int op, ...), const char *ptr EL_HIST, History *(*func)(History *, int op, ...), const char *ptr
Defines which history function to use, which is usually history (). ptr should be the value Defines which history function to use, which is usually history (). ptr should be the value
returned by history_init(). returned by history_init().
EL_EDITMODE, int flag EL_EDITMODE, int flag
If flag is non-zero, editing is enabled (the default). Note th at this is only an indication, If flag is non-zero, editing is enabled (the default). Note th at this is only an indication,
and does not affect the operation of editline. At this time, i t is the caller's responsibil- and does not affect the operation of editline. At this time, i t is the caller's responsibil-
ity to check this (using el_get()) to determine if editing shou ld be enabled or not. ity to check this (using el_get()) to determine if editing shou ld be enabled or not.
EL_GETCFN, int (*f)(EditLine *, char *c) EL_UNBUFFERED, int flag
Define the character reading function as f, which is to return If flag is zero, unbuffered mode is disabled (the default). In
the number of characters read unbuffered mode, el_gets()
and store them in c. This function is called internally by el_ will return immediately after processing a single character.
gets() and el_getc(). The
builtin function can be set or restored with the special functi EL_GETCFN, el_rfunc_t f
on name ``EL_BUILTIN_GETCFN''. Whenever reading a character, use the function
int f(EditLine *e, wchar_t *wc)
which stores the character in wc and returns 1 on success, 0 on
end of file, or -1 on I/O or
encoding errors. Functions internally using it include el_wget
s(), el_wgetc(), el_gets(), and
el_getc(). Initially, a builtin function is installed, and rep
lacing it is discouraged
because writing such a function is very error prone. The built
in function can be restored at
any time by passing the special value EL_BUILTIN_GETCFN instead
of a function pointer.
EL_CLIENTDATA, void *data EL_CLIENTDATA, void *data
Register data to be associated with this EditLine structure. I t can be retrieved with the Register data to be associated with this EditLine structure. I t can be retrieved with the
corresponding el_get() call. corresponding el_get() call.
EL_SETFP, int fd, FILE *fp
Set the current editline file pointer for “input” fd = 0, “outp
ut” fd = 1, or “error” fd = 2
from fp.
el_get() el_get()
Get editline parameters. op determines which parameter to retrieve i nto result. Returns 0 if suc- Get editline parameters. op determines which parameter to retrieve i nto result. Returns 0 if suc-
cessful, -1 otherwise. cessful, -1 otherwise.
The following values for op are supported, along with actual type of result: The following values for op are supported, along with actual type of result:
EL_PROMPT, char *(*f)(EditLine *) EL_PROMPT, char *(*f)(EditLine *), char *c
Return a pointer to the function that displays the prompt. Set f to a pointer to the function that displays the prompt. I
f c is not NULL, set it to the
start/stop literal prompt character.
EL_RPROMPT, char *(*f)(EditLine *) EL_RPROMPT, char *(*f)(EditLine *), char *c
Return a pointer to the function that displays the rightside pr Set f to a pointer to the function that displays the prompt. I
ompt. f c is not NULL, set it to the
start/stop literal prompt character.
EL_EDITOR, const char **n
Set the name of the editor in n, which will be one of “emacs” o
r “vi”.
EL_EDITOR, const char * EL_GETTC, const char *name, void *value
Return the name of the editor, which will be one of “emacs” or If name is a valid termcap(5) capability set value to the curre
“vi”. nt value of that capability.
EL_SIGNAL, int * EL_SIGNAL, int *s
Return non-zero if editline has installed private signal handle Set s to non-zero if editline has installed private signal hand
rs (see el_get() above). lers (see el_get() above).
EL_EDITMODE, int * EL_EDITMODE, int *c
Return non-zero if editing is enabled. Set c to non-zero if editing is enabled.
EL_GETCFN, int (**f)(EditLine *, char *) EL_GETCFN, el_rfunc_t *f
Return a pointer to the function that read characters, which is Set f to a pointer to the function that reads characters, or to
equal to ``EL_BUILTIN_GETCFN'' EL_BUILTIN_GETCFN if the
in the case of the default builtin function. builtin function is in use.
EL_CLIENTDATA, void **data EL_CLIENTDATA, void **data
Retrieve data previously registered with the corresponding el_s et() call. Set data to the previously registered client data set by an el_ set() call.
EL_UNBUFFERED, int EL_UNBUFFERED, int *c
Sets or clears unbuffered mode. In this mode, el_gets() will r Set c to non-zero if unbuffered mode is enabled.
eturn immediately after pro-
cessing a single character.
EL_PREP_TERM, int EL_GETFP, int fd, FILE **fp
Sets or clears terminal editing mode. Set fp to the current editline file pointer for “input” fd = 0,
“output” fd = 1, or “error” fd
= 2.
el_source() el_source()
Initialise editline by reading the contents of file. el_parse() is c Initialize editline by reading the contents of file. el_parse() is c
alled for each line in file. alled for each line in file.
If file is NULL, try $PWD/.editrc then $HOME/.editrc. Refer to editr If file is NULL, try $EDITRC and if that is not set $HOME/.editrc. R
c(5) for details on the format efer to editrc(5) for details
of file. on the format of file. el_source() returns 0 on success and -1 on er
ror.
el_resize() el_resize()
Must be called if the terminal size changes. If EL_SIGNAL has been s et with el_set(), then this is Must be called if the terminal size changes. If EL_SIGNAL has been s et with el_set(), then this is
done automatically. Otherwise, it's the responsibility of the applic ation to call el_resize() on done automatically. Otherwise, it's the responsibility of the applic ation to call el_resize() on
the appropriate occasions. the appropriate occasions.
el_cursor()
Move the cursor to the right (if positive) or to the left (if negativ
e) count characters. Returns
the resulting offset of the cursor from the beginning of the line.
el_line() el_line()
Return the editing information for the current line in a LineInfo str ucture, which is defined as Return the editing information for the current line in a LineInfo str ucture, which is defined as
follows: follows:
typedef struct lineinfo { typedef struct lineinfo {
const char *buffer; /* address of buffer */ const char *buffer; /* address of buffer */
const char *cursor; /* address of cursor */ const char *cursor; /* address of cursor */
const char *lastchar; /* address of last character */ const char *lastchar; /* address of last character */
} LineInfo; } LineInfo;
buffer is not NUL terminated. This function may be called after el_g ets() to obtain the LineInfo buffer is not NUL terminated. This function may be called after el_g ets() to obtain the LineInfo
structure pertaining to line returned by that function, and from with in user defined functions added structure pertaining to line returned by that function, and from with in user defined functions added
with EL_ADDFN. with EL_ADDFN.
el_insertstr() el_insertstr()
Insert str into the line at the cursor. Returns -1 if str is empty o r won't fit, and 0 otherwise. Insert str into the line at the cursor. Returns -1 if str is empty o r won't fit, and 0 otherwise.
el_deletestr() el_deletestr()
Delete num characters before the cursor. Delete count characters before the cursor.
HISTORY LIST FUNCTIONS HISTORY LIST FUNCTIONS
The history functions use a common data structure, History, which is create d by history_init() and freed The history functions use a common data structure, History, which is create d by history_init() and freed
by history_end(). by history_end().
The following functions are available: The following functions are available:
history_init() history_init()
Initialise the history list, and return a data structure to be used b Initialize the history list, and return a data structure to be used b
y all other history list func- y all other history list func-
tions. tions, or NULL on failure.
history_end() history_end()
Clean up and finish with h, assumed to have been created with history _init(). Clean up and finish with h, assumed to have been created with history _init().
history() history()
Perform operation op on the history list, with optional arguments as needed by the operation. ev is Perform operation op on the history list, with optional arguments as needed by the operation. ev is
changed accordingly to operation. The following values for op are su pported, along with the changed accordingly to operation. The following values for op are su pported, along with the
required argument list: required argument list:
H_SETSIZE, int size H_SETSIZE, int size
skipping to change at line 318 skipping to change at line 441
Define functions to perform various history operations. ptr is the argument given to a func- Define functions to perform various history operations. ptr is the argument given to a func-
tion when it's invoked. tion when it's invoked.
H_FIRST H_FIRST
Return the first element in the history. Return the first element in the history.
H_LAST H_LAST
Return the last element in the history. Return the last element in the history.
H_PREV H_PREV
Return the previous element in the history. Return the previous element in the history. It is newer than t he current one.
H_NEXT H_NEXT
Return the next element in the history. Return the next element in the history. It is older than the c urrent one.
H_CURR H_CURR
Return the current element in the history. Return the current element in the history.
H_SET H_SET, int position
Set the cursor to point to the requested element. Set the cursor to point to the requested element.
H_ADD, const char *str H_ADD, const char *str
Append str to the current element of the history, or perform th e H_ENTER operation with argu- Append str to the current element of the history, or perform th e H_ENTER operation with argu-
ment str if there is no current element. ment str if there is no current element.
H_APPEND, const char *str H_APPEND, const char *str
Append str to the last new element of the history. Append str to the last new element of the history.
H_ENTER, const char *str H_ENTER, const char *str
Add str as a new element to the history, and, if necessary, rem Add str as a new element to the history and, if necessary, remo
oving the oldest entry to keep ving the oldest entry to keep
the list to the created size. If H_SETUNIQUE was has been call the list to the created size. If H_SETUNIQUE has been called w
ed with a non-zero arguments, ith a non-zero argument, the
the element will not be entered into the history if its content element will not be entered into the history if its contents ma
s match the ones of the current tch the ones of the current
history element. If the element is entered history() returns 1 history element. If the element is entered history() returns 1
, if it is ignored as a dupli- ; if it is ignored as a dupli-
cate returns 0. Finally history() returns -1 if an error occur red. cate returns 0. Finally history() returns -1 if an error occur red.
H_PREV_STR, const char *str H_PREV_STR, const char *str
Return the closest previous event that starts with str. Return the closest previous event that starts with str.
H_NEXT_STR, const char *str H_NEXT_STR, const char *str
Return the closest next event that starts with str. Return the closest next event that starts with str.
H_PREV_EVENT, int e H_PREV_EVENT, int e
Return the previous event numbered e. Return the previous event numbered e.
H_NEXT_EVENT, int e H_NEXT_EVENT, int e
Return the next event numbered e. Return the next event numbered e.
H_LOAD, const char *file H_LOAD, const char *file
Load the history list stored in file. Load the history list stored in file.
H_SAVE, const char *file H_SAVE, const char *file
Save the history list to file. Save the history list to file.
H_SAVE_FP, FILE *fp
Save the history list to the opened FILE pointer fp.
H_NSAVE_FP, size_t n, FILE *fp
Save the last n history entries to the opened FILE pointer fp.
H_SETUNIQUE, int unique H_SETUNIQUE, int unique
Set if the adjacent identical event strings should not be enter ed into the history. Set flag that adjacent identical event strings should not be en tered into the history.
H_GETUNIQUE H_GETUNIQUE
Retrieve the current setting if if adjacent elements should be Retrieve the current setting if adjacent identical elements sho
entered into the history. uld be entered into the his-
tory.
H_DEL, int e
Delete the event numbered e. This function is only provided fo
r readline compatibility. The
caller is responsible for free'ing the string in the returned H
istEvent.
history() returns >= 0 if the operation op succeeds. Otherwise, -1 i s returned and ev is updated to history() returns >= 0 if the operation op succeeds. Otherwise, -1 i s returned and ev is updated to
contain more details about the error. contain more details about the error.
TOKENIZATION FUNCTIONS TOKENIZATION FUNCTIONS
The tokenization functions use a common data structure, Tokenizer, which is created by tok_init() and The tokenization functions use a common data structure, Tokenizer, which is created by tok_init() and
freed by tok_end(). freed by tok_end().
The following functions are available: The following functions are available:
tok_init() tok_init()
Initialise the tokenizer, and return a data structure to be used by a ll other tokenizer functions. Initialize the tokenizer, and return a data structure to be used by a ll other tokenizer functions.
IFS contains the Input Field Separators, which defaults to ⟨space⟩, ⟨ tab⟩, and ⟨newline⟩ if NULL. IFS contains the Input Field Separators, which defaults to ⟨space⟩, ⟨ tab⟩, and ⟨newline⟩ if NULL.
tok_end() tok_end()
Clean up and finish with t, assumed to have been created with tok_ini t(). Clean up and finish with t, assumed to have been created with tok_ini t().
tok_reset() tok_reset()
Reset the tokenizer state. Use after a line has been successfully to kenized by tok_line() or Reset the tokenizer state. Use after a line has been successfully to kenized by tok_line() or
tok_str() and before a new line is to be tokenized. tok_str() and before a new line is to be tokenized.
tok_line() tok_line()
skipping to change at line 400 skipping to change at line 534
NULL) to contain the offset within argv[cursorc] of the cursor. NULL) to contain the offset within argv[cursorc] of the cursor.
Returns 0 if successful, -1 for an internal error, 1 for an unmatched single quote, 2 for an 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 ⟨newline⟩. A po sitive exit code indicates that unmatched double quote, and 3 for a backslash quoted ⟨newline⟩. A po sitive exit code indicates that
another line should be read and tokenization attempted again. another line should be read and tokenization attempted again.
tok_str() tok_str()
A simpler form of tok_line(); str is a NUL terminated string to token ize. A simpler form of tok_line(); str is a NUL terminated string to token ize.
SEE ALSO SEE ALSO
sh(1), signal(3), termcap(3), editrc(5) sh(1), signal(3), termcap(3), editrc(5), termcap(5), editline(7)
HISTORY HISTORY
The editline library first appeared in 4.4BSD. CC_REDISPLAY appeared in Ne tBSD 1.3. CC_REFRESH_BEEP, The editline library first appeared in 4.4BSD. CC_REDISPLAY appeared in Ne tBSD 1.3. CC_REFRESH_BEEP,
EL_EDITMODE and the readline emulation appeared in NetBSD 1.4. EL_RPROMPT appeared in NetBSD 1.5. EL_EDITMODE and the readline emulation appeared in NetBSD 1.4. EL_RPROMPT appeared in NetBSD 1.5.
AUTHORS AUTHORS
The editline library was written by Christos Zoulas. Luke Mewburn wrote th is manual and implemented The editline library was written by Christos Zoulas. Luke Mewburn wrote th is manual and implemented
CC_REDISPLAY, CC_REFRESH_BEEP, EL_EDITMODE, and EL_RPROMPT. Jaromir Dolece k implemented the readline emu- CC_REDISPLAY, CC_REFRESH_BEEP, EL_EDITMODE, and EL_RPROMPT. Jaromir Dolece k implemented the readline emu-
lation. lation. Johny Mattsson implemented wide-character support.
BUGS BUGS
At this time, it is the responsibility of the caller to check the result of the EL_EDITMODE operation of At this time, it is the responsibility of the caller to check the result of the EL_EDITMODE operation of
el_get() (after an el_source() or el_parse()) to determine if editline shou ld be used for further input. el_get() (after an el_source() or el_parse()) to determine if editline shou ld be used for further input.
I.e., EL_EDITMODE is purely an indication of the result of the most recent editrc(5) edit command. I.e., EL_EDITMODE is purely an indication of the result of the most recent editrc(5) edit command.
BSD March 19, 2005 BSD BSD November 9, 2018 BSD
 End of changes. 55 change blocks. 
87 lines changed or deleted 260 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)