File 0695-Uniform-spelling-and-casing-of-key-shortcuts.patch of Package erlang

From 2ccb47453301a025a76dba0933869232dd4006c5 Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Thu, 13 Jun 2024 14:27:19 +0200
Subject: [PATCH 1/2] Uniform spelling and casing of key shortcuts

Control always written as Ctrl. Letter keys always uppercase.
Modifiers (Shift, Alt, Ctrl) always titlecase.
---
 HOWTO/INSTALL-RASPBERRYPI3.md                 |  2 +-
 erts/emulator/nifs/common/prim_tty_nif.c      | 10 +++++-----
 erts/emulator/sys/unix/sys.c                  |  6 +++---
 erts/emulator/sys/win32/sys_interrupt.c       |  2 +-
 lib/debugger/test/dbg_ui_SUITE.erl            |  8 ++++----
 lib/reltool/test/reltool_manual_gui_SUITE.erl |  2 +-
 lib/ssh/src/ssh_connect.hrl                   |  4 ++--
 lib/stdlib/doc/stdlib_app.md                  |  2 +-
 lib/stdlib/src/edlin_key.erl                  |  2 +-
 lib/stdlib/src/erl_scan.erl                   |  2 +-
 lib/stdlib/src/shell.erl                      |  2 +-
 11 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/HOWTO/INSTALL-RASPBERRYPI3.md b/HOWTO/INSTALL-RASPBERRYPI3.md
index 77fdc67f55..1f4ac108bb 100644
--- a/HOWTO/INSTALL-RASPBERRYPI3.md
+++ b/HOWTO/INSTALL-RASPBERRYPI3.md
@@ -241,7 +241,7 @@ Uncheck option:
 
     $ cat > test.c
     $ int main() { printf("Hello, world!\n"); return 0; }
-    <CTRL+D>
+    <Ctrl+D>
     $ armv8-rpi3-linux-gnueabihf-gcc -o test test.c
 
 
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index ba5ba255d4..19608ef5c9 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -764,7 +764,7 @@ void erts_set_ignore_break(void) {
     sys_signal(SIGTSTP, SIG_IGN);       /* Ctrl-Z */
 }
 
