*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Mon, 17 Dec 2001 05:03:10 +0000
changeset 14411a2e00a16c4
parent 143 5744cdd4e407
child 145 52c26d4a0193
*** empty log message ***
load_voc.c
timidity/instrum.c
timidity/playmidi.c
timidity/readmidi.c
     1.1 --- a/load_voc.c	Mon Dec 17 02:52:34 2001 +0000
     1.2 +++ b/load_voc.c	Mon Dec 17 05:03:10 2001 +0000
     1.3 @@ -50,7 +50,7 @@
     1.4  	Uint32	samples;		/* number of samples output */
     1.5  	Uint32	size;		/* word length of data */
     1.6  	Uint8 	channels;	/* number of sound channels */
     1.7 -	int     extended;       /* Has an extended block been read? */
     1.8 +	int     has_extended;       /* Has an extended block been read? */
     1.9  } vs_t;
    1.10  
    1.11  /* Size field */ 
    1.12 @@ -150,7 +150,7 @@
    1.13  
    1.14                  /* When DATA block preceeded by an EXTENDED     */
    1.15                  /* block, the DATA blocks rate value is invalid */
    1.16 -                if (!v->extended)
    1.17 +                if (!v->has_extended)
    1.18                  {
    1.19                      if (uc == 0)
    1.20                      {
    1.21 @@ -178,7 +178,7 @@
    1.22                      return 0;
    1.23                  }
    1.24  
    1.25 -                v->extended = 0;
    1.26 +                v->has_extended = 0;
    1.27                  v->rest = sblen - 2;
    1.28                  v->size = ST_SIZE_BYTE;
    1.29                  return 1;
    1.30 @@ -265,7 +265,7 @@
    1.31                  /* Set this byte so we know to use the rate      */
    1.32                  /* value from the extended block and not the     */
    1.33                  /* data block.                     */
    1.34 -                v->extended = 1;
    1.35 +                v->has_extended = 1;
    1.36                  if (SDL_RWread(src, &new_rate_short, sizeof (new_rate_short), 1) != 1)
    1.37                      return 0;
    1.38                  new_rate_short = SDL_SwapLE16(new_rate_short);
    1.39 @@ -389,7 +389,7 @@
    1.40  
    1.41      v.rate = -1;
    1.42      v.rest = 0;
    1.43 -    v.extended = 0;
    1.44 +    v.has_extended = 0;
    1.45      *audio_buf = NULL;
    1.46      *audio_len = 0;
    1.47      memset(spec, '\0', sizeof (SDL_AudioSpec));
     2.1 --- a/timidity/instrum.c	Mon Dec 17 02:52:34 2001 +0000
     2.2 +++ b/timidity/instrum.c	Mon Dec 17 05:03:10 2001 +0000
     2.3 @@ -188,7 +188,7 @@
     2.4    if (!name) return 0;
     2.5    
     2.6    /* Open patch file */
     2.7 -  if (!(fp=open_file(name, 1, OF_NORMAL)))
     2.8 +  if ((fp=open_file(name, 1, OF_NORMAL)) == NULL)
     2.9      {
    2.10        noluck=1;
    2.11  #ifdef PATCH_EXT_LIST
    2.12 @@ -197,9 +197,10 @@
    2.13  	{
    2.14  	  if (strlen(name)+strlen(patch_ext[i])<1024)
    2.15  	    {
    2.16 -	      strcpy(tmp, name);
    2.17 -	      strcat(tmp, patch_ext[i]);
    2.18 -	      if ((fp=open_file(tmp, 1, OF_NORMAL)))
    2.19 +              char path[1024];
    2.20 +	      strcpy(path, name);
    2.21 +	      strcat(path, patch_ext[i]);
    2.22 +	      if ((fp=open_file(path, 1, OF_NORMAL)) != NULL)
    2.23  		{
    2.24  		  noluck=0;
    2.25  		  break;
     3.1 --- a/timidity/playmidi.c	Mon Dec 17 02:52:34 2001 +0000
     3.2 +++ b/timidity/playmidi.c	Mon Dec 17 05:03:10 2001 +0000
     3.3 @@ -22,9 +22,6 @@
     3.4  */
     3.5  
     3.6  #include <stdio.h>
     3.7 -#ifndef WIN32
     3.8 -#include <unistd.h>
     3.9 -#endif
    3.10  #include <stdlib.h>
    3.11  #include <string.h>
    3.12  
     4.1 --- a/timidity/readmidi.c	Mon Dec 17 02:52:34 2001 +0000
     4.2 +++ b/timidity/readmidi.c	Mon Dec 17 05:03:10 2001 +0000
     4.3 @@ -22,16 +22,7 @@
     4.4  #include <stdio.h>
     4.5  #include <stdlib.h>
     4.6  #include <errno.h>
     4.7 -
     4.8 -#if defined(SOLARIS) | defined(WIN32)
     4.9 -# include <string.h>
    4.10 -#else
    4.11 -#include <strings.h>
    4.12 -#endif
    4.13 -
    4.14 -#ifndef WIN32
    4.15 -#include <unistd.h>
    4.16 -#endif
    4.17 +#include <string.h>
    4.18  
    4.19  #include "config.h"
    4.20  #include "common.h"