diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-01 16:24:41 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-01 16:24:41 -0700 |
commit | c36029fc806cf083de3aaf1344d6bd2be8db316f (patch) | |
tree | da88b1f073b8125d764b94b924492d2b05ea4c69 /src/utf8.c | |
parent | aa0755f53545fcf343f791f04760f6b934e022e4 (diff) | |
parent | 6982a829e22d2bc7cf7c829c4430a4ea6f5bc7fa (diff) | |
download | mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.gz mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.xz mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.zip |
Merge branch 'mk/cleanups'
* mk/cleanups: (60 commits)
pass constant pointers
const pointers
unsigned integers and size_t
oggflac: fix GCC warnings
include cleanup
protect locate.h from double inclusion
playlist: eliminate unused fd parameters
jack: made "sample_size" static const
moved jack configuration to the JackData struct
jack: removed unused macros
jack: don't set audioOutput->data=NULL
jack: initialize JackData in jack_initDriver()
jack: added freeJackClient()
jack: initialize jd->client after !jd check
jack: eliminate superfluous freeJackData() calls
mp3: converted the MUTEFRAME_ macros to an enum
mp3: converted the DECODE_ constants to an enum
wavpack: don't use "isp" before initialization
wavpack: moved code to wavpack_open_wvc()
simplified code in the ogg decoder plugin
...
Diffstat (limited to 'src/utf8.c')
-rw-r--r-- | src/utf8.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utf8.c b/src/utf8.c index f0d6b3b11..e8f3dbdde 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -69,7 +69,7 @@ static char utf8_to_latin1_char(const char *inUtf8) return (char)(c + utf8[1]); } -static int validateUtf8Char(const char *inUtf8Char) +static unsigned int validateUtf8Char(const char *inUtf8Char) { const unsigned char *utf8Char = (const unsigned char *)inUtf8Char; @@ -77,9 +77,9 @@ static int validateUtf8Char(const char *inUtf8Char) return 1; if (utf8Char[0] >= 0xC0 && utf8Char[0] <= 0xFD) { - int count = 1; + unsigned int count = 1; char t = 1 << 5; - int i; + unsigned int i; while (count < 6 && (t & utf8Char[0])) { t = (t >> 1); count++; @@ -97,7 +97,7 @@ static int validateUtf8Char(const char *inUtf8Char) int validUtf8String(const char *string) { - int ret; + unsigned int ret; while (*string) { ret = validateUtf8Char(string); @@ -114,7 +114,7 @@ char *utf8StrToLatin1Dup(const char *utf8) /* utf8 should have at most two char's per latin1 char */ char *ret = xmalloc(strlen(utf8) + 1); char *cp = ret; - int count; + unsigned int count; size_t len = 0; while (*utf8) { @@ -136,7 +136,7 @@ char *utf8StrToLatin1Dup(const char *utf8) char *utf8_to_latin1(char *dest, const char *utf8) { char *cp = dest; - int count; + unsigned int count; size_t len = 0; while (*utf8) { |