[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5689] numeric argument loop; DECLARE_INFO_COMMAND
From: |
Gavin D. Smith |
Subject: |
[5689] numeric argument loop; DECLARE_INFO_COMMAND |
Date: |
Sat, 28 Jun 2014 21:48:28 +0000 |
Revision: 5689
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5689
Author: gavin
Date: 2014-06-28 21:48:27 +0000 (Sat, 28 Jun 2014)
Log Message:
-----------
numeric argument loop; DECLARE_INFO_COMMAND
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/echo-area.h
trunk/info/indices.h
trunk/info/infomap.c
trunk/info/makedoc.c
trunk/info/session.c
trunk/info/session.h
trunk/info/variables.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/ChangeLog 2014-06-28 21:48:27 UTC (rev 5689)
@@ -1,5 +1,17 @@
2014-06-28 Gavin Smith <address@hidden>
+ * info/session.c (info_set_pending_input): Function removed.
+ (info_gather_typeahead): Don't call info_set_pending_input.
+
+ * info/session.c (info_numeric_arg_digit_loop): Call
+ get_another_input_key instead of info_get_another_input_byte.
+ * info/session.h (DECLARE_INFO_COMMAND): Pass key argument as int
+ rather than unsigned char. All declarations updated.
+ * info/makedoc.c (process_one_file): Change function declarations
+ output in funs.h.
+
+2014-06-28 Gavin Smith <address@hidden>
+
* info/infokey.h (ISMETA, META, UNMETA, ISCONTROL, INFOKEY_RADIX)
(INFOKEY_MAX_SECTIONLEN): Removed.
* info/infokey.h, info/infomap.h (INFOKEY_FILE, A_MAX_COMMAND)
Modified: trunk/info/echo-area.h
===================================================================
--- trunk/info/echo-area.h 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/echo-area.h 2014-06-28 21:48:27 UTC (rev 5689)
@@ -63,29 +63,28 @@
info_read_completing_in_echo_area_with_exclusions (WINDOW *window,
const char *prompt, REFERENCE **completions, reference_bool_fn exclude);
-extern void ea_insert (WINDOW *window, int count, unsigned char key);
-extern void ea_quoted_insert (WINDOW *window, int count, unsigned char key);
-extern void ea_beg_of_line (WINDOW *window, int count, unsigned char key);
-extern void ea_backward (WINDOW *window, int count, unsigned char key);
-extern void ea_delete (WINDOW *window, int count, unsigned char key);
-extern void ea_end_of_line (WINDOW *window, int count, unsigned char key);
-extern void ea_forward (WINDOW *window, int count, unsigned char key);
-extern void ea_abort (WINDOW *window, int count, unsigned char key);
-extern void ea_rubout (WINDOW *window, int count, unsigned char key);
-extern void ea_complete (WINDOW *window, int count, unsigned char key);
-extern void ea_newline (WINDOW *window, int count, unsigned char key);
-extern void ea_kill_line (WINDOW *window, int count, unsigned char key);
-extern void ea_backward_kill_line (WINDOW *window, int count, unsigned char
key);
-extern void ea_transpose_chars (WINDOW *window, int count, unsigned char key);
-extern void ea_yank (WINDOW *window, int count, unsigned char key);
-extern void ea_tab_insert (WINDOW *window, int count, unsigned char key);
-extern void ea_possible_completions (WINDOW *window, int count, unsigned char
key);
-extern void ea_backward_word (WINDOW *window, int count, unsigned char key);
-extern void ea_kill_word (WINDOW *window, int count, unsigned char key);
-extern void ea_forward_word (WINDOW *window, int count, unsigned char key);
-extern void ea_yank_pop (WINDOW *window, int count, unsigned char key);
-extern void ea_backward_kill_word (WINDOW *window, int count, unsigned char
key);
-extern void ea_scroll_completions_window (WINDOW *window, int count,
- unsigned char key);
+extern void ea_insert (WINDOW *window, int count, int key);
+extern void ea_quoted_insert (WINDOW *window, int count, int key);
+extern void ea_beg_of_line (WINDOW *window, int count, int key);
+extern void ea_backward (WINDOW *window, int count, int key);
+extern void ea_delete (WINDOW *window, int count, int key);
+extern void ea_end_of_line (WINDOW *window, int count, int key);
+extern void ea_forward (WINDOW *window, int count, int key);
+extern void ea_abort (WINDOW *window, int count, int key);
+extern void ea_rubout (WINDOW *window, int count, int key);
+extern void ea_complete (WINDOW *window, int count, int key);
+extern void ea_newline (WINDOW *window, int count, int key);
+extern void ea_kill_line (WINDOW *window, int count, int key);
+extern void ea_backward_kill_line (WINDOW *window, int count, int key);
+extern void ea_transpose_chars (WINDOW *window, int count, int key);
+extern void ea_yank (WINDOW *window, int count, int key);
+extern void ea_tab_insert (WINDOW *window, int count, int key);
+extern void ea_possible_completions (WINDOW *window, int count, int key);
+extern void ea_backward_word (WINDOW *window, int count, int key);
+extern void ea_kill_word (WINDOW *window, int count, int key);
+extern void ea_forward_word (WINDOW *window, int count, int key);
+extern void ea_yank_pop (WINDOW *window, int count, int key);
+extern void ea_backward_kill_word (WINDOW *window, int count, int key);
+extern void ea_scroll_completions_window (WINDOW *window, int count, int key);
#endif /* not INFO_ECHO_AREA_H */
Modified: trunk/info/indices.h
===================================================================
--- trunk/info/indices.h 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/indices.h 2014-06-28 21:48:27 UTC (rev 5689)
@@ -31,9 +31,9 @@
REFERENCE **apropos_in_all_indices (char *search_string, int inform);
/* User visible functions declared in indices.c. */
-extern void info_index_search (WINDOW *window, int count, unsigned char key);
-extern void info_next_index_match (WINDOW *window, int count, unsigned char
key);
-extern void info_index_apropos (WINDOW *window, int count, unsigned char key);
+extern void info_index_search (WINDOW *window, int count, int key);
+extern void info_next_index_match (WINDOW *window, int count, int key);
+extern void info_index_apropos (WINDOW *window, int count, int key);
extern void do_info_index_search (WINDOW *window, FILE_BUFFER *fb, int count,
char *search_string);
extern int index_entry_exists (FILE_BUFFER *fb, char *string);
Modified: trunk/info/infomap.c
===================================================================
--- trunk/info/infomap.c 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/infomap.c 2014-06-28 21:48:27 UTC (rev 5689)
@@ -27,8 +27,7 @@
void keymap_bind_keyseq (Keymap map, int *keyseq, KEYMAP_ENTRY *keyentry);
-/* Return a new keymap which has all the uppercase letters mapped to run
- the function info_do_lowercase_version (). */
+/* Return a new Keymap. */
Keymap
keymap_make_keymap (void)
{
@@ -46,6 +45,9 @@
return keymap;
}
+/* Record KEYSEQ, a sequence of keys terminated by 0, in the linked list of
+ FUNCTION_KEYSEQ hanging off FUNCTION. Label it with ROOTMAP so we know
+ whether the key sequence is for main operation or for the echo area. */
static void
add_function_keyseq (InfoCommand *function, int *keyseq, Keymap rootmap)
{
Modified: trunk/info/makedoc.c
===================================================================
--- trunk/info/makedoc.c 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/makedoc.c 2014-06-28 21:48:27 UTC (rev 5689)
@@ -439,7 +439,7 @@
fprintf (funs_stream, "#define A_%s %u\n", func, next_func_key());
fprintf (funs_stream,
- "extern void %s (WINDOW *window, int count, unsigned char key);\n",
+ "extern void %s (WINDOW *window, int count, int key);\n",
func);
free (func);
free (doc);
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/session.c 2014-06-28 21:48:27 UTC (rev 5689)
@@ -271,17 +271,6 @@
static int push_index = 0; /* Where to add bytes to input buffer. */
static unsigned char info_input_buffer[MAX_INFO_INPUT_BUFFERING];
-/* Put a byte back into the input buffer. */
-static void
-info_set_pending_input (unsigned char key)
-{
- if (pop_index > 0)
- pop_index--;
- else
- pop_index = MAX_INFO_INPUT_BUFFERING - 1;
- info_input_buffer[pop_index] = key;
-}
-
/* Get a key from the buffer of characters to be read.
Return the key in KEY.
Result is non-zero if there was a key, or 0 if there wasn't. */
@@ -416,11 +405,8 @@
push_index = 0;
}
else
- {
- /* Flush all pending input in the case of C-g pressed. */
- push_index = pop_index;
- info_set_pending_input (Control ('g'));
- }
+ /* Flush all pending input in the case of C-g pressed. */
+ push_index = pop_index;
i++;
}
}
@@ -4794,13 +4780,12 @@
DECLARE_INFO_COMMAND (info_numeric_arg_digit_loop,
_("Internally used by \\[universal-argument]"))
{
- unsigned char pure_key;
+ int pure_key;
Keymap keymap;
int *which_numeric_arg, *which_numeric_arg_sign, *which_explicit_arg;
- /* Process the right numeric argument. FIXME: Not necessarily the
- nicest way of doing it. */
+ /* Process the right numeric argument. */
if (!echo_area_is_active)
{
which_explicit_arg = &info_explicit_arg;
@@ -4828,22 +4813,21 @@
if (active_window != the_echo_area)
display_cursor_at_point (active_window);
- pure_key = key = info_get_another_input_byte ();
+ pure_key = key = get_another_input_key ();
add_char_to_keyseq (key);
}
if (keymap[key].type == ISFUNC
- && InfoFunction(keymap[key].function)
- == (VFunction *) info_universal_argument)
+ && InfoFunction(keymap[key].function) == info_universal_argument)
{
*which_numeric_arg *= 4;
key = 0;
continue;
}
- if (Meta_p (key))
- key = UnMeta (key);
+ if (key >= KEYMAP_META_BASE)
+ key -= KEYMAP_META_BASE;
if (isdigit (key))
{
Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/session.h 2014-06-28 21:48:27 UTC (rev 5689)
@@ -32,7 +32,7 @@
utility program `makedoc', which is also responsible for making
the documentation/function-pointer maps. */
#define DECLARE_INFO_COMMAND(name, doc) \
-void name (WINDOW *window, int count, unsigned char key)
+void name (WINDOW *window, int count, int key)
/* Variable controlling the garbage collection of files briefly visited
during searches. Such files are normally gc'ed, unless they were
@@ -119,124 +119,113 @@
extern REFERENCE *info_intuit_options_node (NODE *initial_node, char *program);
/* Moving the point within a node. */
-extern void info_next_line (WINDOW *window, int count, unsigned char key);
-extern void info_prev_line (WINDOW *window, int count, unsigned char key);
-extern void info_end_of_line (WINDOW *window, int count, unsigned char key);
-extern void info_beginning_of_line (WINDOW *window, int count, unsigned char
key);
-extern void info_forward_char (WINDOW *window, int count, unsigned char key);
-extern void info_backward_char (WINDOW *window, int count, unsigned char key);
-extern void info_forward_word (WINDOW *window, int count, unsigned char key);
-extern void info_backward_word (WINDOW *window, int count, unsigned char key);
-extern void info_beginning_of_node (WINDOW *window, int count, unsigned char
key);
-extern void info_end_of_node (WINDOW *window, int count, unsigned char key);
-extern void info_move_to_prev_xref (WINDOW *window, int count, unsigned char
key);
-extern void info_move_to_next_xref (WINDOW *window, int count, unsigned char
key);
+extern void info_next_line (WINDOW *window, int count, int key);
+extern void info_prev_line (WINDOW *window, int count, int key);
+extern void info_end_of_line (WINDOW *window, int count, int key);
+extern void info_beginning_of_line (WINDOW *window, int count, int key);
+extern void info_forward_char (WINDOW *window, int count, int key);
+extern void info_backward_char (WINDOW *window, int count, int key);
+extern void info_forward_word (WINDOW *window, int count, int key);
+extern void info_backward_word (WINDOW *window, int count, int key);
+extern void info_beginning_of_node (WINDOW *window, int count, int key);
+extern void info_end_of_node (WINDOW *window, int count, int key);
+extern void info_move_to_prev_xref (WINDOW *window, int count, int key);
+extern void info_move_to_next_xref (WINDOW *window, int count, int key);
/* Scrolling text within a window. */
-extern void info_scroll_forward (WINDOW *window, int count, unsigned char key);
-extern void info_scroll_backward (WINDOW *window, int count, unsigned char
key);
-extern void info_redraw_display (WINDOW *window, int count, unsigned char key);
-extern void info_toggle_wrap (WINDOW *window, int count, unsigned char key);
-extern void info_toggle_regexp (WINDOW *window, int count, unsigned char key);
+extern void info_scroll_forward (WINDOW *window, int count, int key);
+extern void info_scroll_backward (WINDOW *window, int count, int key);
+extern void info_redraw_display (WINDOW *window, int count, int key);
+extern void info_toggle_wrap (WINDOW *window, int count, int key);
+extern void info_toggle_regexp (WINDOW *window, int count, int key);
extern void info_move_to_window_line (WINDOW *window, int count,
- unsigned char key);
-extern void info_up_line (WINDOW *window, int count, unsigned char key);
-extern void info_down_line (WINDOW *window, int count, unsigned char key);
-extern void info_scroll_half_screen_down (WINDOW *window, int count,
- unsigned char key);
-extern void info_scroll_half_screen_up (WINDOW *window, int count,
- unsigned char key);
-extern void info_scroll_forward_set_window (WINDOW *window, int count,
- unsigned char key);
-extern void info_scroll_forward_page_only (WINDOW *window, int count,
- unsigned char key);
+ int key);
+extern void info_up_line (WINDOW *window, int count, int key);
+extern void info_down_line (WINDOW *window, int count, int key);
+extern void info_scroll_half_screen_down (WINDOW *window, int count, int key);
+extern void info_scroll_half_screen_up (WINDOW *window, int count, int key);
+extern void info_scroll_forward_set_window (WINDOW *window, int count, int
key);
+extern void info_scroll_forward_page_only (WINDOW *window, int count, int key);
extern void info_scroll_forward_page_only_set_window (WINDOW *window, int
count,
- unsigned char key);
+ int key);
extern void info_scroll_backward_set_window (WINDOW *window, int count,
- unsigned char key);
+ int key);
extern void info_scroll_backward_page_only (WINDOW *window, int count,
- unsigned char key);
+ int key);
extern void info_scroll_backward_page_only_set_window (WINDOW *window, int
count,
- unsigned char key);
+ int key);
extern void info_scroll_other_window_backward (WINDOW *window, int count,
- unsigned char key);
+ int key);
/* Manipulating multiple windows. */
-extern void info_split_window (WINDOW *window, int count, unsigned char key);
-extern void info_delete_window (WINDOW *window, int count, unsigned char key);
-extern void info_keep_one_window (WINDOW *window, int count, unsigned char
key);
-extern void info_grow_window (WINDOW *window, int count, unsigned char key);
-extern void info_scroll_other_window (WINDOW *window, int count,
- unsigned char key);
-extern void info_tile_windows (WINDOW *window, int count, unsigned char key);
-extern void info_next_window (WINDOW *window, int count, unsigned char key);
-extern void info_prev_window (WINDOW *window, int count, unsigned char key);
+extern void info_split_window (WINDOW *window, int count, int key);
+extern void info_delete_window (WINDOW *window, int count, int key);
+extern void info_keep_one_window (WINDOW *window, int count, int key);
+extern void info_grow_window (WINDOW *window, int count, int key);
+extern void info_scroll_other_window (WINDOW *window, int count, int key);
+extern void info_tile_windows (WINDOW *window, int count, int key);
+extern void info_next_window (WINDOW *window, int count, int key);
+extern void info_prev_window (WINDOW *window, int count, int key);
/* Selecting nodes. */
-extern void info_next_node (WINDOW *window, int count, unsigned char key);
-extern void info_prev_node (WINDOW *window, int count, unsigned char key);
-extern void info_up_node (WINDOW *window, int count, unsigned char key);
-extern void info_last_node (WINDOW *window, int count, unsigned char key);
-extern void info_first_node (WINDOW *window, int count, unsigned char key);
-extern void info_history_node (WINDOW *window, int count, unsigned char key);
-extern void info_goto_node (WINDOW *window, int count, unsigned char key);
-extern void info_goto_invocation_node (WINDOW *window, int count,
- unsigned char key);
-extern void info_top_node (WINDOW *window, int count, unsigned char key);
-extern void info_dir_node (WINDOW *window, int count, unsigned char key);
-extern void info_global_next_node (WINDOW *window, int count, unsigned char
key);
-extern void info_global_prev_node (WINDOW *window, int count, unsigned char
key);
-extern void info_kill_node (WINDOW *window, int count, unsigned char key);
-extern void info_view_file (WINDOW *window, int count, unsigned char key);
-extern void info_menu_sequence (WINDOW *window, int count, unsigned char key);
+extern void info_next_node (WINDOW *window, int count, int key);
+extern void info_prev_node (WINDOW *window, int count, int key);
+extern void info_up_node (WINDOW *window, int count, int key);
+extern void info_last_node (WINDOW *window, int count, int key);
+extern void info_first_node (WINDOW *window, int count, int key);
+extern void info_history_node (WINDOW *window, int count, int key);
+extern void info_goto_node (WINDOW *window, int count, int key);
+extern void info_goto_invocation_node (WINDOW *window, int count, int key);
+extern void info_top_node (WINDOW *window, int count, int key);
+extern void info_dir_node (WINDOW *window, int count, int key);
+extern void info_global_next_node (WINDOW *window, int count, int key);
+extern void info_global_prev_node (WINDOW *window, int count, int key);
+extern void info_kill_node (WINDOW *window, int count, int key);
+extern void info_view_file (WINDOW *window, int count, int key);
+extern void info_menu_sequence (WINDOW *window, int count, int key);
extern NODE *info_follow_menus (NODE *initial_node, char **menus,
char **error_msg, int strict);
-extern void info_man (WINDOW *window, int count, unsigned char key);
-extern void list_visited_nodes (WINDOW *window, int count, unsigned char key);
-extern void select_visited_node (WINDOW *window, int count, unsigned char key);
+extern void info_man (WINDOW *window, int count, int key);
+extern void list_visited_nodes (WINDOW *window, int count, int key);
+extern void select_visited_node (WINDOW *window, int count, int key);
/* Selecting cross references. */
-extern void info_menu_digit (WINDOW *window, int count, unsigned char key);
-extern void info_menu_item (WINDOW *window, int count, unsigned char key);
-extern void info_xref_item (WINDOW *window, int count, unsigned char key);
-extern void info_find_menu (WINDOW *window, int count, unsigned char key);
+extern void info_menu_digit (WINDOW *window, int count, int key);
+extern void info_menu_item (WINDOW *window, int count, int key);
+extern void info_xref_item (WINDOW *window, int count, int key);
+extern void info_find_menu (WINDOW *window, int count, int key);
extern void info_select_reference_this_line (WINDOW *window, int count,
- unsigned char key);
-extern void info_last_menu_item (WINDOW *window, int count, unsigned char key);
-extern void info_visit_menu (WINDOW *window, int count, unsigned char key);
+ int key);
+extern void info_last_menu_item (WINDOW *window, int count, int key);
+extern void info_visit_menu (WINDOW *window, int count, int key);
/* Adding numeric arguments. */
extern int info_explicit_arg, info_numeric_arg, info_numeric_arg_sign;
extern int ea_explicit_arg, ea_numeric_arg, ea_numeric_arg_sign;
-extern void info_add_digit_to_numeric_arg (WINDOW *window, int count,
- unsigned char key);
-extern void info_universal_argument (WINDOW *window, int count,
- unsigned char key);
+extern void info_add_digit_to_numeric_arg (WINDOW *window, int count, int key);
+extern void info_universal_argument (WINDOW *window, int count, int key);
extern void info_initialize_numeric_arg (void);
-extern void info_numeric_arg_digit_loop (WINDOW *window, int count,
- unsigned char key);
+extern void info_numeric_arg_digit_loop (WINDOW *window, int count, int key);
/* Searching commands. */
-extern void info_search (WINDOW *window, int count, unsigned char key);
-extern void isearch_forward (WINDOW *window, int count, unsigned char key);
-extern void isearch_backward (WINDOW *window, int count, unsigned char key);
-extern void info_search_case_sensitively (WINDOW *window, int count,
- unsigned char key);
-extern void info_search_backward (WINDOW *window, int count, unsigned char
key);
-extern void info_search_next (WINDOW *window, int count, unsigned char key);
-extern void info_search_previous (WINDOW *window, int count, unsigned char
key);
+extern void info_search (WINDOW *window, int count, int key);
+extern void isearch_forward (WINDOW *window, int count, int key);
+extern void isearch_backward (WINDOW *window, int count, int key);
+extern void info_search_case_sensitively (WINDOW *window, int count, int key);
+extern void info_search_backward (WINDOW *window, int count, int key);
+extern void info_search_next (WINDOW *window, int count, int key);
+extern void info_search_previous (WINDOW *window, int count, int key);
/* Dumping and printing nodes. */
-extern void info_print_node (WINDOW *window, int count, unsigned char key);
+extern void info_print_node (WINDOW *window, int count, int key);
/* Footnotes. */
-extern void info_show_footnotes (WINDOW *window, int count, unsigned char key);
+extern void info_show_footnotes (WINDOW *window, int count, int key);
/* Miscellaneous commands. */
-extern void info_abort_key (WINDOW *window, int count, unsigned char key);
-extern void info_quit (WINDOW *window, int count, unsigned char key);
-extern void info_do_lowercase_version (WINDOW *window, int count,
- unsigned char key);
+extern void info_abort_key (WINDOW *window, int count, int key);
+extern void info_quit (WINDOW *window, int count, int key);
+extern void info_do_lowercase_version (WINDOW *window, int count, int key);
#endif /* not SESSION_H */
Modified: trunk/info/variables.h
===================================================================
--- trunk/info/variables.h 2014-06-28 20:53:23 UTC (rev 5688)
+++ trunk/info/variables.h 2014-06-28 21:48:27 UTC (rev 5689)
@@ -55,10 +55,10 @@
extern REFERENCE **make_variable_completions_array (void);
/* Set the value of an info variable. */
-extern void set_variable (WINDOW *window, int count, unsigned char key);
+extern void set_variable (WINDOW *window, int count, int key);
extern int set_variable_to_value (VARIABLE_ALIST *var, char *value, int where);
-extern void describe_variable (WINDOW *window, int count, unsigned char key);
+extern void describe_variable (WINDOW *window, int count, int key);
/* The list of user-visible variables. */
extern int auto_footnotes_p;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5689] numeric argument loop; DECLARE_INFO_COMMAND,
Gavin D. Smith <=