Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 17, 2001
1 parent f15d9e6 commit 77e70d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
10 changes: 5 additions & 5 deletions load_voc.c
Expand Up @@ -50,7 +50,7 @@ typedef struct vocstuff {
Uint32 samples; /* number of samples output */
Uint32 size; /* word length of data */
Uint8 channels; /* number of sound channels */
int extended; /* Has an extended block been read? */
int has_extended; /* Has an extended block been read? */
} vs_t;

/* Size field */
Expand Down Expand Up @@ -150,7 +150,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)

/* When DATA block preceeded by an EXTENDED */
/* block, the DATA blocks rate value is invalid */
if (!v->extended)
if (!v->has_extended)
{
if (uc == 0)
{
Expand Down Expand Up @@ -178,7 +178,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
return 0;
}

v->extended = 0;
v->has_extended = 0;
v->rest = sblen - 2;
v->size = ST_SIZE_BYTE;
return 1;
Expand Down Expand Up @@ -265,7 +265,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
/* Set this byte so we know to use the rate */
/* value from the extended block and not the */
/* data block. */
v->extended = 1;
v->has_extended = 1;
if (SDL_RWread(src, &new_rate_short, sizeof (new_rate_short), 1) != 1)
return 0;
new_rate_short = SDL_SwapLE16(new_rate_short);
Expand Down Expand Up @@ -389,7 +389,7 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,

v.rate = -1;
v.rest = 0;
v.extended = 0;
v.has_extended = 0;
*audio_buf = NULL;
*audio_len = 0;
memset(spec, '\0', sizeof (SDL_AudioSpec));
Expand Down
9 changes: 5 additions & 4 deletions timidity/instrum.c
Expand Up @@ -188,7 +188,7 @@ static Instrument *load_instrument(char *name, int percussion,
if (!name) return 0;

/* Open patch file */
if (!(fp=open_file(name, 1, OF_NORMAL)))
if ((fp=open_file(name, 1, OF_NORMAL)) == NULL)
{
noluck=1;
#ifdef PATCH_EXT_LIST
Expand All @@ -197,9 +197,10 @@ static Instrument *load_instrument(char *name, int percussion,
{
if (strlen(name)+strlen(patch_ext[i])<1024)
{
strcpy(tmp, name);
strcat(tmp, patch_ext[i]);
if ((fp=open_file(tmp, 1, OF_NORMAL)))
char path[1024];
strcpy(path, name);
strcat(path, patch_ext[i]);
if ((fp=open_file(path, 1, OF_NORMAL)) != NULL)
{
noluck=0;
break;
Expand Down
3 changes: 0 additions & 3 deletions timidity/playmidi.c
Expand Up @@ -22,9 +22,6 @@
*/

#include <stdio.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>

Expand Down
11 changes: 1 addition & 10 deletions timidity/readmidi.c
Expand Up @@ -22,16 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#if defined(SOLARIS) | defined(WIN32)
# include <string.h>
#else
#include <strings.h>
#endif

#ifndef WIN32
#include <unistd.h>
#endif
#include <string.h>

#include "config.h"
#include "common.h"
Expand Down

0 comments on commit 77e70d2

Please sign in to comment.