Fix incomplete stack traces by gdb.
[dragonfly.git] / contrib / texinfo-4 / info / infomap.h
blob31e4d8275f0464dada20226b19508b14324653f7
1 /* infomap.h -- description of a keymap in Info and related functions.
2 $Id: infomap.h,v 1.3 2004/04/11 17:56:46 karl Exp $
4 Copyright (C) 1993, 2001, 2004 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)
9 any later version.
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). */
22 #ifndef INFOMAP_H
23 #define INFOMAP_H
25 #include "info.h"
27 #define ESC '\033'
28 #define DEL '\177'
29 #define TAB '\011'
30 #define RET '\r'
31 #define LFD '\n'
32 #define SPC ' '
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
55 char type;
56 InfoCommand *function;
57 } KEYMAP_ENTRY;
59 typedef KEYMAP_ENTRY *Keymap;
61 /* The values that TYPE can have in a keymap entry. */
62 #define ISFUNC 0
63 #define ISKMAP 1
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 (void);
72 /* Return a new keymap which is a copy of MAP. */
73 extern Keymap keymap_copy_keymap (Keymap map, Keymap rootmap,
74 Keymap newroot);
76 /* Free MAP and it's descendents. */
77 extern void keymap_discard_keymap (Keymap map, Keymap rootmap);
79 /* Initialize the info keymaps. */
80 extern void initialize_info_keymaps (void);
82 #endif /* not INFOMAP_H */