#include #include #include #define MEMORY (1024*1024) int main(void) { struct aplwc *aplwc; uint8_t *data; int ret; data = malloc(MEMORY); if(data == NULL){ fprintf(stderr, "Couldn't allocate memory\n"); return 1; } ret = aplwc_new(&aplwc, data, MEMORY); if(ret){ fprintf(stderr, "Couldn't create new aplwc instance: %s\n", aplwc_errstr(aplwc)); return 1; } ret = aplwc_destroy(aplwc); if(ret){ fprintf(stderr, "Couldn't destroy the aplwc instance: %s\n", aplwc_errstr(aplwc)); return 1; } free(data); return 0; }