No description
Find a file
Sergey Poznyakoff 4650905537 Change prototypes of ws_getvar and ws_command.
New invocation sequence ensures proper error handling.
This is an incompatible change.  Authors using ws_getvar member will
have to rewrite their ws_getvar function accordingly.

* src/wordsplit.c (wordsplit_init0): Call wordsplit_clearerr
on reuse.
(wordsplit_init): Fix ws_errno
(expvar): Change invocation of ws_getvar.
(expcmd): Change invocation of ws_command.
(wordsplit_clearerr): New function.
(wordsplit_strerror): Handle WRDSE_USERERR.
* src/wordsplit.h (ws_getvar): Change return value and signature of
ws_getvar and ws_command.
New member 'ws_usererr'.
(WRDSF_ARGV): New flag.
(WRDSE_OK): New define. Same as WRDSE_EOF.
(WRDSE_USERERR): New error code.
(wordsplit_clearerr): New proto.
* tests/wsp.c (wsp_getvar, wsp_runcmd): Rewrite.
2015-12-17 15:25:24 +02:00
src Change prototypes of ws_getvar and ws_command. 2015-12-17 15:25:24 +02:00
tests Change prototypes of ws_getvar and ws_command. 2015-12-17 15:25:24 +02:00