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

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;
}
}