annotate target-utils/buzplayer/cmdtab.c @ 1011:6d9b10633f10

etmsync Pirelli IMEI retrieval: fix poor use of printf() Bug reported by Vadim Yanitskiy <fixeria@osmocom.org>: the construct where a static-allocated string was passed to printf() without any format arguments causes newer compilers to report a security problem. Given that formatted output is not needed here, just fixed string output, change printf() to fputs(), and direct the error message to stderr while at it.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 23 May 2024 17:29:57 +0000
parents 9092ff68e37d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #include "cmdtab.h"
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 extern void cmd_abbr();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 extern void cmd_abbw();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 extern void cmd_baud_switch();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 extern void cmd_buz();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 extern void cmd_buzlev();
822
7c02cc7f28df buzplayer: PWT tone playing command shortened to bzt
Mychaela Falconia <falcon@freecalypso.org>
parents: 820
diff changeset
8 extern void cmd_bzt();
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 extern void cmd_jump();
820
03457a66d860 buzplayer: add basic support for PWT
Mychaela Falconia <falcon@freecalypso.org>
parents: 499
diff changeset
10 extern void cmd_pwt();
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 extern void cmd_r8();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 extern void cmd_r16();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 extern void cmd_r32();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 extern void cmd_w8();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 extern void cmd_w16();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 extern void cmd_w32();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 extern void abb_init();
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 extern void abb_power_off();
499
44a1de4264d8 target-utils: added support for secret register page 2 of Iota ABB
Mychaela Falconia <falcon@freecalypso.org>
parents: 81
diff changeset
20 extern void abb_unlock_page2();
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
80
eb5960dc258c buzplayer: melody entry implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 76
diff changeset
22 extern void melody_init();
823
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
23 extern void melody_init_pwt();
80
eb5960dc258c buzplayer: melody entry implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 76
diff changeset
24 extern void melody_entry();
81
8a200d65c6a0 buzplayer: play implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
25 extern void melody_play();
823
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
26 extern void pwt_entry_note();
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
27 extern void pwt_entry_rest();
80
eb5960dc258c buzplayer: melody entry implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 76
diff changeset
28
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 const struct cmdtab cmdtab[] = {
80
eb5960dc258c buzplayer: melody entry implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 76
diff changeset
30 {"E", melody_entry},
823
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
31 {"EP", pwt_entry_rest},
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
32 {"ET", pwt_entry_note},
80
eb5960dc258c buzplayer: melody entry implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 76
diff changeset
33 {"I", melody_init},
823
9092ff68e37d buzplayer: implement PWT mode melody entry
Mychaela Falconia <falcon@freecalypso.org>
parents: 822
diff changeset
34 {"IT", melody_init_pwt},
81
8a200d65c6a0 buzplayer: play implemented
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
35 {"P", melody_play},
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 {"abbinit", abb_init},
499
44a1de4264d8 target-utils: added support for secret register page 2 of Iota ABB
Mychaela Falconia <falcon@freecalypso.org>
parents: 81
diff changeset
37 {"abbpage2", abb_unlock_page2},
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 {"abbr", cmd_abbr},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 {"abbw", cmd_abbw},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 {"baud", cmd_baud_switch},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 {"buz", cmd_buz},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 {"buzlev", cmd_buzlev},
822
7c02cc7f28df buzplayer: PWT tone playing command shortened to bzt
Mychaela Falconia <falcon@freecalypso.org>
parents: 820
diff changeset
43 {"bzt", cmd_bzt},
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 {"jump", cmd_jump},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 {"poweroff", abb_power_off},
820
03457a66d860 buzplayer: add basic support for PWT
Mychaela Falconia <falcon@freecalypso.org>
parents: 499
diff changeset
46 {"pwt", cmd_pwt},
76
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 {"r8", cmd_r8},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 {"r16", cmd_r16},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 {"r32", cmd_r32},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 {"w8", cmd_w8},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 {"w16", cmd_w16},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 {"w32", cmd_w32},
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 {0, 0}
5bbba2cab6f3 target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 };