diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 13:03:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 13:03:18 -0700 |
commit | 7ffe8d302ab56ffe96023daf015a477934b7f17b (patch) | |
tree | 2a083344ce79ed4564361848e6d28b3dd36f88b4 /parser.c | |
parent | 52d027ad3df5905371519ba07ec9d2fe6150c21c (diff) | |
download | txr-7ffe8d302ab56ffe96023daf015a477934b7f17b.tar.gz txr-7ffe8d302ab56ffe96023daf015a477934b7f17b.tar.bz2 txr-7ffe8d302ab56ffe96023daf015a477934b7f17b.zip |
linenoise: error code distinguishes interrupt from eof.
In this commit, we introduce a persistent error
variable stored in the lino_t structure, and
functions to access it.
* linenoise/linenoise.c (struct lino_state): New
member, error.
(enable_raw_mode): Don't set errno to ENOTTY;
set linenoise error to lino_notty.
(complete_line, edit, go_raw, linenoise, lino_hist_save,
lino_hist_load): Set linenoise error before returning -1.
(lino_get_error, lino_set_error): New functions.
* linenoise/linenoise.h (enum lino_error, lino_error_t):
New enum.
(lino_get_error, lino_set_error): Declared.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions