1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-01 00:57:11 +00:00

Use O65OPT_FILENAME to place the filename of the output file into generated

o65 modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5886 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-10-28 19:31:24 +00:00
parent ff166363f0
commit 0e82853a4a

View File

@ -42,6 +42,7 @@
/* common */
#include "chartype.h"
#include "check.h"
#include "fname.h"
#include "print.h"
#include "version.h"
#include "xmalloc.h"
@ -1337,6 +1338,7 @@ void O65WriteTarget (O65Desc* D, File* F)
char OptBuf [256]; /* Buffer for option strings */
unsigned OptLen;
time_t T;
const char* Name;
/* Place the filename in the control structure */
D->Filename = GetString (F->Name);
@ -1366,7 +1368,9 @@ void O65WriteTarget (O65Desc* D, File* F)
/* Keep the user happy */
Print (stdout, 1, "Opened `%s'...\n", D->Filename);
/* Define some more options: A timestamp and the linker version */
/* Define some more options: A timestamp, the linker version and the
* filename
*/
T = time (0);
strcpy (OptBuf, ctime (&T));
OptLen = strlen (OptBuf);
@ -1377,6 +1381,8 @@ void O65WriteTarget (O65Desc* D, File* F)
O65SetOption (D, O65OPT_TIMESTAMP, OptBuf, OptLen + 1);
sprintf (OptBuf, "ld65 V%s", GetVersionAsString ());
O65SetOption (D, O65OPT_ASM, OptBuf, strlen (OptBuf) + 1);
Name = FindName (D->Filename);
O65SetOption (D, O65OPT_FILENAME, Name, strlen (Name) + 1);
/* Write the header */
O65WriteHeader (D);