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
5ea8a0df
Commit
5ea8a0df
authored
Feb 28, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder_list: print decoder list with suffixes
Print the list of suffixes supported by each decoder, instead of prining a list of all suffixes of all decoders with duplicates.
parent
1bb0124b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
28 deletions
+11
-28
cmdline.c
src/cmdline.c
+1
-5
decoder_list.c
src/decoder_list.c
+10
-21
decoder_list.h
src/decoder_list.h
+0
-2
No files found.
src/cmdline.c
View file @
5ea8a0df
...
...
@@ -47,13 +47,9 @@ static void version(void)
"This is free software; see the source for copying conditions. There is NO
\n
"
"warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\n
"
"
\n
"
"Supported
format
s:
\n
"
);
"Supported
decoder
s:
\n
"
);
decoder_plugin_init_all
();
decoder_plugin_print_all_suffixes
(
stdout
);
puts
(
"
\n
"
"Supported decoders:
\n
"
);
decoder_plugin_print_all_decoders
(
stdout
);
puts
(
"
\n
"
...
...
src/decoder_list.c
View file @
5ea8a0df
...
...
@@ -154,36 +154,25 @@ decoder_plugin_from_name(const char *name)
return
NULL
;
}
void
decoder_plugin_print_all_
suffixe
s
(
FILE
*
fp
)
void
decoder_plugin_print_all_
decoder
s
(
FILE
*
fp
)
{
const
char
*
const
*
suffixes
;
for
(
unsigned
i
=
0
;
i
<
num_decoder_plugins
;
++
i
)
{
const
struct
decoder_plugin
*
plugin
=
decoder_plugins
[
i
];
const
char
*
const
*
suffixes
;
if
(
!
decoder_plugins_enabled
[
i
])
continue
;
suffixes
=
plugin
->
suffixes
;
while
(
suffixes
&&
*
suffixes
)
{
fprintf
(
fp
,
"%s "
,
*
suffixes
);
suffixes
++
;
}
}
fprintf
(
fp
,
"
\n
"
);
fflush
(
fp
);
}
fprintf
(
fp
,
"[%s]"
,
plugin
->
name
);
void
decoder_plugin_print_all_decoders
(
FILE
*
fp
)
{
for
(
unsigned
i
=
0
;
i
<
num_decoder_plugins
;
++
i
)
{
const
struct
decoder_plugin
*
plugin
=
decoder_plugins
[
i
];
if
(
!
decoder_plugins_enabled
[
i
])
continue
;
for
(
suffixes
=
plugin
->
suffixes
;
suffixes
!=
NULL
&&
*
suffixes
!=
NULL
;
++
suffixes
)
{
fprintf
(
fp
,
" %s"
,
*
suffixes
);
}
fprintf
(
fp
,
"
%s "
,
plugin
->
name
);
fprintf
(
fp
,
"
\n
"
);
}
fprintf
(
fp
,
"
\n
"
);
fflush
(
fp
);
}
/**
...
...
src/decoder_list.h
View file @
5ea8a0df
...
...
@@ -34,8 +34,6 @@ decoder_plugin_from_mime_type(const char *mimeType, unsigned int next);
const
struct
decoder_plugin
*
decoder_plugin_from_name
(
const
char
*
name
);
void
decoder_plugin_print_all_suffixes
(
FILE
*
fp
);
void
decoder_plugin_print_all_decoders
(
FILE
*
fp
);
/* this is where we "load" all the "plugins" ;-) */
...
...
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