diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2009-10-02 04:06:58 +0000 |
---|---|---|
committer | Vincent Torri <vincent.torri@gmail.com> | 2009-10-02 04:06:58 +0000 |
commit | 8d21e3a783b17a8054ca1e966e50cb2f1151ea1d (patch) | |
tree | 0f02f9698bb08ca3e02998e647e25c1523bfb6b6 /src/bin/eet_main.c | |
parent | a5289f839f8c07a58e9e2cc5fd2fe4fc0f8eb2b7 (diff) | |
download | eet-8d21e3a783b17a8054ca1e966e50cb2f1151ea1d.tar.gz |
* Check the returned value of eet_init() in the binary.
* Use binary mode of fopen() in eet_main() for Windows compatibility
SVN revision: 42851
Diffstat (limited to 'src/bin/eet_main.c')
-rw-r--r-- | src/bin/eet_main.c | 12 |
1 files changed, 7 insertions, 5 deletions
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) { |