Package: timidity / 2.14.0-8

0007-several-compilation-fixes.patch Patch series | download
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
From a7641c8d6e1375369db585665c4be4037bb45dd9 Mon Sep 17 00:00:00 2001
From: Joost Yervante Damad <andete@debian.org>
Date: Tue, 26 Jun 2018 22:31:21 +0200
Subject: several compilation fixes

 applied in Debian revision 2.13.2-21
---
 interface/Makefile.am   | 2 +-
 interface/x_mag.c       | 2 +-
 interface/x_wrdwindow.c | 2 +-
 interface/x_wrdwindow.h | 2 +-
 timidity/sndfont.c      | 4 ++++
 timidity/vorbis_a.c     | 8 ++++----
 timidity/wave_a.c       | 2 +-
 7 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/interface/Makefile.am b/interface/Makefile.am
index e45ce43..b465acc 100644
--- a/interface/Makefile.am
+++ b/interface/Makefile.am
@@ -259,7 +259,7 @@ clean:
 
 tclIndex: $(TCLSRCS)
 	rm -f tclIndex
-	echo 'auto_mkindex . *.tcl; exit' | $(WISH)
+	echo "auto_mkindex . *.tcl" | tclsh
 
 if ENABLE_TCLTK
 install_tk = install.tk
diff --git a/interface/x_mag.c b/interface/x_mag.c
index 04f0fbd..75b865b 100644
--- a/interface/x_mag.c
+++ b/interface/x_mag.c
@@ -187,7 +187,7 @@ magdata *mag_create(char *file)
   magdata mg,*res;
   struct magfilehdr mfh;
   int len,c,header_pos;
-  char *flaga=NULL,*flagb=NULL,*pixels=NULL;
+  unsigned char *flaga=NULL,*flagb=NULL,*pixels=NULL;
   if((res=mag_search(file))){
     return res;
   }
diff --git a/interface/x_wrdwindow.c b/interface/x_wrdwindow.c
index f64990c..1906c55 100644
--- a/interface/x_wrdwindow.c
+++ b/interface/x_wrdwindow.c
@@ -1872,7 +1872,7 @@ static int Parse(int c)
   }
   return 0;
 }
-void AddLine(const unsigned char *str,int len)
+void AddLine(const char *str,int len)
 {
   Linbuf *ptr;
   int i,j;
diff --git a/interface/x_wrdwindow.h b/interface/x_wrdwindow.h
index fd1598a..cc54399 100644
--- a/interface/x_wrdwindow.h
+++ b/interface/x_wrdwindow.h
@@ -26,7 +26,7 @@
 extern void WinEvent(void);
 extern void EndWin(void);
 extern void WinFlush(void);
-extern void AddLine(const unsigned char *,int);
+extern void AddLine(const char *,int);
 extern int OpenWRDWindow(char *opt);
 extern void CloseWRDWindow(void);
 extern void x_RedrawControl(int flag);
diff --git a/timidity/sndfont.c b/timidity/sndfont.c
index e971c27..b1a702f 100644
--- a/timidity/sndfont.c
+++ b/timidity/sndfont.c
@@ -60,6 +60,10 @@
 #include "resample.h"
 #include "interface.h"
 
+// use from freq.c
+float freq_fourier(Sample *sp, int *chord);
+int assign_pitch_to_freq(float freq);
+
 #define FILENAME_NORMALIZE(fname) url_expand_home_dir(fname)
 #define FILENAME_REDUCED(fname)   url_unexpand_home_dir(fname)
 #define SFMalloc(rec, count)      new_segment(&(rec)->pool, count)
diff --git a/timidity/vorbis_a.c b/timidity/vorbis_a.c
index d136047..5fda8bd 100644
--- a/timidity/vorbis_a.c
+++ b/timidity/vorbis_a.c
@@ -475,8 +475,8 @@ static int output_data(char *readbuffer, int32 bytes)
 
 		/* write out pages (if any) */
 		while(ogg_stream_pageout(&os, &og) != 0) {
-		  std_write(dpm.fd, og.header, og.header_len);
-		  std_write(dpm.fd, og.body, og.body_len);
+		  ssize_t dummy = std_write(dpm.fd, og.header, og.header_len);
+		  dummy = std_write(dpm.fd, og.body, og.body_len);
 		}
 	}
   }
@@ -517,8 +517,8 @@ static void close_output(void)
       int result = ogg_stream_pageout(&os,&og);
       if(result == 0)
 	break;
-      std_write(dpm.fd, og.header, og.header_len);
-      std_write(dpm.fd, og.body, og.body_len);
+      ssize_t dummy = std_write(dpm.fd, og.header, og.header_len);
+      dummy = std_write(dpm.fd, og.body, og.body_len);
 
       /* this could be set above, but for illustrative purposes, I do
 	 it here (to show that vorbis does know where the stream ends) */
diff --git a/timidity/wave_a.c b/timidity/wave_a.c
index 6137fbe..c941fe4 100644
--- a/timidity/wave_a.c
+++ b/timidity/wave_a.c
@@ -285,7 +285,7 @@ static int update_header(void)
     }
     lseek(dpm.fd, 40, SEEK_SET);
     tmp = LE_LONG(bytes_output);
-    std_write(dpm.fd, (char *)&tmp, 4);
+    ssize_t dummy = std_write(dpm.fd, (char *)&tmp, 4); ++dummy;
 
     lseek(dpm.fd, save_point, SEEK_SET);
     ctl->cmsg(CMSG_INFO, VERB_DEBUG,