svn path=/trunk/yasm/; revision=375
if (!in) {
in = stdin;
switch_filename("<STDIN>");
+ if (!obj)
+ obj = stdout;
}
/* Set x86 as the architecture */
sections = cur_parser->do_parse(cur_parser, in);
- fclose(in);
+ if (in != stdin)
+ fclose(in);
if (OutputAllErrorWarning() > 0) {
sections_delete(sections);
/* Finalize the object output */
cur_objfmt->finalize();
- fclose(obj);
+ if (obj != stdout)
+ fclose(obj);
+
if (obj_filename)
xfree(obj_filename);
if (!in) {
in = stdin;
switch_filename("<STDIN>");
+ if (!obj)
+ obj = stdout;
}
/* Set x86 as the architecture */
sections = cur_parser->do_parse(cur_parser, in);
- fclose(in);
+ if (in != stdin)
+ fclose(in);
if (OutputAllErrorWarning() > 0) {
sections_delete(sections);
/* Finalize the object output */
cur_objfmt->finalize();
- fclose(obj);
+ if (obj != stdout)
+ fclose(obj);
+
if (obj_filename)
xfree(obj_filename);