Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
01c591fb
Commit
01c591fb
authored
Dec 09, 2008
by
Viliam Mateicka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: moving stringFoundInStringArray() from decoder into utils
parent
e61ba50e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
decoder_list.c
src/decoder_list.c
+1
-11
utils.c
src/utils.c
+11
-0
utils.h
src/utils.h
+2
-0
No files found.
src/decoder_list.c
View file @
01c591fb
...
...
@@ -18,6 +18,7 @@
#include "decoder_list.h"
#include "decoder_api.h"
#include "utils.h"
#include <glib.h>
...
...
@@ -76,17 +77,6 @@ enum {
/** which plugins have been initialized successfully? */
static
bool
decoder_plugins_enabled
[
num_decoder_plugins
];
static
int
stringFoundInStringArray
(
const
char
*
const
*
array
,
const
char
*
suffix
)
{
while
(
array
&&
*
array
)
{
if
(
strcasecmp
(
*
array
,
suffix
)
==
0
)
return
1
;
array
++
;
}
return
0
;
}
const
struct
decoder_plugin
*
decoder_plugin_from_suffix
(
const
char
*
suffix
,
unsigned
int
next
)
{
...
...
src/utils.c
View file @
01c591fb
...
...
@@ -235,3 +235,14 @@ void xpthread_cond_destroy(pthread_cond_t *cond)
if
((
err
=
pthread_cond_destroy
(
cond
)))
FATAL
(
"failed to destroy cond: %s
\n
"
,
strerror
(
err
));
}
int
stringFoundInStringArray
(
const
char
*
const
*
array
,
const
char
*
suffix
)
{
while
(
array
&&
*
array
)
{
if
(
strcasecmp
(
*
array
,
suffix
)
==
0
)
return
1
;
array
++
;
}
return
0
;
}
src/utils.h
View file @
01c591fb
...
...
@@ -108,4 +108,6 @@ void xpthread_mutex_destroy(pthread_mutex_t *mutex);
void
xpthread_cond_destroy
(
pthread_cond_t
*
cond
);
int
stringFoundInStringArray
(
const
char
*
const
*
array
,
const
char
*
suffix
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment