Michael Niedermayer
a31547ce2e
avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode()
...
Fixes Ticket3363
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9ab5cf5417
avutil/avstring: fix () position
...
Fixes CID1135751
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
68590650f0
lavu/avstring: add av_utf8_decode() function
11 years ago
Diego Biurrun
0d6d4a9e4a
avstring-test: Mark pointer passed to av_free() as non-const
...
libavutil/avstring.c:278:9: warning: passing argument 1 of ‘av_free’ discards ‘const’ qualifier from pointer target type
11 years ago
Michael Niedermayer
5717689c75
avutil/avstring: make const tables static const
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Martin Storsjö
4be368b504
avstring: Fix isxdigit to not accept non-hex characters
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
efa7f42020
Use the avstring.h locale-independent character type functions
...
Make sure the behavior does not change with the locale.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
12c5c1d3e3
avstring: Add locale independent versions of some ctype.h functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Stefano Sabatini
9767ec6b86
lavu: add escape API
...
The escape API will be useful to perform escaping programmatically, which
is required when crafting argument strings, and will be used for context
printing as well.
This is based on the ffescape tool code, with a few extensions and fixes.
12 years ago
Reimar Döffinger
88d55b827d
Remove incorrect use of ctype.h functions.
...
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
32de283103
avstring: fix "warning: return discards const qualifier from pointer target type"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Vladimir Pantelic
b85a5e87af
lavu: Add av_strnstr()
...
This is a length limited version of strstr()
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
4333df6355
avstring: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Luca Barbato
d8fd06c37d
avstring: add av_basename and av_dirname
...
Thread safe version of the common basename and dirname.
12 years ago
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
12 years ago
Michael Niedermayer
ab796ded75
avstring: fix compiler warning about freeing const pointers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
0daac647af
avstring-test: fix memory leaks
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
ba04ecfdac
avstring: Add locale independent implementations of strcasecmp/strncasecmp
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Stefano Sabatini
b35e9e19e9
lavu: add av_strtok()
...
The function strtok_r() is part of the POSIX.1 specification, but is not
available on some platforms. We provide an internal implementation, so we
do not need to rely on a platform implementation.
13 years ago
Michael Niedermayer
68eb35b886
avstring: fix return discards qualifiers from pointer target type.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
61e2e29691
av_string: add av_asprintf().
13 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
372e288408
Move av_get_token() from libavfilter to libavutil.
...
Originally committed as revision 25225 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Måns Rullgård
ac6ef8682d
Add av_stristr() function
...
This is a case-insensitive version of strstr().
Originally committed as revision 22251 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
b3e88ae84b
Place { of the function where indent -kr wants it.
...
Also more consistent with the rest of the code.
Originally committed as revision 20851 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
64b12fc317
Move #include where it belongs.
...
This as a sideeffect fixes the linking failure of ffplay.
Originally committed as revision 20832 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
277c733237
Add a function to convert a number to a av_malloced string.
...
Originally committed as revision 20829 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
4d55404fca
Rename string.c to avstring.c so that the name of header and C file match.
...
Originally committed as revision 16853 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Luca Abeni
1e7f363804
Implement av_strlcatf(): a strlcat which adds a printf style formatted string
...
Originally committed as revision 9753 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Måns Rullgård
059eeabf35
10l: fix av_str[i]start()
...
Originally committed as revision 9585 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Måns Rullgård
fc78ce803b
add some string functions
...
Originally committed as revision 9400 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago