CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2016/05/25 03:23:49
Modified files: lib/libedit : el.h keymacro.c read.c Log message: Saving errno in el_errno is only needed for one purpose: Restoring the original errno found in el_wgetc() after el_wgets() did some cleanup that may have changed errno. Improve clarity and robustness of the code by not setting and inspecting el_errno where it isn't needed; in particular, let keymacro_get() properly report read failure to read_getcmd(). Move el_errno to el_read_t because it's only used in read.c. Never set errno back to zero. Checked with a test program installing a USR1 signal handler without SA_RESTART, for the cases read_getcmd(), ed_quoted_insert(), keymacro_get(), ed_command(), and EL_EDITMODE=0. OK czarkoff@