diff --git a/NEWS b/NEWS index 2a07d29..4f1ef14 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +============ +Evisum 0.2.0 +============ + + * Add variable unit display (K, M and G). + * Minor refactoring. + ============ Evisum 0.1.2 ============ diff --git a/src/main.c b/src/main.c index 8fade04..397ed06 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ See LICENSE file for details. */ -#define VERSION "0.1.1" +#define VERSION "0.2.0" #include "process.h" #include "system.h" diff --git a/src/system.c b/src/system.c index 6d4093a..7275db4 100644 --- a/src/system.c +++ b/src/system.c @@ -109,7 +109,7 @@ Fcontents(const char *path) int n = 1024; buf = malloc(n * sizeof(byte) + 1); - if (!buf) exit(0 << 1); + if (!buf) return NULL; while ((count = (fread(byte, sizeof(byte), 1, f))) > 0) { @@ -118,13 +118,18 @@ Fcontents(const char *path) { n *= 2; char *tmp = realloc(buf, n * sizeof(byte) + 1); - if (!tmp) exit(1 << 1); + if (!tmp) return NULL; buf = tmp; } memcpy(&buf[bytes - sizeof(byte)], byte, sizeof(byte)); } - if (!feof(f)) exit(2 << 1); + if (!feof(f)) + { + free(buf); + fclose(f); + return NULL; + } fclose(f); buf[bytes] = 0; diff --git a/src/ui.c b/src/ui.c index a350086..a461c49 100644 --- a/src/ui.c +++ b/src/ui.c @@ -38,6 +38,9 @@ ui_shutdown(Ui *ui) if (ui->thread_process) ecore_thread_wait(ui->thread_process, 1.0); + + eina_lock_free(&_lock); + ecore_main_loop_quit(); }