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
204eaed4
Commit
204eaed4
authored
Aug 24, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tabs in source code
parent
fe147499
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
src/input/info.h
src/input/info.h
+36
-36
No files found.
src/input/info.h
View file @
204eaed4
...
@@ -28,32 +28,32 @@
...
@@ -28,32 +28,32 @@
static
inline
info_t
*
info_New
(
const
char
*
name
,
const
char
*
value
)
static
inline
info_t
*
info_New
(
const
char
*
name
,
const
char
*
value
)
{
{
info_t
*
info
=
malloc
(
sizeof
(
*
info
));
info_t
*
info
=
malloc
(
sizeof
(
*
info
));
if
(
!
info
)
if
(
!
info
)
return
NULL
;
return
NULL
;
info
->
psz_name
=
strdup
(
name
);
info
->
psz_name
=
strdup
(
name
);
info
->
psz_value
=
value
?
strdup
(
value
)
:
NULL
;
info
->
psz_value
=
value
?
strdup
(
value
)
:
NULL
;
return
info
;
return
info
;
}
}
static
inline
void
info_Delete
(
info_t
*
i
)
static
inline
void
info_Delete
(
info_t
*
i
)
{
{
free
(
i
->
psz_name
);
free
(
i
->
psz_name
);
free
(
i
->
psz_value
);
free
(
i
->
psz_value
);
free
(
i
);
free
(
i
);
}
}
static
inline
info_category_t
*
info_category_New
(
const
char
*
name
)
static
inline
info_category_t
*
info_category_New
(
const
char
*
name
)
{
{
info_category_t
*
cat
=
malloc
(
sizeof
(
*
cat
));
info_category_t
*
cat
=
malloc
(
sizeof
(
*
cat
));
if
(
!
cat
)
if
(
!
cat
)
return
NULL
;
return
NULL
;
cat
->
psz_name
=
strdup
(
name
);
cat
->
psz_name
=
strdup
(
name
);
cat
->
i_infos
=
0
;
cat
->
i_infos
=
0
;
cat
->
pp_infos
=
NULL
;
cat
->
pp_infos
=
NULL
;
return
cat
;
return
cat
;
}
}
static
inline
info_t
*
info_category_FindInfo
(
const
info_category_t
*
cat
,
static
inline
info_t
*
info_category_FindInfo
(
const
info_category_t
*
cat
,
...
@@ -61,24 +61,24 @@ static inline info_t *info_category_FindInfo(const info_category_t *cat,
...
@@ -61,24 +61,24 @@ static inline info_t *info_category_FindInfo(const info_category_t *cat,
{
{
for
(
int
i
=
0
;
i
<
cat
->
i_infos
;
i
++
)
{
for
(
int
i
=
0
;
i
<
cat
->
i_infos
;
i
++
)
{
if
(
!
strcmp
(
cat
->
pp_infos
[
i
]
->
psz_name
,
name
))
{
if
(
!
strcmp
(
cat
->
pp_infos
[
i
]
->
psz_name
,
name
))
{
if
(
index
)
if
(
index
)
*
index
=
i
;
*
index
=
i
;
return
cat
->
pp_infos
[
i
];
return
cat
->
pp_infos
[
i
];
}
}
}
}
return
NULL
;
return
NULL
;
}
}
static
inline
void
info_category_ReplaceInfo
(
info_category_t
*
cat
,
static
inline
void
info_category_ReplaceInfo
(
info_category_t
*
cat
,
info_t
*
info
)
info_t
*
info
)
{
{
int
index
;
int
index
;
info_t
*
old
=
info_category_FindInfo
(
cat
,
&
index
,
info
->
psz_name
);
info_t
*
old
=
info_category_FindInfo
(
cat
,
&
index
,
info
->
psz_name
);
if
(
old
)
{
if
(
old
)
{
info_Delete
(
cat
->
pp_infos
[
index
]);
info_Delete
(
cat
->
pp_infos
[
index
]);
cat
->
pp_infos
[
index
]
=
info
;
cat
->
pp_infos
[
index
]
=
info
;
}
else
{
}
else
{
INSERT_ELEM
(
cat
->
pp_infos
,
cat
->
i_infos
,
cat
->
i_infos
,
info
);
INSERT_ELEM
(
cat
->
pp_infos
,
cat
->
i_infos
,
cat
->
i_infos
,
info
);
}
}
}
}
...
@@ -114,22 +114,22 @@ static inline info_t *info_category_AddInfo(info_category_t *cat,
...
@@ -114,22 +114,22 @@ static inline info_t *info_category_AddInfo(info_category_t *cat,
static
inline
int
info_category_DeleteInfo
(
info_category_t
*
cat
,
const
char
*
name
)
static
inline
int
info_category_DeleteInfo
(
info_category_t
*
cat
,
const
char
*
name
)
{
{
int
index
;
int
index
;
if
(
info_category_FindInfo
(
cat
,
&
index
,
name
))
{
if
(
info_category_FindInfo
(
cat
,
&
index
,
name
))
{
info_Delete
(
cat
->
pp_infos
[
index
]);
info_Delete
(
cat
->
pp_infos
[
index
]);
REMOVE_ELEM
(
cat
->
pp_infos
,
cat
->
i_infos
,
index
);
REMOVE_ELEM
(
cat
->
pp_infos
,
cat
->
i_infos
,
index
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
static
inline
void
info_category_Delete
(
info_category_t
*
cat
)
static
inline
void
info_category_Delete
(
info_category_t
*
cat
)
{
{
for
(
int
i
=
0
;
i
<
cat
->
i_infos
;
i
++
)
for
(
int
i
=
0
;
i
<
cat
->
i_infos
;
i
++
)
info_Delete
(
cat
->
pp_infos
[
i
]);
info_Delete
(
cat
->
pp_infos
[
i
]);
free
(
cat
->
pp_infos
);
free
(
cat
->
pp_infos
);
free
(
cat
->
psz_name
);
free
(
cat
->
psz_name
);
free
(
cat
);
free
(
cat
);
}
}
#endif
#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