svn path=/trunk/yasm/; revision=427
}
/* if no files were specified, fallback to reading stdin */
- if (!in) {
+ if (!in || !in_filename) {
in = stdin;
+ if (in_filename)
+ xfree(in_filename);
in_filename = xstrdup("<STDIN>");
if (!obj)
obj = stdout;
{
if (in) {
WarningNow("can open only one input file, only latest file will be processed");
- if(fclose(in))
+ if (fclose(in))
ErrorNow("could not close old input file");
- if (in_filename)
- xfree(in_filename);
}
in = fopen(param, "rt");
ErrorNow(_("could not open file `%s'"), param);
return 1;
}
+ if (in_filename)
+ xfree(in_filename);
in_filename = xstrdup(param);
files_open++;
}
/* if no files were specified, fallback to reading stdin */
- if (!in) {
+ if (!in || !in_filename) {
in = stdin;
+ if (in_filename)
+ xfree(in_filename);
in_filename = xstrdup("<STDIN>");
if (!obj)
obj = stdout;
{
if (in) {
WarningNow("can open only one input file, only latest file will be processed");
- if(fclose(in))
+ if (fclose(in))
ErrorNow("could not close old input file");
- if (in_filename)
- xfree(in_filename);
}
in = fopen(param, "rt");
ErrorNow(_("could not open file `%s'"), param);
return 1;
}
+ if (in_filename)
+ xfree(in_filename);
in_filename = xstrdup(param);
files_open++;