version 1.11, 2012/07/03 08:51:05
|
version 1.12.6.1, 2012/11/15 23:18:33
|
Line 105 io_mm_inuse()
|
Line 105 io_mm_inuse()
|
|
|
|
|
// init libaitio routine |
// init libaitio routine |
void | __attribute__((constructor)) void |
_init() | _io_init() |
{ |
{ |
ioLibInit(IO_MPOOL, 0); |
ioLibInit(IO_MPOOL, 0); |
} |
} |
|
|
// fini libaitio routine |
// fini libaitio routine |
void | __attribute__((destructor)) void |
_fini() | _io_fini() |
{ |
{ |
ioLibFini(); |
ioLibFini(); |
} |
} |
Line 168 ioLibFini()
|
Line 168 ioLibFini()
|
{ |
{ |
switch (use_mm) { |
switch (use_mm) { |
case IO_MPOOL: |
case IO_MPOOL: |
mpool_destroy(&io_mpool); |
|
|
|
io_malloc = malloc; |
io_malloc = malloc; |
io_calloc = calloc; |
io_calloc = calloc; |
io_realloc = realloc; |
io_realloc = realloc; |
io_strdup = strdup; |
io_strdup = strdup; |
io_free = free; |
io_free = free; |
use_mm = IO_SYSM; |
use_mm = IO_SYSM; |
|
|
|
mpool_destroy(&io_mpool); |
break; |
break; |
} |
} |
} |
} |
Line 474 ioStrAst(const char *csString)
|
Line 474 ioStrAst(const char *csString)
|
io_Errno = EINVAL; |
io_Errno = EINVAL; |
return NULL; |
return NULL; |
} else { |
} else { |
str = strdup(strchr(csString, '{') + 1); | str = io_strdup(strchr(csString, '{') + 1); |
*strrchr(str, '}') = 0; |
*strrchr(str, '}') = 0; |
} |
} |
|
|
Line 496 ioStrAst(const char *csString)
|
Line 496 ioStrAst(const char *csString)
|
/* ok, clear show */ |
/* ok, clear show */ |
ext = str; |
ext = str; |
|
|
out = strdup(ext); | out = io_strdup(ext); |
io_free(str); |
io_free(str); |
|
|
return out; |
return out; |
Line 519 ioMkDir(const char *csDir, int mode)
|
Line 519 ioMkDir(const char *csDir, int mode)
|
if (!csDir) |
if (!csDir) |
return cx; |
return cx; |
|
|
str = strdup(csDir); | str = io_strdup(csDir); |
if (!str) { |
if (!str) { |
LOGERR; |
LOGERR; |
return cx; |
return cx; |