-/* Don't use ctrl-c for break handler but let it be 
+/* Don't use Ctrl-C for break handler but let it be
    used by the shell instead (see user_drv.erl) */
 void erts_replace_intr(void) {
   struct termios mode;
@@ -772,11 +772,11 @@ void erts_replace_intr(void) {
   if (isatty(0)) {
     tcgetattr(0, &mode);
 
-    /* here's an example of how to replace ctrl-c with ctrl-u */
+    /* here's an example of how to replace Ctrl-C with Ctrl-U */
     /* mode.c_cc[VKILL] = 0;
        mode.c_cc[VINTR] = CKILL; */
 
-    mode.c_cc[VINTR] = 0;	/* disable ctrl-c */
+    mode.c_cc[VINTR] = 0;	/* disable Ctrl-C */
     tcsetattr(0, TCSANOW, &mode);
     replace_intr = 1;
   }
diff --git a/erts/emulator/sys/win32/sys_interrupt.c b/erts/emulator/sys/win32/sys_interrupt.c
index fc4f63d4bf..fbbd7a1b76 100644
--- a/erts/emulator/sys/win32/sys_interrupt.c
+++ b/erts/emulator/sys/win32/sys_interrupt.c
@@ -111,7 +111,7 @@ BOOL WINAPI ctrl_handler_replace_intr(DWORD dwCtrlType)
 }
 
 
-/* Don't use ctrl-c for break handler but let it be 
+/* Don't use Ctrl-C for break handler but let it be
    used by the shell instead (see user_drv.erl) */
 void erts_replace_intr(void) {
     ConSetCtrlHandler(ctrl_handler_replace_intr);
diff --git a/lib/debugger/test/dbg_ui_SUITE.erl b/lib/debugger/test/dbg_ui_SUITE.erl
index ca66f49f0a..0b519e6a32 100644
--- a/lib/debugger/test/dbg_ui_SUITE.erl
+++ b/lib/debugger/test/dbg_ui_SUITE.erl
@@ -192,10 +192,10 @@ Interpret one module").
 	  "Start the debugger and interpret the modules [test, lists1, ordsets1]. Close the Interpret dialog. Set Attach on First Call and Attach on Break.").
 
 ?MAN_CASE(all_step3, "Click Step through all evaluation",
-	  "In the shell, call test:test1(). Use the Step button, the Process->Step menu item and the ctrl-s shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+	  "In the shell, call test:test1(). Use the Step button, the Process->Step menu item and the Ctrl-S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
 
 ?MAN_CASE(all_next3,"Click Next through all evaluation",
-	  "Again call test:test1() in the shell. This time Use the Next button,  the Process->Next menu and the ctrl-n shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+	  "Again call test:test1() in the shell. This time Use the Next button,  the Process->Next menu and the Ctrl-N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
 
 ?MAN_CASE(save3, "Save the debugger state",
 	  "Use File->Save Settings to save the debugger state with the name 'three.state'").
@@ -256,7 +256,7 @@ Interpret one module").
 
 
 ?MAN_CASE(all_step6, "Click Step through all evaluation",
-	  "In the bar shell, call test:test1().This should open an attach window. Use the Step button, the Process->Step menu item and the ctrl-s shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the bar shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+	  "In the bar shell, call test:test1().This should open an attach window. Use the Step button, the Process->Step menu item and the Ctrl-S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the bar shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
 
 ?MAN_CASE(all_next6,"Click Next through all evaluation",
-	  "Again, in the bar shell, call test:test1(). This time Use the Next button,  the Process->Next menu and the ctrl-n shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+	  "Again, in the bar shell, call test:test1(). This time Use the Next button,  the Process->Next menu and the Ctrl-N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE.erl b/lib/reltool/test/reltool_manual_gui_SUITE.erl
index 3a4b012d2e..659c51f23b 100644
--- a/lib/reltool/test/reltool_manual_gui_SUITE.erl
+++ b/lib/reltool/test/reltool_manual_gui_SUITE.erl
@@ -172,7 +172,7 @@ config(Config) ->
     {ok,ServerPid} = reltool:get_server(SysPid),
     unlink(SysPid),
     break("the system window is still alive",
-	  "terminate reltool by hitting 'Ctrl-q' (linux) or clicking the "
+	  "terminate reltool by hitting 'Ctrl-Q' (linux) or clicking the "
 	  "close box on the top fram when system window is active"),
     false = erlang:is_process_alive(SysPid),
     false = erlang:is_process_alive(ServerPid),
diff --git a/lib/ssh/src/ssh_connect.hrl b/lib/ssh/src/ssh_connect.hrl
index 3bd53d5912..7b985451f8 100644
--- a/lib/ssh/src/ssh_connect.hrl
+++ b/lib/ssh/src/ssh_connect.hrl
@@ -180,8 +180,8 @@
 -define(VEOL,6).        %% End-of-line character in addition to carriage return
                         %% or,and). linefeed.
 -define(VEOL2,7).       %% Additional end-of-line character.
--define(VSTART,8).      %% Continues paused output (normally control-Q).
--define(VSTOP,9).       %% Pauses output (normally control-S).
+-define(VSTART,8).      %% Continues paused output (normally Ctrl-Q).
+-define(VSTOP,9).       %% Pauses output (normally Ctrl-S).
 -define(VSUSP,10).      %% Suspends the current program.
 -define(VDSUSP,11).     %% Another suspend character.
 -define(VREPRINT,12).   %% Reprints the current input line.
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index 899785ae3d..9215e2df01 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -1718,7 +1718,7 @@ scan_escape([$x,H1], _Col) when ?HEX(H1) ->
     more;
 scan_escape([$x|Cs], Col) ->
     {error,Cs,{illegal,character},incr_column(Col, 1)};
-%% \^X -> Control-X
+%% \^X -> Ctrl-X
 scan_escape([$^=C0,C|Cs], Col) when ?CHAR(C) ->
     case caret_char_code(C) of
         error ->
-- 
2.43.0

openSUSE Build Service is sponsored by