parseList: removed unused value parameter

This commit is contained in:
Gabor Adam Toth 2011-05-13 17:02:31 +02:00
parent 248e9234e1
commit 0b823493f9
6 changed files with 8 additions and 8 deletions

View File

@ -416,8 +416,7 @@ psycParseRC psyc_parse (psycParseState *state, char *oper,
* @param value Contains the list to be parsed.
* @param elem It will point to the next element in the list.
*/
psycParseListRC psyc_parseList (psycParseListState *state, psycString *value,
psycString *elem);
psycParseListRC psyc_parseList (psycParseListState *state, psycString *elem);
/** @} */ // end of parse group

View File

@ -20,7 +20,7 @@ diet: lib
lib: $O
@mkdir -p ../lib
${WRAPPER} ar rcs ../lib/libpsyc.a $O
${WRAPPER} ${AR} rcs ../lib/libpsyc.a $O
match: match.c
${CC} -o $@ -DDEBUG=4 -DCMDTOOL -DTEST $<

View File

@ -483,8 +483,7 @@ psycParseRC psyc_parse (psycParseState *state, char *oper,
}
/** List parser. */
psycParseListRC psyc_parseList (psycParseListState *state, psycString *value,
psycString *elem)
psycParseListRC psyc_parseList (psycParseListState *state, psycString *elem)
{
if (state->cursor >= state->buffer.length)
return PSYC_PARSE_LIST_INCOMPLETE;

View File

@ -34,6 +34,8 @@ psycRenderListRC psyc_renderList (psycList *list, char *buffer, size_t buflen)
}
}
// actual length should be equal to pre-calculated length at this point
assert(cur == list->length);
return PSYC_RENDER_LIST_SUCCESS;
}

View File

@ -67,7 +67,7 @@ int main (int argc, char **argv)
psyc_initParseListState(&listState);
psyc_setParseListBuffer(&listState, value);
while ((ret = psyc_parseList(&listState, &value, &elem)))
while ((ret = psyc_parseList(&listState, &elem)))
{
switch (ret)
{

View File

@ -453,7 +453,7 @@ int main (int argc, char **argv)
do
{
retl = psyc_parseList(&listState, pvalue, &elem);
retl = psyc_parseList(&listState, &elem);
switch (retl)
{
case PSYC_PARSE_LIST_END:
@ -468,7 +468,7 @@ int main (int argc, char **argv)
break;
default:
printf("# Error while parsing list: %i\n", ret);
printf("# Error while parsing list: %i\n", retl);
ret = retl = -1;
}
}