1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

added psyc_isListVar(), removed name param from psyc_parseList(), added more documentation

This commit is contained in:
tg(x) 2011-05-09 19:21:26 +02:00
parent f68021b26c
commit b1ae67135d
5 changed files with 55 additions and 37 deletions

View file

@ -59,7 +59,7 @@ int main (int argc, char **argv)
(int)name.length, name.ptr,
(int)value.length, value.ptr);
if (name.length >= 5 && memcmp(name.ptr, "_list", 5) == 0)
if (psyc_isListVar(&name))
{
if (verbose)
printf(">> LIST START\n");
@ -67,7 +67,7 @@ int main (int argc, char **argv)
psyc_initParseListState(&listState);
psyc_setParseListBuffer(&listState, value);
while ((ret = psyc_parseList(&listState, &name, &value, &elem)))
while ((ret = psyc_parseList(&listState, &value, &elem)))
{
switch (ret)
{

View file

@ -443,7 +443,7 @@ int main (int argc, char **argv)
name.length = 0;
value.length = 0;
if (pname->length >= 5 && memcmp(pname->ptr, "_list", 5) == 0)
if (psyc_isListVar(pname))
{
if (verbose >= 2)
printf("## LIST START\n");
@ -453,7 +453,7 @@ int main (int argc, char **argv)
do
{
retl = psyc_parseList(&listState, pname, pvalue, &elem);
retl = psyc_parseList(&listState, pvalue, &elem);
switch (retl)
{
case PSYC_PARSE_LIST_END: