From bb3efc106bd462402bcc7655413cf27f1fdc531d Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 6 Aug 2003 01:29:12 +0000 Subject: [PATCH] optional output file spec SVN revision: 7293 --- legacy/edje/src/bin/edje_cc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/legacy/edje/src/bin/edje_cc.c b/legacy/edje/src/bin/edje_cc.c index dc7b907204..d804b256d4 100644 --- a/legacy/edje/src/bin/edje_cc.c +++ b/legacy/edje/src/bin/edje_cc.c @@ -13,7 +13,7 @@ main_help(void) { printf ("Usage:\n" - "\t%s [OPTIONS] input_file.edc output_file.eet\n" + "\t%s [OPTIONS] input_file.edc [output_file.eet]\n" "\n" "Where OPTIONS is one or more of:\n" "\n" @@ -57,6 +57,20 @@ main(int argc, char **argv) main_help(); exit(-1); } + if (!file_out) + { + char *suffix; + + if ((suffix = strstr(file_in,".edc")) && (suffix[4] == 0)) + { + file_out = strdup(file_in); + if (file_out) + { + suffix = strstr(file_out,".edc"); + strcpy(suffix,".eet"); + } + } + } if (!file_out) { fprintf(stderr, "%s: Error: no output file specified.\n", progname);