summaryrefslogtreecommitdiff
path: root/opusfile/internal.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2020-08-11 22:35:12 +0100
committerThomas Preud'homme <robotux@celest.fr>2020-08-11 22:35:12 +0100
commit3ac113857071fc1f225b2e1b42547269e568c6b7 (patch)
tree8b28dd9c44a0d3c7ab8187cd8d8f19d47591d813 /opusfile/internal.c
parent9b10c21f5cad0e2ec27d23c59e65af7141a226f3 (diff)
New upstream version 2.2.4.4
Diffstat (limited to 'opusfile/internal.c')
-rw-r--r--opusfile/internal.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/opusfile/internal.c b/opusfile/internal.c
new file mode 100644
index 0000000..bd14cf6
--- /dev/null
+++ b/opusfile/internal.c
@@ -0,0 +1,42 @@
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
+ * *
+ * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
+ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
+ * *
+ ********************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "internal.h"
+
+#if defined(OP_ENABLE_ASSERTIONS)
+void op_fatal_impl(const char *_str,const char *_file,int _line){
+ fprintf(stderr,"Fatal (internal) error in %s, line %i: %s\n",
+ _file,_line,_str);
+ abort();
+}
+#endif
+
+/*A version of strncasecmp() that is guaranteed to only ignore the case of
+ ASCII characters.*/
+int op_strncasecmp(const char *_a,const char *_b,int _n){
+ int i;
+ for(i=0;i<_n;i++){
+ int a;
+ int b;
+ int d;
+ a=_a[i];
+ b=_b[i];
+ if(a>='a'&&a<='z')a-='a'-'A';
+ if(b>='a'&&b<='z')b-='a'-'A';
+ d=a-b;
+ if(d)return d;
+ }
+ return 0;
+} \ No newline at end of file