Followed the discussions in the Pull request #682.
* Fixed a misspelling * Fixed styles * Added sample codes
This commit is contained in:
@@ -59,6 +59,7 @@ unsigned char PassCount = 2; /* How many passed do we do? */
|
||||
signed char NewlineAfterJMP = -1; /* Add a newline after a JMP insn? */
|
||||
signed char NewlineAfterRTS = -1; /* Add a newline after a RTS insn? */
|
||||
long StartAddr = -1L; /* Start/load address of the program */
|
||||
unsigned char SyncLines = 0; /* Accept line markers in the info file */
|
||||
long InputOffs = -1L; /* Offset into input file */
|
||||
long InputSize = -1L; /* Number of bytes to read from input */
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ extern unsigned char PassCount; /* How many passed do we do? */
|
||||
extern signed char NewlineAfterJMP;/* Add a newline after a JMP insn? */
|
||||
extern signed char NewlineAfterRTS;/* Add a newline after a RTS insn? */
|
||||
extern long StartAddr; /* Start/load address of the program */
|
||||
extern unsigned char SyncLines; /* Accept line markers in the info file */
|
||||
extern long InputOffs; /* Offset into input file */
|
||||
extern long InputSize; /* Number of bytes to read from input */
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ static void OptSyncLines (const char* Opt attribute ((unused)),
|
||||
const char* Arg attribute ((unused)))
|
||||
/* Handle the --sync-lines option */
|
||||
{
|
||||
InfoSyncLines = 1;
|
||||
SyncLines = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,8 +76,6 @@ static unsigned InputCol = 0;
|
||||
static FILE* InputFile = 0;
|
||||
static char* InputSrcName = 0;
|
||||
|
||||
/* Options */
|
||||
unsigned char InfoSyncLines = 0;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -119,6 +117,7 @@ void InfoError (const char* Format, ...)
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
@@ -164,7 +163,7 @@ static void SkipBlanks (int SingleLine)
|
||||
}
|
||||
}
|
||||
|
||||
static long GetDecimalToken ()
|
||||
static long GetDecimalToken (void)
|
||||
{
|
||||
long Value = 0;
|
||||
|
||||
@@ -226,15 +225,15 @@ Store:
|
||||
|
||||
static void LineMarkerOrComment ()
|
||||
/* Handle a line beginning with '#'. Possible interpretations are:
|
||||
* - #line <lineno> ["<filename>"] (C preprocessor input)
|
||||
* - # <lineno> "<filename>" [<flag>]... (gcc preprocessor output)
|
||||
* - #<comment>
|
||||
*/
|
||||
** - #line <lineno> ["<filename>"] (C preprocessor input)
|
||||
** - # <lineno> "<filename>" [<flag>]... (gcc preprocessor output)
|
||||
** - #<comment>
|
||||
*/
|
||||
{
|
||||
unsigned long LineNo = 0;
|
||||
int LineDirective = 0;
|
||||
StrBuf SrcNameBuf = AUTO_STRBUF_INITIALIZER;
|
||||
|
||||
|
||||
/* Skip the first "# " */
|
||||
NextChar ();
|
||||
SkipBlanks (1);
|
||||
@@ -440,7 +439,7 @@ Again:
|
||||
|
||||
case '#':
|
||||
/* # lineno "sourcefile" or # comment */
|
||||
if (InfoSyncLines && InputCol == 1) {
|
||||
if (SyncLines && InputCol == 1) {
|
||||
LineMarkerOrComment ();
|
||||
} else {
|
||||
do {
|
||||
|
||||
@@ -138,8 +138,6 @@ extern long InfoIVal;
|
||||
extern unsigned InfoErrorLine;
|
||||
extern unsigned InfoErrorCol;
|
||||
|
||||
/* Options */
|
||||
extern unsigned char InfoSyncLines;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user