diff options
Diffstat (limited to 'apps/plugins/mikmod/munitrk.c')
-rw-r--r-- | apps/plugins/mikmod/munitrk.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/plugins/mikmod/munitrk.c b/apps/plugins/mikmod/munitrk.c index f0a8f58af7..72e7de4e7e 100644 --- a/apps/plugins/mikmod/munitrk.c +++ b/apps/plugins/mikmod/munitrk.c | |||
@@ -6,12 +6,12 @@ | |||
6 | it under the terms of the GNU Library General Public License as | 6 | it under the terms of the GNU Library General Public License as |
7 | published by the Free Software Foundation; either version 2 of | 7 | published by the Free Software Foundation; either version 2 of |
8 | the License, or (at your option) any later version. | 8 | the License, or (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU Library General Public License for more details. | 13 | GNU Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public | 15 | You should have received a copy of the GNU Library General Public |
16 | License along with this library; if not, write to the Free Software | 16 | License along with this library; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /*============================================================================== | 21 | /*============================================================================== |
22 | 22 | ||
23 | $Id: munitrk.c,v 1.2 2005/03/30 19:11:46 realtech Exp $ | 23 | $Id$ |
24 | 24 | ||
25 | All routines dealing with the manipulation of UNITRK streams | 25 | All routines dealing with the manipulation of UNITRK streams |
26 | 26 | ||
@@ -37,7 +37,7 @@ | |||
37 | /* Unibuffer chunk size */ | 37 | /* Unibuffer chunk size */ |
38 | #define BUFPAGE 128 | 38 | #define BUFPAGE 128 |
39 | 39 | ||
40 | UWORD unioperands[UNI_LAST]={ | 40 | const UWORD unioperands[UNI_LAST] = { |
41 | 0, /* not used */ | 41 | 0, /* not used */ |
42 | 1, /* UNI_NOTE */ | 42 | 1, /* UNI_NOTE */ |
43 | 1, /* UNI_INSTRUMENT */ | 43 | 1, /* UNI_INSTRUMENT */ |
@@ -214,7 +214,7 @@ static int UniExpand(int wanted) | |||
214 | unibuf = newbuf; | 214 | unibuf = newbuf; |
215 | unimax+=BUFPAGE; | 215 | unimax+=BUFPAGE; |
216 | return 1; | 216 | return 1; |
217 | } else | 217 | } else |
218 | return 0; | 218 | return 0; |
219 | } | 219 | } |
220 | return 1; | 220 | return 1; |
@@ -236,7 +236,7 @@ void UniWriteWord(UWORD data) | |||
236 | } | 236 | } |
237 | } | 237 | } |
238 | 238 | ||
239 | static int MyCmp(UBYTE* a,UBYTE* b,UWORD l) | 239 | static int MyCmp(const UBYTE* a,const UBYTE* b,UWORD l) |
240 | { | 240 | { |
241 | UWORD t; | 241 | UWORD t; |
242 | 242 | ||
@@ -275,15 +275,15 @@ void UniNewline(void) | |||
275 | stream. */ | 275 | stream. */ |
276 | UBYTE* UniDup(void) | 276 | UBYTE* UniDup(void) |
277 | { | 277 | { |
278 | UBYTE *d; | 278 | void *d; |
279 | 279 | ||
280 | if (!UniExpand(unitt-unipc)) return NULL; | 280 | if (!UniExpand(unipc-unitt)) return NULL; |
281 | unibuf[unitt] = 0; | 281 | unibuf[unitt] = 0; |
282 | 282 | ||
283 | if(!(d=(UBYTE *)MikMod_malloc(unipc))) return NULL; | 283 | if(!(d=MikMod_malloc(unipc))) return NULL; |
284 | memcpy(d,unibuf,unipc); | 284 | memcpy(d,unibuf,unipc); |
285 | 285 | ||
286 | return d; | 286 | return (UBYTE *)d; |
287 | } | 287 | } |
288 | 288 | ||
289 | int UniInit(void) | 289 | int UniInit(void) |
@@ -296,7 +296,7 @@ int UniInit(void) | |||
296 | 296 | ||
297 | void UniCleanup(void) | 297 | void UniCleanup(void) |
298 | { | 298 | { |
299 | if(unibuf) MikMod_free(unibuf); | 299 | MikMod_free(unibuf); |
300 | unibuf = NULL; | 300 | unibuf = NULL; |
301 | } | 301 | } |
302 | 302 | ||