File denemo-perform_command.patch of Package denemo
diff -up denemo-2.6.0/src/command/keyresponses.c.orig denemo-2.6.0/src/command/keyresponses.c
--- denemo-2.6.0/src/command/keyresponses.c.orig 2022-03-11 13:15:53.587874581 +0100
+++ denemo-2.6.0/src/command/keyresponses.c 2025-08-10 08:45:14.161405675 +0200
@@ -203,7 +203,7 @@ perform_command (const gchar * command_n
//return the value of perform_command if executed or "" if keypress is part of a two-key shortcut, or NULL toherwise
gchar *
-process_key_event (GdkEventKey * event, gchar * perform_command ())
+process_key_event (GdkEventKey * event, gchar * (*perform_command) (const gchar *, GdkEventKey *))
{
keymap *the_keymap = Denemo.map;
//g_debug("\n********\nCaps Lock %x?\n\n********\nShifted %x?\n", event->state&GDK_LOCK_MASK, event->state&GDK_SHIFT_MASK );
diff -up denemo-2.6.0/src/command/keyresponses.h.orig denemo-2.6.0/src/command/keyresponses.h
--- denemo-2.6.0/src/command/keyresponses.h.orig 2022-03-11 13:15:53.587874581 +0100
+++ denemo-2.6.0/src/command/keyresponses.h 2025-08-10 08:40:35.877333685 +0200
@@ -125,7 +125,7 @@ void blank_mode (DenemoAction * action,
void append_measure_score (DenemoAction* action, DenemoScriptParam *param);
-gchar *process_key_event (GdkEventKey * event, gchar * perform_command ());
+gchar *process_key_event (GdkEventKey * event, gchar * (*perform_command) (const gchar *, GdkEventKey *));
void InsertRest(gint duration);
diff -up denemo-2.6.0/src/scripting/scheme-callbacks.c.orig denemo-2.6.0/src/scripting/scheme-callbacks.c
--- denemo-2.6.0/src/scripting/scheme-callbacks.c.orig 2022-03-11 13:15:53.614541275 +0100
+++ denemo-2.6.0/src/scripting/scheme-callbacks.c 2025-08-10 12:50:57.398319178 +0200
@@ -4874,7 +4874,7 @@ scheme_get_command (void)
gchar *
-return_command (gchar * name, GdkEvent * event)
+return_command (const gchar * name, GdkEventKey * event)
{
return name;
}
@@ -4888,14 +4888,14 @@ scheme_get_command_from_user (void)
if (intercept_scorearea_keypress (&event))
{
- gchar *command = process_key_event (&event, &return_command);
+ gchar *command = process_key_event (&event, return_command);
if (command == NULL)
return SCM_BOOL_F;
if (*command == 0)
{ //can be two-key shortcut
if (intercept_scorearea_keypress (&event))
{
- command = process_key_event (&event, &return_command);
+ command = process_key_event (&event, return_command);
if (command == NULL)
return SCM_BOOL_F;
}