Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6cdc9671
Commit
6cdc9671
authored
May 29, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/misc/modules.c: small cleanup.
parent
e7abe37c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
62 deletions
+37
-62
src/misc/modules.c
src/misc/modules.c
+37
-62
No files found.
src/misc/modules.c
View file @
6cdc9671
...
@@ -1457,16 +1457,13 @@ static char * GetWindowsError( void )
...
@@ -1457,16 +1457,13 @@ static char * GetWindowsError( void )
*****************************************************************************/
*****************************************************************************/
static
void
CacheLoad
(
vlc_object_t
*
p_this
)
static
void
CacheLoad
(
vlc_object_t
*
p_this
)
{
{
char
*
psz_filename
,
*
psz_homedir
,
*
psz_cachefile
;
char
*
psz_filename
,
*
psz_homedir
;
FILE
*
file
;
FILE
*
file
;
int
i
,
j
,
i_size
,
i_read
;
int
i
,
j
,
i_size
,
i_read
;
char
p_cachestring
[
sizeof
(
PLUGINSCACHE_FILE
COPYRIGHT_MESSAGE
)];
char
p_cachestring
[
sizeof
(
PLUGINSCACHE_FILE
COPYRIGHT_MESSAGE
)];
int
*
pi_cache
;
int
*
pi_cache
;
module_cache_t
**
pp_cache
=
0
;
module_cache_t
**
pp_cache
=
0
;
psz_cachefile
=
0
;
// FIXME
if
(
!
psz_cachefile
||
!
psz_cachefile
)
{
psz_homedir
=
p_this
->
p_vlc
->
psz_homedir
;
psz_homedir
=
p_this
->
p_vlc
->
psz_homedir
;
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
{
{
...
@@ -1486,16 +1483,6 @@ static void CacheLoad( vlc_object_t *p_this )
...
@@ -1486,16 +1483,6 @@ static void CacheLoad( vlc_object_t *p_this )
msg_Err
(
p_this
,
"out of memory"
);
msg_Err
(
p_this
,
"out of memory"
);
return
;
return
;
}
}
}
else
{
psz_filename
=
strdup
(
psz_cachefile
);
if
(
!
psz_filename
)
{
msg_Err
(
p_this
,
"out of memory"
);
return
;
}
}
if
(
p_this
->
p_libvlc
->
p_module_bank
->
b_cache_delete
)
if
(
p_this
->
p_libvlc
->
p_module_bank
->
b_cache_delete
)
{
{
...
@@ -1533,6 +1520,7 @@ static void CacheLoad( vlc_object_t *p_this )
...
@@ -1533,6 +1520,7 @@ static void CacheLoad( vlc_object_t *p_this )
for
(
i
=
0
;
i
<
*
pi_cache
;
i
++
)
for
(
i
=
0
;
i
<
*
pi_cache
;
i
++
)
{
{
int32_t
i_size
;
int32_t
i_size
;
int
i_submodules
;
#define LOAD_IMMEDIATE(a) \
#define LOAD_IMMEDIATE(a) \
fread( &a, sizeof(char), sizeof(a), file )
fread( &a, sizeof(char), sizeof(a), file )
...
@@ -1577,7 +1565,6 @@ static void CacheLoad( vlc_object_t *p_this )
...
@@ -1577,7 +1565,6 @@ static void CacheLoad( vlc_object_t *p_this )
LOAD_STRING
(
pp_cache
[
i
]
->
p_module
->
psz_filename
);
LOAD_STRING
(
pp_cache
[
i
]
->
p_module
->
psz_filename
);
int
i_submodules
;
LOAD_IMMEDIATE
(
i_submodules
);
LOAD_IMMEDIATE
(
i_submodules
);
while
(
i_submodules
--
)
while
(
i_submodules
--
)
...
@@ -1707,14 +1694,11 @@ void CacheLoadConfig( module_t *p_module, FILE *file )
...
@@ -1707,14 +1694,11 @@ void CacheLoadConfig( module_t *p_module, FILE *file )
*****************************************************************************/
*****************************************************************************/
static
void
CacheSave
(
vlc_object_t
*
p_this
)
static
void
CacheSave
(
vlc_object_t
*
p_this
)
{
{
char
*
psz_filename
,
*
psz_homedir
,
*
psz_cachefile
;
char
*
psz_filename
,
*
psz_homedir
;
FILE
*
file
;
FILE
*
file
;
int
i
,
j
,
i_cache
;
int
i
,
j
,
i_cache
;
module_cache_t
**
pp_cache
;
module_cache_t
**
pp_cache
;
psz_cachefile
=
0
;
// FIXME
if
(
!
psz_cachefile
||
!
psz_cachefile
)
{
psz_homedir
=
p_this
->
p_vlc
->
psz_homedir
;
psz_homedir
=
p_this
->
p_vlc
->
psz_homedir
;
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
{
{
...
@@ -1737,16 +1721,6 @@ static void CacheSave( vlc_object_t *p_this )
...
@@ -1737,16 +1721,6 @@ static void CacheSave( vlc_object_t *p_this )
config_CreateDir
(
p_this
,
psz_filename
);
config_CreateDir
(
p_this
,
psz_filename
);
strcat
(
psz_filename
,
"/"
PLUGINSCACHE_FILE
);
strcat
(
psz_filename
,
"/"
PLUGINSCACHE_FILE
);
}
else
{
psz_filename
=
strdup
(
psz_cachefile
);
if
(
!
psz_filename
)
{
msg_Err
(
p_this
,
"out of memory"
);
return
;
}
}
msg_Dbg
(
p_this
,
"saving plugins cache file %s"
,
psz_filename
);
msg_Dbg
(
p_this
,
"saving plugins cache file %s"
,
psz_filename
);
...
@@ -1771,6 +1745,7 @@ static void CacheSave( vlc_object_t *p_this )
...
@@ -1771,6 +1745,7 @@ static void CacheSave( vlc_object_t *p_this )
for
(
i
=
0
;
i
<
i_cache
;
i
++
)
for
(
i
=
0
;
i
<
i_cache
;
i
++
)
{
{
int32_t
i_size
;
int32_t
i_size
;
int32_t
i_submodule
;
#define SAVE_IMMEDIATE(a) \
#define SAVE_IMMEDIATE(a) \
fwrite( &a, sizeof(char), sizeof(a), file )
fwrite( &a, sizeof(char), sizeof(a), file )
...
@@ -1809,8 +1784,8 @@ static void CacheSave( vlc_object_t *p_this )
...
@@ -1809,8 +1784,8 @@ static void CacheSave( vlc_object_t *p_this )
SAVE_STRING
(
pp_cache
[
i
]
->
p_module
->
psz_filename
);
SAVE_STRING
(
pp_cache
[
i
]
->
p_module
->
psz_filename
);
i
nt
i_submodule
;
i
_submodule
=
pp_cache
[
i
]
->
p_module
->
i_children
;
SAVE_IMMEDIATE
(
pp_cache
[
i
]
->
p_module
->
i_children
);
SAVE_IMMEDIATE
(
i_submodule
);
for
(
i_submodule
=
0
;
i_submodule
<
pp_cache
[
i
]
->
p_module
->
i_children
;
for
(
i_submodule
=
0
;
i_submodule
<
pp_cache
[
i
]
->
p_module
->
i_children
;
i_submodule
++
)
i_submodule
++
)
{
{
...
...
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