From 2116c2913a815d4f6cd3ef44e161331c1c666122 Mon Sep 17 00:00:00 2001 From: caro Date: Fri, 2 Oct 2009 04:06:58 +0000 Subject: [PATCH] * Check the returned value of eet_init() in the binary. * Use binary mode of fopen() in eet_main() for Windows compatibility git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@42851 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 5 +++++ src/bin/eet_main.c | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ca946f..0bcd9fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -242,3 +242,8 @@ 2009-10-01 Mathieu Taillefumier * remove useless Eina_Log macros. + +2009-10-01 Vincent Torri + + * Check the returned value of eet_init() in the binary. + * Use binary mode of fopen() in eet_main() for Windows compatibility diff --git a/src/bin/eet_main.c b/src/bin/eet_main.c index 43fac6f..0889008 100644 --- a/src/bin/eet_main.c +++ b/src/bin/eet_main.c @@ -90,7 +90,7 @@ do_eet_extract(const char *file, const char *key, const char *out, const char *c ERR("cannot read key %s\n", key); exit(-1); } - f = fopen(out, "w"); + f = fopen(out, "wb"); if (!f) { ERR("cannot open %s\n", out); @@ -124,7 +124,7 @@ do_eet_decode(const char *file, const char *key, const char *out, const char *cr ERR("cannot open for reading: %s\n", file); exit(-1); } - f = fopen(out, "w"); + f = fopen(out, "wb"); if (!f) { ERR("cannot open %s\n", out); @@ -155,7 +155,7 @@ do_eet_insert(const char *file, const char *key, const char *out, int compress, ERR("cannot open for read+write: %s\n", file); exit(-1); } - f = fopen(out, "r"); + f = fopen(out, "rb"); if (!f) { ERR("cannot open %s\n", out); @@ -198,7 +198,7 @@ do_eet_encode(const char *file, const char *key, const char *out, int compress, ERR("cannot open for read+write: %s\n", file); exit(-1); } - f = fopen(out, "r"); + f = fopen(out, "rb"); if (!f) { ERR("cannot open %s\n", out); @@ -300,7 +300,9 @@ do_eet_sign(const char *file, const char *private_key, const char *public_key) int main(int argc, char **argv) { - eet_init(); + if (!eet_init()) + return -1; + _eet_main_log_dom = eina_log_domain_register("Eet_Main",EINA_COLOR_CYAN); if(_eet_main_log_dom < -1) { -- 2.7.4