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
a42f9fd4
Commit
a42f9fd4
authored
Jan 29, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ArchivePlugin: scan_next() returns const string
parent
e6600556
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
16 deletions
+18
-16
ArchivePlugin.cxx
src/ArchivePlugin.cxx
+1
-1
ArchivePlugin.hxx
src/ArchivePlugin.hxx
+2
-2
UpdateArchive.cxx
src/UpdateArchive.cxx
+7
-5
Bzip2ArchivePlugin.cxx
src/archive/Bzip2ArchivePlugin.cxx
+2
-2
Iso9660ArchivePlugin.cxx
src/archive/Iso9660ArchivePlugin.cxx
+3
-3
ZzipArchivePlugin.cxx
src/archive/ZzipArchivePlugin.cxx
+3
-3
No files found.
src/ArchivePlugin.cxx
View file @
a42f9fd4
...
...
@@ -70,7 +70,7 @@ archive_file_scan_reset(struct archive_file *file)
file
->
plugin
->
scan_reset
(
file
);
}
char
*
c
onst
c
har
*
archive_file_scan_next
(
struct
archive_file
*
file
)
{
assert
(
file
!=
NULL
);
...
...
src/ArchivePlugin.hxx
View file @
a42f9fd4
...
...
@@ -62,7 +62,7 @@ struct archive_plugin {
* (as pathnames) and move read index to next file. When there is no
* next file it return NULL.
*/
char
*
(
*
scan_next
)(
struct
archive_file
*
);
c
onst
c
har
*
(
*
scan_next
)(
struct
archive_file
*
);
/**
* Opens an input_stream of a file within the archive.
...
...
@@ -98,7 +98,7 @@ archive_file_close(struct archive_file *file);
void
archive_file_scan_reset
(
struct
archive_file
*
file
);
char
*
c
onst
c
har
*
archive_file_scan_next
(
struct
archive_file
*
file
);
struct
input_stream
*
...
...
src/UpdateArchive.cxx
View file @
a42f9fd4
...
...
@@ -33,17 +33,19 @@
#include <string.h>
static
void
update_archive_tree
(
Directory
*
directory
,
char
*
name
)
update_archive_tree
(
Directory
*
directory
,
c
onst
c
har
*
name
)
{
char
*
tmp
=
strchr
(
name
,
'/'
);
c
onst
c
har
*
tmp
=
strchr
(
name
,
'/'
);
if
(
tmp
)
{
*
tmp
=
0
;
char
*
child_name
=
g_strndup
(
name
,
tmp
-
name
)
;
//add dir is not there already
db_lock
();
Directory
*
subdir
=
directory
->
MakeChild
(
name
);
directory
->
MakeChild
(
child_
name
);
subdir
->
device
=
DEVICE_INARCHIVE
;
db_unlock
();
g_free
(
child_name
);
//create directories first
update_archive_tree
(
subdir
,
tmp
+
1
);
}
else
{
...
...
@@ -122,7 +124,7 @@ update_archive_file2(Directory *parent, const char *name,
archive_file_scan_reset
(
file
);
char
*
filepath
;
c
onst
c
har
*
filepath
;
while
((
filepath
=
archive_file_scan_next
(
file
))
!=
NULL
)
{
/* split name into directory and file */
g_debug
(
"adding archive file: %s"
,
filepath
);
...
...
src/archive/Bzip2ArchivePlugin.cxx
View file @
a42f9fd4
...
...
@@ -158,11 +158,11 @@ bz2_scan_reset(struct archive_file *file)
context
->
reset
=
true
;
}
static
char
*
static
c
onst
c
har
*
bz2_scan_next
(
struct
archive_file
*
file
)
{
Bzip2ArchiveFile
*
context
=
(
Bzip2ArchiveFile
*
)
file
;
char
*
name
=
NULL
;
c
onst
c
har
*
name
=
NULL
;
if
(
context
->
reset
)
{
name
=
context
->
name
;
...
...
src/archive/Iso9660ArchivePlugin.cxx
View file @
a42f9fd4
...
...
@@ -141,16 +141,16 @@ iso9660_archive_scan_reset(struct archive_file *file)
context
->
iter
=
context
->
list
;
}
static
char
*
static
c
onst
c
har
*
iso9660_archive_scan_next
(
struct
archive_file
*
file
)
{
Iso9660ArchiveFile
*
context
=
(
Iso9660ArchiveFile
*
)
file
;
char
*
data
=
NULL
;
c
onst
c
har
*
data
=
NULL
;
if
(
context
->
iter
!=
NULL
)
{
///fetch data and goto next
data
=
(
char
*
)
context
->
iter
->
data
;
data
=
(
c
onst
c
har
*
)
context
->
iter
->
data
;
context
->
iter
=
g_slist_next
(
context
->
iter
);
}
return
data
;
...
...
src/archive/ZzipArchivePlugin.cxx
View file @
a42f9fd4
...
...
@@ -109,14 +109,14 @@ zzip_archive_scan_reset(struct archive_file *file)
context
->
iter
=
context
->
list
;
}
static
char
*
static
c
onst
c
har
*
zzip_archive_scan_next
(
struct
archive_file
*
file
)
{
ZzipArchiveFile
*
context
=
(
ZzipArchiveFile
*
)
file
;
char
*
data
=
NULL
;
c
onst
c
har
*
data
=
NULL
;
if
(
context
->
iter
!=
NULL
)
{
///fetch data and goto next
data
=
(
char
*
)
context
->
iter
->
data
;
data
=
(
c
onst
c
har
*
)
context
->
iter
->
data
;
context
->
iter
=
g_slist_next
(
context
->
iter
);
}
return
data
;
...
...
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