1 /* infomap.h -- description of a keymap in Info and related functions.
2 $Id: infomap.h,v 1.6 2001/11/16 23:16:59 karl Exp $
4 Copyright (C) 1993, 2001 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 Written by Brian Fox (bfox@ai.mit.edu). */
34 #define meta_character_threshold (DEL + 1)
35 #define control_character_threshold (SPC)
37 #define meta_character_bit 0x80
38 #define control_character_bit 0x40
40 #define Meta_p(c) (((c) > meta_character_threshold))
41 #define Control_p(c) ((c) < control_character_threshold)
43 #define Meta(c) ((c) | (meta_character_bit))
44 #define UnMeta(c) ((c) & (~meta_character_bit))
45 #define Control(c) ((toupper (c)) & (~control_character_bit))
46 #define UnControl(c) (tolower ((c) | control_character_bit))
48 /* A keymap contains one entry for each key in the ASCII set.
49 Each entry consists of a type and a pointer.
50 FUNCTION is the address of a function to run, or the
51 address of a keymap to indirect through.
52 TYPE says which kind of thing FUNCTION is. */
53 typedef struct keymap_entry
56 InfoCommand *function;
59 typedef KEYMAP_ENTRY *Keymap;
61 /* The values that TYPE can have in a keymap entry. */
65 extern Keymap info_keymap;
66 extern Keymap echo_area_keymap;
68 /* Return a new keymap which has all the uppercase letters mapped to run
69 the function info_do_lowercase_version (). */
70 extern Keymap keymap_make_keymap ();
72 /* Return a new keymap which is a copy of MAP. */
73 extern Keymap keymap_copy_keymap ();
75 /* Free MAP and it's descendents. */
76 extern void keymap_discard_keymap ();
78 /* Initialize the info keymaps. */
79 extern void initialize_info_keymaps ();
81 #endif /* not INFOMAP_H */