Deleted Added
full compact
keymacro.c (84334) keymacro.c (108470)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

35 *
36 * $NetBSD: key.c,v 1.11 2001/01/23 15:55:30 jdolecek Exp $
37 */
38
39#if !defined(lint) && !defined(SCCSID)
40static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
41#endif /* not lint && not SCCSID */
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

35 *
36 * $NetBSD: key.c,v 1.11 2001/01/23 15:55:30 jdolecek Exp $
37 */
38
39#if !defined(lint) && !defined(SCCSID)
40static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
41#endif /* not lint && not SCCSID */
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/lib/libedit/key.c 84334 2001-10-01 23:00:29Z obrien $");
43__FBSDID("$FreeBSD: head/lib/libedit/key.c 108470 2002-12-30 21:18:15Z schweikh $");
44
45/*
46 * key.c: This module contains the procedures for maintaining
47 * the extended-key map.
48 *
49 * An extended-key (key) is a sequence of keystrokes introduced
44
45/*
46 * key.c: This module contains the procedures for maintaining
47 * the extended-key map.
48 *
49 * An extended-key (key) is a sequence of keystrokes introduced
50 * with an sequence introducer and consisting of an arbitrary
50 * with a sequence introducer and consisting of an arbitrary
51 * number of characters. This module maintains a map (the el->el_key.map)
52 * to convert these extended-key sequences into input strs
53 * (XK_STR), editor functions (XK_CMD), or unix commands (XK_EXE).
54 *
55 * Warning:
56 * If key is a substr of some other keys, then the longer
57 * keys are lost!! That is, if the keys "abcd" and "abcef"
58 * are in el->el_key.map, adding the key "abc" will cause the first two

--- 386 unchanged lines hidden (view full) ---

445 EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ptr->type));
446 break;
447 }
448 el_free((ptr_t) ptr);
449}
450
451
452/* node__get():
51 * number of characters. This module maintains a map (the el->el_key.map)
52 * to convert these extended-key sequences into input strs
53 * (XK_STR), editor functions (XK_CMD), or unix commands (XK_EXE).
54 *
55 * Warning:
56 * If key is a substr of some other keys, then the longer
57 * keys are lost!! That is, if the keys "abcd" and "abcef"
58 * are in el->el_key.map, adding the key "abc" will cause the first two

--- 386 unchanged lines hidden (view full) ---

445 EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ptr->type));
446 break;
447 }
448 el_free((ptr_t) ptr);
449}
450
451
452/* node__get():
453 * Returns pointer to an key_node_t for ch.
453 * Returns pointer to a key_node_t for ch.
454 */
455private key_node_t *
456node__get(int ch)
457{
458 key_node_t *ptr;
459
460 ptr = (key_node_t *) el_malloc((size_t) sizeof(key_node_t));
461 if (ptr == NULL)

--- 223 unchanged lines hidden ---
454 */
455private key_node_t *
456node__get(int ch)
457{
458 key_node_t *ptr;
459
460 ptr = (key_node_t *) el_malloc((size_t) sizeof(key_node_t));
461 if (ptr == NULL)

--- 223 unchanged lines hidden ---