[binutils-gdb] [gdb/tui] Add default arguments to tui_rl_switch_mode

Tom de Vries via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2801e289d0ddb04a514b42c821d2650d7e8f7da6

commit 2801e289d0ddb04a514b42c821d2650d7e8f7da6
Author: Tom de Vries <[email protected]>
Date:   Thu Mar 19 10:55:46 2026 +0100

    [gdb/tui] Add default arguments to tui_rl_switch_mode
    
    Add default arguments for tui_rl_switch_mode, to allow:
    ...
    -tui_rl_switch_mode (0 /* notused */, 0 /* notused */);
    +tui_rl_switch_mode ();
    ...
    
    Tested on x86_64-linux.
    
    Reviewed-By: Keith Seitz <[email protected]>

Diff:
---
 gdb/tui/tui.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 731543e2e18..5b322db5bdf 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -111,7 +111,7 @@ static Keymap tui_readline_standard_keymap;
 /* TUI readline command.
    Switch the output mode between TUI/standard gdb.  */
 static int
-tui_rl_switch_mode (int notused1, int notused2)
+tui_rl_switch_mode (int notused1 = 0, int notused2 = 0)
 {
 
   /* Don't let exceptions escape.  We're in the middle of a readline
@@ -186,7 +186,7 @@ static int
 tui_rl_change_windows (int notused1, int notused2)
 {
   if (!tui_active)
-    tui_rl_switch_mode (0 /* notused */, 0 /* notused */);
+    tui_rl_switch_mode ();
 
   if (tui_active)
     tui_next_layout ();
@@ -200,7 +200,7 @@ static int
 tui_rl_delete_other_windows (int notused1, int notused2)
 {
   if (!tui_active)
-    tui_rl_switch_mode (0 /* notused */, 0 /* notused */);
+    tui_rl_switch_mode ();
 
   if (tui_active)
     tui_remove_some_windows ();
@@ -214,7 +214,7 @@ static int
 tui_rl_other_window (int count, int key)
 {
   if (!tui_active)
-    tui_rl_switch_mode (0 /* notused */, 0 /* notused */);
+    tui_rl_switch_mode ();
 
   tui_set_win_focus_to (tui_next_win (tui_win_with_focus ()));
 
@@ -267,7 +267,7 @@ static int
 tui_rl_next_keymap (int notused1, int notused2)
 {
   if (!tui_active)
-    tui_rl_switch_mode (0 /* notused */, 0 /* notused */);
+    tui_rl_switch_mode ();
 
   if (rl_end)
     {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.