Merge branch 'master' into macexpand

This commit is contained in:
Bob Andrews
2025-07-10 21:05:20 +02:00
committed by GitHub
226 changed files with 2848 additions and 2119 deletions

View File

@@ -52,6 +52,7 @@
/* ca65 */
#include "condasm.h"
#include "error.h"
#include "expect.h"
#include "filetab.h"
#include "global.h"
#include "incpath.h"
@@ -556,7 +557,7 @@ int NewInputFile (const char* Name)
/* Main file */
F = fopen (Name, "r");
if (F == 0) {
Fatal ("Cannot open input file '%s': %s", Name, strerror (errno));
Fatal ("Cannot open input file `%s': %s", Name, strerror (errno));
}
} else {
/* We are on include level. Search for the file in the include
@@ -565,7 +566,7 @@ int NewInputFile (const char* Name)
PathName = SearchFile (IncSearchPath, Name);
if (PathName == 0 || (F = fopen (PathName, "r")) == 0) {
/* Not found or cannot open, print an error and bail out */
Error ("Cannot open include file '%s': %s", Name, strerror (errno));
Error ("Cannot open include file `%s': %s", Name, strerror (errno));
goto ExitPoint;
}
@@ -582,7 +583,7 @@ int NewInputFile (const char* Name)
** here.
*/
if (FileStat (Name, &Buf) != 0) {
Fatal ("Cannot stat input file '%s': %s", Name, strerror (errno));
Fatal ("Cannot stat input file `%s': %s", Name, strerror (errno));
}
/* Add the file to the input file table and remember the index */
@@ -829,7 +830,7 @@ static void ReadStringConst (int StringTerm)
int Cooked = 1;
NeedNext = 1;
if (StringTerm == 0 && SB_GetLen(&CurTok.SVal) == 1) {
if (StringTerm == 0 && SB_GetLen (&CurTok.SVal) == 1) {
if (C == '\'') {
break;
}
@@ -912,12 +913,12 @@ static void ReadStringConst (int StringTerm)
case '7':
{ /* brace needed for scoping */
int Count = 1;
int Final = DigitVal(C);
int Final = DigitVal (C);
Cooked = 0;
NextChar ();
while (IsODigit (C) && Count++ < 3) {
Final = (Final << 3) | DigitVal(C);
NextChar();
Final = (Final << 3) | DigitVal (C);
NextChar ();
}
if (C >= 256)
Error ("Octal character constant out of range");
@@ -1207,7 +1208,7 @@ Again:
/* Not found */
if (!LeadingDotInIdents) {
/* Invalid pseudo instruction */
Error ("'%m%p' is not a recognized control command", &CurTok.SVal);
Error ("`%m%p' is not a recognized control command", &CurTok.SVal);
goto Again;
}
@@ -1598,8 +1599,8 @@ CharAgain:
/* Always a character constant
** Hack: Pass 0 to ReadStringConst for special handling.
*/
ReadStringConst(0);
if (SB_GetLen(&CurTok.SVal) != 1) {
ReadStringConst (0);
if (SB_GetLen (&CurTok.SVal) != 1) {
Error ("Illegal character constant");
goto CharAgain;
}
@@ -1697,14 +1698,14 @@ unsigned char ParseAddrSize (void)
/* Check for an identifier */
if (CurTok.Tok != TOK_IDENT) {
Error ("Address size specifier expected");
ErrorExpect ("Expected an address size specifier");
return ADDR_SIZE_DEFAULT;
}
/* Convert the attribute */
AddrSize = AddrSizeFromStr (SB_GetConstBuf (&CurTok.SVal));
if (AddrSize == ADDR_SIZE_INVALID) {
Error ("Address size specifier expected");
ErrorExpect ("Expected an address size specifier");
AddrSize = ADDR_SIZE_DEFAULT;
}