diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-07-05 14:45:12 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-07-05 14:45:12 -0700 |
commit | 0cba10757976294d034ae5d8cd38784555a7ac8b (patch) | |
tree | 9c5f816527d88c2195a83ebad6f5e7b392272559 /nasm.c | |
parent | fe1ca5a09fb3e82535a40aad3c5caa84d72d7d3a (diff) | |
download | nasm-0cba10757976294d034ae5d8cd38784555a7ac8b.tar.gz nasm-0cba10757976294d034ae5d8cd38784555a7ac8b.tar.bz2 nasm-0cba10757976294d034ae5d8cd38784555a7ac8b.zip |
Make it possible for outputs to be either text or binary
Allow the backend to specify that an output format is either text or
binary. For future uses, define this as a flag word so we can define
other flags in the future if it would make sense.
Currently, the ieee and dbg formats are text; all the others are
binary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -456,7 +456,7 @@ int main(int argc, char **argv) */ ofmt->filename(inname, outname, report_error); - ofile = fopen(outname, "wb"); + ofile = fopen(outname, (ofmt->flags & OFMT_TEXT) ? "w" : "wb"); if (!ofile) { report_error(ERR_FATAL | ERR_NOFILE, "unable to open output file `%s'", outname); |