[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5757] remove WINDOW argument from echo area reading functions
From: |
Gavin D. Smith |
Subject: |
[5757] remove WINDOW argument from echo area reading functions |
Date: |
Mon, 18 Aug 2014 13:48:52 +0000 |
Revision: 5757
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5757
Author: gavin
Date: 2014-08-18 13:48:49 +0000 (Mon, 18 Aug 2014)
Log Message:
-----------
remove WINDOW argument from echo area reading functions
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/echo-area.c
trunk/info/echo-area.h
trunk/info/indices.c
trunk/info/info.h
trunk/info/m-x.c
trunk/info/nodemenu.c
trunk/info/session.c
trunk/info/variables.c
trunk/info/variables.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/ChangeLog 2014-08-18 13:48:49 UTC (rev 5757)
@@ -1,3 +1,13 @@
+2014-08-18 Gavin Smith <address@hidden>
+
+ * info/echo-area.c (info_read_in_echo_area)
+ (info_read_completing_internal, info_read_completing_in_echo_area)
+ (info_read_maybe_completing)
+ (info_read_completing_in_echo_area_with_exclusions): WINDOW argument
+ removed. All uses updated.
+
+ * info/session.c (ask_for_search_string): WINDOW argument removed.
+
2014-08-17 Gavin Smith <address@hidden>
* info/session.c (info_search_1): Argument removed. Don't call
Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/echo-area.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -200,11 +200,10 @@
}
/* Read a line of text in the echo area. Return a malloc ()'ed string,
- or NULL if the user aborted out of this read. WINDOW is the currently
- active window, so that we can restore it when we need to. PROMPT, if
+ or NULL if the user aborted out of this read. PROMPT, if
non-null, is a prompt to print before reading the line. */
char *
-info_read_in_echo_area (WINDOW *window, const char *prompt)
+info_read_in_echo_area (char *prompt)
{
char *line;
@@ -220,7 +219,7 @@
/* Save away the original node of this window, and the window itself,
so echo area commands can temporarily use this window. */
- remember_calling_window (window);
+ remember_calling_window (active_window);
/* Let the rest of Info know that the echo area is active. */
echo_area_is_active++;
@@ -816,8 +815,8 @@
exit unless the line read completes, or is empty. Use EXCLUDE_FUNC to
exclude items in COMPLETIONS. */
char *
-info_read_completing_internal (WINDOW *window, const char *prompt,
- REFERENCE **completions, int force, reference_bool_fn exclude_func)
+info_read_completing_internal (char *prompt, REFERENCE **completions,
+ int force, reference_bool_fn exclude_func)
{
char *line;
@@ -835,7 +834,7 @@
/* Save away the original node of this window, and the window itself,
so echo area commands can temporarily use this window. */
- remember_calling_window (window);
+ remember_calling_window (active_window);
/* Save away the list of items to complete over. */
echo_area_completion_items = completions;
@@ -913,29 +912,26 @@
/* Read a line in the echo area with completion over COMPLETIONS. */
char *
-info_read_completing_in_echo_area (WINDOW *window,
- const char *prompt, REFERENCE **completions)
+info_read_completing_in_echo_area (char *prompt, REFERENCE **completions)
{
- return info_read_completing_internal (window, prompt, completions, 1, 0);
+ return info_read_completing_internal (prompt, completions, 1, 0);
}
/* Read a line in the echo area allowing completion over COMPLETIONS, but
not requiring it. */
char *
-info_read_maybe_completing (WINDOW *window,
- const char *prompt, REFERENCE **completions)
+info_read_maybe_completing (char *prompt, REFERENCE **completions)
{
- return info_read_completing_internal (window, prompt, completions, 0, 0);
+ return info_read_completing_internal (prompt, completions, 0, 0);
}
/* Read a line in the echo area with completion over COMPLETIONS, using
EXCLUDE to exclude items from the completion list. */
char *
-info_read_completing_in_echo_area_with_exclusions (WINDOW *window,
- const char *prompt, REFERENCE **completions, reference_bool_fn exclude)
+info_read_completing_in_echo_area_with_exclusions (char *prompt,
+ REFERENCE **completions, reference_bool_fn exclude)
{
- return info_read_completing_internal
- (window, prompt, completions, 1, exclude);
+ return info_read_completing_internal (prompt, completions, 1, exclude);
}
DECLARE_INFO_COMMAND (ea_possible_completions, _("List possible completions"))
Modified: trunk/info/echo-area.h
===================================================================
--- trunk/info/echo-area.h 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/echo-area.h 2014-08-18 13:48:49 UTC (rev 5757)
@@ -37,31 +37,28 @@
typedef int (*reference_bool_fn) (REFERENCE *);
-extern char * info_read_completing_internal (WINDOW *window, const char
*prompt,
+extern char *info_read_completing_internal (char *prompt,
REFERENCE **completions, int force, reference_bool_fn exclude);
/* Read a line of text in the echo area. Return a malloc ()'ed string,
- or NULL if the user aborted out of this read. WINDOW is the currently
- active window, so that we can restore it when we need to. PROMPT, if
+ or NULL if the user aborted out of this read. PROMPT, if
non-null, is a prompt to print before reading the line. */
-extern char *info_read_in_echo_area (WINDOW *window, const char *prompt);
+extern char *info_read_in_echo_area (char *prompt);
-/* Read a line in the echo area with completion over COMPLETIONS.
- Takes arguments of WINDOW, PROMPT, and COMPLETIONS, a REFERENCE **. */
-char *info_read_completing_in_echo_area (WINDOW *window,
- const char *prompt, REFERENCE **completions);
+/* Read a line in the echo area with completion over COMPLETIONS. */
+char *info_read_completing_in_echo_area (char *prompt,
+ REFERENCE **completions);
/* Read a line in the echo area allowing completion over COMPLETIONS, but
- not requiring it. Takes arguments of WINDOW, PROMPT, and COMPLETIONS,
- a REFERENCE **. */
-extern char *info_read_maybe_completing (WINDOW *window,
- const char *prompt, REFERENCE **completions);
+ not requiring it. */
+extern char *info_read_maybe_completing (char *prompt,
+ REFERENCE **completions);
/* Read a line in the echo area with completion over COMPLETIONS, using
EXCLUDE to exclude items from the completion list. */
char *
-info_read_completing_in_echo_area_with_exclusions (WINDOW *window,
- const char *prompt, REFERENCE **completions, reference_bool_fn exclude);
+info_read_completing_in_echo_area_with_exclusions (char *prompt,
+ REFERENCE **completions, reference_bool_fn exclude);
extern void ea_insert (WINDOW *window, int count, int key);
extern void ea_quoted_insert (WINDOW *window, int count, int key);
Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/indices.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -215,8 +215,7 @@
line = xstrdup (search_string);
else
{
- line = info_read_maybe_completing (window, _("Index entry: "),
- index_index);
+ line = info_read_maybe_completing (_("Index entry: "), index_index);
window = active_window;
/* User aborted? */
@@ -589,7 +588,7 @@
{
char *line;
- line = info_read_in_echo_area (window, _("Index apropos: "));
+ line = info_read_in_echo_area (_("Index apropos: "));
window = active_window;
@@ -784,8 +783,7 @@
return;
}
- line = info_read_maybe_completing (window, _("Index topic: "),
- index_index);
+ line = info_read_maybe_completing (_("Index topic: "), index_index);
/* User aborted? */
if (!line)
Modified: trunk/info/info.h
===================================================================
--- trunk/info/info.h 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/info.h 2014-08-18 13:48:49 UTC (rev 5757)
@@ -135,7 +135,7 @@
/* Found in m-x.c. */
-extern char *read_function_name (const char *prompt, WINDOW *window);
+extern char *read_function_name (char *prompt, WINDOW *window);
extern void show_error_node (char *error_msg);
Modified: trunk/info/m-x.c
===================================================================
--- trunk/info/m-x.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/m-x.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -32,7 +32,7 @@
name. A return value of NULL indicates that no function name could
be read. */
char *
-read_function_name (const char *prompt, WINDOW *window)
+read_function_name (char *prompt, WINDOW *window)
{
register int i;
char *line;
@@ -53,7 +53,7 @@
add_pointer_to_array (entry, array_index, array, array_slots, 200);
}
- line = info_read_completing_in_echo_area (window, prompt, array);
+ line = info_read_completing_in_echo_area (prompt, array);
info_free_references (array);
return line;
@@ -165,7 +165,7 @@
sprintf (prompt, _("Set screen height to (%d): "), new_height);
- line = info_read_in_echo_area (window, prompt);
+ line = info_read_in_echo_area (prompt);
/* If the user aborted, do that now. */
if (!line)
Modified: trunk/info/nodemenu.c
===================================================================
--- trunk/info/nodemenu.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/nodemenu.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -254,8 +254,8 @@
node = get_visited_nodes ();
- line = info_read_completing_in_echo_area (window,
- _("Select visited node: "), node->references);
+ line = info_read_completing_in_echo_area (_("Select visited node: "),
+ node->references);
window = active_window;
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/session.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -2418,8 +2418,8 @@
prompt = xstrdup (_("Follow xref: "));
}
- line = info_read_completing_in_echo_area_with_exclusions
- (window, prompt, refs, exclude);
+ line = info_read_completing_in_echo_area_with_exclusions (prompt, refs,
+ exclude);
free (prompt);
window = active_window;
@@ -2790,7 +2790,7 @@
DECLARE_INFO_COMMAND (info_menu_sequence,
_("Read a list of menus starting from dir and follow them"))
{
- char *line = info_read_in_echo_area (window, _("Follow menus: "));
+ char *line = info_read_in_echo_area (_("Follow menus: "));
/* If the user aborted, quit now. */
if (!line)
@@ -2909,12 +2909,11 @@
}
}
}
- line = info_read_maybe_completing (window, _("Goto node: "),
- items);
+ line = info_read_maybe_completing (_("Goto node: "), items);
info_free_references (items);
}
#else /* !GOTO_COMPLETES */
- line = info_read_in_echo_area (window, _("Goto node: "));
+ line = info_read_in_echo_area (_("Goto node: "));
#endif /* !GOTO_COMPLETES */
/* If the user aborted, quit now. */
@@ -3057,7 +3056,7 @@
prompt = xmalloc (strlen (default_program_name) +
strlen (invocation_prompt));
sprintf (prompt, invocation_prompt, default_program_name);
- line = info_read_in_echo_area (window, prompt);
+ line = info_read_in_echo_area (prompt);
free (prompt);
if (!line)
{
@@ -3089,7 +3088,7 @@
{
char *line;
- line = info_read_in_echo_area (window, _("Get Manpage: "));
+ line = info_read_in_echo_area (_("Get Manpage: "));
if (!line)
{
@@ -3150,7 +3149,7 @@
{
char *line;
- line = info_read_in_echo_area (window, _("Find file: "));
+ line = info_read_in_echo_area (_("Find file: "));
if (!line)
{
info_abort_key (active_window, 1, 0);
@@ -3743,8 +3742,7 @@
/* Read a string from the user. */
static int
-ask_for_search_string (int case_sensitive, int use_regex,
- int direction, WINDOW *window)
+ask_for_search_string (int case_sensitive, int use_regex, int direction)
{
char *line, *prompt;
@@ -3760,14 +3758,11 @@
case_sensitive ? _(" case-sensitively") : "",
direction < 0 ? _(" backward") : "");
- line = info_read_in_echo_area (window, prompt);
+ line = info_read_in_echo_area (prompt);
free (prompt);
if (!line)
- {
- info_abort_key (window, 0, 0);
- return 0;
- }
+ return 0;
if (*line)
{
@@ -3868,7 +3863,7 @@
last_search_direction = count > 0 ? 1 : -1;
last_search_case_sensitive = 1;
- if (!ask_for_search_string (1, use_regex, count, window))
+ if (!ask_for_search_string (1, use_regex, count))
return;
info_search_1 (window, count, 1, DFL_START);
@@ -3879,7 +3874,7 @@
last_search_direction = count > 0 ? 1 : -1;
last_search_case_sensitive = 0;
- if (!ask_for_search_string (0, use_regex, count, window))
+ if (!ask_for_search_string (0, use_regex, count))
return;
info_search_1 (window, count, 0, DFL_START);
@@ -3891,7 +3886,7 @@
last_search_direction = count > 0 ? -1 : 1;
last_search_case_sensitive = 0;
- if (!ask_for_search_string (0, use_regex, -count, window))
+ if (!ask_for_search_string (0, use_regex, -count))
return;
info_search_1 (window, -count, 0, DFL_START);
Modified: trunk/info/variables.c
===================================================================
--- trunk/info/variables.c 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/variables.c 2014-08-18 13:48:49 UTC (rev 5757)
@@ -161,7 +161,7 @@
sprintf (prompt, _("Set %s to value (%d): "),
var->name, potential_value);
- line = info_read_in_echo_area (active_window, prompt);
+ line = info_read_in_echo_area (prompt);
/* User aborted? */
if (!line)
@@ -197,7 +197,7 @@
var->name, var->choices[*(var->value)]);
/* Ask the completer to read a variable value for us. */
- line = info_read_completing_in_echo_area (window, prompt, array);
+ line = info_read_completing_in_echo_area (prompt, array);
info_free_references (array);
@@ -239,7 +239,7 @@
address of a VARIABLE_ALIST member. A return value of NULL indicates
that no variable could be read. */
VARIABLE_ALIST *
-read_variable_name (const char *prompt, WINDOW *window)
+read_variable_name (char *prompt, WINDOW *window)
{
char *line;
REFERENCE **variables;
@@ -248,7 +248,7 @@
variables = make_variable_completions_array ();
/* Ask the completer to read a variable for us. */
- line = info_read_completing_in_echo_area (window, prompt, variables);
+ line = info_read_completing_in_echo_area (prompt, variables);
info_free_references (variables);
Modified: trunk/info/variables.h
===================================================================
--- trunk/info/variables.h 2014-08-17 19:00:32 UTC (rev 5756)
+++ trunk/info/variables.h 2014-08-18 13:48:49 UTC (rev 5757)
@@ -46,7 +46,7 @@
/* Read the name of an Info variable in the echo area and return the
address of a VARIABLE_ALIST member. A return value of NULL indicates
that no variable could be read. */
-extern VARIABLE_ALIST *read_variable_name (const char *prompt, WINDOW *window);
+extern VARIABLE_ALIST *read_variable_name (char *prompt, WINDOW *window);
extern VARIABLE_ALIST *variable_by_name (char *name);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5757] remove WINDOW argument from echo area reading functions,
Gavin D. Smith <=