mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
------------------------------------------------------------------------
r4171 | acceptthis | 2013-01-17 09:05:18 +0000 (Thu, 17 Jan 2013) | 1 line gcc is more fussy, for better or worse. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4169 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
eb110b969a
commit
fd13c057a0
1 changed files with 8 additions and 4 deletions
|
@ -405,7 +405,6 @@ char *Q_strlwr(char *s)
|
|||
|
||||
int wildcmp(const char *wild, const char *string)
|
||||
{
|
||||
const char *cp=NULL, *mp=NULL;
|
||||
/*
|
||||
while ((*string) && (*wild != '*'))
|
||||
{
|
||||
|
@ -2093,16 +2092,21 @@ unsigned int utf8_encode(void *out, unsigned int unicode, int maxlen)
|
|||
|
||||
//output it.
|
||||
if (bcount == 1)
|
||||
*((unsigned char *)out)++ = (unsigned char)(unicode&0x7f);
|
||||
{
|
||||
*((unsigned char *)out) = (unsigned char)(unicode&0x7f);
|
||||
out = (char*)out + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
shift = bcount*6;
|
||||
shift = shift-6;
|
||||
*((unsigned char *)out)++ = (unsigned char)((unicode>>shift)&(0x0000007f>>bcount)) | (0xffffff00 >> bcount);
|
||||
*((unsigned char *)out) = (unsigned char)((unicode>>shift)&(0x0000007f>>bcount)) | (0xffffff00 >> bcount);
|
||||
out = (char*)out + 1;
|
||||
do
|
||||
{
|
||||
shift = shift-6;
|
||||
*((unsigned char *)out)++ = (unsigned char)((unicode>>shift)&0x3f) | 0x80;
|
||||
*((unsigned char *)out) += (unsigned char)((unicode>>shift)&0x3f) | 0x80;
|
||||
out = (char*)out + 1;
|
||||
}
|
||||
while(shift);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue