annotate src/opusfile-0.9/src/internal.c @ 79:91c729825bca
pa_catalina
Update build for AUDIO_COMPONENT_FIX
author |
Chris Cannam |
date |
Wed, 30 Oct 2019 12:40:34 +0000 |
parents |
7aeed7906520 |
children |
|
rev |
line source |
Chris@69
|
1 /********************************************************************
|
Chris@69
|
2 * *
|
Chris@69
|
3 * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
|
Chris@69
|
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
Chris@69
|
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
Chris@69
|
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
Chris@69
|
7 * *
|
Chris@69
|
8 * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
|
Chris@69
|
9 * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
Chris@69
|
10 * *
|
Chris@69
|
11 ********************************************************************/
|
Chris@69
|
12 #ifdef HAVE_CONFIG_H
|
Chris@69
|
13 #include "config.h"
|
Chris@69
|
14 #endif
|
Chris@69
|
15
|
Chris@69
|
16 #include "internal.h"
|
Chris@69
|
17
|
Chris@69
|
18 #if defined(OP_ENABLE_ASSERTIONS)
|
Chris@69
|
19 void op_fatal_impl(const char *_str,const char *_file,int _line){
|
Chris@69
|
20 fprintf(stderr,"Fatal (internal) error in %s, line %i: %s\n",
|
Chris@69
|
21 _file,_line,_str);
|
Chris@69
|
22 abort();
|
Chris@69
|
23 }
|
Chris@69
|
24 #endif
|
Chris@69
|
25
|
Chris@69
|
26 /*A version of strncasecmp() that is guaranteed to only ignore the case of
|
Chris@69
|
27 ASCII characters.*/
|
Chris@69
|
28 int op_strncasecmp(const char *_a,const char *_b,int _n){
|
Chris@69
|
29 int i;
|
Chris@69
|
30 for(i=0;i<_n;i++){
|
Chris@69
|
31 int a;
|
Chris@69
|
32 int b;
|
Chris@69
|
33 int d;
|
Chris@69
|
34 a=_a[i];
|
Chris@69
|
35 b=_b[i];
|
Chris@69
|
36 if(a>='a'&&a<='z')a-='a'-'A';
|
Chris@69
|
37 if(b>='a'&&b<='z')b-='a'-'A';
|
Chris@69
|
38 d=a-b;
|
Chris@69
|
39 if(d)return d;
|
Chris@69
|
40 }
|
Chris@69
|
41 return 0;
|
Chris@69
|
42 }
|