shithub: opus-tools

Download patch

ref: 69628fb518ab78c3742948131c510a1a38371f96
parent: d0a27d5edf0ff74e3f8e154b8aa65f95b9166805
author: Mark Harris <mark.hsj@gmail.com>
date: Sat Feb 3 15:04:01 EST 2018

Don't use reserved identifiers as macro names

--- a/src/encoder.h
+++ b/src/encoder.h
@@ -1,6 +1,4 @@
-#ifndef __OPUSENC_H
-#define __OPUSENC_H
-
+#include <stdio.h>
 #include <opus_types.h>
 #include <opusenc.h>
 
@@ -96,5 +94,3 @@
 
 long wav_read(void *, float *buffer, int samples);
 long wav_ieee_read(void *, float *buffer, int samples);
-
-#endif /* __OPUSENC_H */
--- a/src/flac.c
+++ b/src/flac.c
@@ -22,6 +22,7 @@
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
+
 #if defined(HAVE_CONFIG_H)
 # include <config.h>
 #endif
@@ -29,6 +30,7 @@
 #include <math.h>
 #include <string.h>
 #include <locale.h>
+#include "encoder.h"
 #include "flac.h"
 #include "opus_header.h"
 #include "picture.h"
--- a/src/flac.h
+++ b/src/flac.h
@@ -22,15 +22,13 @@
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
-#ifndef __FLAC_H
-# define __FLAC_H
-# include <stdio.h>
-# include "os_support.h"
-# include "encoder.h"
-# if defined(HAVE_LIBFLAC)
-#  include <FLAC/stream_decoder.h>
-#  include <FLAC/metadata.h>
 
+#include <stdio.h>
+#include "os_support.h"
+#if defined(HAVE_LIBFLAC)
+# include <FLAC/stream_decoder.h>
+# include <FLAC/metadata.h>
+
 typedef struct flacfile flacfile;
 
 struct flacfile{
@@ -48,11 +46,9 @@
   opus_int32 max_blocksize;
 };
 
-# endif
+#endif
 
 int flac_id(unsigned char *buf,int len);
 int oggflac_id(unsigned char *buf,int len);
 int flac_open(FILE *in,oe_enc_opt *opt,unsigned char *oldbuf,int buflen);
 void flac_close(void *client_data);
-
-#endif
--- a/src/picture.h
+++ b/src/picture.h
@@ -1,6 +1,3 @@
-#ifndef __PICTURE_H
-#define __PICTURE_H
-
 #include <ogg/ogg.h>
 
 typedef enum{
@@ -42,5 +39,3 @@
     (buf)[3]=(unsigned char)(val); \
   } \
   while(0);
-
-#endif /* __PICTURE_H */