Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
aae60936
Commit
aae60936
authored
Apr 02, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify code reading.
parent
4ad218c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+12
-7
No files found.
modules/misc/lua/vlc.c
View file @
aae60936
...
@@ -405,39 +405,44 @@ static int file_compare( const char **a, const char **b )
...
@@ -405,39 +405,44 @@ static int file_compare( const char **a, const char **b )
int
vlclua_dir_list
(
vlc_object_t
*
p_this
,
const
char
*
luadirname
,
int
vlclua_dir_list
(
vlc_object_t
*
p_this
,
const
char
*
luadirname
,
char
**
ppsz_dir_list
)
char
**
ppsz_dir_list
)
{
{
if
(
asprintf
(
&
ppsz_dir_list
[
0
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
int
i
=
0
;
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
p_this
->
p_libvlc
->
psz_datadir
,
luadirname
)
<
0
)
p_this
->
p_libvlc
->
psz_datadir
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
i
++
;
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
{
const
char
*
psz_vlcpath
=
config_GetDataDir
();
const
char
*
psz_vlcpath
=
config_GetDataDir
();
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
psz_vlcpath
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
i
++
;
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"%s"
DIR_SEP
"share"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
psz_vlcpath
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
i
++
;
}
}
# else
# else
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"share"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
luadirname
)
<
0
)
"share"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
# ifdef HAVE_SYS_STAT_H
# ifdef HAVE_SYS_STAT_H
{
{
struct
stat
stat_info
;
struct
stat
stat_info
;
if
(
(
utf8_stat
(
ppsz_dir_list
[
1
],
&
stat_info
)
==
-
1
)
if
(
(
utf8_stat
(
ppsz_dir_list
[
i
],
&
stat_info
)
==
-
1
)
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
{
free
(
ppsz_dir_list
[
1
]);
free
(
ppsz_dir_list
[
i
]);
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
config_GetDataDir
(),
luadirname
)
<
0
)
config_GetDataDir
(),
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
}
}
# endif
# endif
i
++
;
# endif
# endif
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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