*polished code.
This commit is contained in:
parent
e0d6853e6b
commit
f7dc6327ba
1
HISTORY
1
HISTORY
@ -1,4 +1,5 @@
|
||||
Mar. 2 2016
|
||||
Added a new YARD sample
|
||||
Fixed a crash bug when unreferencing a garbage
|
||||
Fixed a multiple disposing bug when an error occurs in an expression
|
||||
|
||||
|
@ -2864,10 +2864,10 @@ static char* mb_strupr(char* s) {
|
||||
static int mb_uu_ischar(char* ch) {
|
||||
/* Copyright 2008, 2009 Bjoern Hoehrmann, http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ */
|
||||
/* Determine whether a buffer is a UTF8 encoded character, and return taken bytes */
|
||||
#define _TAKE(__ch, __c, __r) do { __c = *__ch++; __r++; } while(0)
|
||||
#define _COPY(__ch, __c, __r, __cp) do { _TAKE(__ch, __c, __r); __cp = (__cp << 6) | ((unsigned char)__c & 0x3Fu); } while(0)
|
||||
#define _TRANS(__m, __cp, __g) do { __cp &= ((__g[(unsigned char)c] & __m) != 0); } while(0)
|
||||
#define _TAIL(__ch, __c, __r, __cp, __g) do { _COPY(__ch, __c, __r, __cp); _TRANS(0x70, __cp, __g); } while(0)
|
||||
# define _TAKE(__ch, __c, __r) do { __c = *__ch++; __r++; } while(0)
|
||||
# define _COPY(__ch, __c, __r, __cp) do { _TAKE(__ch, __c, __r); __cp = (__cp << 6) | ((unsigned char)__c & 0x3Fu); } while(0)
|
||||
# define _TRANS(__m, __cp, __g) do { __cp &= ((__g[(unsigned char)c] & __m) != 0); } while(0)
|
||||
# define _TAIL(__ch, __c, __r, __cp, __g) do { _COPY(__ch, __c, __r, __cp); _TRANS(0x70, __cp, __g); } while(0)
|
||||
static const unsigned char range[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -2909,10 +2909,10 @@ static int mb_uu_ischar(char* ch) {
|
||||
case 11: _COPY(ch, c, result, codepoint); _TRANS(0x60, codepoint, range); _TAIL(ch, c, result, codepoint, range); _TAIL(ch, c, result, codepoint, range); return result;
|
||||
default: return 0;
|
||||
}
|
||||
#undef _TAKE
|
||||
#undef _COPY
|
||||
#undef _TRANS
|
||||
#undef _TAIL
|
||||
# undef _TAKE
|
||||
# undef _COPY
|
||||
# undef _TRANS
|
||||
# undef _TAIL
|
||||
}
|
||||
|
||||
static int mb_uu_strlen(char* ch) {
|
||||
|
@ -222,7 +222,7 @@ static void _tidy_mem_pool(bool_t force) {
|
||||
}
|
||||
|
||||
static void _open_mem_pool(void) {
|
||||
#define N 22
|
||||
# define N 22
|
||||
size_t szs[N];
|
||||
size_t lst[N];
|
||||
int i = 0;
|
||||
@ -279,7 +279,7 @@ static void _open_mem_pool(void) {
|
||||
pool[i].size = lst[i];
|
||||
pool[i].stack = 0;
|
||||
}
|
||||
#undef N
|
||||
# undef N
|
||||
}
|
||||
|
||||
static void _close_mem_pool(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user