提交 7a2c9428 编写于 作者: Y yuqing

ini_file_reader set global section before and after directive #include

上级 bcd00f40
Version 1.15 2015-06-15
Version 1.15 2015-06-16
* fast_mblock.c support none lock
* ioevent support set timeout
* fast_mblock suport alloc and free object
* fast_mblock support alloc and free object
* ini_file_reader set global section before and after directive #include
Version 1.14 2015-06-12
* fast_task_info support set_buffer_size and realloc_buffer
......
......@@ -256,14 +256,7 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
result = 0;
pLastEnd = content - 1;
pSection = pContext->current_section;
if (pSection->count > 0)
{
pItem = pSection->items + pSection->count;
}
else
{
pItem = pSection->items;
}
pItem = pSection->items + pSection->count;
while (pLastEnd != NULL)
{
......@@ -320,6 +313,7 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
}
}
pContext->current_section = &pContext->global;
result = iniDoLoadFromFile(full_filename, pContext);
if (result != 0)
{
......@@ -327,15 +321,9 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
break;
}
pContext->current_section = &pContext->global;
pSection = pContext->current_section;
if (pSection->count > 0)
{
pItem = pSection->items + pSection->count; //must re-asign
}
else
{
pItem = pSection->items;
}
pItem = pSection->items + pSection->count; //must re-asign
free(pIncludeFilename);
continue;
......@@ -361,14 +349,7 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
{
pContext->current_section = &pContext->global;
pSection = pContext->current_section;
if (pSection->count > 0)
{
pItem = pSection->items + pSection->count;
}
else
{
pItem = pSection->items;
}
pItem = pSection->items + pSection->count;
continue;
}
......@@ -411,14 +392,7 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
}
pContext->current_section = pSection;
if (pSection->count > 0)
{
pItem = pSection->items + pSection->count;
}
else
{
pItem = pSection->items;
}
pItem = pSection->items + pSection->count;
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册