mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
New option --add-source
git-svn-id: svn://svn.cc65.org/cc65/trunk@79 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
6d33db1291
commit
409d12534b
@ -56,7 +56,7 @@ unsigned char RegVarsToCallStack= 0; /* Save reg variables on call stack
|
||||
unsigned char LocalsAreStatic = 0; /* Make local variables static */
|
||||
unsigned char SignedChars = 0; /* Make characters signed by default */
|
||||
unsigned char Verbose = 0; /* Verbose flag */
|
||||
unsigned char IncSource = 0; /* Include source as comments */
|
||||
unsigned char AddSource = 0; /* Add source lines as comments */
|
||||
unsigned char DebugInfo = 0; /* Add debug info to the obj */
|
||||
unsigned char Debug = 0; /* Debug mode */
|
||||
|
||||
|
@ -73,7 +73,7 @@ extern unsigned char RegVarsToCallStack; /* Save reg variables on call stack */
|
||||
extern unsigned char LocalsAreStatic; /* Make local variables static */
|
||||
extern unsigned char SignedChars; /* Make characters signed by default */
|
||||
extern unsigned char Verbose; /* Verbose flag */
|
||||
extern unsigned char IncSource; /* Include source as comments */
|
||||
extern unsigned char AddSource; /* Add source lines as comments */
|
||||
extern unsigned char DebugInfo; /* Add debug info to the obj */
|
||||
extern unsigned char Debug; /* Debug mode */
|
||||
|
||||
|
@ -162,7 +162,7 @@ int NextLine (void)
|
||||
/* Output the source line in the generated assembler file
|
||||
* if requested.
|
||||
*/
|
||||
if (IncSource && line[Start] != '\0') {
|
||||
if (AddSource && line[Start] != '\0') {
|
||||
AddCodeLine ("; %s", line+Start);
|
||||
}
|
||||
|
||||
|
@ -260,6 +260,14 @@ static void DefineSym (const char* Def)
|
||||
|
||||
|
||||
|
||||
static void OptAddSource (const char* Opt, const char* Arg)
|
||||
/* Add source lines as comments in generated assembler file */
|
||||
{
|
||||
AddSource = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void OptAnsi (const char* Opt, const char* Arg)
|
||||
/* Compile in strict ANSI mode */
|
||||
{
|
||||
@ -355,6 +363,7 @@ int main (int argc, char* argv[])
|
||||
{
|
||||
/* Program long options */
|
||||
static const LongOpt OptTab[] = {
|
||||
{ "--add-source", 0, OptAddSource },
|
||||
{ "--ansi", 0, OptAnsi },
|
||||
{ "--cpu", 1, OptCPU },
|
||||
{ "--debug-info", 0, OptDebugInfo },
|
||||
@ -468,7 +477,7 @@ int main (int argc, char* argv[])
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
IncSource = 1;
|
||||
OptAddSource (Arg, 0);
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
|
Loading…
Reference in New Issue
Block a user