Move attribute lookup into the output functions. Allow a bytesperline

attribute for asm output files.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5589 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-10 14:22:51 +00:00
parent 2d0e71b242
commit c140a15dac
8 changed files with 69 additions and 65 deletions

View File

@@ -38,6 +38,7 @@
#include <string.h>
/* sp65 */
#include "attr.h"
#include "bin.h"
#include "error.h"
@@ -49,11 +50,14 @@
void WriteBinFile (const char* Name, const StrBuf* Data)
void WriteBinFile (const StrBuf* Data, const Collection* A)
/* Write the contents of Data to the given file in binary format */
{
unsigned Size;
/* Get the file name */
const char* Name = NeedAttrVal (A, "name", "write");
/* Open the output file */
FILE* F = fopen (Name, "wb");
if (F == 0) {