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
ab2b7358
Commit
ab2b7358
authored
Jan 28, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/bzip2: rename the classes
parent
8ceea858
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
Bzip2ArchivePlugin.cxx
src/archive/Bzip2ArchivePlugin.cxx
+16
-16
No files found.
src/archive/Bzip2ArchivePlugin.cxx
View file @
ab2b7358
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#define BZ2_bzDecompress bzDecompress
#define BZ2_bzDecompress bzDecompress
#endif
#endif
struct
bz2_archive_f
ile
{
struct
Bzip2ArchiveF
ile
{
struct
archive_file
base
;
struct
archive_file
base
;
struct
refcount
ref
;
struct
refcount
ref
;
...
@@ -50,7 +50,7 @@ struct bz2_archive_file {
...
@@ -50,7 +50,7 @@ struct bz2_archive_file {
bool
reset
;
bool
reset
;
struct
input_stream
*
istream
;
struct
input_stream
*
istream
;
bz2_archive_f
ile
()
{
Bzip2ArchiveF
ile
()
{
archive_file_init
(
&
base
,
&
bz2_archive_plugin
);
archive_file_init
(
&
base
,
&
bz2_archive_plugin
);
refcount_init
(
&
ref
);
refcount_init
(
&
ref
);
}
}
...
@@ -66,10 +66,10 @@ struct bz2_archive_file {
...
@@ -66,10 +66,10 @@ struct bz2_archive_file {
}
}
};
};
struct
bz2_input_s
tream
{
struct
Bzip2InputS
tream
{
struct
input_stream
base
;
struct
input_stream
base
;
struct
bz2_archive_f
ile
*
archive
;
Bzip2ArchiveF
ile
*
archive
;
bool
eof
;
bool
eof
;
...
@@ -89,7 +89,7 @@ bz2_quark(void)
...
@@ -89,7 +89,7 @@ bz2_quark(void)
/* single archive handling allocation helpers */
/* single archive handling allocation helpers */
static
bool
static
bool
bz2_alloc
(
struct
bz2_input_s
tream
*
data
,
GError
**
error_r
)
bz2_alloc
(
Bzip2InputS
tream
*
data
,
GError
**
error_r
)
{
{
int
ret
;
int
ret
;
...
@@ -113,7 +113,7 @@ bz2_alloc(struct bz2_input_stream *data, GError **error_r)
...
@@ -113,7 +113,7 @@ bz2_alloc(struct bz2_input_stream *data, GError **error_r)
}
}
static
void
static
void
bz2_destroy
(
struct
bz2_input_s
tream
*
data
)
bz2_destroy
(
Bzip2InputS
tream
*
data
)
{
{
BZ2_bzDecompressEnd
(
&
data
->
bzstream
);
BZ2_bzDecompressEnd
(
&
data
->
bzstream
);
}
}
...
@@ -123,7 +123,7 @@ bz2_destroy(struct bz2_input_stream *data)
...
@@ -123,7 +123,7 @@ bz2_destroy(struct bz2_input_stream *data)
static
struct
archive_file
*
static
struct
archive_file
*
bz2_open
(
const
char
*
pathname
,
GError
**
error_r
)
bz2_open
(
const
char
*
pathname
,
GError
**
error_r
)
{
{
struct
bz2_archive_file
*
context
=
new
bz2_archive_f
ile
();
Bzip2ArchiveFile
*
context
=
new
Bzip2ArchiveF
ile
();
int
len
;
int
len
;
//open archive
//open archive
...
@@ -150,14 +150,14 @@ bz2_open(const char *pathname, GError **error_r)
...
@@ -150,14 +150,14 @@ bz2_open(const char *pathname, GError **error_r)
static
void
static
void
bz2_scan_reset
(
struct
archive_file
*
file
)
bz2_scan_reset
(
struct
archive_file
*
file
)
{
{
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_f
ile
*
)
file
;
Bzip2ArchiveFile
*
context
=
(
Bzip2ArchiveF
ile
*
)
file
;
context
->
reset
=
true
;
context
->
reset
=
true
;
}
}
static
char
*
static
char
*
bz2_scan_next
(
struct
archive_file
*
file
)
bz2_scan_next
(
struct
archive_file
*
file
)
{
{
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_f
ile
*
)
file
;
Bzip2ArchiveFile
*
context
=
(
Bzip2ArchiveF
ile
*
)
file
;
char
*
name
=
NULL
;
char
*
name
=
NULL
;
if
(
context
->
reset
)
{
if
(
context
->
reset
)
{
...
@@ -171,7 +171,7 @@ bz2_scan_next(struct archive_file *file)
...
@@ -171,7 +171,7 @@ bz2_scan_next(struct archive_file *file)
static
void
static
void
bz2_close
(
struct
archive_file
*
file
)
bz2_close
(
struct
archive_file
*
file
)
{
{
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_f
ile
*
)
file
;
Bzip2ArchiveFile
*
context
=
(
Bzip2ArchiveF
ile
*
)
file
;
context
->
Unref
();
context
->
Unref
();
}
}
...
@@ -183,8 +183,8 @@ bz2_open_stream(struct archive_file *file, const char *path,
...
@@ -183,8 +183,8 @@ bz2_open_stream(struct archive_file *file, const char *path,
Mutex
&
mutex
,
Cond
&
cond
,
Mutex
&
mutex
,
Cond
&
cond
,
GError
**
error_r
)
GError
**
error_r
)
{
{
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_f
ile
*
)
file
;
Bzip2ArchiveFile
*
context
=
(
Bzip2ArchiveF
ile
*
)
file
;
struct
bz2_input_stream
*
bis
=
g_new
(
struct
bz2_input_s
tream
,
1
);
Bzip2InputStream
*
bis
=
g_new
(
Bzip2InputS
tream
,
1
);
input_stream_init
(
&
bis
->
base
,
&
bz2_inputplugin
,
path
,
input_stream_init
(
&
bis
->
base
,
&
bz2_inputplugin
,
path
,
mutex
,
cond
);
mutex
,
cond
);
...
@@ -210,7 +210,7 @@ bz2_open_stream(struct archive_file *file, const char *path,
...
@@ -210,7 +210,7 @@ bz2_open_stream(struct archive_file *file, const char *path,
static
void
static
void
bz2_is_close
(
struct
input_stream
*
is
)
bz2_is_close
(
struct
input_stream
*
is
)
{
{
struct
bz2_input_stream
*
bis
=
(
struct
bz2_input_s
tream
*
)
is
;
Bzip2InputStream
*
bis
=
(
Bzip2InputS
tream
*
)
is
;
bz2_destroy
(
bis
);
bz2_destroy
(
bis
);
...
@@ -221,7 +221,7 @@ bz2_is_close(struct input_stream *is)
...
@@ -221,7 +221,7 @@ bz2_is_close(struct input_stream *is)
}
}
static
bool
static
bool
bz2_fillbuffer
(
struct
bz2_input_s
tream
*
bis
,
GError
**
error_r
)
bz2_fillbuffer
(
Bzip2InputS
tream
*
bis
,
GError
**
error_r
)
{
{
size_t
count
;
size_t
count
;
bz_stream
*
bzstream
;
bz_stream
*
bzstream
;
...
@@ -246,7 +246,7 @@ static size_t
...
@@ -246,7 +246,7 @@ static size_t
bz2_is_read
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
length
,
bz2_is_read
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
length
,
GError
**
error_r
)
GError
**
error_r
)
{
{
struct
bz2_input_stream
*
bis
=
(
struct
bz2_input_s
tream
*
)
is
;
Bzip2InputStream
*
bis
=
(
Bzip2InputS
tream
*
)
is
;
bz_stream
*
bzstream
;
bz_stream
*
bzstream
;
int
bz_result
;
int
bz_result
;
size_t
nbytes
=
0
;
size_t
nbytes
=
0
;
...
@@ -285,7 +285,7 @@ bz2_is_read(struct input_stream *is, void *ptr, size_t length,
...
@@ -285,7 +285,7 @@ bz2_is_read(struct input_stream *is, void *ptr, size_t length,
static
bool
static
bool
bz2_is_eof
(
struct
input_stream
*
is
)
bz2_is_eof
(
struct
input_stream
*
is
)
{
{
struct
bz2_input_stream
*
bis
=
(
struct
bz2_input_s
tream
*
)
is
;
Bzip2InputStream
*
bis
=
(
Bzip2InputS
tream
*
)
is
;
return
bis
->
eof
;
return
bis
->
eof
;
}
}
...
...
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