if (zcs==NULL) return 0; /* support free on NULL */
{ ZSTD_customMem const cMem = zcs->customMem;
ZSTD_freeCCtx(zcs->cctx);
+ ZSTD_freeCDict(zcs->cdict);
ZSTD_free(zcs->inBuff, cMem);
ZSTD_free(zcs->outBuff, cMem);
ZSTD_free(zcs, cMem);
/*-************************************
* Dependencies
**************************************/
-#include <stdlib.h> /* malloc */
+#include <stdlib.h> /* malloc, free */
#include <stdio.h> /* FILE, fwrite, fprintf */
#include <string.h> /* memcpy */
-#include <errno.h> /* errno */
#include "mem.h" /* U32 */
BYTE ldt[LTSIZE]; /* literals distribution table */
/* init */
- if (buff==NULL) { fprintf(stderr, "datagen: error: %s \n", strerror(errno)); exit(1); }
+ if (buff==NULL) { perror("datagen"); exit(1); }
if (litProba<=0.0) litProba = matchProba / 4.5;
memset(ldt, '0', sizeof(ldt)); /* yes, character '0', this is intentional */
RDG_fillLiteralDistrib(ldt, litProba);
*/
-#pragma once
+#ifndef FILEIO_H_23981798732
+#define FILEIO_H_23981798732
#if defined (__cplusplus)
extern "C" {
#if defined (__cplusplus)
}
#endif
+
+#endif /* FILEIO_H_23981798732 */