Changed most "backticks" (grave accents) into apostrophes.
Quotations that are embraced by tick marks now look better, in most fonts.
This commit is contained in:
@@ -468,7 +468,7 @@ void DbgInfoCheck (void)
|
||||
/* Search for the symbol name */
|
||||
S->Sym = SymFindAny (S->Scope, GetStrBuf (S->AsmName));
|
||||
if (S->Sym == 0) {
|
||||
PError (&S->Pos, "Assembler symbol `%s' not found",
|
||||
PError (&S->Pos, "Assembler symbol '%s' not found",
|
||||
GetString (S->AsmName));
|
||||
} else {
|
||||
/* Set the backlink */
|
||||
|
||||
@@ -133,7 +133,7 @@ void GetEA (EffAddr* A)
|
||||
A->AddrModeSet = AM65_STACK_REL_IND_Y;
|
||||
Consume (IndirectLeave, IndirectExpect);
|
||||
ConsumeComma ();
|
||||
Consume (TOK_Y, "`Y' expected");
|
||||
Consume (TOK_Y, "'Y' expected");
|
||||
} else {
|
||||
Error ("Syntax error");
|
||||
}
|
||||
@@ -152,7 +152,7 @@ void GetEA (EffAddr* A)
|
||||
A->AddrModeSet = AM65_DIR_IND;
|
||||
break;
|
||||
default:
|
||||
Consume (TOK_Y, "`Y' expected");
|
||||
Consume (TOK_Y, "'Y' expected");
|
||||
A->AddrModeSet = AM65_DIR_IND_Y;
|
||||
break;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void GetEA (EffAddr* A)
|
||||
if (CurTok.Tok == TOK_COMMA) {
|
||||
/* [dir],y */
|
||||
NextTok ();
|
||||
Consume (TOK_Y, "`Y' expected");
|
||||
Consume (TOK_Y, "'Y' expected");
|
||||
A->AddrModeSet = AM65_DIR_IND_LONG_Y;
|
||||
} else {
|
||||
/* [dir] */
|
||||
|
||||
@@ -146,7 +146,7 @@ void DoEnum (void)
|
||||
}
|
||||
|
||||
/* End of enum definition */
|
||||
Consume (TOK_ENDENUM, "`.ENDENUM' expected");
|
||||
Consume (TOK_ENDENUM, "'.ENDENUM' expected");
|
||||
|
||||
/* Free the base expression */
|
||||
FreeExpr (BaseExpr);
|
||||
|
||||
@@ -699,7 +699,7 @@ static ExprNode* FuncAddrSize (void)
|
||||
/* Cheap local symbol */
|
||||
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
|
||||
if (Sym == 0) {
|
||||
Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal);
|
||||
Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
|
||||
} else {
|
||||
AddrSize = Sym->AddrSize;
|
||||
}
|
||||
@@ -739,13 +739,13 @@ static ExprNode* FuncAddrSize (void)
|
||||
if (Sym) {
|
||||
AddrSize = Sym->AddrSize;
|
||||
} else {
|
||||
Error ("Unknown symbol or scope: `%m%p%m%p'", &ScopeName, &Name);
|
||||
Error ("Unknown symbol or scope: '%m%p%m%p'", &ScopeName, &Name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (AddrSize == 0) {
|
||||
Warning (1, "Unknown address size: `%m%p%m%p'", &ScopeName, &Name);
|
||||
Warning (1, "Unknown address size: '%m%p%m%p'", &ScopeName, &Name);
|
||||
}
|
||||
|
||||
/* Free the string buffers */
|
||||
@@ -780,7 +780,7 @@ static ExprNode* FuncSizeOf (void)
|
||||
/* Cheap local symbol */
|
||||
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
|
||||
if (Sym == 0) {
|
||||
Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal);
|
||||
Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
|
||||
} else {
|
||||
SizeSym = GetSizeOfSymbol (Sym);
|
||||
}
|
||||
@@ -832,7 +832,7 @@ static ExprNode* FuncSizeOf (void)
|
||||
if (Sym) {
|
||||
SizeSym = GetSizeOfSymbol (Sym);
|
||||
} else {
|
||||
Error ("Unknown symbol or scope: `%m%p%m%p'",
|
||||
Error ("Unknown symbol or scope: '%m%p%m%p'",
|
||||
&ScopeName, &Name);
|
||||
}
|
||||
}
|
||||
@@ -840,7 +840,7 @@ static ExprNode* FuncSizeOf (void)
|
||||
|
||||
/* Check if we have a size */
|
||||
if (SizeSym == 0 || !SymIsConst (SizeSym, &Size)) {
|
||||
Error ("Size of `%m%p%m%p' is unknown", &ScopeName, &Name);
|
||||
Error ("Size of '%m%p%m%p' is unknown", &ScopeName, &Name);
|
||||
Size = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ unsigned GetFileIndex (const StrBuf* Name)
|
||||
|
||||
/* If we don't have this index, print a diagnostic and use the main file */
|
||||
if (F == 0) {
|
||||
Error ("File name `%m%p' not found in file table", Name);
|
||||
Error ("File name '%m%p' not found in file table", Name);
|
||||
return 0;
|
||||
} else {
|
||||
return F->Index;
|
||||
@@ -316,7 +316,7 @@ static void CreateDepFile (const char* Name, FileType Types)
|
||||
/* Open the file */
|
||||
FILE* F = fopen (Name, "w");
|
||||
if (F == 0) {
|
||||
Fatal ("Cannot open dependency file `%s': %s", Name, strerror (errno));
|
||||
Fatal ("Cannot open dependency file '%s': %s", Name, strerror (errno));
|
||||
}
|
||||
|
||||
/* Print the output file followed by a tab char */
|
||||
|
||||
@@ -304,7 +304,7 @@ void CreateListing (void)
|
||||
/* Open the real listing file */
|
||||
F = fopen (SB_GetConstBuf (&ListingName), "w");
|
||||
if (F == 0) {
|
||||
Fatal ("Cannot open listing file `%s': %s",
|
||||
Fatal ("Cannot open listing file '%s': %s",
|
||||
SB_GetConstBuf (&ListingName),
|
||||
strerror (errno));
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ static void MacSkipDef (unsigned Style)
|
||||
if (CurTok.Tok != TOK_EOF) {
|
||||
SkipUntilSep ();
|
||||
} else {
|
||||
Error ("`.ENDMACRO' expected");
|
||||
Error ("'.ENDMACRO' expected");
|
||||
}
|
||||
} else {
|
||||
/* Skip until end of line */
|
||||
@@ -409,7 +409,7 @@ void MacDef (unsigned Style)
|
||||
/* Did we already define that macro? */
|
||||
if (HT_Find (&MacroTab, &CurTok.SVal) != 0) {
|
||||
/* Macro is already defined */
|
||||
Error ("A macro named `%m%p' is already defined", &CurTok.SVal);
|
||||
Error ("A macro named '%m%p' is already defined", &CurTok.SVal);
|
||||
/* Skip tokens until we reach the final .endmacro */
|
||||
MacSkipDef (Style);
|
||||
return;
|
||||
@@ -451,7 +451,7 @@ void MacDef (unsigned Style)
|
||||
IdDesc* List = M->Params;
|
||||
while (1) {
|
||||
if (SB_Compare (&List->Id, &CurTok.SVal) == 0) {
|
||||
Error ("Duplicate symbol `%m%p'", &CurTok.SVal);
|
||||
Error ("Duplicate symbol '%m%p'", &CurTok.SVal);
|
||||
}
|
||||
if (List->Next == 0) {
|
||||
break;
|
||||
@@ -500,7 +500,7 @@ void MacDef (unsigned Style)
|
||||
}
|
||||
/* May not have end of file in a macro definition */
|
||||
if (CurTok.Tok == TOK_EOF) {
|
||||
Error ("`.ENDMACRO' expected");
|
||||
Error ("'.ENDMACRO' expected");
|
||||
goto Done;
|
||||
}
|
||||
} else {
|
||||
@@ -930,7 +930,7 @@ static void StartExpDefine (MacExp* E)
|
||||
if (CurTok.Tok == TOK_COMMA) {
|
||||
NextTok ();
|
||||
} else {
|
||||
Error ("`,' expected");
|
||||
Error ("',' expected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ static void NewSymbol (const char* SymName, long Val)
|
||||
|
||||
/* Check if have already a symbol with this name */
|
||||
if (SymIsDef (Sym)) {
|
||||
AbEnd ("`%s' is already defined", SymName);
|
||||
AbEnd ("'%s' is already defined", SymName);
|
||||
}
|
||||
|
||||
/* Generate an expression for the symbol */
|
||||
@@ -201,7 +201,7 @@ static void SetSys (const char* Sys)
|
||||
break;
|
||||
|
||||
case TGT_MODULE:
|
||||
AbEnd ("Cannot use `module' as a target for the assembler");
|
||||
AbEnd ("Cannot use 'module' as a target for the assembler");
|
||||
break;
|
||||
|
||||
case TGT_ATARI2600:
|
||||
@@ -331,7 +331,7 @@ static void SetSys (const char* Sys)
|
||||
break;
|
||||
|
||||
default:
|
||||
AbEnd ("Invalid target name: `%s'", Sys);
|
||||
AbEnd ("Invalid target name: '%s'", Sys);
|
||||
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ static void FileNameOption (const char* Opt, const char* Arg, StrBuf* Name)
|
||||
{
|
||||
/* Cannot have the option twice */
|
||||
if (SB_NotEmpty (Name)) {
|
||||
AbEnd ("Cannot use option `%s' twice", Opt);
|
||||
AbEnd ("Cannot use option '%s' twice", Opt);
|
||||
}
|
||||
/* Remember the file name for later */
|
||||
SB_CopyStr (Name, Arg);
|
||||
@@ -427,7 +427,7 @@ static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
|
||||
{
|
||||
cpu_t CPU = FindCPU (Arg);
|
||||
if (CPU == CPU_UNKNOWN) {
|
||||
AbEnd ("Invalid CPU: `%s'", Arg);
|
||||
AbEnd ("Invalid CPU: '%s'", Arg);
|
||||
} else {
|
||||
SetCPU (CPU);
|
||||
}
|
||||
@@ -478,7 +478,7 @@ static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
|
||||
|
||||
/* Set the feature, check for errors */
|
||||
if (SetFeature (SB_InitFromString (&Feature, Arg)) == FEAT_UNKNOWN) {
|
||||
AbEnd ("Illegal emulation feature: `%s'", Arg);
|
||||
AbEnd ("Illegal emulation feature: '%s'", Arg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ static void OptListBytes (const char* Opt, const char* Arg)
|
||||
|
||||
/* Check the bounds */
|
||||
if (Num != 0 && (Num < MIN_LIST_BYTES || Num > MAX_LIST_BYTES)) {
|
||||
AbEnd ("Argument for option `%s' is out of range", Opt);
|
||||
AbEnd ("Argument for option '%s' is out of range", Opt);
|
||||
}
|
||||
|
||||
/* Use the value */
|
||||
@@ -549,7 +549,7 @@ static void OptListing (const char* Opt, const char* Arg)
|
||||
** the filename is empty or begins with the option char.
|
||||
*/
|
||||
if (Arg == 0 || *Arg == '\0' || *Arg == '-') {
|
||||
Fatal ("The meaning of `%s' has changed. It does now "
|
||||
Fatal ("The meaning of '%s' has changed. It does now "
|
||||
"expect a file name as argument.", Opt);
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ static void OptMemoryModel (const char* Opt, const char* Arg)
|
||||
|
||||
/* Check the current memory model */
|
||||
if (MemoryModel != MMODEL_UNKNOWN) {
|
||||
AbEnd ("Cannot use option `%s' twice", Opt);
|
||||
AbEnd ("Cannot use option '%s' twice", Opt);
|
||||
}
|
||||
|
||||
/* Translate the memory model name and check it */
|
||||
@@ -762,7 +762,7 @@ static void OneLine (void)
|
||||
*/
|
||||
if (CurTok.Tok != TOK_COLON) {
|
||||
if (HadWS || !NoColonLabels) {
|
||||
Error ("`:' expected");
|
||||
Error ("':' expected");
|
||||
/* Try some smart error recovery */
|
||||
if (CurTok.Tok == TOK_NAMESPACE) {
|
||||
NextTok ();
|
||||
@@ -807,7 +807,7 @@ static void OneLine (void)
|
||||
} else if (PCAssignment && (CurTok.Tok == TOK_STAR || CurTok.Tok == TOK_PC)) {
|
||||
NextTok ();
|
||||
if (CurTok.Tok != TOK_EQ) {
|
||||
Error ("`=' expected");
|
||||
Error ("'=' expected");
|
||||
SkipUntilSep ();
|
||||
} else {
|
||||
/* Skip the equal sign */
|
||||
@@ -1040,7 +1040,7 @@ int main (int argc, char* argv [])
|
||||
} else {
|
||||
/* Filename. Check if we already had one */
|
||||
if (InFile) {
|
||||
fprintf (stderr, "%s: Don't know what to do with `%s'\n",
|
||||
fprintf (stderr, "%s: Don't know what to do with '%s'\n",
|
||||
ProgName, Arg);
|
||||
exit (EXIT_FAILURE);
|
||||
} else {
|
||||
|
||||
@@ -179,7 +179,7 @@ static void FuncConcat (void)
|
||||
** by the string token just created.
|
||||
*/
|
||||
if (CurTok.Tok != TOK_RPAREN) {
|
||||
Error ("`)' expected");
|
||||
Error ("')' expected");
|
||||
} else {
|
||||
CurTok.Tok = TOK_STRCON;
|
||||
SB_Copy (&CurTok.SVal, &Buf);
|
||||
@@ -253,7 +253,7 @@ static void FuncIdent (void)
|
||||
SB_Copy (&Buf, &CurTok.SVal);
|
||||
NextTok ();
|
||||
if (CurTok.Tok != TOK_RPAREN) {
|
||||
Error ("`)' expected");
|
||||
Error ("')' expected");
|
||||
} else {
|
||||
CurTok.Tok = Id;
|
||||
SB_Copy (&CurTok.SVal, &Buf);
|
||||
@@ -600,7 +600,7 @@ static void FuncSPrintF (void)
|
||||
** by the string token just created.
|
||||
*/
|
||||
if (CurTok.Tok != TOK_RPAREN) {
|
||||
Error ("`)' expected");
|
||||
Error ("')' expected");
|
||||
} else {
|
||||
CurTok.Tok = TOK_STRCON;
|
||||
SB_Copy (&CurTok.SVal, &R);
|
||||
@@ -660,7 +660,7 @@ static void FuncString (void)
|
||||
** by the string token just created.
|
||||
*/
|
||||
if (CurTok.Tok != TOK_RPAREN) {
|
||||
Error ("`)' expected");
|
||||
Error ("')' expected");
|
||||
} else {
|
||||
CurTok.Tok = TOK_STRCON;
|
||||
SB_Copy (&CurTok.SVal, &Buf);
|
||||
@@ -754,7 +754,7 @@ void ConsumeSep (void)
|
||||
void ConsumeLParen (void)
|
||||
/* Consume a left paren */
|
||||
{
|
||||
Consume (TOK_LPAREN, "`(' expected");
|
||||
Consume (TOK_LPAREN, "'(' expected");
|
||||
}
|
||||
|
||||
|
||||
@@ -762,7 +762,7 @@ void ConsumeLParen (void)
|
||||
void ConsumeRParen (void)
|
||||
/* Consume a right paren */
|
||||
{
|
||||
Consume (TOK_RPAREN, "`)' expected");
|
||||
Consume (TOK_RPAREN, "')' expected");
|
||||
}
|
||||
|
||||
|
||||
@@ -770,7 +770,7 @@ void ConsumeRParen (void)
|
||||
void ConsumeComma (void)
|
||||
/* Consume a comma */
|
||||
{
|
||||
Consume (TOK_COMMA, "`,' expected");
|
||||
Consume (TOK_COMMA, "',' expected");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ static void ObjWriteError (void)
|
||||
remove (OutFile);
|
||||
|
||||
/* Now abort with a fatal error */
|
||||
Fatal ("Cannot write to output file `%s': %s", OutFile, strerror (Error));
|
||||
Fatal ("Cannot write to output file '%s': %s", OutFile, strerror (Error));
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ void ObjOpen (void)
|
||||
/* Create the output file */
|
||||
F = fopen (OutFile, "w+b");
|
||||
if (F == 0) {
|
||||
Fatal ("Cannot open output file `%s': %s", OutFile, strerror (errno));
|
||||
Fatal ("Cannot open output file '%s': %s", OutFile, strerror (errno));
|
||||
}
|
||||
|
||||
/* Write a dummy header */
|
||||
|
||||
@@ -167,13 +167,13 @@ static void SetBoolOption (unsigned char* Flag)
|
||||
switch (GetSubKey (Keys, sizeof (Keys) / sizeof (Keys [0]))) {
|
||||
case 0: *Flag = 0; NextTok (); break;
|
||||
case 1: *Flag = 1; NextTok (); break;
|
||||
default: ErrorSkip ("`on' or `off' expected"); break;
|
||||
default: ErrorSkip ("'on' or 'off' expected"); break;
|
||||
}
|
||||
} else if (TokIsSep (CurTok.Tok)) {
|
||||
/* Without anything assume switch on */
|
||||
*Flag = 1;
|
||||
} else {
|
||||
ErrorSkip ("`on' or `off' expected");
|
||||
ErrorSkip ("'on' or 'off' expected");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,7 +1017,7 @@ static void DoFeature (void)
|
||||
/* Set the feature and check for errors */
|
||||
if (SetFeature (&CurTok.SVal) == FEAT_UNKNOWN) {
|
||||
/* Not found */
|
||||
ErrorSkip ("Invalid feature: `%m%p'", &CurTok.SVal);
|
||||
ErrorSkip ("Invalid feature: '%m%p'", &CurTok.SVal);
|
||||
return;
|
||||
} else {
|
||||
/* Skip the keyword */
|
||||
@@ -1242,7 +1242,7 @@ static void DoIncBin (void)
|
||||
char* PathName = SearchFile (BinSearchPath, SB_GetConstBuf (&Name));
|
||||
if (PathName == 0 || (F = fopen (PathName, "rb")) == 0) {
|
||||
/* Not found or cannot open, print an error and bail out */
|
||||
ErrorSkip ("Cannot open include file `%m%p': %s", &Name, strerror (errno));
|
||||
ErrorSkip ("Cannot open include file '%m%p': %s", &Name, strerror (errno));
|
||||
xfree (PathName);
|
||||
goto ExitPoint;
|
||||
}
|
||||
@@ -1268,7 +1268,7 @@ static void DoIncBin (void)
|
||||
*/
|
||||
SB_Terminate (&Name);
|
||||
if (FileStat (SB_GetConstBuf (&Name), &StatBuf) != 0) {
|
||||
Fatal ("Cannot stat input file `%m%p': %s", &Name, strerror (errno));
|
||||
Fatal ("Cannot stat input file '%m%p': %s", &Name, strerror (errno));
|
||||
}
|
||||
|
||||
/* Add the file to the input file table */
|
||||
@@ -1305,7 +1305,7 @@ static void DoIncBin (void)
|
||||
size_t BytesRead = fread (Buf, 1, BytesToRead, F);
|
||||
if (BytesToRead != BytesRead) {
|
||||
/* Some sort of error */
|
||||
ErrorSkip ("Cannot read from include file `%m%p': %s",
|
||||
ErrorSkip ("Cannot read from include file '%m%p': %s",
|
||||
&Name, strerror (errno));
|
||||
break;
|
||||
}
|
||||
@@ -1896,7 +1896,7 @@ static void DoUnDef (void)
|
||||
static void DoUnexpected (void)
|
||||
/* Got an unexpected keyword */
|
||||
{
|
||||
Error ("Unexpected `%m%p'", &Keyword);
|
||||
Error ("Unexpected '%m%p'", &Keyword);
|
||||
SkipUntilSep ();
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,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
|
||||
@@ -510,7 +510,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;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,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 */
|
||||
@@ -1054,7 +1054,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ static Segment* NewSegment (const char* Name, unsigned char AddrSize)
|
||||
|
||||
/* Check the segment name for invalid names */
|
||||
if (!ValidSegName (Name)) {
|
||||
Error ("Illegal segment name: `%s'", Name);
|
||||
Error ("Illegal segment name: '%s'", Name);
|
||||
}
|
||||
|
||||
/* Create a new segment and return it */
|
||||
|
||||
@@ -261,9 +261,9 @@ static long DoStructInternal (long Offs, unsigned Type)
|
||||
|
||||
/* End of struct/union definition */
|
||||
if (Type == STRUCT) {
|
||||
Consume (TOK_ENDSTRUCT, "`.ENDSTRUCT' expected");
|
||||
Consume (TOK_ENDSTRUCT, "'.ENDSTRUCT' expected");
|
||||
} else {
|
||||
Consume (TOK_ENDUNION, "`.ENDUNION' expected");
|
||||
Consume (TOK_ENDUNION, "'.ENDUNION' expected");
|
||||
}
|
||||
|
||||
/* Return the size of the struct */
|
||||
|
||||
@@ -524,7 +524,7 @@ static void StudySymbol (ExprNode* Expr, ExprDesc* D)
|
||||
|
||||
if (SymHasUserMark (Sym)) {
|
||||
LIError (&Sym->DefLines,
|
||||
"Circular reference in definition of symbol `%m%p'",
|
||||
"Circular reference in definition of symbol '%m%p'",
|
||||
GetSymName (Sym));
|
||||
ED_SetError (D);
|
||||
} else {
|
||||
|
||||
@@ -95,7 +95,7 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
|
||||
if (Scope == 0) {
|
||||
/* Scope not found */
|
||||
SB_Terminate (FullName);
|
||||
Error ("No such scope: `%m%p'", FullName);
|
||||
Error ("No such scope: '%m%p'", FullName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
|
||||
Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING);
|
||||
if (Scope == 0) {
|
||||
/* Scope not found */
|
||||
Error ("No such scope: `%m%p'", FullName);
|
||||
Error ("No such scope: '%m%p'", FullName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,24 +213,24 @@ void SymDef (SymEntry* S, ExprNode* Expr, unsigned char AddrSize, unsigned Flags
|
||||
{
|
||||
if (S->Flags & SF_IMPORT) {
|
||||
/* Defined symbol is marked as imported external symbol */
|
||||
Error ("Symbol `%m%p' is already an import", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already an import", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
if ((Flags & SF_VAR) != 0 && (S->Flags & (SF_EXPORT | SF_GLOBAL))) {
|
||||
/* Variable symbols cannot be exports or globals */
|
||||
Error ("Var symbol `%m%p' cannot be an export or global symbol", GetSymName (S));
|
||||
Error ("Var symbol '%m%p' cannot be an export or global symbol", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
if (S->Flags & SF_DEFINED) {
|
||||
/* Multiple definition. In case of a variable, this is legal. */
|
||||
if ((S->Flags & SF_VAR) == 0) {
|
||||
Error ("Symbol `%m%p' is already defined", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already defined", GetSymName (S));
|
||||
S->Flags |= SF_MULTDEF;
|
||||
return;
|
||||
} else {
|
||||
/* Redefinition must also be a variable symbol */
|
||||
if ((Flags & SF_VAR) == 0) {
|
||||
Error ("Symbol `%m%p' is already different kind", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already different kind", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
/* Delete the current symbol expression, since it will get
|
||||
@@ -285,7 +285,7 @@ void SymDef (SymEntry* S, ExprNode* Expr, unsigned char AddrSize, unsigned Flags
|
||||
S->ExportSize = S->AddrSize;
|
||||
} else if (S->AddrSize > S->ExportSize) {
|
||||
/* We're exporting a symbol smaller than it actually is */
|
||||
Warning (1, "Symbol `%m%p' is %s but exported %s",
|
||||
Warning (1, "Symbol '%m%p' is %s but exported %s",
|
||||
GetSymName (S), AddrSizeToStr (S->AddrSize),
|
||||
AddrSizeToStr (S->ExportSize));
|
||||
}
|
||||
@@ -315,13 +315,13 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
/* Mark the given symbol as an imported symbol */
|
||||
{
|
||||
if (S->Flags & SF_DEFINED) {
|
||||
Error ("Symbol `%m%p' is already defined", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already defined", GetSymName (S));
|
||||
S->Flags |= SF_MULTDEF;
|
||||
return;
|
||||
}
|
||||
if (S->Flags & SF_EXPORT) {
|
||||
/* The symbol is already marked as exported symbol */
|
||||
Error ("Cannot import exported symbol `%m%p'", GetSymName (S));
|
||||
Error ("Cannot import exported symbol '%m%p'", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -337,16 +337,16 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
*/
|
||||
if (S->Flags & SF_IMPORT) {
|
||||
if ((Flags & SF_FORCED) != (S->Flags & SF_FORCED)) {
|
||||
Error ("Redeclaration mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Redeclaration mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
if (AddrSize != S->AddrSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
if (S->Flags & SF_GLOBAL) {
|
||||
S->Flags &= ~SF_GLOBAL;
|
||||
if (AddrSize != S->AddrSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,12 +369,12 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
/* Check if it's ok to export the symbol */
|
||||
if (S->Flags & SF_IMPORT) {
|
||||
/* The symbol is already marked as imported external symbol */
|
||||
Error ("Symbol `%m%p' is already an import", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already an import", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
if (S->Flags & SF_VAR) {
|
||||
/* Variable symbols cannot be exported */
|
||||
Error ("Var symbol `%m%p' cannot be exported", GetSymName (S));
|
||||
Error ("Var symbol '%m%p' cannot be exported", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
*/
|
||||
if (S->Flags & SF_GLOBAL) {
|
||||
if (AddrSize != S->ExportSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
S->Flags &= ~SF_GLOBAL;
|
||||
|
||||
@@ -398,7 +398,7 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
*/
|
||||
if ((S->Flags & (SF_EXPORT|SF_DEFINED)) == SF_EXPORT) {
|
||||
if (S->ExportSize != AddrSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
S->ExportSize = AddrSize;
|
||||
@@ -412,7 +412,7 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
S->ExportSize = S->AddrSize;
|
||||
} else if (S->AddrSize > S->ExportSize) {
|
||||
/* We're exporting a symbol smaller than it actually is */
|
||||
Warning (1, "Symbol `%m%p' is %s but exported %s",
|
||||
Warning (1, "Symbol '%m%p' is %s but exported %s",
|
||||
GetSymName (S), AddrSizeToStr (S->AddrSize),
|
||||
AddrSizeToStr (S->ExportSize));
|
||||
}
|
||||
@@ -434,7 +434,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
{
|
||||
if (S->Flags & SF_VAR) {
|
||||
/* Variable symbols cannot be exported or imported */
|
||||
Error ("Var symbol `%m%p' cannot be made global", GetSymName (S));
|
||||
Error ("Var symbol '%m%p' cannot be made global", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
AddrSize = GetCurrentSegAddrSize ();
|
||||
}
|
||||
if (AddrSize != S->AddrSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -459,12 +459,12 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
if ((S->Flags & SF_DEFINED) == 0) {
|
||||
/* Symbol is undefined */
|
||||
if (AddrSize != S->ExportSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
} else if (AddrSize != ADDR_SIZE_DEFAULT) {
|
||||
/* Symbol is defined and address size given */
|
||||
if (AddrSize != S->ExportSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -476,7 +476,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
*/
|
||||
if (S->Flags & SF_GLOBAL) {
|
||||
if (AddrSize != S->ExportSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -494,7 +494,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
|
||||
S->ExportSize = S->AddrSize;
|
||||
} else if (S->AddrSize > S->ExportSize) {
|
||||
/* We're exporting a symbol smaller than it actually is */
|
||||
Warning (1, "Symbol `%m%p' is %s but exported %s",
|
||||
Warning (1, "Symbol '%m%p' is %s but exported %s",
|
||||
GetSymName (S), AddrSizeToStr (S->AddrSize),
|
||||
AddrSizeToStr (S->ExportSize));
|
||||
}
|
||||
@@ -537,12 +537,12 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri
|
||||
/* Check for errors */
|
||||
if (S->Flags & SF_IMPORT) {
|
||||
/* The symbol is already marked as imported external symbol */
|
||||
Error ("Symbol `%m%p' is already an import", GetSymName (S));
|
||||
Error ("Symbol '%m%p' is already an import", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
if (S->Flags & SF_VAR) {
|
||||
/* Variable symbols cannot be exported or imported */
|
||||
Error ("Var symbol `%m%p' cannot be exported", GetSymName (S));
|
||||
Error ("Var symbol '%m%p' cannot be exported", GetSymName (S));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri
|
||||
*/
|
||||
if (S->Flags & (SF_EXPORT | SF_GLOBAL)) {
|
||||
if (S->ExportSize != AddrSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
S->Flags &= ~SF_GLOBAL;
|
||||
}
|
||||
@@ -566,7 +566,7 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri
|
||||
/* Use the real size of the symbol */
|
||||
S->ExportSize = S->AddrSize;
|
||||
} else if (S->AddrSize != S->ExportSize) {
|
||||
Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri
|
||||
*/
|
||||
if (S->ConDesPrio[Type] != CD_PRIO_NONE) {
|
||||
if (S->ConDesPrio[Type] != Prio) {
|
||||
Error ("Redeclaration mismatch for symbol `%m%p'", GetSymName (S));
|
||||
Error ("Redeclaration mismatch for symbol '%m%p'", GetSymName (S));
|
||||
}
|
||||
}
|
||||
S->ConDesPrio[Type] = Prio;
|
||||
|
||||
@@ -178,7 +178,7 @@ static SymTable* NewSymTable (SymTable* Parent, const StrBuf* Name)
|
||||
}
|
||||
} else {
|
||||
/* Duplicate scope name */
|
||||
Internal ("Duplicate scope name: `%m%p'", Name);
|
||||
Internal ("Duplicate scope name: '%m%p'", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void SymEnterLevel (const StrBuf* ScopeName, unsigned char Type,
|
||||
|
||||
/* Check if the scope has been defined before */
|
||||
if (CurrentScope->Flags & ST_DEFINED) {
|
||||
Error ("Duplicate scope `%m%p'", ScopeName);
|
||||
Error ("Duplicate scope '%m%p'", ScopeName);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -502,7 +502,7 @@ static void SymCheckUndefined (SymEntry* S)
|
||||
if (Sym->Flags & SF_IMPORT) {
|
||||
/* The symbol is already marked as import */
|
||||
LIError (&S->RefLines,
|
||||
"Symbol `%s' is already an import",
|
||||
"Symbol '%s' is already an import",
|
||||
GetString (Sym->Name));
|
||||
}
|
||||
if ((Sym->Flags & SF_EXPORT) == 0) {
|
||||
@@ -516,7 +516,7 @@ static void SymCheckUndefined (SymEntry* S)
|
||||
if (Sym->AddrSize > Sym->ExportSize) {
|
||||
/* We're exporting a symbol smaller than it actually is */
|
||||
LIWarning (&Sym->DefLines, 1,
|
||||
"Symbol `%m%p' is %s but exported %s",
|
||||
"Symbol '%m%p' is %s but exported %s",
|
||||
GetSymName (Sym),
|
||||
AddrSizeToStr (Sym->AddrSize),
|
||||
AddrSizeToStr (Sym->ExportSize));
|
||||
@@ -541,7 +541,7 @@ static void SymCheckUndefined (SymEntry* S)
|
||||
if (S->Flags & SF_EXPORT) {
|
||||
/* We will not auto-import an export */
|
||||
LIError (&S->RefLines,
|
||||
"Exported symbol `%m%p' was never defined",
|
||||
"Exported symbol '%m%p' was never defined",
|
||||
GetSymName (S));
|
||||
} else {
|
||||
if (AutoImport) {
|
||||
@@ -554,7 +554,7 @@ static void SymCheckUndefined (SymEntry* S)
|
||||
} else {
|
||||
/* Error */
|
||||
LIError (&S->RefLines,
|
||||
"Symbol `%m%p' is undefined",
|
||||
"Symbol '%m%p' is undefined",
|
||||
GetSymName (S));
|
||||
}
|
||||
}
|
||||
@@ -616,7 +616,7 @@ void SymCheck (void)
|
||||
ReleaseFullLineInfo (&S->RefLines);
|
||||
} else if ((S->Flags & SF_DEFINED) != 0 && (S->Flags & SF_REFERENCED) == 0) {
|
||||
LIWarning (&S->DefLines, 2,
|
||||
"Symbol `%m%p' is defined but never used",
|
||||
"Symbol '%m%p' is defined but never used",
|
||||
GetSymName (S));
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ void SymCheck (void)
|
||||
if ((S->Flags & (SF_REFERENCED | SF_FORCED)) == SF_NONE) {
|
||||
/* Imported symbol is not referenced */
|
||||
LIWarning (&S->DefLines, 2,
|
||||
"Symbol `%m%p' is imported but never used",
|
||||
"Symbol '%m%p' is imported but never used",
|
||||
GetSymName (S));
|
||||
} else {
|
||||
/* Give the import an id, count imports */
|
||||
@@ -653,7 +653,7 @@ void SymCheck (void)
|
||||
} else if (S->AddrSize > S->ExportSize) {
|
||||
/* We're exporting a symbol smaller than it actually is */
|
||||
LIWarning (&S->DefLines, 1,
|
||||
"Symbol `%m%p' is %s but exported %s",
|
||||
"Symbol '%m%p' is %s but exported %s",
|
||||
GetSymName (S),
|
||||
AddrSizeToStr (S->AddrSize),
|
||||
AddrSizeToStr (S->ExportSize));
|
||||
@@ -673,7 +673,7 @@ void SymCheck (void)
|
||||
const FilePos* P = S->GuessedUse[S->AddrSize - 1];
|
||||
if (P) {
|
||||
PWarning (P, 0,
|
||||
"Didn't use %s addressing for `%m%p'",
|
||||
"Didn't use %s addressing for '%m%p'",
|
||||
AddrSizeToStr (S->AddrSize),
|
||||
GetSymName (S));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user