made changes to clear errors before reading and writing xli

This commit is contained in:
hyung-hwan 2013-07-01 09:29:08 +00:00
parent d8cb7f4ef1
commit 3e21bc4f98
2 changed files with 4 additions and 0 deletions

View File

@ -824,6 +824,8 @@ int qse_xli_read (qse_xli_t* xli, qse_xli_io_impl_t io)
xli->rio.top.line = 1;
xli->rio.top.colm = 1;
xli->rio.inp = &xli->rio.top;
qse_xli_seterrnum (xli, QSE_XLI_ENOERR, QSE_NULL);
qse_xli_clearrionames (xli);
n = xli->rio.impl (xli, QSE_XLI_IO_OPEN, xli->rio.inp, QSE_NULL, 0);

View File

@ -288,6 +288,8 @@ int qse_xli_write (qse_xli_t* xli, qse_xli_io_impl_t io)
QSE_MEMSET (&xli->wio, 0, QSE_SIZEOF(xli->wio));
xli->wio.impl = io;
xli->wio.inp = &xli->wio.top;
qse_xli_seterrnum (xli, QSE_XLI_ENOERR, QSE_NULL);
qse_xli_clearwionames (xli);
/* open the top level stream */