summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2024-08-16 23:09:26 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2024-08-16 23:09:26 +0000
commit1f84e9d0e797015ff0c6d16e1f5c019cbcea63f3 (patch)
tree0a34229fe7006b55a8c7f524fcbb84c5d9f9a96b /gnu
parentec6195e87a51727fcbe5f6b6ada676488b6a006d (diff)
Cast to unsigned char after or'ing in the meta bit, so the compiler
doesn't complain when it's implicitly converted to plain char in an assignment, and to make sure it's not negative when used as an array index. ok miod@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/texinfo/info/infomap.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/gnu/usr.bin/texinfo/info/infomap.h b/gnu/usr.bin/texinfo/info/infomap.h
index faf93884fd5..0938c14a4ce 100644
--- a/gnu/usr.bin/texinfo/info/infomap.h
+++ b/gnu/usr.bin/texinfo/info/infomap.h
@@ -1,9 +1,7 @@
-/* infomap.h -- Description of a keymap in Info and related functions. */
+/* infomap.h -- description of a keymap in Info and related functions.
+ $Id: infomap.h,v 1.2 2024/08/16 23:09:25 guenther Exp $
-/* This file is part of GNU Info, a program for reading online documentation
- stored in Info format.
-
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,14 +19,14 @@
Written by Brian Fox (bfox@ai.mit.edu). */
-#if !defined (_INFOMAP_H_)
-#define _INFOMAP_H_
+#ifndef INFOMAP_H
+#define INFOMAP_H
-#include "general.h"
+#include "info.h"
#define ESC '\033'
#define DEL '\177'
-#define TAB '\011'
+#define TAB '\011'
#define RET '\r'
#define LFD '\n'
#define SPC ' '
@@ -42,7 +40,7 @@
#define Meta_p(c) (((c) > meta_character_threshold))
#define Control_p(c) ((c) < control_character_threshold)
-#define Meta(c) ((c) | (meta_character_bit))
+#define Meta(c) ((unsigned char)((c) | (meta_character_bit)))
#define UnMeta(c) ((c) & (~meta_character_bit))
#define Control(c) ((toupper (c)) & (~control_character_bit))
#define UnControl(c) (tolower ((c) | control_character_bit))
@@ -52,9 +50,10 @@
FUNCTION is the address of a function to run, or the
address of a keymap to indirect through.
TYPE says which kind of thing FUNCTION is. */
-typedef struct {
+typedef struct keymap_entry
+{
char type;
- VFunction *function;
+ InfoCommand *function;
} KEYMAP_ENTRY;
typedef KEYMAP_ENTRY *Keymap;
@@ -68,15 +67,16 @@ extern Keymap echo_area_keymap;
/* Return a new keymap which has all the uppercase letters mapped to run
the function info_do_lowercase_version (). */
-extern Keymap keymap_make_keymap ();
+extern Keymap keymap_make_keymap (void);
/* Return a new keymap which is a copy of MAP. */
-extern Keymap keymap_copy_keymap ();
+extern Keymap keymap_copy_keymap (Keymap map, Keymap rootmap,
+ Keymap newroot);
/* Free MAP and it's descendents. */
-extern void keymap_discard_keymap ();
+extern void keymap_discard_keymap (Keymap map, Keymap rootmap);
/* Initialize the info keymaps. */
-extern void initialize_info_keymaps ();
+extern void initialize_info_keymaps (void);
-#endif /* !_INFOMAP_H_ */
+#endif /* not INFOMAP_H */