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
c959148e
Commit
c959148e
authored
Dec 15, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/zip: renamed plugin to "zzip"
This plugin is based on libzzip.
parent
530e4807
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
43 deletions
+45
-43
Makefile.am
Makefile.am
+2
-2
NEWS
NEWS
+2
-0
configure.ac
configure.ac
+10
-10
zzip_archive_plugin.c
src/archive/zzip_archive_plugin.c
+28
-28
archive_list.c
src/archive_list.c
+3
-3
No files found.
Makefile.am
View file @
c959148e
...
...
@@ -354,8 +354,8 @@ if HAVE_BZ2
ARCHIVE_SRC
+=
src/archive/bz2_plugin.c
endif
if
HAVE_ZIP
ARCHIVE_SRC
+=
src/archive/z
ip
_plugin.c
if
HAVE_Z
Z
IP
ARCHIVE_SRC
+=
src/archive/z
zip_archive
_plugin.c
endif
if
HAVE_ISO
...
...
NEWS
View file @
c959148e
...
...
@@ -10,6 +10,8 @@ ver 0.16 (20??/??/??)
- "load" supports remote playlists (extm3u, pls, asx, xspf, lastfm://)
- allow changing replay gain mode on-the-fly
- omitting the range end is possible
* archive:
- zip: renamed plugin to "zzip"
* input:
- lastfm: obsolete plugin removed
* tags:
...
...
configure.ac
View file @
c959148e
...
...
@@ -355,18 +355,18 @@ if test x$enable_bzip2 = xyes; then
AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
fi
dnl zip
AC_ARG_ENABLE(zip,
AS_HELP_STRING([--enable-zip],
dnl z
z
ip
AC_ARG_ENABLE(z
z
ip,
AS_HELP_STRING([--enable-z
z
ip],
[enable zip archive support (default: disabled)]),,
enable_zip=no)
enable_z
z
ip=no)
MPD_AUTO_PKG(zip, ZZIP, [zziplib >= 0.13],
MPD_AUTO_PKG(z
z
ip, ZZIP, [zziplib >= 0.13],
[libzzip archive library], [libzzip not found])
AM_CONDITIONAL(HAVE_Z
IP, test x$enable_
zip = xyes)
if test x$enable_zip = xyes; then
AC_DEFINE(HAVE_ZIP, 1, [Define to have zip archive support])
AM_CONDITIONAL(HAVE_Z
ZIP, test x$enable_z
zip = xyes)
if test x$enable_z
z
ip = xyes; then
AC_DEFINE(HAVE_Z
Z
IP, 1, [Define to have zip archive support])
fi
dnl iso9660
...
...
@@ -386,7 +386,7 @@ fi
dnl archive API
if
test x$enable_bzip2 = xyes ||
test x$enable_zip = xyes ||
test x$enable_z
z
ip = xyes ||
test x$enable_iso9660 = xyes; then
enable_archive=yes
AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
...
...
@@ -1625,7 +1625,7 @@ else
echo " ISO 9660 archives support .....disabled"
fi
if test x$enable_zip = xyes; then
if test x$enable_z
z
ip = xyes; then
echo " ZIP archives support ..........enabled"
else
echo " ZIP archives support ..........disabled"
...
...
src/archive/z
ip
_plugin.c
→
src/archive/z
zip_archive
_plugin.c
View file @
c959148e
...
...
@@ -38,12 +38,12 @@ typedef struct {
GSList
*
iter
;
}
zip_context
;
static
const
struct
input_plugin
z
ip_input
plugin
;
static
const
struct
input_plugin
z
zip_input_
plugin
;
/* archive open && listing routine */
static
struct
archive_file
*
z
ip_open
(
char
*
pathname
)
z
zip_archive_open
(
char
*
pathname
)
{
zip_context
*
context
=
g_malloc
(
sizeof
(
zip_context
));
ZZIP_DIRENT
dirent
;
...
...
@@ -68,7 +68,7 @@ zip_open(char * pathname)
}
static
void
z
ip
_scan_reset
(
struct
archive_file
*
file
)
z
zip_archive
_scan_reset
(
struct
archive_file
*
file
)
{
zip_context
*
context
=
(
zip_context
*
)
file
;
//reset iterator
...
...
@@ -76,7 +76,7 @@ zip_scan_reset(struct archive_file *file)
}
static
char
*
z
ip
_scan_next
(
struct
archive_file
*
file
)
z
zip_archive
_scan_next
(
struct
archive_file
*
file
)
{
zip_context
*
context
=
(
zip_context
*
)
file
;
char
*
data
=
NULL
;
...
...
@@ -89,7 +89,7 @@ zip_scan_next(struct archive_file *file)
}
static
void
z
ip
_close
(
struct
archive_file
*
file
)
z
zip_archive
_close
(
struct
archive_file
*
file
)
{
zip_context
*
context
=
(
zip_context
*
)
file
;
if
(
context
->
list
)
{
...
...
@@ -107,14 +107,14 @@ zip_close(struct archive_file *file)
/* single archive handling */
static
bool
z
ip
_open_stream
(
struct
archive_file
*
file
,
struct
input_stream
*
is
,
const
char
*
pathname
)
z
zip_archive
_open_stream
(
struct
archive_file
*
file
,
struct
input_stream
*
is
,
const
char
*
pathname
)
{
zip_context
*
context
=
(
zip_context
*
)
file
;
ZZIP_STAT
z_stat
;
//setup file ops
is
->
plugin
=
&
z
ip_input
plugin
;
is
->
plugin
=
&
z
zip_input_
plugin
;
//insert back reference
is
->
data
=
context
;
//we are seekable (but its not recommendent to do so)
...
...
@@ -131,16 +131,16 @@ zip_open_stream(struct archive_file *file, struct input_stream *is,
}
static
void
z
ip_is
_close
(
struct
input_stream
*
is
)
z
zip_input
_close
(
struct
input_stream
*
is
)
{
zip_context
*
context
=
(
zip_context
*
)
is
->
data
;
zzip_file_close
(
context
->
file
);
z
ip
_close
((
struct
archive_file
*
)
context
);
z
zip_archive
_close
((
struct
archive_file
*
)
context
);
}
static
size_t
z
ip_is
_read
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
size
)
z
zip_input
_read
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
size
)
{
zip_context
*
context
=
(
zip_context
*
)
is
->
data
;
int
ret
;
...
...
@@ -153,15 +153,15 @@ zip_is_read(struct input_stream *is, void *ptr, size_t size)
}
static
bool
z
ip_is
_eof
(
struct
input_stream
*
is
)
z
zip_input
_eof
(
struct
input_stream
*
is
)
{
zip_context
*
context
=
(
zip_context
*
)
is
->
data
;
return
((
size_t
)
zzip_tell
(
context
->
file
)
==
context
->
length
);
}
static
bool
z
ip_is
_seek
(
G_GNUC_UNUSED
struct
input_stream
*
is
,
G_GNUC_UNUSED
goffset
offset
,
G_GNUC_UNUSED
int
whence
)
z
zip_input
_seek
(
G_GNUC_UNUSED
struct
input_stream
*
is
,
G_GNUC_UNUSED
goffset
offset
,
G_GNUC_UNUSED
int
whence
)
{
zip_context
*
context
=
(
zip_context
*
)
is
->
data
;
zzip_off_t
ofs
=
zzip_seek
(
context
->
file
,
offset
,
whence
);
...
...
@@ -174,24 +174,24 @@ zip_is_seek(G_GNUC_UNUSED struct input_stream *is,
/* exported structures */
static
const
char
*
const
z
ip
_extensions
[]
=
{
static
const
char
*
const
z
zip_archive
_extensions
[]
=
{
"zip"
,
NULL
};
static
const
struct
input_plugin
z
ip_input
plugin
=
{
.
close
=
z
ip_is
_close
,
.
read
=
z
ip_is
_read
,
.
eof
=
z
ip_is
_eof
,
.
seek
=
z
ip_is
_seek
,
static
const
struct
input_plugin
z
zip_input_
plugin
=
{
.
close
=
z
zip_input
_close
,
.
read
=
z
zip_input
_read
,
.
eof
=
z
zip_input
_eof
,
.
seek
=
z
zip_input
_seek
,
};
const
struct
archive_plugin
z
ip
_plugin
=
{
.
name
=
"zip"
,
.
open
=
z
ip
_open
,
.
scan_reset
=
z
ip
_scan_reset
,
.
scan_next
=
z
ip
_scan_next
,
.
open_stream
=
z
ip
_open_stream
,
.
close
=
z
ip
_close
,
.
suffixes
=
z
ip
_extensions
const
struct
archive_plugin
z
zip_archive
_plugin
=
{
.
name
=
"z
z
ip"
,
.
open
=
z
zip_archive
_open
,
.
scan_reset
=
z
zip_archive
_scan_reset
,
.
scan_next
=
z
zip_archive
_scan_next
,
.
open_stream
=
z
zip_archive
_open_stream
,
.
close
=
z
zip_archive
_close
,
.
suffixes
=
z
zip_archive
_extensions
};
src/archive_list.c
View file @
c959148e
...
...
@@ -26,15 +26,15 @@
#include <glib.h>
extern
const
struct
archive_plugin
bz2_plugin
;
extern
const
struct
archive_plugin
z
ip
_plugin
;
extern
const
struct
archive_plugin
z
zip_archive
_plugin
;
extern
const
struct
archive_plugin
iso_plugin
;
static
const
struct
archive_plugin
*
const
archive_plugins
[]
=
{
#ifdef HAVE_BZ2
&
bz2_plugin
,
#endif
#ifdef HAVE_ZIP
&
z
ip
_plugin
,
#ifdef HAVE_Z
Z
IP
&
z
zip_archive
_plugin
,
#endif
#ifdef HAVE_ISO
&
iso_plugin
,
...
...
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