diff options
| author | George Marques | 2015-10-02 14:20:50 -0300 |
|---|---|---|
| committer | George Marques | 2015-10-02 14:25:38 -0300 |
| commit | 6e87314d83a9beab56fdd115277e230ef683c53d (patch) | |
| tree | 31f1ec4669cf2e54162d4b68ba2edbea95751ee6 /drivers/opus/internal.c | |
| parent | 2c45ee5e1ce939bcef32129ac01944f3995269f4 (diff) | |
| download | godot-6e87314d83a9beab56fdd115277e230ef683c53d.tar.gz godot-6e87314d83a9beab56fdd115277e230ef683c53d.tar.zst godot-6e87314d83a9beab56fdd115277e230ef683c53d.zip | |
Diffstat (limited to 'drivers/opus/internal.c')
| -rw-r--r-- | drivers/opus/internal.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/opus/internal.c b/drivers/opus/internal.c new file mode 100644 index 000000000..a9c367117 --- /dev/null +++ b/drivers/opus/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 OPUS_HAVE_CONFIG_H +#include "opus_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; +} |
