OpenBSD CVS

CVS log for src/lib/libedit/keymacro.c


[BACK] Up to [local] / src / lib / libedit

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.16 / (download) - annotate - [select for diffs], Wed May 25 09:23:49 2016 UTC (8 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, HEAD
Changes since 1.15: +5 -7 lines
Diff to previous 1.15 (colored)

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@

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 6 13:12:52 2016 UTC (8 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

Replace the generated file "fcns.c" by a simpler header "func.h"
included only in the one file needing it, "map.c".
That allows to define el_action_t directly in "map.h",
which in turn allows to stop including "fcns.h" from "el.h"
and include it only in the modules needing it.
Now we no longer autogenerate any C files.

Feedback and OK martijn@.
First version also proofread by Christian Heckendorf <mbie at ulmus dot me>.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 12 09:04:02 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +4 -8 lines
Diff to previous 1.13 (colored)

* Delete the unimplemented feature XK_EXE.
* Delete the unused macro MIN().
No functional change.
OK czarkoff@ martijn@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 11 21:17:29 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +18 -18 lines
Diff to previous 1.12 (colored)

delete the "private" and "public" preprocessor macros, just use standard C;
OK martijn@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 11 20:43:33 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +29 -26 lines
Diff to previous 1.11 (colored)

get rid of the non-standard data type "Char" in almost all files;
ok martijn@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 11 19:54:54 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Move wrapper macros to the two files actually needing them:
FUNW, Strlen, Strdup, Strcmp, Strncmp, Strncpy, Strncat -> history.c
Strchr, tok_strdup -> tokenizer.c
FUN, TYPE, STR -> both of these files

OK martijn@

Also proofread by Christian Heckendorf <mbie at ulmus dot me>
who reported some whitespace issues in parse.c.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Apr 9 20:15:26 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (colored)

Delete 26 wrapper macros and two wrapper functions that are no
longer needed now that we always compile with wide character support,
reducing code obfuscation.

OK czarkoff@ martijn@.
Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 9 19:31:55 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -4 lines
Diff to previous 1.8 (colored)

Always compile with WIDECHAR on and delete that preprocessor switch.
OK martijn@.
Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Mar 21 15:25:39 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +5 -3 lines
Diff to previous 1.7 (colored)

Reduce the FUN() macro madness by no longer applying it to el_[w]getc(3).
Always use el_wgetc(3) internally.  In the !WIDECHAR case, casting
the result to (Char) is safe because the function returns a byte
rather than a character in that case.
No functional change except for fixing a printf(3) format string issue
when compiled with DEBUG_READ and WIDECHAR.
OK czarkoff@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Mar 20 23:48:27 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +8 -8 lines
Diff to previous 1.6 (colored)

Cleanup of standard header inclusion:

1. Add the missing <errno.h> to sig.c.
2. Do not include standard headers from private headers "chared.h"
and "el.h", include them directly where needed.
3. Delete a few needless inclusions of <ctype.h>.
4. Sort the standard headers.
5. Delete _GNU_SOURCE weirdness from histedit.h, that file doesn't even
need the access to wcsdup(3) mentioned in the comment.
6. Delete some trailing blanks and blanks before tabs.

OK czarkoff@

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 20 20:35:38 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Delete the useless Int datatype and always use the standard wint_t
directly.  This is not a problem because <wchar_t> is required all
over the place anyway, even when WIDECHAR is not defined.
No functional change except that it fixes a few printf(3)
format string issues, %c vs. %lc.
OK czarkoff@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jan 31 20:42:33 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

remove some whitespace differences with NetBSD; no change with diff -b

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jan 30 17:32:52 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +7 -7 lines
Diff to previous 1.3 (colored)

Fifth step in synching with NetBSD:
Delete the silly ptr_t and ioctl_t typedefs
and delete some "#ifdef notdef" code from "sys.h".
No functional change.
This makes hist.h identical to the NetBSD version.
It reduces the remaining diff from +1526 -734 to +1430 -592.
OK czarkoff@

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jan 30 12:22:20 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +27 -27 lines
Diff to previous 1.2 (colored)

Fourth step in synching with NetBSD:
KNF: Remove parentheses from return lines.  No object change.
This makes emacs.c and prompt.c identical to the NetBSD versions.
It reduces the remaining diff from +2053 -1261 to +1526 -734.
OK czarkoff@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 29 19:32:33 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +119 -115 lines
Diff to previous 1.1 (colored)

Second step in synching with NetBSD:
* Rename some types from *key*_t to *keymacro*_t.
* Rename struct editline member el_key to el_keymacro.
* Rename some functions in keymacro.c from key*() to keymacro*().
This removes the conflict of key_clear(), key_end(), and key_print()
with macros in <term.h>.  No functional change.
This makes keymacro.h identical to the NetBSD version.
It reduces the remaining diff from +2640 -1998 to +2446 -1805.
OK czarkoff@

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 29 17:23:21 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN

Start synching with NetBSD:
Rename the files key.[hc] to keymacro.[hc] and term.[hc] to terminal.[hc].
The change makes sense because "term.h" conflicts with <term.h>
and the functions key_clear(), key_end(), and key_print() in "key.h"
conflict with macros in <term.h>.
No content change yet, no binary change in *.o after "strip -d".
This reduces the remaining diff from +4634 -3992 to +2640 -1998.
OK czarkoff@, and mmcc@ agrees with the direction.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.