Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
9ab3370b
Commit
9ab3370b
authored
Aug 20, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap all gz functions to avoid void* -> int casts.
Fix 64 bits build (Debian #324031)
parent
704a9d96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+45
-4
No files found.
modules/gui/skins2/src/theme_loader.cpp
View file @
9ab3370b
...
...
@@ -50,7 +50,10 @@
#if defined( HAVE_ZLIB_H )
# include <zlib.h>
# include <errno.h>
int
gzopen_frontend
(
char
*
pathname
,
int
oflags
,
int
mode
);
int
gzopen_frontend
(
char
*
pathname
,
int
oflags
,
int
mode
);
int
gzclose_frontend
(
int
);
int
gzread_frontend
(
int
,
void
*
,
size_t
);
int
gzwrite_frontend
(
int
,
const
void
*
,
size_t
);
#if defined( HAVE_LIBTAR_H )
# include <libtar.h>
#else
...
...
@@ -111,8 +114,10 @@ bool ThemeLoader::extractTarGz( const string &tarFile, const string &rootDir )
{
TAR
*
t
;
#if defined( HAVE_LIBTAR_H )
tartype_t
gztype
=
{
(
openfunc_t
)
gzopen_frontend
,
(
closefunc_t
)
gzclose
,
(
readfunc_t
)
gzread
,
(
writefunc_t
)
gzwrite
};
tartype_t
gztype
=
{
(
openfunc_t
)
gzopen_frontend
,
(
closefunc_t
)
gzclose_frontend
,
(
readfunc_t
)
gzread_frontend
,
(
writefunc_t
)
gzwrite_frontend
};
if
(
tar_open
(
&
t
,
(
char
*
)
tarFile
.
c_str
(),
&
gztype
,
O_RDONLY
,
0
,
TAR_GNU
)
==
-
1
)
...
...
@@ -530,6 +535,10 @@ int makedir( char *newdir )
#endif
#ifdef HAVE_ZLIB_H
static
int
currentGzFd
=
-
1
;
static
void
*
currentGzVp
=
NULL
;
int
gzopen_frontend
(
char
*
pathname
,
int
oflags
,
int
mode
)
{
char
*
gzflags
;
...
...
@@ -556,6 +565,38 @@ int gzopen_frontend( char *pathname, int oflags, int mode )
return
-
1
;
}
return
(
int
)
gzf
;
/** Hum ... */
currentGzFd
=
42
;
currentGzVp
=
gzf
;
return
currentGzFd
;
}
int
gzclose_frontend
(
int
fd
)
{
if
(
currentGzVp
!=
NULL
&&
fd
!=
-
1
)
{
return
gzclose
(
currentGzVp
);
}
return
-
1
;
}
int
gzread_frontend
(
int
fd
,
void
*
p_buffer
,
size_t
i_length
)
{
if
(
currentGzVp
!=
NULL
&&
fd
!=
-
1
)
{
return
gzread
(
currentGzVp
,
p_buffer
,
i_length
);
}
return
-
1
;
}
int
gzwrite_frontend
(
int
fd
,
const
void
*
p_buffer
,
size_t
i_length
)
{
if
(
currentGzVp
!=
NULL
&&
fd
!=
-
1
)
{
return
gzwrite
(
currentGzVp
,
p_buffer
,
i_length
);
}
return
-
1
;
}
#endif
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