4 * Copyright (c) 1992, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 * Copyright (c) 1992, 1993, 1994, 1995, 1996
7 * Keith Bostic. All rights reserved.
9 * See the LICENSE file for redistribution information.
11 * Id: seq.h,v 10.3 1996/03/06 19:51:03 bostic Exp (Berkeley) Date: 1996/03/06 19:51:03
15 * Map and abbreviation structures.
17 * The map structure is doubly linked list, sorted by input string and by
18 * input length within the string. (The latter is necessary so that short
19 * matches will happen before long matches when the list is searched.)
20 * Additionally, there is a bitmap which has bits set if there are entries
21 * starting with the corresponding character. This keeps us from walking
22 * the list unless it's necessary.
24 * The name and the output fields of a SEQ can be empty, i.e. NULL.
25 * Only the input field is required.
28 * The fast-lookup bits are never turned off -- users don't usually unmap
29 * things, though, so it's probably not a big deal.
32 LIST_ENTRY(_seq
) q
; /* Linked list of all sequences. */
33 seq_t stype
; /* Sequence type. */
34 CHAR_T
*name
; /* Sequence name (if any). */
35 size_t nlen
; /* Name length. */
36 CHAR_T
*input
; /* Sequence input keys. */
37 size_t ilen
; /* Input keys length. */
38 CHAR_T
*output
; /* Sequence output keys. */
39 size_t olen
; /* Output keys length. */
41 #define SEQ_FUNCMAP 0x01 /* If unresolved function key.*/
42 #define SEQ_NOOVERWRITE 0x02 /* Don't replace existing entry. */
43 #define SEQ_SCREEN 0x04 /* If screen specific. */
44 #define SEQ_USERDEF 0x08 /* If user defined. */