Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e46e884f
Commit
e46e884f
authored
Jun 23, 2007
by
Måns Rullgård
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove old unused string functions
Originally committed as revision 9402 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
75e61b0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
68 deletions
+0
-68
avformat.h
libavformat/avformat.h
+0
-5
cutils.c
libavformat/cutils.c
+0
-63
No files found.
libavformat/avformat.h
View file @
e46e884f
...
...
@@ -833,11 +833,6 @@ int av_filename_number_test(const char *filename);
#include "os_support.h"
int
strstart
(
const
char
*
str
,
const
char
*
val
,
const
char
**
ptr
);
int
stristart
(
const
char
*
str
,
const
char
*
val
,
const
char
**
ptr
);
void
pstrcpy
(
char
*
buf
,
int
buf_size
,
const
char
*
str
);
char
*
pstrcat
(
char
*
buf
,
int
buf_size
,
const
char
*
s
);
void
__dynarray_add
(
unsigned
long
**
tab_ptr
,
int
*
nb_ptr
,
unsigned
long
elem
);
#ifdef __GNUC__
...
...
libavformat/cutils.c
View file @
e46e884f
...
...
@@ -20,69 +20,6 @@
*/
#include "avformat.h"
/**
* Return TRUE if val is a prefix of str. If it returns TRUE, ptr is
* set to the next character in 'str' after the prefix.
*
* @param str input string
* @param pfx prefix to test
* @param ptr updated after the prefix in str in there is a match
* @return TRUE if there is a match
*/
int
strstart
(
const
char
*
str
,
const
char
*
pfx
,
const
char
**
ptr
)
{
while
(
*
pfx
&&
*
pfx
++
==
*
str
++
);
if
(
!*
pfx
&&
ptr
)
*
ptr
=
str
;
return
!*
pfx
;
}
/**
* Return TRUE if val is a prefix of str (case independent). If it
* returns TRUE, ptr is set to the next character in 'str' after the
* prefix.
*
* @param str input string
* @param pfx prefix to test
* @param ptr updated after the prefix in str in there is a match
* @return TRUE if there is a match */
int
stristart
(
const
char
*
str
,
const
char
*
pfx
,
const
char
**
ptr
)
{
while
(
*
pfx
&&
toupper
((
unsigned
)
*
pfx
++
)
==
toupper
((
unsigned
)
*
str
++
));
if
(
!*
pfx
&&
ptr
)
*
ptr
=
str
;
return
!*
pfx
;
}
/**
* Copy the string str to buf. If str length is bigger than buf_size -
* 1 then it is clamped to buf_size - 1.
* NOTE: this function does what strncpy should have done to be
* useful. NEVER use strncpy.
*
* @param buf destination buffer
* @param buf_size size of destination buffer
* @param str source string
*/
void
pstrcpy
(
char
*
buf
,
int
buf_size
,
const
char
*
str
)
{
if
(
buf_size
<=
0
)
return
;
while
(
buf_size
--
>
1
&&
*
str
)
*
buf
++
=
*
str
++
;
*
buf
=
0
;
}
/* strcat and truncate. */
char
*
pstrcat
(
char
*
buf
,
int
buf_size
,
const
char
*
s
)
{
int
len
=
strlen
(
buf
);
if
(
len
<
buf_size
)
pstrcpy
(
buf
+
len
,
buf_size
-
len
,
s
);
return
buf
;
}
/* add one element to a dynamic array */
void
__dynarray_add
(
unsigned
long
**
tab_ptr
,
int
*
nb_ptr
,
unsigned
long
elem
)
{
...
...
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