avstring: Add locale independent implementations of toupper/tolower

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/2/head
Luca Barbato 13 years ago committed by Martin Storsjö
parent 66760b30a3
commit 07b172fe8f
  1. 3
      doc/APIchanges
  2. 20
      libavutil/avstring.h
  3. 2
      libavutil/avutil.h

@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-11-xx - xxxxxxx - lavu 51.13.0
Add av_toupper()/av_tolower()
2011-11-xx - xxxxxxx - lavf 53.13.0
Add avformat_network_init()/avformat_network_uninit()

@ -131,4 +131,24 @@ char *av_d2str(double d);
*/
char *av_get_token(const char **buf, const char *term);
/**
* Locale independent conversion of ASCII characters to upper case.
*/
static inline int av_toupper(int c)
{
if (c >= 'a' && c <= 'z')
c ^= 0x20;
return c;
}
/**
* Locale independent conversion of ASCII characters to lower case.
*/
static inline int av_tolower(int c)
{
if (c >= 'A' && c <= 'Z')
c ^= 0x20;
return c;
}
#endif /* AVUTIL_AVSTRING_H */

@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 12
#define LIBAVUTIL_VERSION_MINOR 13
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Loading…
Cancel
Save