From 20c62edc0497bb26794df0ea6f506c59638096b0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 30 Oct 2018 09:57:56 +0100 Subject: input_gadgets.c: add commented direct-file read for debugging --- input_gadgets.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'input_gadgets.c') diff --git a/input_gadgets.c b/input_gadgets.c index 98f761f..aad8aad 100644 --- a/input_gadgets.c +++ b/input_gadgets.c @@ -359,6 +359,23 @@ char *gadgets_retrieve_weather_warnings(char *output, int max_len) return NULL; } +/* FILE *f = fopen("Z_CAP_C_EDZW_LATEST_PVW_STATUS_PREMIUMDWD_COMMUNEUNION_DE.zip","rb"); + if (f == NULL) { + perror("failed to open file"); + return NULL; + } + fseek(f, 0, SEEK_END); + chunk.size = ftell(f); + chunk.memory = malloc(chunk.size); + if (chunk.memory == NULL) { + fprintf(stderr, "malloc failed to allocate %d bytes", chunk.size); + fclose(f); + return NULL; + } + fseek(f, 0, SEEK_SET); + fread(chunk.memory, chunk.size, 1, f); + fclose(f); */ + zip_error_t error; zip_source_t *src; zip_t *za; -- cgit v1.2.3-54-g00ecf