1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
diff --git a/pm_test/latency.c b/pm_test/latency.c
old mode 100755
new mode 100644
index bfcdc0c..87f6a5e
--- a/pm_test/latency.c
+++ b/pm_test/latency.c
@@ -280,7 +280,7 @@ int get_number(char *prompt)
{
char line[STRING_MAX];
int n = 0, i;
- printf(prompt);
+ printf("%s\n", prompt);
while (n != 1) {
n = scanf("%d", &i);
fgets(line, STRING_MAX, stdin);
diff --git a/pm_test/mm.c b/pm_test/mm.c
old mode 100755
new mode 100644
index 0f2a52e..3f04a30
--- a/pm_test/mm.c
+++ b/pm_test/mm.c
@@ -119,7 +119,7 @@ int get_number(char *prompt)
{
char line[STRING_MAX];
int n = 0, i;
- printf(prompt);
+ printf("%s", prompt);
while (n != 1) {
n = scanf("%d", &i);
fgets(line, STRING_MAX, stdin);
@@ -136,7 +136,7 @@ void receive_poll(PtTimestamp timestamp, void *userData)
if (!active) return;
while ((count = Pm_Read(midi_in, &event, 1))) {
if (count == 1) output(event.message);
- else printf(Pm_GetErrorText(count));
+ else printf("%s", Pm_GetErrorText(count));
}
}
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
inp = get_number("Type input device number: ");
err = Pm_OpenInput(&midi_in, inp, NULL, 512, NULL, NULL);
if (err) {
- printf(Pm_GetErrorText(err));
+ printf("%s", Pm_GetErrorText(err));
Pt_Stop();
mmexit(1);
}
@@ -484,7 +484,7 @@ private int put_pitch(int p)
"gs", "a", "bf", "b" };
/* note octave correction below */
sprintf(result, "%s%d", ptos[p % 12], (p / 12) - 1);
- printf(result);
+ printf("%s\n", result);
return strlen(result);
}
diff --git a/pm_test/midiclock.c b/pm_test/midiclock.c
index 60fcf7a..def511a 100644
--- a/pm_test/midiclock.c
+++ b/pm_test/midiclock.c
@@ -167,7 +167,7 @@ int get_number(char *prompt)
{
char line[STRING_MAX];
int n = 0, i;
- printf(prompt);
+ printf("%s", prompt);
while (n != 1) {
n = scanf("%d", &i);
fgets(line, STRING_MAX, stdin);
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
err = Pm_OpenOutput(&midi, outp, DRIVER_INFO, OUTPUT_BUFFER_SIZE,
TIME_PROC, TIME_INFO, LATENCY);
if (err) {
- printf(Pm_GetErrorText(err));
+ printf("%s", Pm_GetErrorText(err));
goto error_exit_no_device;
}
active = true;
diff --git a/pm_test/sysex.c b/pm_test/sysex.c
index 7bbcf0e..812d979 100755
--- a/pm_test/sysex.c
+++ b/pm_test/sysex.c
@@ -39,7 +39,7 @@ int get_number(char *prompt)
{
char line[STRING_MAX];
int n = 0, i;
- printf(prompt);
+ printf("%s", prompt);
while (n != 1) {
n = scanf("%d", &i);
fgets(line, STRING_MAX, stdin);
|