Mercurial > hg > dmlib
diff src/dmzlib.c @ 1121:043b5942fdb6
Rename some dmzlib functions and add context init/close functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Mar 2015 04:37:58 +0200 |
parents | e06abfde6c39 |
children | d0898867ec4c |
line wrap: on
line diff
--- a/src/dmzlib.c Wed Mar 04 03:53:22 2015 +0200 +++ b/src/dmzlib.c Wed Mar 04 04:37:58 2015 +0200 @@ -548,7 +548,26 @@ } -int dmZLibDecode(DMZLibContext * ctx) +int dmZLibInitInflate(DMZLibContext *ctx) +{ + if (ctx == NULL) + return DMERR_NULLPTR; + + memset(ctx, 0, sizeof(DMZLibContext)); + return DMERR_OK; +} + + +void dmZLibCloseInflate(DMZLibContext *ctx) +{ + if (ctx != NULL) + { + memset(ctx, 0, sizeof(DMZLibContext)); + } +} + + +int dmZLibInflate(DMZLibContext * ctx) { int final, type, ret;