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