oops arg order... fix.

SVN revision: 12862
This commit is contained in:
Carsten Haitzler 2005-01-10 06:15:00 +00:00
parent 45bc169845
commit c7c6f53e78
1 changed files with 6 additions and 3 deletions

View File

@ -609,7 +609,8 @@ compile(void)
static char tmpn[4096];
strcpy(tmpn, "/tmp/edje_cc.edc-tmp-XXXXXX");
strncpy(inc, file_in, 4000); inc[4001] = 0;
strncpy(inc, file_in, 4000);
inc[4001] = 0;
p = strrchr(inc, '/');
if (!p) strcpy(inc, "./");
else *p = 0;
@ -642,11 +643,13 @@ compile(void)
strcat(def, " ");
}
}
snprintf(buf, sizeof(buf), "cat %s | /usr/bin/cpp -I%s %s -E -o %s", inc, file_in, def, tmpn);
snprintf(buf, sizeof(buf), "cat %s | /usr/bin/cpp -I%s %s -E -o %s",
file_in, inc, def, tmpn);
ret = system(buf);
if (ret < 0)
{
snprintf(buf, sizeof(buf), "/usr/bin/gcc -I%s %s -E -o %s %s", inc, def, tmpn, file_in);
snprintf(buf, sizeof(buf), "/usr/bin/gcc -I%s %s -E -o %s %s",
inc, def, tmpn, file_in);
ret = system(buf);
}
if (ret >= 0) file_in = tmpn;