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