1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

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:
Greg King 2019-01-05 14:57:12 -05:00
parent 5ac11b5e88
commit a6b04f6e97
109 changed files with 501 additions and 501 deletions

View File

@ -46,7 +46,7 @@ clean:
$(RM) -r ../html ../info $(RM) -r ../html ../info
install: install:
$(if $(PREFIX),,$(error variable `PREFIX' must be set)) $(if $(PREFIX),,$(error variable "PREFIX" must be set))
ifeq ($(wildcard ../html),../html) ifeq ($(wildcard ../html),../html)
$(INSTALL) -d $(DESTDIR)$(htmldir) $(INSTALL) -d $(DESTDIR)$(htmldir)
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir) $(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)

View File

@ -40,7 +40,7 @@ The archiver is called as follows:
V Print the archiver version V Print the archiver version
</verb></tscreen> </verb></tscreen>
You may add modules to a library using the `r' command (`a' is deprecated). If the library You may add modules to a library using the <tt/'r'/ command ('a' is deprecated). If the library
does not exist, it is created (and a warning message is printed which you does not exist, it is created (and a warning message is printed which you
may ignore if creation of the library was your intention). You may may ignore if creation of the library was your intention). You may
specify any number of modules on the command line following the library. specify any number of modules on the command line following the library.
@ -55,7 +55,7 @@ Here's an example:
ar65 r mysubs.lib sub1.o sub2.o ar65 r mysubs.lib sub1.o sub2.o
</verb></tscreen> </verb></tscreen>
This will add two modules to the library `mysubs.lib' creating the This will add two modules to the library 'mysubs.lib' creating the
library if necessary. If the library contains modules named sub1.o or library if necessary. If the library contains modules named sub1.o or
sub2.o, they are replaced by the new ones. sub2.o, they are replaced by the new ones.
@ -65,9 +65,9 @@ Modules names in the library are stored without the path, so, using
ar65 v v r mysubs.lib ofiles/sub1.o ofiles/sub2.o ar65 v v r mysubs.lib ofiles/sub1.o ofiles/sub2.o
</verb></tscreen> </verb></tscreen>
will verbose add two modules named `sub1.o' and `sub2.o' to the library. will verbose add two modules named 'sub1.o' and 'sub2.o' to the library.
Deleting modules from a library is done with the `d' command. You may not Deleting modules from a library is done with the <tt/'d'/ command. You may not
give a path when naming the modules. give a path when naming the modules.
Example: Example:
@ -76,11 +76,11 @@ Example:
ar65 d mysubs.lib sub1.o ar65 d mysubs.lib sub1.o
</verb></tscreen> </verb></tscreen>
This will delete the module named `sub1.o' from the library, printing an This will delete the module named 'sub1.o' from the library, printing an
error if the library does not contain that module. error if the library does not contain that module.
The `t' command prints a table of all modules in the library (`l' is deprecated). The <tt/'t'/ command prints a table of all modules in the library ('l' is deprecated).
Any module names on the command line are ignored. Any module names on the command line are ignored.
Example: Example:
@ -90,7 +90,7 @@ Example:
</verb></tscreen> </verb></tscreen>
Using the `x' command, you may extract modules from the library. The Using the <tt/'x'/ command, you may extract modules from the library. The
modules named on the command line are extracted from the library and put modules named on the command line are extracted from the library and put
into the current directory. into the current directory.
@ -107,7 +107,7 @@ Example for extracting a module from the library:
</verb></tscreen> </verb></tscreen>
The `V' command prints the version number of the assembler. If you send The <tt/'V'/ command prints the version number of the assembler. If you send
any suggestions or bugfixes, please include your version number. any suggestions or bugfixes, please include your version number.
In addition to these operations, the archiver will check for, and warn In addition to these operations, the archiver will check for, and warn

View File

@ -1082,7 +1082,7 @@ If you are using a customized linker config file you might get some errors
regarding the MAINHDR segment. Like this: regarding the MAINHDR segment. Like this:
<tscreen><verb> <tscreen><verb>
ld65: Error: Missing memory area assignment for segment `MAINHDR' ld65: Error: Missing memory area assignment for segment 'MAINHDR'
</verb></tscreen> </verb></tscreen>
The old "HEADER" memory description contained six bytes: &dollar;FFFF The old "HEADER" memory description contained six bytes: &dollar;FFFF

View File

@ -2730,7 +2730,7 @@ Here's a list of all control commands and a description, what they do:
<tag><tt>at_in_identifiers</tt><label id="at_in_identifiers"></tag> <tag><tt>at_in_identifiers</tt><label id="at_in_identifiers"></tag>
Accept the at character (`@') as a valid character in identifiers. The Accept the at character ('@') as a valid character in identifiers. The
at character is not allowed to start an identifier, even with this at character is not allowed to start an identifier, even with this
feature enabled. feature enabled.
@ -2765,13 +2765,13 @@ Here's a list of all control commands and a description, what they do:
<tag><tt>dollar_in_identifiers</tt><label id="dollar_in_identifiers"></tag> <tag><tt>dollar_in_identifiers</tt><label id="dollar_in_identifiers"></tag>
Accept the dollar sign (`&dollar;') as a valid character in identifiers. The Accept the dollar sign ('&dollar;') as a valid character in identifiers. The
dollar character is not allowed to start an identifier, even with this dollar character is not allowed to start an identifier, even with this
feature enabled. feature enabled.
<tag><tt>dollar_is_pc</tt><label id="dollar_is_pc"></tag> <tag><tt>dollar_is_pc</tt><label id="dollar_is_pc"></tag>
The dollar sign may be used as an alias for the star (`*'), which The dollar sign may be used as an alias for the star ('*'), which
gives the value of the current PC in expressions. gives the value of the current PC in expressions.
Note: Assignment to the pseudo variable is not allowed. Note: Assignment to the pseudo variable is not allowed.
@ -2789,7 +2789,7 @@ Here's a list of all control commands and a description, what they do:
<tag><tt>leading_dot_in_identifiers</tt><label id="leading_dot_in_identifiers"></tag> <tag><tt>leading_dot_in_identifiers</tt><label id="leading_dot_in_identifiers"></tag>
Accept the dot (`.') as the first character of an identifier. This may be Accept the dot ('.') as the first character of an identifier. This may be
used for example to create macro names that start with a dot emulating used for example to create macro names that start with a dot emulating
control directives of other assemblers. Note however, that none of the control directives of other assemblers. Note however, that none of the
reserved keywords built into the assembler, that starts with a dot, may be reserved keywords built into the assembler, that starts with a dot, may be
@ -2825,7 +2825,7 @@ Here's a list of all control commands and a description, what they do:
<tag><tt>pc_assignment</tt><label id="pc_assignment"></tag> <tag><tt>pc_assignment</tt><label id="pc_assignment"></tag>
Allow assignments to the PC symbol (`*' or `&dollar;' if <tt/dollar_is_pc/ Allow assignments to the PC symbol ('*' or '&dollar;' if <tt/dollar_is_pc/
is enabled). Such an assignment is handled identical to the <tt><ref is enabled). Such an assignment is handled identical to the <tt><ref
id=".ORG" name=".ORG"></tt> command (which is usually not needed, so just id=".ORG" name=".ORG"></tt> command (which is usually not needed, so just
removing the lines with the assignments may also be an option when porting removing the lines with the assignments may also be an option when porting
@ -3799,7 +3799,7 @@ Here's a list of all control commands and a description, what they do:
page and direct (short) addressing is possible for data in this segment. page and direct (short) addressing is possible for data in this segment.
Beware: Only labels in a segment with the zeropage attribute are marked Beware: Only labels in a segment with the zeropage attribute are marked
as reachable by short addressing. The `*' (PC counter) operator will as reachable by short addressing. The '*' (PC counter) operator will
work as in other segments and will create absolute variable values. work as in other segments and will create absolute variable values.
Please note that a segment cannot have two different address sizes. A Please note that a segment cannot have two different address sizes. A

View File

@ -44,7 +44,7 @@ Short options:
-o name Name the output file -o name Name the output file
-r Enable register variables -r Enable register variables
-t sys Set the target system -t sys Set the target system
-u sym Force an import of symbol `sym' -u sym Force an import of symbol 'sym'
-v Verbose mode -v Verbose mode
-vm Verbose map file -vm Verbose map file
-C name Use linker config file -C name Use linker config file
@ -90,7 +90,7 @@ Long options:
--debug Debug mode --debug Debug mode
--debug-info Add debug info --debug-info Add debug info
--feature name Set an emulation feature --feature name Set an emulation feature
--force-import sym Force an import of symbol `sym' --force-import sym Force an import of symbol 'sym'
--help Help (this text) --help Help (this text)
--include-dir dir Set a compiler include directory path --include-dir dir Set a compiler include directory path
--ld-args options Pass options to the linker --ld-args options Pass options to the linker

View File

@ -1561,7 +1561,7 @@ char text = "foo";
DB_VARSTR (TXT_LN_X, TXT_LN_1_Y, &amp;r15), DB_VARSTR (TXT_LN_X, TXT_LN_1_Y, &amp;r15),
... ...
</verb></tscreen> </verb></tscreen>
will cause the word ``foo'' to appear in the window, but you may store the pointer to any text in will cause the word ''foo'' to appear in the window, but you may store the pointer to any text in
<tt/r15/ (in this case) before the call to DoDlgBox. <tt/r15/ (in this case) before the call to DoDlgBox.
<p> <p>
<tt/DB_GETSTR(x, y, ptr, length)/ - will add a input-from-keyboard feature. <tt/ptr/ works as in the <tt/DB_GETSTR(x, y, ptr, length)/ - will add a input-from-keyboard feature. <tt/ptr/ works as in the

View File

@ -66,7 +66,7 @@ Short options:
-m name Create a map file -m name Create a map file
-o name Name the default output file -o name Name the default output file
-t sys Set the target system -t sys Set the target system
-u sym Force an import of symbol `sym' -u sym Force an import of symbol 'sym'
-v Verbose mode -v Verbose mode
-vm Verbose map file -vm Verbose map file
@ -76,7 +76,7 @@ Long options:
--dbgfile name Generate debug information --dbgfile name Generate debug information
--define sym=val Define a symbol --define sym=val Define a symbol
--end-group End a library group --end-group End a library group
--force-import sym Force an import of symbol `sym' --force-import sym Force an import of symbol 'sym'
--help Help (this text) --help Help (this text)
--lib file Link this library --lib file Link this library
--lib-path path Specify a library search path --lib-path path Specify a library search path
@ -487,7 +487,7 @@ There are of course more attributes for a memory section than just start and
size. Start and size are mandatory attributes, that means, each memory area size. Start and size are mandatory attributes, that means, each memory area
defined <em/must/ have these attributes given (the linker will check that). I defined <em/must/ have these attributes given (the linker will check that). I
will cover other attributes later. As you may have noticed, I've used a will cover other attributes later. As you may have noticed, I've used a
comment in the example above. Comments start with a hash mark (`#'), the comment in the example above. Comments start with a hash mark ('#'), the
remainder of the line is ignored if this character is found. remainder of the line is ignored if this character is found.
@ -572,7 +572,7 @@ default behaviour is OK for our purposes, I did not use the attribute in the
example above. Let's have a look at it now. example above. Let's have a look at it now.
The "file" attribute (the keyword may also be written as "FILE" if you like The "file" attribute (the keyword may also be written as "FILE" if you like
that better) takes a string enclosed in double quotes (`&dquot;') that specifies the that better) takes a string enclosed in double quotes ('&dquot;') that specifies the
file, where the data is written. You may specify the same file several times, file, where the data is written. You may specify the same file several times,
in that case the data for all memory areas having this file name is written in that case the data for all memory areas having this file name is written
into this file, in the order of the memory areas defined in the <tt/MEMORY/ into this file, in the order of the memory areas defined in the <tt/MEMORY/

View File

@ -89,7 +89,7 @@ Example output for the command
sim65 --verbose --verbose samples/gunzip65 sim65 --verbose --verbose samples/gunzip65
</verb></tscreen> </verb></tscreen>
<tscreen><verb> <tscreen><verb>
Loaded `samples/gunzip65' at $0200-$151F Loaded 'samples/gunzip65' at $0200-$151F
PVWrite ($0001, $13C9, $000F) PVWrite ($0001, $13C9, $000F)
GZIP file name:PVWrite ($0001, $151F, $0001) GZIP file name:PVWrite ($0001, $151F, $0001)

View File

@ -93,7 +93,7 @@ INSTALL = install
define INSTALL_recipe define INSTALL_recipe
$(if $(PREFIX),,$(error variable `PREFIX' must be set)) $(if $(PREFIX),,$(error variable "PREFIX" must be set))
$(INSTALL) -d $(DESTDIR)$(datadir)/$(dir) $(INSTALL) -d $(DESTDIR)$(datadir)/$(dir)
$(INSTALL) -m0644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir) $(INSTALL) -m0644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)

View File

@ -1062,7 +1062,7 @@ SndSetValues:
ldx #4-1 ldx #4-1
set0: ldy SndOffsets,x set0: ldy SndOffsets,x
lda SndChannel+2,y lda SndChannel+2,y
_IFNE ; flag == 0 => don`t set _IFNE ; flag == 0 => don't set
bit #$80 bit #$80
_IFNE ; _IFNE ;

View File

@ -296,7 +296,7 @@ INSTALL = install
samplesdir = $(PREFIX)/share/cc65/samples samplesdir = $(PREFIX)/share/cc65/samples
install: install:
$(if $(PREFIX),,$(error variable `PREFIX' must be set)) $(if $(PREFIX),,$(error variable "PREFIX" must be set))
$(INSTALL) -d $(DESTDIR)$(samplesdir) $(INSTALL) -d $(DESTDIR)$(samplesdir)
$(INSTALL) -d $(DESTDIR)$(samplesdir)/geos $(INSTALL) -d $(DESTDIR)$(samplesdir)/geos
$(INSTALL) -d $(DESTDIR)$(samplesdir)/tutorial $(INSTALL) -d $(DESTDIR)$(samplesdir)/tutorial

View File

@ -107,7 +107,7 @@ $(RM) /usr/local/bin/$(prog)
endef # UNAVAIL_recipe endef # UNAVAIL_recipe
install: install:
$(if $(PREFIX),,$(error variable `PREFIX' must be set)) $(if $(PREFIX),,$(error variable "PREFIX" must be set))
$(INSTALL) -d $(DESTDIR)$(bindir) $(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) ../bin/* $(DESTDIR)$(bindir) $(INSTALL) ../bin/* $(DESTDIR)$(bindir)

View File

@ -113,8 +113,8 @@ void ExpInsert (const char* Name, const ObjData* Module)
while (1) { while (1) {
if (strcmp (L->Name, Name) == 0) { if (strcmp (L->Name, Name) == 0) {
/* Duplicate entry */ /* Duplicate entry */
Warning ("External symbol `%s' in module `%s', library `%s', " Warning ("External symbol '%s' in module '%s', library '%s', "
"is duplicated in module `%s'", "is duplicated in module '%s'",
Name, L->Module->Name, LibName, Module->Name); Name, L->Module->Name, LibName, Module->Name);
} }
if (L->Next == 0) { if (L->Next == 0) {

View File

@ -95,11 +95,11 @@ static void ReadHeader (void)
/* Read the header fields, checking magic and version */ /* Read the header fields, checking magic and version */
Header.Magic = Read32 (Lib); Header.Magic = Read32 (Lib);
if (Header.Magic != LIB_MAGIC) { if (Header.Magic != LIB_MAGIC) {
Error ("`%s' is not a valid library file", LibName); Error ("'%s' is not a valid library file", LibName);
} }
Header.Version = Read16 (Lib); Header.Version = Read16 (Lib);
if (Header.Version != LIB_VERSION) { if (Header.Version != LIB_VERSION) {
Error ("Wrong data version in `%s'", LibName); Error ("Wrong data version in '%s'", LibName);
} }
Header.Flags = Read16 (Lib); Header.Flags = Read16 (Lib);
Header.IndexOffs = Read32 (Lib); Header.IndexOffs = Read32 (Lib);
@ -229,11 +229,11 @@ void LibOpen (const char* Name, int MustExist, int NeedTemp)
/* File does not exist */ /* File does not exist */
if (MustExist) { if (MustExist) {
Error ("Library `%s' does not exist", Name); Error ("Library '%s' does not exist", Name);
} else { } else {
/* Announce the library's creation if ar65 is verbose. */ /* Announce the library's creation if ar65 is verbose. */
Print (stdout, 1, Print (stdout, 1,
"%s: Library `%s' will be created.\n", ProgName, Name); "%s: Library '%s' will be created.\n", ProgName, Name);
} }
} else { } else {
@ -317,7 +317,7 @@ static void LibCheckExports (ObjData* O)
unsigned I; unsigned I;
/* Let the user know what we do */ /* Let the user know what we do */
Print (stdout, 2, "Module `%s' (%u exports):\n", O->Name, CollCount (&O->Exports)); Print (stdout, 2, "Module '%s' (%u exports):\n", O->Name, CollCount (&O->Exports));
/* Insert the exports into the global table */ /* Insert the exports into the global table */
for (I = 0; I < CollCount (&O->Exports); ++I) { for (I = 0; I < CollCount (&O->Exports); ++I) {
@ -381,7 +381,7 @@ void LibClose (void)
/* Reopen the library and truncate it */ /* Reopen the library and truncate it */
Lib = fopen (LibName, "wb"); Lib = fopen (LibName, "wb");
if (Lib == 0) { if (Lib == 0) {
Error ("Cannot open library `%s' for writing: %s", Error ("Cannot open library '%s' for writing: %s",
LibName, strerror (errno)); LibName, strerror (errno));
} }
@ -389,14 +389,14 @@ void LibClose (void)
fseek (NewLib, 0, SEEK_SET); fseek (NewLib, 0, SEEK_SET);
while ((Count = fread (Buf, 1, sizeof (Buf), NewLib)) != 0) { while ((Count = fread (Buf, 1, sizeof (Buf), NewLib)) != 0) {
if (fwrite (Buf, 1, Count, Lib) != Count) { if (fwrite (Buf, 1, Count, Lib) != Count) {
Error ("Cannot write to `%s': %s", LibName, strerror (errno)); Error ("Cannot write to '%s': %s", LibName, strerror (errno));
} }
} }
} }
/* Close both files */ /* Close both files */
if (Lib && fclose (Lib) != 0) { if (Lib && fclose (Lib) != 0) {
Error ("Problem closing `%s': %s", LibName, strerror (errno)); Error ("Problem closing '%s': %s", LibName, strerror (errno));
} }
if (NewLib && fclose (NewLib) != 0) { if (NewLib && fclose (NewLib) != 0) {
Error ("Problem closing temporary library file: %s", strerror (errno)); Error ("Problem closing temporary library file: %s", strerror (errno));

View File

@ -165,5 +165,5 @@ void DelObjData (const char* Module)
} }
/* Not found! */ /* Not found! */
Warning ("Module `%s' not found in library `%s'", Module, LibName); Warning ("Module '%s' not found in library '%s'", Module, LibName);
} }

View File

@ -68,7 +68,7 @@ static const char* GetModule (const char* Name)
/* Must not end with a path separator */ /* Must not end with a path separator */
if (*Module == 0) { if (*Module == 0) {
Error ("Cannot make module name from `%s'", Name); Error ("Cannot make module name from '%s'", Name);
} }
/* Done */ /* Done */
@ -82,11 +82,11 @@ static void ObjReadHeader (FILE* Obj, ObjHeader* H, const char* Name)
{ {
H->Magic = Read32 (Obj); H->Magic = Read32 (Obj);
if (H->Magic != OBJ_MAGIC) { if (H->Magic != OBJ_MAGIC) {
Error ("`%s' is not an object file", Name); Error ("'%s' is not an object file", Name);
} }
H->Version = Read16 (Obj); H->Version = Read16 (Obj);
if (H->Version != OBJ_VERSION) { if (H->Version != OBJ_VERSION) {
Error ("Object file `%s' has wrong version", Name); Error ("Object file '%s' has wrong version", Name);
} }
H->Flags = Read16 (Obj); H->Flags = Read16 (Obj);
H->OptionOffs = Read32 (Obj); H->OptionOffs = Read32 (Obj);
@ -236,7 +236,7 @@ void ObjAdd (const char* Name)
/* Open the object file */ /* Open the object file */
FILE* Obj = fopen (Name, "rb"); FILE* Obj = fopen (Name, "rb");
if (Obj == 0) { if (Obj == 0) {
Error ("Could not open `%s': %s", Name, strerror (errno)); Error ("Could not open '%s': %s", Name, strerror (errno));
} }
/* Get the modification time of the object file. There's a race condition /* Get the modification time of the object file. There's a race condition
@ -248,7 +248,7 @@ void ObjAdd (const char* Name)
** here. ** here.
*/ */
if (FileStat (Name, &StatBuf) != 0) { if (FileStat (Name, &StatBuf) != 0) {
Error ("Cannot stat object file `%s': %s", Name, strerror (errno)); Error ("Cannot stat object file '%s': %s", Name, strerror (errno));
} }
/* Read and check the header */ /* Read and check the header */
@ -267,7 +267,7 @@ void ObjAdd (const char* Name)
** and the external one. ** and the external one.
*/ */
if (difftime ((time_t)O->MTime, StatBuf.st_mtime) > 0.0) { if (difftime ((time_t)O->MTime, StatBuf.st_mtime) > 0.0) {
Warning ("Replacing module `%s' by older version in library `%s'", Warning ("Replacing module '%s' by older version in library '%s'",
O->Name, LibName); O->Name, LibName);
} }
@ -313,13 +313,13 @@ void ObjExtract (const char* Name)
/* Bail out if the module does not exist */ /* Bail out if the module does not exist */
if (O == 0) { if (O == 0) {
Error ("Module `%s' not found in library `%s'", Module, LibName); Error ("Module '%s' not found in library '%s'", Module, LibName);
} }
/* Open the output file */ /* Open the output file */
Obj = fopen (Name, "w+b"); Obj = fopen (Name, "w+b");
if (Obj == 0) { if (Obj == 0) {
Error ("Cannot open target file `%s': %s", Name, strerror (errno)); Error ("Cannot open target file '%s': %s", Name, strerror (errno));
} }
/* Copy the complete object file data from the library to the new object /* Copy the complete object file data from the library to the new object
@ -329,11 +329,11 @@ void ObjExtract (const char* Name)
/* Close the file */ /* Close the file */
if (fclose (Obj) != 0) { if (fclose (Obj) != 0) {
Error ("Problem closing object file `%s': %s", Name, strerror (errno)); Error ("Problem closing object file '%s': %s", Name, strerror (errno));
} }
/* Set access and modification time */ /* Set access and modification time */
if (SetFileTimes (Name, O->MTime) != 0) { if (SetFileTimes (Name, O->MTime) != 0) {
Error ("Cannot set mod time on `%s': %s", Name, strerror (errno)); Error ("Cannot set mod time on '%s': %s", Name, strerror (errno));
} }
} }

View File

@ -468,7 +468,7 @@ void DbgInfoCheck (void)
/* Search for the symbol name */ /* Search for the symbol name */
S->Sym = SymFindAny (S->Scope, GetStrBuf (S->AsmName)); S->Sym = SymFindAny (S->Scope, GetStrBuf (S->AsmName));
if (S->Sym == 0) { if (S->Sym == 0) {
PError (&S->Pos, "Assembler symbol `%s' not found", PError (&S->Pos, "Assembler symbol '%s' not found",
GetString (S->AsmName)); GetString (S->AsmName));
} else { } else {
/* Set the backlink */ /* Set the backlink */

View File

@ -133,7 +133,7 @@ void GetEA (EffAddr* A)
A->AddrModeSet = AM65_STACK_REL_IND_Y; A->AddrModeSet = AM65_STACK_REL_IND_Y;
Consume (IndirectLeave, IndirectExpect); Consume (IndirectLeave, IndirectExpect);
ConsumeComma (); ConsumeComma ();
Consume (TOK_Y, "`Y' expected"); Consume (TOK_Y, "'Y' expected");
} else { } else {
Error ("Syntax error"); Error ("Syntax error");
} }
@ -152,7 +152,7 @@ void GetEA (EffAddr* A)
A->AddrModeSet = AM65_DIR_IND; A->AddrModeSet = AM65_DIR_IND;
break; break;
default: default:
Consume (TOK_Y, "`Y' expected"); Consume (TOK_Y, "'Y' expected");
A->AddrModeSet = AM65_DIR_IND_Y; A->AddrModeSet = AM65_DIR_IND_Y;
break; break;
} }
@ -173,7 +173,7 @@ void GetEA (EffAddr* A)
if (CurTok.Tok == TOK_COMMA) { if (CurTok.Tok == TOK_COMMA) {
/* [dir],y */ /* [dir],y */
NextTok (); NextTok ();
Consume (TOK_Y, "`Y' expected"); Consume (TOK_Y, "'Y' expected");
A->AddrModeSet = AM65_DIR_IND_LONG_Y; A->AddrModeSet = AM65_DIR_IND_LONG_Y;
} else { } else {
/* [dir] */ /* [dir] */

View File

@ -146,7 +146,7 @@ void DoEnum (void)
} }
/* End of enum definition */ /* End of enum definition */
Consume (TOK_ENDENUM, "`.ENDENUM' expected"); Consume (TOK_ENDENUM, "'.ENDENUM' expected");
/* Free the base expression */ /* Free the base expression */
FreeExpr (BaseExpr); FreeExpr (BaseExpr);

View File

@ -699,7 +699,7 @@ static ExprNode* FuncAddrSize (void)
/* Cheap local symbol */ /* Cheap local symbol */
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING); Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
if (Sym == 0) { if (Sym == 0) {
Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal); Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
} else { } else {
AddrSize = Sym->AddrSize; AddrSize = Sym->AddrSize;
} }
@ -739,13 +739,13 @@ static ExprNode* FuncAddrSize (void)
if (Sym) { if (Sym) {
AddrSize = Sym->AddrSize; AddrSize = Sym->AddrSize;
} else { } 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) { 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 */ /* Free the string buffers */
@ -780,7 +780,7 @@ static ExprNode* FuncSizeOf (void)
/* Cheap local symbol */ /* Cheap local symbol */
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING); Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
if (Sym == 0) { if (Sym == 0) {
Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal); Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
} else { } else {
SizeSym = GetSizeOfSymbol (Sym); SizeSym = GetSizeOfSymbol (Sym);
} }
@ -832,7 +832,7 @@ static ExprNode* FuncSizeOf (void)
if (Sym) { if (Sym) {
SizeSym = GetSizeOfSymbol (Sym); SizeSym = GetSizeOfSymbol (Sym);
} else { } else {
Error ("Unknown symbol or scope: `%m%p%m%p'", Error ("Unknown symbol or scope: '%m%p%m%p'",
&ScopeName, &Name); &ScopeName, &Name);
} }
} }
@ -840,7 +840,7 @@ static ExprNode* FuncSizeOf (void)
/* Check if we have a size */ /* Check if we have a size */
if (SizeSym == 0 || !SymIsConst (SizeSym, &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; Size = 0;
} }

View File

@ -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 we don't have this index, print a diagnostic and use the main file */
if (F == 0) { 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; return 0;
} else { } else {
return F->Index; return F->Index;
@ -316,7 +316,7 @@ static void CreateDepFile (const char* Name, FileType Types)
/* Open the file */ /* Open the file */
FILE* F = fopen (Name, "w"); FILE* F = fopen (Name, "w");
if (F == 0) { 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 */ /* Print the output file followed by a tab char */

View File

@ -304,7 +304,7 @@ void CreateListing (void)
/* Open the real listing file */ /* Open the real listing file */
F = fopen (SB_GetConstBuf (&ListingName), "w"); F = fopen (SB_GetConstBuf (&ListingName), "w");
if (F == 0) { if (F == 0) {
Fatal ("Cannot open listing file `%s': %s", Fatal ("Cannot open listing file '%s': %s",
SB_GetConstBuf (&ListingName), SB_GetConstBuf (&ListingName),
strerror (errno)); strerror (errno));
} }

View File

@ -375,7 +375,7 @@ static void MacSkipDef (unsigned Style)
if (CurTok.Tok != TOK_EOF) { if (CurTok.Tok != TOK_EOF) {
SkipUntilSep (); SkipUntilSep ();
} else { } else {
Error ("`.ENDMACRO' expected"); Error ("'.ENDMACRO' expected");
} }
} else { } else {
/* Skip until end of line */ /* Skip until end of line */
@ -409,7 +409,7 @@ void MacDef (unsigned Style)
/* Did we already define that macro? */ /* Did we already define that macro? */
if (HT_Find (&MacroTab, &CurTok.SVal) != 0) { if (HT_Find (&MacroTab, &CurTok.SVal) != 0) {
/* Macro is already defined */ /* 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 */ /* Skip tokens until we reach the final .endmacro */
MacSkipDef (Style); MacSkipDef (Style);
return; return;
@ -451,7 +451,7 @@ void MacDef (unsigned Style)
IdDesc* List = M->Params; IdDesc* List = M->Params;
while (1) { while (1) {
if (SB_Compare (&List->Id, &CurTok.SVal) == 0) { 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) { if (List->Next == 0) {
break; break;
@ -500,7 +500,7 @@ void MacDef (unsigned Style)
} }
/* May not have end of file in a macro definition */ /* May not have end of file in a macro definition */
if (CurTok.Tok == TOK_EOF) { if (CurTok.Tok == TOK_EOF) {
Error ("`.ENDMACRO' expected"); Error ("'.ENDMACRO' expected");
goto Done; goto Done;
} }
} else { } else {
@ -930,7 +930,7 @@ static void StartExpDefine (MacExp* E)
if (CurTok.Tok == TOK_COMMA) { if (CurTok.Tok == TOK_COMMA) {
NextTok (); NextTok ();
} else { } else {
Error ("`,' expected"); Error ("',' expected");
} }
} }
} }

View File

@ -168,7 +168,7 @@ static void NewSymbol (const char* SymName, long Val)
/* Check if have already a symbol with this name */ /* Check if have already a symbol with this name */
if (SymIsDef (Sym)) { if (SymIsDef (Sym)) {
AbEnd ("`%s' is already defined", SymName); AbEnd ("'%s' is already defined", SymName);
} }
/* Generate an expression for the symbol */ /* Generate an expression for the symbol */
@ -201,7 +201,7 @@ static void SetSys (const char* Sys)
break; break;
case TGT_MODULE: case TGT_MODULE:
AbEnd ("Cannot use `module' as a target for the assembler"); AbEnd ("Cannot use 'module' as a target for the assembler");
break; break;
case TGT_ATARI2600: case TGT_ATARI2600:
@ -331,7 +331,7 @@ static void SetSys (const char* Sys)
break; break;
default: 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 */ /* Cannot have the option twice */
if (SB_NotEmpty (Name)) { if (SB_NotEmpty (Name)) {
AbEnd ("Cannot use option `%s' twice", Opt); AbEnd ("Cannot use option '%s' twice", Opt);
} }
/* Remember the file name for later */ /* Remember the file name for later */
SB_CopyStr (Name, Arg); SB_CopyStr (Name, Arg);
@ -427,7 +427,7 @@ static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
{ {
cpu_t CPU = FindCPU (Arg); cpu_t CPU = FindCPU (Arg);
if (CPU == CPU_UNKNOWN) { if (CPU == CPU_UNKNOWN) {
AbEnd ("Invalid CPU: `%s'", Arg); AbEnd ("Invalid CPU: '%s'", Arg);
} else { } else {
SetCPU (CPU); SetCPU (CPU);
} }
@ -478,7 +478,7 @@ static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
/* Set the feature, check for errors */ /* Set the feature, check for errors */
if (SetFeature (SB_InitFromString (&Feature, Arg)) == FEAT_UNKNOWN) { 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 */ /* Check the bounds */
if (Num != 0 && (Num < MIN_LIST_BYTES || Num > MAX_LIST_BYTES)) { 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 */ /* 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. ** the filename is empty or begins with the option char.
*/ */
if (Arg == 0 || *Arg == '\0' || *Arg == '-') { 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); "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 */ /* Check the current memory model */
if (MemoryModel != MMODEL_UNKNOWN) { 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 */ /* Translate the memory model name and check it */
@ -762,7 +762,7 @@ static void OneLine (void)
*/ */
if (CurTok.Tok != TOK_COLON) { if (CurTok.Tok != TOK_COLON) {
if (HadWS || !NoColonLabels) { if (HadWS || !NoColonLabels) {
Error ("`:' expected"); Error ("':' expected");
/* Try some smart error recovery */ /* Try some smart error recovery */
if (CurTok.Tok == TOK_NAMESPACE) { if (CurTok.Tok == TOK_NAMESPACE) {
NextTok (); NextTok ();
@ -807,7 +807,7 @@ static void OneLine (void)
} else if (PCAssignment && (CurTok.Tok == TOK_STAR || CurTok.Tok == TOK_PC)) { } else if (PCAssignment && (CurTok.Tok == TOK_STAR || CurTok.Tok == TOK_PC)) {
NextTok (); NextTok ();
if (CurTok.Tok != TOK_EQ) { if (CurTok.Tok != TOK_EQ) {
Error ("`=' expected"); Error ("'=' expected");
SkipUntilSep (); SkipUntilSep ();
} else { } else {
/* Skip the equal sign */ /* Skip the equal sign */
@ -1040,7 +1040,7 @@ int main (int argc, char* argv [])
} else { } else {
/* Filename. Check if we already had one */ /* Filename. Check if we already had one */
if (InFile) { 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); ProgName, Arg);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} else { } else {

View File

@ -179,7 +179,7 @@ static void FuncConcat (void)
** by the string token just created. ** by the string token just created.
*/ */
if (CurTok.Tok != TOK_RPAREN) { if (CurTok.Tok != TOK_RPAREN) {
Error ("`)' expected"); Error ("')' expected");
} else { } else {
CurTok.Tok = TOK_STRCON; CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &Buf); SB_Copy (&CurTok.SVal, &Buf);
@ -253,7 +253,7 @@ static void FuncIdent (void)
SB_Copy (&Buf, &CurTok.SVal); SB_Copy (&Buf, &CurTok.SVal);
NextTok (); NextTok ();
if (CurTok.Tok != TOK_RPAREN) { if (CurTok.Tok != TOK_RPAREN) {
Error ("`)' expected"); Error ("')' expected");
} else { } else {
CurTok.Tok = Id; CurTok.Tok = Id;
SB_Copy (&CurTok.SVal, &Buf); SB_Copy (&CurTok.SVal, &Buf);
@ -600,7 +600,7 @@ static void FuncSPrintF (void)
** by the string token just created. ** by the string token just created.
*/ */
if (CurTok.Tok != TOK_RPAREN) { if (CurTok.Tok != TOK_RPAREN) {
Error ("`)' expected"); Error ("')' expected");
} else { } else {
CurTok.Tok = TOK_STRCON; CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &R); SB_Copy (&CurTok.SVal, &R);
@ -660,7 +660,7 @@ static void FuncString (void)
** by the string token just created. ** by the string token just created.
*/ */
if (CurTok.Tok != TOK_RPAREN) { if (CurTok.Tok != TOK_RPAREN) {
Error ("`)' expected"); Error ("')' expected");
} else { } else {
CurTok.Tok = TOK_STRCON; CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &Buf); SB_Copy (&CurTok.SVal, &Buf);
@ -754,7 +754,7 @@ void ConsumeSep (void)
void ConsumeLParen (void) void ConsumeLParen (void)
/* Consume a left paren */ /* Consume a left paren */
{ {
Consume (TOK_LPAREN, "`(' expected"); Consume (TOK_LPAREN, "'(' expected");
} }
@ -762,7 +762,7 @@ void ConsumeLParen (void)
void ConsumeRParen (void) void ConsumeRParen (void)
/* Consume a right paren */ /* Consume a right paren */
{ {
Consume (TOK_RPAREN, "`)' expected"); Consume (TOK_RPAREN, "')' expected");
} }
@ -770,7 +770,7 @@ void ConsumeRParen (void)
void ConsumeComma (void) void ConsumeComma (void)
/* Consume a comma */ /* Consume a comma */
{ {
Consume (TOK_COMMA, "`,' expected"); Consume (TOK_COMMA, "',' expected");
} }

View File

@ -113,7 +113,7 @@ static void ObjWriteError (void)
remove (OutFile); remove (OutFile);
/* Now abort with a fatal error */ /* 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 */ /* Create the output file */
F = fopen (OutFile, "w+b"); F = fopen (OutFile, "w+b");
if (F == 0) { 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 */ /* Write a dummy header */

View File

@ -167,13 +167,13 @@ static void SetBoolOption (unsigned char* Flag)
switch (GetSubKey (Keys, sizeof (Keys) / sizeof (Keys [0]))) { switch (GetSubKey (Keys, sizeof (Keys) / sizeof (Keys [0]))) {
case 0: *Flag = 0; NextTok (); break; case 0: *Flag = 0; NextTok (); break;
case 1: *Flag = 1; 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)) { } else if (TokIsSep (CurTok.Tok)) {
/* Without anything assume switch on */ /* Without anything assume switch on */
*Flag = 1; *Flag = 1;
} else { } 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 */ /* Set the feature and check for errors */
if (SetFeature (&CurTok.SVal) == FEAT_UNKNOWN) { if (SetFeature (&CurTok.SVal) == FEAT_UNKNOWN) {
/* Not found */ /* Not found */
ErrorSkip ("Invalid feature: `%m%p'", &CurTok.SVal); ErrorSkip ("Invalid feature: '%m%p'", &CurTok.SVal);
return; return;
} else { } else {
/* Skip the keyword */ /* Skip the keyword */
@ -1242,7 +1242,7 @@ static void DoIncBin (void)
char* PathName = SearchFile (BinSearchPath, SB_GetConstBuf (&Name)); char* PathName = SearchFile (BinSearchPath, SB_GetConstBuf (&Name));
if (PathName == 0 || (F = fopen (PathName, "rb")) == 0) { if (PathName == 0 || (F = fopen (PathName, "rb")) == 0) {
/* Not found or cannot open, print an error and bail out */ /* 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); xfree (PathName);
goto ExitPoint; goto ExitPoint;
} }
@ -1268,7 +1268,7 @@ static void DoIncBin (void)
*/ */
SB_Terminate (&Name); SB_Terminate (&Name);
if (FileStat (SB_GetConstBuf (&Name), &StatBuf) != 0) { 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 */ /* Add the file to the input file table */
@ -1305,7 +1305,7 @@ static void DoIncBin (void)
size_t BytesRead = fread (Buf, 1, BytesToRead, F); size_t BytesRead = fread (Buf, 1, BytesToRead, F);
if (BytesToRead != BytesRead) { if (BytesToRead != BytesRead) {
/* Some sort of error */ /* 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)); &Name, strerror (errno));
break; break;
} }
@ -1896,7 +1896,7 @@ static void DoUnDef (void)
static void DoUnexpected (void) static void DoUnexpected (void)
/* Got an unexpected keyword */ /* Got an unexpected keyword */
{ {
Error ("Unexpected `%m%p'", &Keyword); Error ("Unexpected '%m%p'", &Keyword);
SkipUntilSep (); SkipUntilSep ();
} }

View File

@ -501,7 +501,7 @@ int NewInputFile (const char* Name)
/* Main file */ /* Main file */
F = fopen (Name, "r"); F = fopen (Name, "r");
if (F == 0) { if (F == 0) {
Fatal ("Cannot open input file `%s': %s", Name, strerror (errno)); Fatal ("Cannot open input file '%s': %s", Name, strerror (errno));
} }
} else { } else {
/* We are on include level. Search for the file in the include /* 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); PathName = SearchFile (IncSearchPath, Name);
if (PathName == 0 || (F = fopen (PathName, "r")) == 0) { if (PathName == 0 || (F = fopen (PathName, "r")) == 0) {
/* Not found or cannot open, print an error and bail out */ /* 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; goto ExitPoint;
} }
@ -527,7 +527,7 @@ int NewInputFile (const char* Name)
** here. ** here.
*/ */
if (FileStat (Name, &Buf) != 0) { 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 */ /* Add the file to the input file table and remember the index */
@ -1054,7 +1054,7 @@ Again:
/* Not found */ /* Not found */
if (!LeadingDotInIdents) { if (!LeadingDotInIdents) {
/* Invalid pseudo instruction */ /* 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; goto Again;
} }

View File

@ -134,7 +134,7 @@ static Segment* NewSegment (const char* Name, unsigned char AddrSize)
/* Check the segment name for invalid names */ /* Check the segment name for invalid names */
if (!ValidSegName (Name)) { if (!ValidSegName (Name)) {
Error ("Illegal segment name: `%s'", Name); Error ("Illegal segment name: '%s'", Name);
} }
/* Create a new segment and return it */ /* Create a new segment and return it */

View File

@ -261,9 +261,9 @@ static long DoStructInternal (long Offs, unsigned Type)
/* End of struct/union definition */ /* End of struct/union definition */
if (Type == STRUCT) { if (Type == STRUCT) {
Consume (TOK_ENDSTRUCT, "`.ENDSTRUCT' expected"); Consume (TOK_ENDSTRUCT, "'.ENDSTRUCT' expected");
} else { } else {
Consume (TOK_ENDUNION, "`.ENDUNION' expected"); Consume (TOK_ENDUNION, "'.ENDUNION' expected");
} }
/* Return the size of the struct */ /* Return the size of the struct */

View File

@ -524,7 +524,7 @@ static void StudySymbol (ExprNode* Expr, ExprDesc* D)
if (SymHasUserMark (Sym)) { if (SymHasUserMark (Sym)) {
LIError (&Sym->DefLines, LIError (&Sym->DefLines,
"Circular reference in definition of symbol `%m%p'", "Circular reference in definition of symbol '%m%p'",
GetSymName (Sym)); GetSymName (Sym));
ED_SetError (D); ED_SetError (D);
} else { } else {

View File

@ -95,7 +95,7 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
if (Scope == 0) { if (Scope == 0) {
/* Scope not found */ /* Scope not found */
SB_Terminate (FullName); SB_Terminate (FullName);
Error ("No such scope: `%m%p'", FullName); Error ("No such scope: '%m%p'", FullName);
return 0; return 0;
} }
@ -139,7 +139,7 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING); Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING);
if (Scope == 0) { if (Scope == 0) {
/* Scope not found */ /* Scope not found */
Error ("No such scope: `%m%p'", FullName); Error ("No such scope: '%m%p'", FullName);
return 0; return 0;
} }

View File

@ -213,24 +213,24 @@ void SymDef (SymEntry* S, ExprNode* Expr, unsigned char AddrSize, unsigned Flags
{ {
if (S->Flags & SF_IMPORT) { if (S->Flags & SF_IMPORT) {
/* Defined symbol is marked as imported external symbol */ /* 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; return;
} }
if ((Flags & SF_VAR) != 0 && (S->Flags & (SF_EXPORT | SF_GLOBAL))) { if ((Flags & SF_VAR) != 0 && (S->Flags & (SF_EXPORT | SF_GLOBAL))) {
/* Variable symbols cannot be exports or globals */ /* 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; return;
} }
if (S->Flags & SF_DEFINED) { if (S->Flags & SF_DEFINED) {
/* Multiple definition. In case of a variable, this is legal. */ /* Multiple definition. In case of a variable, this is legal. */
if ((S->Flags & SF_VAR) == 0) { 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; S->Flags |= SF_MULTDEF;
return; return;
} else { } else {
/* Redefinition must also be a variable symbol */ /* Redefinition must also be a variable symbol */
if ((Flags & SF_VAR) == 0) { 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; return;
} }
/* Delete the current symbol expression, since it will get /* 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; S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) { } else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */ /* 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), GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize)); AddrSizeToStr (S->ExportSize));
} }
@ -315,13 +315,13 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
/* Mark the given symbol as an imported symbol */ /* Mark the given symbol as an imported symbol */
{ {
if (S->Flags & SF_DEFINED) { 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; S->Flags |= SF_MULTDEF;
return; return;
} }
if (S->Flags & SF_EXPORT) { if (S->Flags & SF_EXPORT) {
/* The symbol is already marked as exported symbol */ /* 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; return;
} }
@ -337,16 +337,16 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
*/ */
if (S->Flags & SF_IMPORT) { if (S->Flags & SF_IMPORT) {
if ((Flags & SF_FORCED) != (S->Flags & SF_FORCED)) { 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) { 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) { if (S->Flags & SF_GLOBAL) {
S->Flags &= ~SF_GLOBAL; S->Flags &= ~SF_GLOBAL;
if (AddrSize != S->AddrSize) { 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 */ /* Check if it's ok to export the symbol */
if (S->Flags & SF_IMPORT) { if (S->Flags & SF_IMPORT) {
/* The symbol is already marked as imported external symbol */ /* 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; return;
} }
if (S->Flags & SF_VAR) { if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported */ /* 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; return;
} }
@ -383,7 +383,7 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
*/ */
if (S->Flags & SF_GLOBAL) { if (S->Flags & SF_GLOBAL) {
if (AddrSize != S->ExportSize) { 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; 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->Flags & (SF_EXPORT|SF_DEFINED)) == SF_EXPORT) {
if (S->ExportSize != AddrSize) { 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; S->ExportSize = AddrSize;
@ -412,7 +412,7 @@ void SymExport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
S->ExportSize = S->AddrSize; S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) { } else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */ /* 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), GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize)); AddrSizeToStr (S->ExportSize));
} }
@ -434,7 +434,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
{ {
if (S->Flags & SF_VAR) { if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported or imported */ /* 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; return;
} }
@ -447,7 +447,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
AddrSize = GetCurrentSegAddrSize (); AddrSize = GetCurrentSegAddrSize ();
} }
if (AddrSize != S->AddrSize) { 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; return;
} }
@ -459,12 +459,12 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
if ((S->Flags & SF_DEFINED) == 0) { if ((S->Flags & SF_DEFINED) == 0) {
/* Symbol is undefined */ /* Symbol is undefined */
if (AddrSize != S->ExportSize) { 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) { } else if (AddrSize != ADDR_SIZE_DEFAULT) {
/* Symbol is defined and address size given */ /* Symbol is defined and address size given */
if (AddrSize != S->ExportSize) { 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; return;
@ -476,7 +476,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
*/ */
if (S->Flags & SF_GLOBAL) { if (S->Flags & SF_GLOBAL) {
if (AddrSize != S->ExportSize) { 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; return;
} }
@ -494,7 +494,7 @@ void SymGlobal (SymEntry* S, unsigned char AddrSize, unsigned Flags)
S->ExportSize = S->AddrSize; S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) { } else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */ /* 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), GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize)); AddrSizeToStr (S->ExportSize));
} }
@ -537,12 +537,12 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri
/* Check for errors */ /* Check for errors */
if (S->Flags & SF_IMPORT) { if (S->Flags & SF_IMPORT) {
/* The symbol is already marked as imported external symbol */ /* 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; return;
} }
if (S->Flags & SF_VAR) { if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported or imported */ /* 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; 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->Flags & (SF_EXPORT | SF_GLOBAL)) {
if (S->ExportSize != AddrSize) { 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; 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 */ /* Use the real size of the symbol */
S->ExportSize = S->AddrSize; S->ExportSize = S->AddrSize;
} else if (S->AddrSize != S->ExportSize) { } 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] != CD_PRIO_NONE) {
if (S->ConDesPrio[Type] != Prio) { 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; S->ConDesPrio[Type] = Prio;

View File

@ -178,7 +178,7 @@ static SymTable* NewSymTable (SymTable* Parent, const StrBuf* Name)
} }
} else { } else {
/* Duplicate scope name */ /* 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 */ /* Check if the scope has been defined before */
if (CurrentScope->Flags & ST_DEFINED) { if (CurrentScope->Flags & ST_DEFINED) {
Error ("Duplicate scope `%m%p'", ScopeName); Error ("Duplicate scope '%m%p'", ScopeName);
} }
} else { } else {
@ -502,7 +502,7 @@ static void SymCheckUndefined (SymEntry* S)
if (Sym->Flags & SF_IMPORT) { if (Sym->Flags & SF_IMPORT) {
/* The symbol is already marked as import */ /* The symbol is already marked as import */
LIError (&S->RefLines, LIError (&S->RefLines,
"Symbol `%s' is already an import", "Symbol '%s' is already an import",
GetString (Sym->Name)); GetString (Sym->Name));
} }
if ((Sym->Flags & SF_EXPORT) == 0) { if ((Sym->Flags & SF_EXPORT) == 0) {
@ -516,7 +516,7 @@ static void SymCheckUndefined (SymEntry* S)
if (Sym->AddrSize > Sym->ExportSize) { if (Sym->AddrSize > Sym->ExportSize) {
/* We're exporting a symbol smaller than it actually is */ /* We're exporting a symbol smaller than it actually is */
LIWarning (&Sym->DefLines, 1, LIWarning (&Sym->DefLines, 1,
"Symbol `%m%p' is %s but exported %s", "Symbol '%m%p' is %s but exported %s",
GetSymName (Sym), GetSymName (Sym),
AddrSizeToStr (Sym->AddrSize), AddrSizeToStr (Sym->AddrSize),
AddrSizeToStr (Sym->ExportSize)); AddrSizeToStr (Sym->ExportSize));
@ -541,7 +541,7 @@ static void SymCheckUndefined (SymEntry* S)
if (S->Flags & SF_EXPORT) { if (S->Flags & SF_EXPORT) {
/* We will not auto-import an export */ /* We will not auto-import an export */
LIError (&S->RefLines, LIError (&S->RefLines,
"Exported symbol `%m%p' was never defined", "Exported symbol '%m%p' was never defined",
GetSymName (S)); GetSymName (S));
} else { } else {
if (AutoImport) { if (AutoImport) {
@ -554,7 +554,7 @@ static void SymCheckUndefined (SymEntry* S)
} else { } else {
/* Error */ /* Error */
LIError (&S->RefLines, LIError (&S->RefLines,
"Symbol `%m%p' is undefined", "Symbol '%m%p' is undefined",
GetSymName (S)); GetSymName (S));
} }
} }
@ -616,7 +616,7 @@ void SymCheck (void)
ReleaseFullLineInfo (&S->RefLines); ReleaseFullLineInfo (&S->RefLines);
} else if ((S->Flags & SF_DEFINED) != 0 && (S->Flags & SF_REFERENCED) == 0) { } else if ((S->Flags & SF_DEFINED) != 0 && (S->Flags & SF_REFERENCED) == 0) {
LIWarning (&S->DefLines, 2, LIWarning (&S->DefLines, 2,
"Symbol `%m%p' is defined but never used", "Symbol '%m%p' is defined but never used",
GetSymName (S)); GetSymName (S));
} }
@ -625,7 +625,7 @@ void SymCheck (void)
if ((S->Flags & (SF_REFERENCED | SF_FORCED)) == SF_NONE) { if ((S->Flags & (SF_REFERENCED | SF_FORCED)) == SF_NONE) {
/* Imported symbol is not referenced */ /* Imported symbol is not referenced */
LIWarning (&S->DefLines, 2, LIWarning (&S->DefLines, 2,
"Symbol `%m%p' is imported but never used", "Symbol '%m%p' is imported but never used",
GetSymName (S)); GetSymName (S));
} else { } else {
/* Give the import an id, count imports */ /* Give the import an id, count imports */
@ -653,7 +653,7 @@ void SymCheck (void)
} else if (S->AddrSize > S->ExportSize) { } else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */ /* We're exporting a symbol smaller than it actually is */
LIWarning (&S->DefLines, 1, LIWarning (&S->DefLines, 1,
"Symbol `%m%p' is %s but exported %s", "Symbol '%m%p' is %s but exported %s",
GetSymName (S), GetSymName (S),
AddrSizeToStr (S->AddrSize), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize)); AddrSizeToStr (S->ExportSize));
@ -673,7 +673,7 @@ void SymCheck (void)
const FilePos* P = S->GuessedUse[S->AddrSize - 1]; const FilePos* P = S->GuessedUse[S->AddrSize - 1];
if (P) { if (P) {
PWarning (P, 0, PWarning (P, 0,
"Didn't use %s addressing for `%m%p'", "Didn't use %s addressing for '%m%p'",
AddrSizeToStr (S->AddrSize), AddrSizeToStr (S->AddrSize),
GetSymName (S)); GetSymName (S));
} }

View File

@ -102,7 +102,7 @@ static SymEntry* AsmGetSym (unsigned Arg, unsigned Type)
/* Did we find a symbol with this name? */ /* Did we find a symbol with this name? */
if (Sym == 0) { if (Sym == 0) {
Error ("Undefined symbol `%s' for argument %u", CurTok.Ident, Arg); Error ("Undefined symbol '%s' for argument %u", CurTok.Ident, Arg);
AsmErrorSkip (); AsmErrorSkip ();
return 0; return 0;
} }

View File

@ -461,7 +461,7 @@ void GetFuncInfo (const char* Name, unsigned short* Use, unsigned short* Chg)
** use and change all registers. ** use and change all registers.
*/ */
if (Debug) { if (Debug) {
fprintf (stderr, "No info about internal function `%s'\n", Name); fprintf (stderr, "No info about internal function '%s'\n", Name);
} }
*Use = REG_ALL; *Use = REG_ALL;
*Chg = REG_ALL; *Chg = REG_ALL;

View File

@ -981,7 +981,7 @@ static OptFunc* GetOptFunc (const char* Name)
OptFunc* F = FindOptFunc (Name); OptFunc* F = FindOptFunc (Name);
if (F == 0) { if (F == 0) {
/* Not found */ /* Not found */
AbEnd ("Optimization step `%s' not found", Name); AbEnd ("Optimization step '%s' not found", Name);
} }
return F; return F;
} }
@ -1168,10 +1168,10 @@ static void WriteDebugOutput (CodeSeg* S, const char* Step)
/* Output a header line */ /* Output a header line */
if (Step == 0) { if (Step == 0) {
/* Initial output */ /* Initial output */
WriteOutput ("Initial code for function `%s':\n", WriteOutput ("Initial code for function '%s':\n",
S->Func? S->Func->Name : "<global>"); S->Func? S->Func->Name : "<global>");
} else { } else {
WriteOutput ("Code after applying `%s':\n", Step); WriteOutput ("Code after applying '%s':\n", Step);
} }
/* Output the code segment */ /* Output the code segment */
@ -1512,7 +1512,7 @@ void RunOpt (CodeSeg* S)
/* Print the name of the function we are working on */ /* Print the name of the function we are working on */
if (S->Func) { if (S->Func) {
Print (stdout, 1, "Running optimizer for function `%s'\n", S->Func->Name); Print (stdout, 1, "Running optimizer for function '%s'\n", S->Func->Name);
} else { } else {
Print (stdout, 1, "Running optimizer for global code segment\n"); Print (stdout, 1, "Running optimizer for global code segment\n");
} }

View File

@ -317,12 +317,12 @@ static CodeEntry* ParseInsn (CodeSeg* S, LineInfo* LI, const char* L)
/* Expect zp x indirect */ /* Expect zp x indirect */
L = SkipSpace (L+1); L = SkipSpace (L+1);
if (toupper (*L) != 'X') { if (toupper (*L) != 'X') {
Error ("ASM code error: `X' expected"); Error ("ASM code error: 'X' expected");
return 0; return 0;
} }
L = SkipSpace (L+1); L = SkipSpace (L+1);
if (*L != ')') { if (*L != ')') {
Error ("ASM code error: `)' expected"); Error ("ASM code error: ')' expected");
return 0; return 0;
} }
L = SkipSpace (L+1); L = SkipSpace (L+1);
@ -337,7 +337,7 @@ static CodeEntry* ParseInsn (CodeSeg* S, LineInfo* LI, const char* L)
if (*L == ',') { if (*L == ',') {
L = SkipSpace (L+1); L = SkipSpace (L+1);
if (toupper (*L) != 'Y') { if (toupper (*L) != 'Y') {
Error ("ASM code error: `Y' expected"); Error ("ASM code error: 'Y' expected");
return 0; return 0;
} }
L = SkipSpace (L+1); L = SkipSpace (L+1);
@ -378,7 +378,7 @@ static CodeEntry* ParseInsn (CodeSeg* S, LineInfo* LI, const char* L)
/* Check for subroutine call to local label */ /* Check for subroutine call to local label */
if ((OPC->Info & OF_CALL) && IsLocalLabelName (Arg)) { if ((OPC->Info & OF_CALL) && IsLocalLabelName (Arg)) {
Error ("ASM code error: " Error ("ASM code error: "
"Cannot use local label `%s' in subroutine call", "Cannot use local label '%s' in subroutine call",
Arg); Arg);
} }
AM = AM65_ABS; AM = AM65_ABS;
@ -532,7 +532,7 @@ void CS_AddVLine (CodeSeg* S, LineInfo* LI, const char* Format, va_list ap)
case '.': case '.':
/* Control instruction */ /* Control instruction */
ReadToken (L, " \t", Token, sizeof (Token)); ReadToken (L, " \t", Token, sizeof (Token));
Error ("ASM code error: Pseudo instruction `%s' not supported", Token); Error ("ASM code error: Pseudo instruction '%s' not supported", Token);
break; break;
default: default:
@ -780,7 +780,7 @@ CodeLabel* CS_AddLabel (CodeSeg* S, const char* Name)
if (L) { if (L) {
/* We found it - be sure it does not already have an owner */ /* We found it - be sure it does not already have an owner */
if (L->Owner) { if (L->Owner) {
Error ("ASM label `%s' is already defined", Name); Error ("ASM label '%s' is already defined", Name);
return L; return L;
} }
} else { } else {
@ -790,7 +790,7 @@ CodeLabel* CS_AddLabel (CodeSeg* S, const char* Name)
/* Safety. This call is quite costly, but safety is better */ /* Safety. This call is quite costly, but safety is better */
if (CollIndex (&S->Labels, L) >= 0) { if (CollIndex (&S->Labels, L) >= 0) {
Error ("ASM label `%s' is already defined", Name); Error ("ASM label '%s' is already defined", Name);
return L; return L;
} }
@ -906,7 +906,7 @@ void CS_MergeLabels (CodeSeg* S)
/* Print some debugging output */ /* Print some debugging output */
if (Debug) { if (Debug) {
printf ("Removing unused global label `%s'", X->Name); printf ("Removing unused global label '%s'", X->Name);
} }
/* And free the label */ /* And free the label */

View File

@ -192,7 +192,7 @@ static void Parse (void)
/* This is a definition */ /* This is a definition */
if (SymIsDef (Entry)) { if (SymIsDef (Entry)) {
Error ("Global variable `%s' has already been defined", Error ("Global variable '%s' has already been defined",
Entry->Name); Entry->Name);
} }
Entry->Flags |= SC_DEF; Entry->Flags |= SC_DEF;
@ -204,11 +204,11 @@ static void Parse (void)
if (!IsTypeVoid (Decl.Type)) { if (!IsTypeVoid (Decl.Type)) {
if (!IsTypeArray (Decl.Type)) { if (!IsTypeArray (Decl.Type)) {
/* Size is unknown and not an array */ /* Size is unknown and not an array */
Error ("Variable `%s' has unknown size", Decl.Ident); Error ("Variable '%s' has unknown size", Decl.Ident);
} }
} else if (IS_Get (&Standard) != STD_CC65) { } else if (IS_Get (&Standard) != STD_CC65) {
/* We cannot declare variables of type void */ /* We cannot declare variables of type void */
Error ("Illegal type for variable `%s'", Decl.Ident); Error ("Illegal type for variable '%s'", Decl.Ident);
} }
} }
@ -234,12 +234,12 @@ static void Parse (void)
if (IsTypeVoid (Decl.Type)) { if (IsTypeVoid (Decl.Type)) {
/* We cannot declare variables of type void */ /* We cannot declare variables of type void */
Error ("Illegal type for variable `%s'", Decl.Ident); Error ("Illegal type for variable '%s'", Decl.Ident);
Entry->Flags &= ~(SC_STORAGE | SC_DEF); Entry->Flags &= ~(SC_STORAGE | SC_DEF);
} else if (Size == 0) { } else if (Size == 0) {
/* Size is unknown. Is it an array? */ /* Size is unknown. Is it an array? */
if (!IsTypeArray (Decl.Type)) { if (!IsTypeArray (Decl.Type)) {
Error ("Variable `%s' has unknown size", Decl.Ident); Error ("Variable '%s' has unknown size", Decl.Ident);
} }
Entry->Flags &= ~(SC_STORAGE | SC_DEF); Entry->Flags &= ~(SC_STORAGE | SC_DEF);
} else { } else {
@ -256,7 +256,7 @@ static void Parse (void)
const char* bssName = GetSegName (SEG_BSS); const char* bssName = GetSegName (SEG_BSS);
if (Entry->V.BssName && strcmp (Entry->V.BssName, bssName) != 0) { if (Entry->V.BssName && strcmp (Entry->V.BssName, bssName) != 0) {
Error ("Global variable `%s' already was defined in the `%s' segment.", Error ("Global variable '%s' already was defined in the '%s' segment.",
Entry->Name, Entry->V.BssName); Entry->Name, Entry->V.BssName);
} }
Entry->V.BssName = xstrdup (bssName); Entry->V.BssName = xstrdup (bssName);
@ -286,7 +286,7 @@ static void Parse (void)
/* Function body. Check for duplicate function definitions */ /* Function body. Check for duplicate function definitions */
if (SymIsDef (Entry)) { if (SymIsDef (Entry)) {
Error ("Body for function `%s' has already been defined", Error ("Body for function '%s' has already been defined",
Entry->Name); Entry->Name);
} }

View File

@ -102,7 +102,7 @@ static unsigned ParseInitInternal (Type* T, int AllowFlexibleMembers);
static void DuplicateQualifier (const char* Name) static void DuplicateQualifier (const char* Name)
/* Print an error message */ /* Print an error message */
{ {
Warning ("Duplicate qualifier: `%s'", Name); Warning ("Duplicate qualifier: '%s'", Name);
} }
@ -551,7 +551,7 @@ static SymEntry* StructOrUnionForwardDecl (const char* Name, unsigned Type)
Entry = AddStructSym (Name, Type, 0, 0); Entry = AddStructSym (Name, Type, 0, 0);
} else if ((Entry->Flags & SC_TYPEMASK) != Type) { } else if ((Entry->Flags & SC_TYPEMASK) != Type) {
/* Already defined, but no struct */ /* Already defined, but no struct */
Error ("Symbol `%s' is already different kind", Name); Error ("Symbol '%s' is already different kind", Name);
} }
return Entry; return Entry;
} }
@ -1070,7 +1070,7 @@ static void ParseTypeSpec (DeclSpec* D, long Default, TypeCode Qualifiers)
Entry = FindTagSym (CurTok.Ident); Entry = FindTagSym (CurTok.Ident);
if (Entry) { if (Entry) {
if (SymIsLocal (Entry) && (Entry->Flags & SC_ENUM) == 0) { if (SymIsLocal (Entry) && (Entry->Flags & SC_ENUM) == 0) {
Error ("Symbol `%s' is already different kind", Entry->Name); Error ("Symbol '%s' is already different kind", Entry->Name);
} }
} else { } else {
/* Insert entry into table ### */ /* Insert entry into table ### */
@ -1211,10 +1211,10 @@ static void ParseOldStyleParamList (FuncDesc* F)
Sym->Flags &= ~SC_DEFTYPE; Sym->Flags &= ~SC_DEFTYPE;
} else { } else {
/* Type has already been changed */ /* Type has already been changed */
Error ("Redefinition for parameter `%s'", Sym->Name); Error ("Redefinition for parameter '%s'", Sym->Name);
} }
} else { } else {
Error ("Unknown identifier: `%s'", Decl.Ident); Error ("Unknown identifier: '%s'", Decl.Ident);
} }
} }
@ -1291,7 +1291,7 @@ static void ParseAnsiParamList (FuncDesc* F)
/* If the parameter is a struct or union, emit a warning */ /* If the parameter is a struct or union, emit a warning */
if (IsClassStruct (Decl.Type)) { if (IsClassStruct (Decl.Type)) {
if (IS_Get (&WarnStructParam)) { if (IS_Get (&WarnStructParam)) {
Warning ("Passing struct by value for parameter `%s'", Decl.Ident); Warning ("Passing struct by value for parameter '%s'", Decl.Ident);
} }
} }
@ -1512,7 +1512,7 @@ static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
ConstAbsIntExpr (hie1, &Expr); ConstAbsIntExpr (hie1, &Expr);
if (Expr.IVal <= 0) { if (Expr.IVal <= 0) {
if (D->Ident[0] != '\0') { if (D->Ident[0] != '\0') {
Error ("Size of array `%s' is invalid", D->Ident); Error ("Size of array '%s' is invalid", D->Ident);
} else { } else {
Error ("Size of array is invalid"); Error ("Size of array is invalid");
} }
@ -1534,16 +1534,16 @@ static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
/* If we have remaining qualifiers, flag them as invalid */ /* If we have remaining qualifiers, flag them as invalid */
if (Qualifiers & T_QUAL_NEAR) { if (Qualifiers & T_QUAL_NEAR) {
Error ("Invalid `__near__' qualifier"); Error ("Invalid '__near__' qualifier");
} }
if (Qualifiers & T_QUAL_FAR) { if (Qualifiers & T_QUAL_FAR) {
Error ("Invalid `__far__' qualifier"); Error ("Invalid '__far__' qualifier");
} }
if (Qualifiers & T_QUAL_FASTCALL) { if (Qualifiers & T_QUAL_FASTCALL) {
Error ("Invalid `__fastcall__' qualifier"); Error ("Invalid '__fastcall__' qualifier");
} }
if (Qualifiers & T_QUAL_CDECL) { if (Qualifiers & T_QUAL_CDECL) {
Error ("Invalid `__cdecl__' qualifier"); Error ("Invalid '__cdecl__' qualifier");
} }
} }
@ -1637,7 +1637,7 @@ void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
** have the C89 standard enabled explicitly. ** have the C89 standard enabled explicitly.
*/ */
if (IS_Get (&Standard) >= STD_C99) { if (IS_Get (&Standard) >= STD_C99) {
Warning ("Implicit `int' return type is an obsolete feature"); Warning ("Implicit 'int' return type is an obsolete feature");
} }
GetFuncDesc (D->Type)->Flags |= FD_OLDSTYLE_INTRET; GetFuncDesc (D->Type)->Flags |= FD_OLDSTYLE_INTRET;
} }
@ -1653,7 +1653,7 @@ void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
** for variables with implicit int type. ** for variables with implicit int type.
*/ */
if ((Spec->Flags & DS_DEF_TYPE) != 0 && IS_Get (&Standard) >= STD_C99) { if ((Spec->Flags & DS_DEF_TYPE) != 0 && IS_Get (&Standard) >= STD_C99) {
Warning ("Implicit `int' is an obsolete feature"); Warning ("Implicit 'int' is an obsolete feature");
} }
} }
@ -1662,7 +1662,7 @@ void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
unsigned Size = SizeOf (D->Type); unsigned Size = SizeOf (D->Type);
if (Size >= 0x10000) { if (Size >= 0x10000) {
if (D->Ident[0] != '\0') { if (D->Ident[0] != '\0') {
Error ("Size of `%s' is invalid (0x%06X)", D->Ident, Size); Error ("Size of '%s' is invalid (0x%06X)", D->Ident, Size);
} else { } else {
Error ("Invalid size in declaration (0x%06X)", Size); Error ("Invalid size in declaration (0x%06X)", Size);
} }
@ -1735,7 +1735,7 @@ static unsigned OpeningCurlyBraces (unsigned BracesNeeded)
NextToken (); NextToken ();
} }
if (BraceCount < BracesNeeded) { if (BraceCount < BracesNeeded) {
Error ("`{' expected"); Error ("'{' expected");
} }
return BraceCount; return BraceCount;
} }
@ -1755,7 +1755,7 @@ static void ClosingCurlyBraces (unsigned BracesExpected)
NextToken (); NextToken ();
NextToken (); NextToken ();
} else { } else {
Error ("`}' expected"); Error ("'}' expected");
return; return;
} }
--BracesExpected; --BracesExpected;

View File

@ -225,7 +225,7 @@ void ParseAttribute (Declaration* D)
} else { } else {
/* Attribute not known, maybe typo */ /* Attribute not known, maybe typo */
Error ("Illegal attribute: `%s'", AttrName); Error ("Illegal attribute: '%s'", AttrName);
/* Skip until end of attribute */ /* Skip until end of attribute */
ErrorSkip (); ErrorSkip ();

View File

@ -791,9 +791,9 @@ static void Primary (ExprDesc* E)
** list and returning int. ** list and returning int.
*/ */
if (IS_Get (&Standard) >= STD_C99) { if (IS_Get (&Standard) >= STD_C99) {
Error ("Call to undefined function `%s'", Ident); Error ("Call to undefined function '%s'", Ident);
} else { } else {
Warning ("Call to undefined function `%s'", Ident); Warning ("Call to undefined function '%s'", Ident);
} }
Sym = AddGlobalSym (Ident, GetImplicitFuncType(), SC_EXTERN | SC_REF | SC_FUNC); Sym = AddGlobalSym (Ident, GetImplicitFuncType(), SC_EXTERN | SC_REF | SC_FUNC);
E->Type = Sym->Type; E->Type = Sym->Type;
@ -804,7 +804,7 @@ static void Primary (ExprDesc* E)
Sym = AddLocalSym (Ident, type_int, SC_AUTO | SC_REF, 0); Sym = AddLocalSym (Ident, type_int, SC_AUTO | SC_REF, 0);
E->Flags = E_LOC_STACK | E_RTYPE_LVAL; E->Flags = E_LOC_STACK | E_RTYPE_LVAL;
E->Type = type_int; E->Type = type_int;
Error ("Undefined symbol: `%s'", Ident); Error ("Undefined symbol: '%s'", Ident);
} }
} }
@ -1174,7 +1174,7 @@ static void StructRef (ExprDesc* Expr)
NextToken (); NextToken ();
Field = FindStructField (Expr->Type, Ident); Field = FindStructField (Expr->Type, Ident);
if (Field == 0) { if (Field == 0) {
Error ("Struct/union has no field named `%s'", Ident); Error ("Struct/union has no field named '%s'", Ident);
/* Make the expression an integer at address zero */ /* Make the expression an integer at address zero */
ED_MakeConstAbs (Expr, 0, type_int); ED_MakeConstAbs (Expr, 0, type_int);
return; return;
@ -2485,7 +2485,7 @@ static void parseadd (ExprDesc* Expr)
typeadjust (Expr, &Expr2, 1); typeadjust (Expr, &Expr2, 1);
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `+'"); Error ("Invalid operands for binary operator '+'");
} }
} else { } else {
@ -2567,7 +2567,7 @@ static void parseadd (ExprDesc* Expr)
} }
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `+'"); Error ("Invalid operands for binary operator '+'");
flags = CF_INT; flags = CF_INT;
} }
@ -2611,7 +2611,7 @@ static void parseadd (ExprDesc* Expr)
flags = typeadjust (Expr, &Expr2, 1); flags = typeadjust (Expr, &Expr2, 1);
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `+'"); Error ("Invalid operands for binary operator '+'");
flags = CF_INT; flags = CF_INT;
} }
@ -2653,7 +2653,7 @@ static void parseadd (ExprDesc* Expr)
flags = typeadjust (Expr, &Expr2, 0) & ~CF_CONST; flags = typeadjust (Expr, &Expr2, 0) & ~CF_CONST;
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `+'"); Error ("Invalid operands for binary operator '+'");
flags = CF_INT; flags = CF_INT;
} }
@ -2689,7 +2689,7 @@ static void parsesub (ExprDesc* Expr)
/* lhs cannot be function or pointer to function */ /* lhs cannot be function or pointer to function */
if (IsTypeFunc (Expr->Type) || IsTypeFuncPtr (Expr->Type)) { if (IsTypeFunc (Expr->Type) || IsTypeFuncPtr (Expr->Type)) {
Error ("Invalid left operand for binary operator `-'"); Error ("Invalid left operand for binary operator '-'");
/* Make it pointer to char to avoid further errors */ /* Make it pointer to char to avoid further errors */
Expr->Type = type_uchar; Expr->Type = type_uchar;
} }
@ -2712,7 +2712,7 @@ static void parsesub (ExprDesc* Expr)
/* rhs cannot be function or pointer to function */ /* rhs cannot be function or pointer to function */
if (IsTypeFunc (Expr2.Type) || IsTypeFuncPtr (Expr2.Type)) { if (IsTypeFunc (Expr2.Type) || IsTypeFuncPtr (Expr2.Type)) {
Error ("Invalid right operand for binary operator `-'"); Error ("Invalid right operand for binary operator '-'");
/* Make it pointer to char to avoid further errors */ /* Make it pointer to char to avoid further errors */
Expr2.Type = type_uchar; Expr2.Type = type_uchar;
} }
@ -2750,7 +2750,7 @@ static void parsesub (ExprDesc* Expr)
Expr->IVal -= Expr2.IVal; Expr->IVal -= Expr2.IVal;
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `-'"); Error ("Invalid operands for binary operator '-'");
} }
/* Result is constant, condition codes not set */ /* Result is constant, condition codes not set */
@ -2783,7 +2783,7 @@ static void parsesub (ExprDesc* Expr)
flags = typeadjust (Expr, &Expr2, 1); flags = typeadjust (Expr, &Expr2, 1);
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `-'"); Error ("Invalid operands for binary operator '-'");
flags = CF_INT; flags = CF_INT;
} }
@ -2837,7 +2837,7 @@ static void parsesub (ExprDesc* Expr)
flags = typeadjust (Expr, &Expr2, 0); flags = typeadjust (Expr, &Expr2, 0);
} else { } else {
/* OOPS */ /* OOPS */
Error ("Invalid operands for binary operator `-'"); Error ("Invalid operands for binary operator '-'");
flags = CF_INT; flags = CF_INT;
} }
@ -3304,7 +3304,7 @@ static void opeq (const GenDesc* Gen, ExprDesc* Expr, const char* Op)
/* The rhs must be an integer (or a float, but we don't support that yet */ /* The rhs must be an integer (or a float, but we don't support that yet */
if (!IsClassInt (Expr2.Type)) { if (!IsClassInt (Expr2.Type)) {
Error ("Invalid right operand for binary operator `%s'", Op); Error ("Invalid right operand for binary operator '%s'", Op);
/* Continue. Wrong code will be generated, but the compiler won't /* Continue. Wrong code will be generated, but the compiler won't
** break, so this is the best error recovery. ** break, so this is the best error recovery.
*/ */
@ -3421,7 +3421,7 @@ static void addsubeq (const GenDesc* Gen, ExprDesc *Expr, const char* Op)
*/ */
hie1 (&Expr2); hie1 (&Expr2);
if (!IsClassInt (Expr2.Type)) { if (!IsClassInt (Expr2.Type)) {
Error ("Invalid right operand for binary operator `%s'", Op); Error ("Invalid right operand for binary operator '%s'", Op);
/* Continue. Wrong code will be generated, but the compiler won't /* Continue. Wrong code will be generated, but the compiler won't
** break, so this is the best error recovery. ** break, so this is the best error recovery.
*/ */

View File

@ -422,14 +422,14 @@ void NewFunc (SymEntry* Func)
/* Main cannot be a fastcall function */ /* Main cannot be a fastcall function */
if (IsQualFastcall (Func->Type)) { if (IsQualFastcall (Func->Type)) {
Error ("`main' cannot be declared as __fastcall__"); Error ("'main' cannot be declared as __fastcall__");
} }
/* If cc65 extensions aren't enabled, don't allow a main function that /* If cc65 extensions aren't enabled, don't allow a main function that
** doesn't return an int. ** doesn't return an int.
*/ */
if (IS_Get (&Standard) != STD_CC65 && CurrentFunc->ReturnType[0].C != T_INT) { if (IS_Get (&Standard) != STD_CC65 && CurrentFunc->ReturnType[0].C != T_INT) {
Error ("`main' must always return an int"); Error ("'main' must always return an int");
} }
/* Add a forced import of a symbol that is contained in the startup /* Add a forced import of a symbol that is contained in the startup

View File

@ -54,7 +54,7 @@ unsigned HexVal (int C)
*/ */
{ {
if (!IsXDigit (C)) { if (!IsXDigit (C)) {
Error ("Invalid hexadecimal digit: `%c'", C); Error ("Invalid hexadecimal digit: '%c'", C);
} }
if (IsDigit (C)) { if (IsDigit (C)) {
return C - '0'; return C - '0';

View File

@ -174,7 +174,7 @@ static AFile* NewAFile (IFile* IF, FILE* F)
struct stat Buf; struct stat Buf;
if (FileStat (IF->Name, &Buf) != 0) { if (FileStat (IF->Name, &Buf) != 0) {
/* Error */ /* Error */
Fatal ("Cannot stat `%s': %s", IF->Name, strerror (errno)); Fatal ("Cannot stat '%s': %s", IF->Name, strerror (errno));
} }
IF->Size = (unsigned long) Buf.st_size; IF->Size = (unsigned long) Buf.st_size;
IF->MTime = (unsigned long) Buf.st_mtime; IF->MTime = (unsigned long) Buf.st_mtime;
@ -251,7 +251,7 @@ void OpenMainFile (const char* Name)
FILE* F = fopen (Name, "r"); FILE* F = fopen (Name, "r");
if (F == 0) { if (F == 0) {
/* Cannot open */ /* Cannot open */
Fatal ("Cannot open input file `%s': %s", Name, strerror (errno)); Fatal ("Cannot open input file '%s': %s", Name, strerror (errno));
} }
/* Allocate a new AFile structure for the file */ /* Allocate a new AFile structure for the file */
@ -284,7 +284,7 @@ void OpenIncludeFile (const char* Name, InputType IT)
/* Search for the file */ /* Search for the file */
N = SearchFile ((IT == IT_SYSINC)? SysIncSearchPath : UsrIncSearchPath, Name); N = SearchFile ((IT == IT_SYSINC)? SysIncSearchPath : UsrIncSearchPath, Name);
if (N == 0) { if (N == 0) {
PPError ("Include file `%s' not found", Name); PPError ("Include file '%s' not found", Name);
return; return;
} }
@ -303,12 +303,12 @@ void OpenIncludeFile (const char* Name, InputType IT)
F = fopen (IF->Name, "r"); F = fopen (IF->Name, "r");
if (F == 0) { if (F == 0) {
/* Error opening the file */ /* Error opening the file */
PPError ("Cannot open include file `%s': %s", IF->Name, strerror (errno)); PPError ("Cannot open include file '%s': %s", IF->Name, strerror (errno));
return; return;
} }
/* Debugging output */ /* Debugging output */
Print (stdout, 1, "Opened include file `%s'\n", IF->Name); Print (stdout, 1, "Opened include file '%s'\n", IF->Name);
/* Allocate a new AFile structure */ /* Allocate a new AFile structure */
(void) NewAFile (IF, F); (void) NewAFile (IF, F);
@ -619,7 +619,7 @@ static void CreateDepFile (const char* Name, InputType Types)
/* Open the file */ /* Open the file */
FILE* F = fopen (Name, "w"); FILE* F = fopen (Name, "w");
if (F == 0) { if (F == 0) {
Fatal ("Cannot open dependency file `%s': %s", Name, strerror (errno)); Fatal ("Cannot open dependency file '%s': %s", Name, strerror (errno));
} }
/* If a dependency target was given, use it, otherwise use the output /* If a dependency target was given, use it, otherwise use the output

View File

@ -143,7 +143,7 @@ static void ParseRegisterDecl (Declaration* Decl, int Reg)
** we cannot allow that here. ** we cannot allow that here.
*/ */
if (ParseInit (Sym->Type) != Size) { if (ParseInit (Sym->Type) != Size) {
Error ("Cannot initialize flexible array members of storage class `register'"); Error ("Cannot initialize flexible array members of storage class 'register'");
} }
/* Generate code to copy this data into the variable space */ /* Generate code to copy this data into the variable space */
@ -171,7 +171,7 @@ static void ParseRegisterDecl (Declaration* Decl, int Reg)
/* Cannot allocate a variable of zero size */ /* Cannot allocate a variable of zero size */
if (Size == 0) { if (Size == 0) {
Error ("Variable `%s' has unknown size", Decl->Ident); Error ("Variable '%s' has unknown size", Decl->Ident);
} }
} }
@ -356,7 +356,7 @@ static void ParseAutoDecl (Declaration* Decl)
/* Cannot allocate a variable of zero size */ /* Cannot allocate a variable of zero size */
if (Size == 0) { if (Size == 0) {
Error ("Variable `%s' has unknown size", Decl->Ident); Error ("Variable '%s' has unknown size", Decl->Ident);
} }
} }
@ -410,7 +410,7 @@ static void ParseStaticDecl (Declaration* Decl)
/* Cannot allocate a variable of zero size */ /* Cannot allocate a variable of zero size */
if (Size == 0) { if (Size == 0) {
Error ("Variable `%s' has unknown size", Decl->Ident); Error ("Variable '%s' has unknown size", Decl->Ident);
} }
} }

View File

@ -245,7 +245,7 @@ void AddMacroArg (Macro* M, const char* Arg)
for (I = 0; I < CollCount (&M->FormalArgs); ++I) { for (I = 0; I < CollCount (&M->FormalArgs); ++I) {
if (strcmp (CollAtUnchecked (&M->FormalArgs, I), Arg) == 0) { if (strcmp (CollAtUnchecked (&M->FormalArgs, I), Arg) == 0) {
/* Found */ /* Found */
Error ("Duplicate macro parameter: `%s'", Arg); Error ("Duplicate macro parameter: '%s'", Arg);
break; break;
} }
} }

View File

@ -160,7 +160,7 @@ static void SetSys (const char* Sys)
break; break;
case TGT_MODULE: case TGT_MODULE:
AbEnd ("Cannot use `module' as a target for the compiler"); AbEnd ("Cannot use 'module' as a target for the compiler");
break; break;
case TGT_ATARI2600: case TGT_ATARI2600:
@ -300,7 +300,7 @@ static void FileNameOption (const char* Opt, const char* Arg, StrBuf* Name)
{ {
/* Cannot have the option twice */ /* Cannot have the option twice */
if (SB_NotEmpty (Name)) { if (SB_NotEmpty (Name)) {
AbEnd ("Cannot use option `%s' twice", Opt); AbEnd ("Cannot use option '%s' twice", Opt);
} }
/* A typo in OptTab[] might allow a NULL Arg */ /* A typo in OptTab[] might allow a NULL Arg */
if (Arg == 0) { if (Arg == 0) {
@ -362,7 +362,7 @@ static void CheckSegName (const char* Seg)
{ {
/* Print an error and abort if the name is not ok */ /* Print an error and abort if the name is not ok */
if (!ValidSegName (Seg)) { if (!ValidSegName (Seg)) {
AbEnd ("Segment name `%s' is invalid", Seg); AbEnd ("Segment name '%s' is invalid", Seg);
} }
} }
@ -459,7 +459,7 @@ static void OptCPU (const char* Opt, const char* Arg)
CPU = FindCPU (Arg); CPU = FindCPU (Arg);
if (CPU != CPU_6502 && CPU != CPU_6502X && CPU != CPU_65SC02 && if (CPU != CPU_6502 && CPU != CPU_6502X && CPU != CPU_65SC02 &&
CPU != CPU_65C02 && CPU != CPU_65816 && CPU != CPU_HUC6280) { CPU != CPU_65C02 && CPU != CPU_65816 && CPU != CPU_HUC6280) {
AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); AbEnd ("Invalid argument for %s: '%s'", Opt, Arg);
} }
} }
@ -504,7 +504,7 @@ static void OptDebugOpt (const char* Opt attribute ((unused)), const char* Arg)
/* Open the file */ /* Open the file */
FILE* F = fopen (Arg, "r"); FILE* F = fopen (Arg, "r");
if (F == 0) { if (F == 0) {
AbEnd ("Cannot open `%s': %s", Arg, strerror (errno)); AbEnd ("Cannot open '%s': %s", Arg, strerror (errno));
} }
/* Read line by line, ignore empty lines and switch optimization /* Read line by line, ignore empty lines and switch optimization
@ -675,7 +675,7 @@ static void OptMemoryModel (const char* Opt, const char* Arg)
/* Check the current memory model */ /* Check the current memory model */
if (MemoryModel != MMODEL_UNKNOWN) { 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 */ /* Translate the memory model name and check it */
@ -739,7 +739,7 @@ static void OptStandard (const char* Opt, const char* Arg)
/* Find the standard from the given name */ /* Find the standard from the given name */
standard_t Std = FindStandard (Arg); standard_t Std = FindStandard (Arg);
if (Std == STD_UNKNOWN) { if (Std == STD_UNKNOWN) {
AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); AbEnd ("Invalid argument for %s: '%s'", Opt, Arg);
} else if (IS_Get (&Standard) != STD_UNKNOWN) { } else if (IS_Get (&Standard) != STD_UNKNOWN) {
AbEnd ("Option %s given more than once", Opt); AbEnd ("Option %s given more than once", Opt);
} else { } else {
@ -1069,7 +1069,7 @@ int main (int argc, char* argv[])
/* Write the output to the file */ /* Write the output to the file */
WriteAsmOutput (); WriteAsmOutput ();
Print (stdout, 1, "Wrote output to `%s'\n", OutputFilename); Print (stdout, 1, "Wrote output to '%s'\n", OutputFilename);
/* Close the file, check for errors */ /* Close the file, check for errors */
CloseOutputFile (); CloseOutputFile ();

View File

@ -102,9 +102,9 @@ void OpenOutputFile ()
/* Open the file */ /* Open the file */
OutputFile = fopen (OutputFilename, "w"); OutputFile = fopen (OutputFilename, "w");
if (OutputFile == 0) { if (OutputFile == 0) {
Fatal ("Cannot open output file `%s': %s", OutputFilename, strerror (errno)); Fatal ("Cannot open output file '%s': %s", OutputFilename, strerror (errno));
} }
Print (stdout, 1, "Opened output file `%s'\n", OutputFilename); Print (stdout, 1, "Opened output file '%s'\n", OutputFilename);
} }
@ -120,9 +120,9 @@ void OpenDebugOutputFile (const char* Name)
/* Open the file */ /* Open the file */
OutputFile = fopen (Name, "w"); OutputFile = fopen (Name, "w");
if (OutputFile == 0) { if (OutputFile == 0) {
Fatal ("Cannot open debug output file `%s': %s", Name, strerror (errno)); Fatal ("Cannot open debug output file '%s': %s", Name, strerror (errno));
} }
Print (stdout, 1, "Opened debug output file `%s'\n", Name); Print (stdout, 1, "Opened debug output file '%s'\n", Name);
} }
@ -138,7 +138,7 @@ void CloseOutputFile ()
remove (OutputFilename); remove (OutputFilename);
Fatal ("Cannot write to output file (disk full?)"); Fatal ("Cannot write to output file (disk full?)");
} }
Print (stdout, 1, "Closed output file `%s'\n", OutputFilename); Print (stdout, 1, "Closed output file '%s'\n", OutputFilename);
OutputFile = 0; OutputFile = 0;
} }

View File

@ -356,7 +356,7 @@ static int BoolKeyword (StrBuf* Ident)
} }
/* Error */ /* Error */
Error ("Pragma argument must be one of `on', `off', `true' or `false'"); Error ("Pragma argument must be one of 'on', 'off', 'true' or 'false'");
return 0; return 0;
} }
@ -453,7 +453,7 @@ static void SegNamePragma (StrBuf* B, segment_t Seg)
} else { } else {
/* Segment name is invalid */ /* Segment name is invalid */
Error ("Illegal segment name: `%s'", Name); Error ("Illegal segment name: '%s'", Name);
} }
@ -788,7 +788,7 @@ static void ParsePragma (void)
** for unknown pragmas, but warn about them if enabled (the default). ** for unknown pragmas, but warn about them if enabled (the default).
*/ */
if (IS_Get (&WarnUnknownPragma)) { if (IS_Get (&WarnUnknownPragma)) {
Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident)); Warning ("Unknown pragma '%s'", SB_GetConstBuf (&Ident));
} }
goto ExitPoint; goto ExitPoint;
} }

View File

@ -304,7 +304,7 @@ static void OldStyleComment (void)
} }
} else { } else {
if (CurC == '/' && NextC == '*') { if (CurC == '/' && NextC == '*') {
PPWarning ("`/*' found inside a comment"); PPWarning ("'/*' found inside a comment");
} }
NextChar (); NextChar ();
} }
@ -491,7 +491,7 @@ static void ReadMacroArgs (MacroExp* E)
NewStyleComment (); NewStyleComment ();
} else if (CurC == '\0') { } else if (CurC == '\0') {
/* End of input inside macro argument list */ /* End of input inside macro argument list */
PPError ("Unterminated argument list invoking macro `%s'", E->M->Name); PPError ("Unterminated argument list invoking macro '%s'", E->M->Name);
ClearLine (); ClearLine ();
break; break;
@ -611,7 +611,7 @@ static void MacroArgSubst (MacroExp* E)
NextChar (); NextChar ();
SkipWhitespace (0); SkipWhitespace (0);
if (!IsSym (Ident) || (ArgIdx = FindMacroArg (E->M, Ident)) < 0) { if (!IsSym (Ident) || (ArgIdx = FindMacroArg (E->M, Ident)) < 0) {
PPError ("`#' is not followed by a macro parameter"); PPError ("'#' is not followed by a macro parameter");
} else { } else {
/* Make a valid string from Replacement */ /* Make a valid string from Replacement */
Arg = ME_GetActual (E, ArgIdx); Arg = ME_GetActual (E, ArgIdx);
@ -782,7 +782,7 @@ static void DefineMacro (void)
/* Ellipsis */ /* Ellipsis */
NextChar (); NextChar ();
if (CurC != '.' || NextC != '.') { if (CurC != '.' || NextC != '.') {
PPError ("`...' expected"); PPError ("'...' expected");
ClearLine (); ClearLine ();
return; return;
} }
@ -803,7 +803,7 @@ static void DefineMacro (void)
/* __VA_ARGS__ is only allowed in C89 mode */ /* __VA_ARGS__ is only allowed in C89 mode */
if (!C89 && strcmp (Ident, "__VA_ARGS__") == 0) { if (!C89 && strcmp (Ident, "__VA_ARGS__") == 0) {
PPWarning ("`__VA_ARGS__' can only appear in the expansion " PPWarning ("'__VA_ARGS__' can only appear in the expansion "
"of a C99 variadic macro"); "of a C99 variadic macro");
} }
@ -823,7 +823,7 @@ static void DefineMacro (void)
/* Check for a right paren and eat it if we find one */ /* Check for a right paren and eat it if we find one */
if (CurC != ')') { if (CurC != ')') {
PPError ("`)' expected"); PPError ("')' expected");
ClearLine (); ClearLine ();
return; return;
} }
@ -900,7 +900,7 @@ static unsigned Pass1 (StrBuf* Source, StrBuf* Target)
if (HaveParen) { if (HaveParen) {
SkipWhitespace (0); SkipWhitespace (0);
if (CurC != ')') { if (CurC != ')') {
PPError ("`)' expected"); PPError ("')' expected");
} else { } else {
NextChar (); NextChar ();
} }
@ -1138,7 +1138,7 @@ static void DoInclude (void)
break; break;
default: default:
PPError ("`\"' or `<' expected"); PPError ("'\"' or '<' expected");
goto Done; goto Done;
} }
NextChar (); NextChar ();
@ -1295,7 +1295,7 @@ void Preprocess (void)
PPError ("Duplicate #else"); PPError ("Duplicate #else");
} }
} else { } else {
PPError ("Unexpected `#else'"); PPError ("Unexpected '#else'");
} }
break; break;
@ -1314,7 +1314,7 @@ void Preprocess (void)
/* Remove the clause that needs a terminator */ /* Remove the clause that needs a terminator */
Skip = (IfStack[IfIndex--] & IFCOND_SKIP) != 0; Skip = (IfStack[IfIndex--] & IFCOND_SKIP) != 0;
} else { } else {
PPError ("Unexpected `#endif'"); PPError ("Unexpected '#endif'");
} }
break; break;
@ -1387,7 +1387,7 @@ void Preprocess (void)
} }
if (NextLine () == 0) { if (NextLine () == 0) {
if (IfIndex >= 0) { if (IfIndex >= 0) {
PPError ("`#endif' expected"); PPError ("'#endif' expected");
} }
return; return;
} }

View File

@ -377,7 +377,7 @@ static void CharConst (void)
/* Check for closing quote */ /* Check for closing quote */
if (CurC != '\'') { if (CurC != '\'') {
Error ("`\'' expected"); Error ("'\'' expected");
} else { } else {
/* Skip the quote */ /* Skip the quote */
NextChar (); NextChar ();
@ -1044,7 +1044,7 @@ int Consume (token_t Token, const char* ErrorMsg)
int ConsumeColon (void) int ConsumeColon (void)
/* Check for a colon and skip it. */ /* Check for a colon and skip it. */
{ {
return Consume (TOK_COLON, "`:' expected"); return Consume (TOK_COLON, "':' expected");
} }
@ -1057,7 +1057,7 @@ int ConsumeSemi (void)
NextToken (); NextToken ();
return 1; return 1;
} else { } else {
Error ("`;' expected"); Error ("';' expected");
if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) { if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) {
NextToken (); NextToken ();
} }
@ -1075,7 +1075,7 @@ int ConsumeComma (void)
NextToken (); NextToken ();
return 1; return 1;
} else { } else {
Error ("`,' expected"); Error ("',' expected");
if (CurTok.Tok == TOK_SEMI) { if (CurTok.Tok == TOK_SEMI) {
NextToken (); NextToken ();
} }
@ -1088,7 +1088,7 @@ int ConsumeComma (void)
int ConsumeLParen (void) int ConsumeLParen (void)
/* Check for a left parenthesis and skip it */ /* Check for a left parenthesis and skip it */
{ {
return Consume (TOK_LPAREN, "`(' expected"); return Consume (TOK_LPAREN, "'(' expected");
} }
@ -1096,7 +1096,7 @@ int ConsumeLParen (void)
int ConsumeRParen (void) int ConsumeRParen (void)
/* Check for a right parenthesis and skip it */ /* Check for a right parenthesis and skip it */
{ {
return Consume (TOK_RPAREN, "`)' expected"); return Consume (TOK_RPAREN, "')' expected");
} }
@ -1104,7 +1104,7 @@ int ConsumeRParen (void)
int ConsumeLBrack (void) int ConsumeLBrack (void)
/* Check for a left bracket and skip it */ /* Check for a left bracket and skip it */
{ {
return Consume (TOK_LBRACK, "`[' expected"); return Consume (TOK_LBRACK, "'[' expected");
} }
@ -1112,7 +1112,7 @@ int ConsumeLBrack (void)
int ConsumeRBrack (void) int ConsumeRBrack (void)
/* Check for a right bracket and skip it */ /* Check for a right bracket and skip it */
{ {
return Consume (TOK_RBRACK, "`]' expected"); return Consume (TOK_RBRACK, "']' expected");
} }
@ -1120,7 +1120,7 @@ int ConsumeRBrack (void)
int ConsumeLCurly (void) int ConsumeLCurly (void)
/* Check for a left curly brace and skip it */ /* Check for a left curly brace and skip it */
{ {
return Consume (TOK_LCURLY, "`{' expected"); return Consume (TOK_LCURLY, "'{' expected");
} }
@ -1128,5 +1128,5 @@ int ConsumeLCurly (void)
int ConsumeRCurly (void) int ConsumeRCurly (void)
/* Check for a right curly brace and skip it */ /* Check for a right curly brace and skip it */
{ {
return Consume (TOK_RCURLY, "`}' expected"); return Consume (TOK_RCURLY, "'}' expected");
} }

View File

@ -271,7 +271,7 @@ int SB_GetNumber (StrBuf* B, long* Val)
SB_Skip (B); SB_Skip (B);
*Val = SignExtendChar (TgtTranslateChar (ParseChar (B))); *Val = SignExtendChar (TgtTranslateChar (ParseChar (B)));
if (SB_Peek (B) != '\'') { if (SB_Peek (B) != '\'') {
Error ("`\'' expected"); Error ("'\'' expected");
return 0; return 0;
} else { } else {
/* Skip the quote */ /* Skip the quote */

View File

@ -115,7 +115,7 @@ static void CheckSemi (int* PendingToken)
{ {
int HaveToken = (CurTok.Tok == TOK_SEMI); int HaveToken = (CurTok.Tok == TOK_SEMI);
if (!HaveToken) { if (!HaveToken) {
Error ("`;' expected"); Error ("';' expected");
/* Try to be smart about errors */ /* Try to be smart about errors */
if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) { if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) {
HaveToken = 1; HaveToken = 1;
@ -231,7 +231,7 @@ static void DoStatement (void)
g_defcodelabel (ContinueLabel); g_defcodelabel (ContinueLabel);
/* Parse the end condition */ /* Parse the end condition */
Consume (TOK_WHILE, "`while' expected"); Consume (TOK_WHILE, "'while' expected");
TestInParens (LoopLabel, 1); TestInParens (LoopLabel, 1);
ConsumeSemi (); ConsumeSemi ();
@ -332,7 +332,7 @@ static void ReturnStatement (void)
} }
} else if (!F_HasVoidReturn (CurrentFunc) && !F_HasOldStyleIntRet (CurrentFunc)) { } else if (!F_HasVoidReturn (CurrentFunc) && !F_HasOldStyleIntRet (CurrentFunc)) {
Error ("Function `%s' must return a value", F_GetFuncName (CurrentFunc)); Error ("Function '%s' must return a value", F_GetFuncName (CurrentFunc));
} }
/* Mark the function as having a return statement */ /* Mark the function as having a return statement */
@ -361,7 +361,7 @@ static void BreakStatement (void)
/* Check if we are inside a loop */ /* Check if we are inside a loop */
if (L == 0) { if (L == 0) {
/* Error: No current loop */ /* Error: No current loop */
Error ("`break' statement not within loop or switch"); Error ("'break' statement not within loop or switch");
return; return;
} }
@ -396,7 +396,7 @@ static void ContinueStatement (void)
/* Did we find it? */ /* Did we find it? */
if (L == 0) { if (L == 0) {
Error ("`continue' statement not within a loop"); Error ("'continue' statement not within a loop");
return; return;
} }
@ -591,7 +591,7 @@ int Statement (int* PendingToken)
case TOK_LCURLY: case TOK_LCURLY:
NextToken (); NextToken ();
GotBreak = CompoundStatement (); GotBreak = CompoundStatement ();
CheckTok (TOK_RCURLY, "`{' expected", PendingToken); CheckTok (TOK_RCURLY, "'{' expected", PendingToken);
return GotBreak; return GotBreak;
case TOK_IF: case TOK_IF:

View File

@ -303,7 +303,7 @@ void DefaultLabel (void)
} else { } else {
/* case keyword outside a switch statement */ /* case keyword outside a switch statement */
Error ("`default' label not within a switch statement"); Error ("'default' label not within a switch statement");
} }

View File

@ -168,11 +168,11 @@ static void CheckSymTable (SymTable* Tab)
!SymHasAttr (Entry, atUnused)) { !SymHasAttr (Entry, atUnused)) {
if (Flags & SC_PARAM) { if (Flags & SC_PARAM) {
if (IS_Get (&WarnUnusedParam)) { if (IS_Get (&WarnUnusedParam)) {
Warning ("Parameter `%s' is never used", Entry->Name); Warning ("Parameter '%s' is never used", Entry->Name);
} }
} else { } else {
if (IS_Get (&WarnUnusedVar)) { if (IS_Get (&WarnUnusedVar)) {
Warning ("`%s' is defined but never used", Entry->Name); Warning ("'%s' is defined but never used", Entry->Name);
} }
} }
} }
@ -182,11 +182,11 @@ static void CheckSymTable (SymTable* Tab)
if (Flags & SC_LABEL) { if (Flags & SC_LABEL) {
if (!SymIsDef (Entry)) { if (!SymIsDef (Entry)) {
/* Undefined label */ /* Undefined label */
Error ("Undefined label: `%s'", Entry->Name); Error ("Undefined label: '%s'", Entry->Name);
} else if (!SymIsRef (Entry)) { } else if (!SymIsRef (Entry)) {
/* Defined but not used */ /* Defined but not used */
if (IS_Get (&WarnUnusedLabel)) { if (IS_Get (&WarnUnusedLabel)) {
Warning ("`%s' is defined but never used", Entry->Name); Warning ("'%s' is defined but never used", Entry->Name);
} }
} }
} }
@ -566,10 +566,10 @@ SymEntry* AddStructSym (const char* Name, unsigned Type, unsigned Size, SymTable
/* We do have an entry. This may be a forward, so check it. */ /* We do have an entry. This may be a forward, so check it. */
if ((Entry->Flags & SC_TYPEMASK) != Type) { if ((Entry->Flags & SC_TYPEMASK) != Type) {
/* Existing symbol is not a struct */ /* Existing symbol is not a struct */
Error ("Symbol `%s' is already different kind", Name); Error ("Symbol '%s' is already different kind", Name);
} else if (Size > 0 && Entry->V.S.Size > 0) { } else if (Size > 0 && Entry->V.S.Size > 0) {
/* Both structs are definitions. */ /* Both structs are definitions. */
Error ("Multiple definition for `%s'", Name); Error ("Multiple definition for '%s'", Name);
} else { } else {
/* Define the struct size if it is given */ /* Define the struct size if it is given */
if (Size > 0) { if (Size > 0) {
@ -605,7 +605,7 @@ SymEntry* AddBitField (const char* Name, unsigned Offs, unsigned BitOffs, unsign
if (Entry) { if (Entry) {
/* We have a symbol with this name already */ /* We have a symbol with this name already */
Error ("Multiple definition for `%s'", Name); Error ("Multiple definition for '%s'", Name);
} else { } else {
@ -639,9 +639,9 @@ SymEntry* AddConstSym (const char* Name, const Type* T, unsigned Flags, long Val
SymEntry* Entry = FindSymInTable (Tab, Name, HashStr (Name)); SymEntry* Entry = FindSymInTable (Tab, Name, HashStr (Name));
if (Entry) { if (Entry) {
if ((Entry->Flags & SC_CONST) != SC_CONST) { if ((Entry->Flags & SC_CONST) != SC_CONST) {
Error ("Symbol `%s' is already different kind", Name); Error ("Symbol '%s' is already different kind", Name);
} else { } else {
Error ("Multiple definition for `%s'", Name); Error ("Multiple definition for '%s'", Name);
} }
return Entry; return Entry;
} }
@ -706,7 +706,7 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags)
if (SymIsDef (Entry) && (Flags & SC_DEF) != 0) { if (SymIsDef (Entry) && (Flags & SC_DEF) != 0) {
/* Trying to define the label more than once */ /* Trying to define the label more than once */
Error ("Label `%s' is defined more than once", Name); Error ("Label '%s' is defined more than once", Name);
} }
NewDOR = AddDefOrRef (Entry, Flags); NewDOR = AddDefOrRef (Entry, Flags);
@ -809,7 +809,7 @@ SymEntry* AddLocalSym (const char* Name, const Type* T, unsigned Flags, int Offs
if (Entry) { if (Entry) {
/* We have a symbol with this name already */ /* We have a symbol with this name already */
Error ("Multiple definition for `%s'", Name); Error ("Multiple definition for '%s'", Name);
} else { } else {
@ -865,12 +865,12 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
** then avoid a compiler crash. See GitHub issue #728. ** then avoid a compiler crash. See GitHub issue #728.
*/ */
if (Entry->Flags & SC_ENUM) { if (Entry->Flags & SC_ENUM) {
Fatal ("Can't redeclare enum constant `%s' as global variable", Name); Fatal ("Can't redeclare enum constant '%s' as global variable", Name);
} }
/* We have a symbol with this name already */ /* We have a symbol with this name already */
if (Entry->Flags & SC_TYPE) { if (Entry->Flags & SC_TYPE) {
Error ("Multiple definition for `%s'", Name); Error ("Multiple definition for '%s'", Name);
return Entry; return Entry;
} }
@ -890,7 +890,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
if ((Size != UNSPECIFIED && ESize != UNSPECIFIED && Size != ESize) || if ((Size != UNSPECIFIED && ESize != UNSPECIFIED && Size != ESize) ||
TypeCmp (T + 1, EType + 1) < TC_EQUAL) { TypeCmp (T + 1, EType + 1) < TC_EQUAL) {
/* Types not identical: Conflicting types */ /* Types not identical: Conflicting types */
Error ("Conflicting types for `%s'", Name); Error ("Conflicting types for '%s'", Name);
return Entry; return Entry;
} else { } else {
/* Check if we have a size in the existing definition */ /* Check if we have a size in the existing definition */
@ -903,7 +903,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
} else { } else {
/* New type must be identical */ /* New type must be identical */
if (TypeCmp (EType, T) < TC_EQUAL) { if (TypeCmp (EType, T) < TC_EQUAL) {
Error ("Conflicting types for `%s'", Name); Error ("Conflicting types for '%s'", Name);
return Entry; return Entry;
} }
@ -930,7 +930,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
** warn about the conflict. (It will compile a public declaration.) ** warn about the conflict. (It will compile a public declaration.)
*/ */
if ((Flags & SC_EXTERN) == 0 && (Entry->Flags & SC_EXTERN) != 0) { if ((Flags & SC_EXTERN) == 0 && (Entry->Flags & SC_EXTERN) != 0) {
Warning ("static declaration follows non-static declaration of `%s'.", Name); Warning ("static declaration follows non-static declaration of '%s'.", Name);
} }
/* An extern declaration must not change the current linkage. */ /* An extern declaration must not change the current linkage. */
@ -942,7 +942,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
** warn about the conflict. (It will compile a public declaration.) ** warn about the conflict. (It will compile a public declaration.)
*/ */
if ((Flags & SC_EXTERN) != 0 && (Entry->Flags & SC_EXTERN) == 0) { if ((Flags & SC_EXTERN) != 0 && (Entry->Flags & SC_EXTERN) == 0) {
Warning ("public declaration follows static declaration of `%s'.", Name); Warning ("public declaration follows static declaration of '%s'.", Name);
} }
/* Add the new flags */ /* Add the new flags */
@ -1017,7 +1017,7 @@ void MakeZPSym (const char* Name)
if (Entry) { if (Entry) {
Entry->Flags |= SC_ZEROPAGE; Entry->Flags |= SC_ZEROPAGE;
} else { } else {
Error ("Undefined symbol: `%s'", Name); Error ("Undefined symbol: '%s'", Name);
} }
} }

View File

@ -76,7 +76,7 @@ static void DoConversion (ExprDesc* Expr, const Type* NewType)
/* Don't allow casts from void to something else. */ /* Don't allow casts from void to something else. */
if (IsTypeVoid (OldType)) { if (IsTypeVoid (OldType)) {
Error ("Cannot convert from `void' to something else"); Error ("Cannot convert from 'void' to something else");
goto ExitPoint; goto ExitPoint;
} }

View File

@ -325,7 +325,7 @@ static void ConvertFile (const char* Input, const char* Output)
/* Try to open the file for reading */ /* Try to open the file for reading */
FILE* F = fopen (Input, "rb"); FILE* F = fopen (Input, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open input file `%s': %s", Input, strerror (errno)); Error ("Cannot open input file '%s': %s", Input, strerror (errno));
} }
/* Seek to the end and determine the size */ /* Seek to the end and determine the size */
@ -337,9 +337,9 @@ static void ConvertFile (const char* Input, const char* Output)
/* Check if the size is reasonable */ /* Check if the size is reasonable */
if (Size > 32*1024) { if (Size > 32*1024) {
Error ("Input file `%s' is too large (max = 32k)", Input); Error ("Input file '%s' is too large (max = 32k)", Input);
} else if (Size < 0x100) { } else if (Size < 0x100) {
Error ("Input file `%s' is too small to be a vector font file", Input); Error ("Input file '%s' is too small to be a vector font file", Input);
} }
/* Allocate memory for the file */ /* Allocate memory for the file */
@ -347,7 +347,7 @@ static void ConvertFile (const char* Input, const char* Output)
/* Read the file contents into the buffer */ /* Read the file contents into the buffer */
if (fread (Buf, 1, (size_t) Size, F) != (size_t) Size) { if (fread (Buf, 1, (size_t) Size, F) != (size_t) Size) {
Error ("Error reading from input file `%s'", Input); Error ("Error reading from input file '%s'", Input);
} }
/* Close the file */ /* Close the file */
@ -355,14 +355,14 @@ static void ConvertFile (const char* Input, const char* Output)
/* Verify the header */ /* Verify the header */
if (memcmp (Buf, ChrHeader, sizeof (ChrHeader)) != 0) { if (memcmp (Buf, ChrHeader, sizeof (ChrHeader)) != 0) {
Error ("Invalid format for `%s': invalid header", Input); Error ("Invalid format for '%s': invalid header", Input);
} }
MsgEnd = memchr (Buf + sizeof (ChrHeader), 0x1A, 0x80); MsgEnd = memchr (Buf + sizeof (ChrHeader), 0x1A, 0x80);
if (MsgEnd == 0) { if (MsgEnd == 0) {
Error ("Invalid format for `%s': description not found", Input); Error ("Invalid format for '%s': description not found", Input);
} }
if (MsgEnd[1] != 0x80 || MsgEnd[2] != 0x00) { if (MsgEnd[1] != 0x80 || MsgEnd[2] != 0x00) {
Error ("Invalid format for `%s': wrong header size", Input); Error ("Invalid format for '%s': wrong header size", Input);
} }
/* We expect the file to hold chars from 0x20 (space) to 0x7E (tilde) */ /* We expect the file to hold chars from 0x20 (space) to 0x7E (tilde) */
@ -372,9 +372,9 @@ static void ConvertFile (const char* Input, const char* Output)
if (FirstChar > 0x20 || LastChar < 0x7E) { if (FirstChar > 0x20 || LastChar < 0x7E) {
Print (stderr, 1, "FirstChar = $%04X, CharCount = %u\n", Print (stderr, 1, "FirstChar = $%04X, CharCount = %u\n",
FirstChar, CharCount); FirstChar, CharCount);
Error ("File `%s' doesn't contain the chars we need", Input); Error ("File '%s' doesn't contain the chars we need", Input);
} else if (LastChar >= 0x100) { } else if (LastChar >= 0x100) {
Error ("File `%s' contains too many character definitions", Input); Error ("File '%s' contains too many character definitions", Input);
} }
/* Print the copyright from the header */ /* Print the copyright from the header */
@ -405,7 +405,7 @@ static void ConvertFile (const char* Input, const char* Output)
/* Check if the offset is valid */ /* Check if the offset is valid */
if (Remaining <= 0) { if (Remaining <= 0) {
Error ("Invalid data offset in input file `%s'", Input); Error ("Invalid data offset in input file '%s'", Input);
} }
/* Convert the vector data and place it into the buffer */ /* Convert the vector data and place it into the buffer */
@ -422,7 +422,7 @@ static void ConvertFile (const char* Input, const char* Output)
/* The baseline must be zero, otherwise we cannot convert */ /* The baseline must be zero, otherwise we cannot convert */
if (Buf[0x89] != 0) { if (Buf[0x89] != 0) {
Error ("Baseline of font in `%s' is not zero", Input); Error ("Baseline of font in '%s' is not zero", Input);
} }
/* If the output file is NULL, use the name of the input file with ".tch" /* If the output file is NULL, use the name of the input file with ".tch"
@ -435,33 +435,33 @@ static void ConvertFile (const char* Input, const char* Output)
/* Open the output file */ /* Open the output file */
F = fopen (Output, "wb"); F = fopen (Output, "wb");
if (F == 0) { if (F == 0) {
Error ("Cannot open output file `%s': %s", Output, strerror (errno)); Error ("Cannot open output file '%s': %s", Output, strerror (errno));
} }
/* Write the header to the output file */ /* Write the header to the output file */
if (fwrite (TchHeader, 1, sizeof (TchHeader), F) != sizeof (TchHeader)) { if (fwrite (TchHeader, 1, sizeof (TchHeader), F) != sizeof (TchHeader)) {
Error ("Error writing to `%s' (disk full?)", Output); Error ("Error writing to '%s' (disk full?)", Output);
} }
/* Write the width table to the output file */ /* Write the width table to the output file */
if (fwrite (WidthBuf, 1, 0x5F, F) != 0x5F) { if (fwrite (WidthBuf, 1, 0x5F, F) != 0x5F) {
Error ("Error writing to `%s' (disk full?)", Output); Error ("Error writing to '%s' (disk full?)", Output);
} }
/* Write the offsets to the output file */ /* Write the offsets to the output file */
if (fwrite (SB_GetConstBuf (&Offsets), 1, 0x5F * 2, F) != 0x5F * 2) { if (fwrite (SB_GetConstBuf (&Offsets), 1, 0x5F * 2, F) != 0x5F * 2) {
Error ("Error writing to `%s' (disk full?)", Output); Error ("Error writing to '%s' (disk full?)", Output);
} }
/* Write the data to the output file */ /* Write the data to the output file */
Offs = SB_GetLen (&VectorData); Offs = SB_GetLen (&VectorData);
if (fwrite (SB_GetConstBuf (&VectorData), 1, Offs, F) != Offs) { if (fwrite (SB_GetConstBuf (&VectorData), 1, Offs, F) != Offs) {
Error ("Error writing to `%s' (disk full?)", Output); Error ("Error writing to '%s' (disk full?)", Output);
} }
/* Close the output file */ /* Close the output file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing to `%s': %s", Output, strerror (errno)); Error ("Error closing to '%s': %s", Output, strerror (errno));
} }
/* Done */ /* Done */

View File

@ -339,7 +339,7 @@ static void CmdAddFile (CmdDesc* Cmd, const char* File)
for (I = 0; I < Cmd->FileCount; ++I) { for (I = 0; I < Cmd->FileCount; ++I) {
if (strcmp (Cmd->Files[I], File) == 0) { if (strcmp (Cmd->Files[I], File) == 0) {
/* Duplicate file */ /* Duplicate file */
Warning ("Duplicate file in argument list: `%s'", File); Warning ("Duplicate file in argument list: '%s'", File);
/* No need to search further */ /* No need to search further */
break; break;
} }
@ -447,7 +447,7 @@ static void ExecProgram (CmdDesc* Cmd)
/* Check the result code */ /* Check the result code */
if (Status < 0) { if (Status < 0) {
/* Error executing the program */ /* Error executing the program */
Error ("Cannot execute `%s': %s", Cmd->Name, strerror (errno)); Error ("Cannot execute '%s': %s", Cmd->Name, strerror (errno));
} else if (Status != 0) { } else if (Status != 0) {
/* Called program had an error */ /* Called program had an error */
exit (Status); exit (Status);
@ -573,7 +573,7 @@ static void AssembleIntermediate (const char* SourceFile)
/* Remove the input file */ /* Remove the input file */
if (remove (AsmName) < 0) { if (remove (AsmName) < 0) {
Warning ("Cannot remove temporary file `%s': %s", Warning ("Cannot remove temporary file '%s': %s",
AsmName, strerror (errno)); AsmName, strerror (errno));
} }
@ -757,7 +757,7 @@ static void Usage (void)
" -o name\t\t\tName the output file\n" " -o name\t\t\tName the output file\n"
" -r\t\t\t\tEnable register variables\n" " -r\t\t\t\tEnable register variables\n"
" -t sys\t\t\tSet the target system\n" " -t sys\t\t\tSet the target system\n"
" -u sym\t\t\tForce an import of symbol `sym'\n" " -u sym\t\t\tForce an import of symbol 'sym'\n"
" -v\t\t\t\tVerbose mode\n" " -v\t\t\t\tVerbose mode\n"
" -vm\t\t\t\tVerbose map file\n" " -vm\t\t\t\tVerbose map file\n"
" -C name\t\t\tUse linker config file\n" " -C name\t\t\tUse linker config file\n"
@ -803,7 +803,7 @@ static void Usage (void)
" --debug\t\t\tDebug mode\n" " --debug\t\t\tDebug mode\n"
" --debug-info\t\t\tAdd debug info\n" " --debug-info\t\t\tAdd debug info\n"
" --feature name\t\tSet an emulation feature\n" " --feature name\t\tSet an emulation feature\n"
" --force-import sym\t\tForce an import of symbol `sym'\n" " --force-import sym\t\tForce an import of symbol 'sym'\n"
" --help\t\t\tHelp (this text)\n" " --help\t\t\tHelp (this text)\n"
" --include-dir dir\t\tSet a compiler include directory path\n" " --include-dir dir\t\tSet a compiler include directory path\n"
" --ld-args options\t\tPass options to the linker\n" " --ld-args options\t\tPass options to the linker\n"
@ -1296,9 +1296,9 @@ static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
{ {
Target = FindTarget (Arg); Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) { if (Target == TGT_UNKNOWN) {
Error ("No such target system: `%s'", Arg); Error ("No such target system: '%s'", Arg);
} else if (Target == TGT_MODULE) { } else if (Target == TGT_MODULE) {
Error ("Cannot use `module' as target, use --module instead"); Error ("Cannot use 'module' as target, use --module instead");
} }
} }
@ -1631,7 +1631,7 @@ int main (int argc, char* argv [])
break; break;
default: default:
Error ("Don't know what to do with `%s'", Arg); Error ("Don't know what to do with '%s'", Arg);
} }

View File

@ -82,7 +82,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv [
/* The son - exec the program */ /* The son - exec the program */
if (execvp (File, argv) < 0) { if (execvp (File, argv) < 0) {
Error ("Cannot exec `%s': %s", File, strerror (errno)); Error ("Cannot exec '%s': %s", File, strerror (errno));
} }
} else { } else {
@ -94,7 +94,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv [
/* Examine the child status */ /* Examine the child status */
if (!WIFEXITED (Status)) { if (!WIFEXITED (Status)) {
Error ("Subprocess `%s' aborted by signal %d", File, WTERMSIG (Status)); Error ("Subprocess '%s' aborted by signal %d", File, WTERMSIG (Status));
} }
} }

View File

@ -394,7 +394,7 @@ void Convert (const O65Data* D)
switch (O->Type) { switch (O->Type) {
case O65_OPT_FILENAME: case O65_OPT_FILENAME:
Print (stdout, 1, "O65 filename option: `%s'\n", Print (stdout, 1, "O65 filename option: '%s'\n",
GetO65OptionText (O)); GetO65OptionText (O));
break; break;
@ -402,7 +402,7 @@ void Convert (const O65Data* D)
if (O->Len == 2) { if (O->Len == 2) {
Warning ("Operating system option without data found"); Warning ("Operating system option without data found");
} else { } else {
Print (stdout, 1, "O65 operating system option: `%s'\n", Print (stdout, 1, "O65 operating system option: '%s'\n",
GetO65OSName (O->Data[0])); GetO65OSName (O->Data[0]));
switch (O->Data[0]) { switch (O->Data[0]) {
case O65_OS_CC65_MODULE: case O65_OS_CC65_MODULE:
@ -418,7 +418,7 @@ void Convert (const O65Data* D)
break; break;
case O65_OPT_ASM: case O65_OPT_ASM:
Print (stdout, 1, "O65 assembler option: `%s'\n", Print (stdout, 1, "O65 assembler option: '%s'\n",
GetO65OptionText (O)); GetO65OptionText (O));
break; break;
@ -427,11 +427,11 @@ void Convert (const O65Data* D)
xfree (Author); xfree (Author);
} }
Author = xstrdup (GetO65OptionText (O)); Author = xstrdup (GetO65OptionText (O));
Print (stdout, 1, "O65 author option: `%s'\n", Author); Print (stdout, 1, "O65 author option: '%s'\n", Author);
break; break;
case O65_OPT_TIMESTAMP: case O65_OPT_TIMESTAMP:
Print (stdout, 1, "O65 timestamp option: `%s'\n", Print (stdout, 1, "O65 timestamp option: '%s'\n",
GetO65OptionText (O)); GetO65OptionText (O));
break; break;
@ -450,11 +450,11 @@ void Convert (const O65Data* D)
/* Open the output file */ /* Open the output file */
F = fopen (OutputName, "w"); F = fopen (OutputName, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", OutputName, strerror (errno)); Error ("Cannot open '%s': %s", OutputName, strerror (errno));
} }
/* Create a header */ /* Create a header */
fprintf (F, ";\n; File generated by co65 v %s using model `%s'\n;\n", fprintf (F, ";\n; File generated by co65 v %s using model '%s'\n;\n",
GetVersionAsString (), GetModelName (Model)); GetVersionAsString (), GetModelName (Model));
/* Select the CPU */ /* Select the CPU */

View File

@ -112,7 +112,7 @@ static void CheckLabelName (const char* Label)
} }
if (*L) { if (*L) {
Error ("Label name `%s' is invalid", Label); Error ("Label name '%s' is invalid", Label);
} }
} }
@ -123,7 +123,7 @@ static void CheckSegName (const char* Seg)
{ {
/* Print an error and abort if the name is not ok */ /* Print an error and abort if the name is not ok */
if (!ValidSegName (Seg)) { if (!ValidSegName (Seg)) {
Error ("Segment name `%s' is invalid", Seg); Error ("Segment name '%s' is invalid", Seg);
} }
} }
@ -244,7 +244,7 @@ static void OptO65Model (const char* Opt attribute ((unused)), const char* Arg)
/* Search for the model name */ /* Search for the model name */
Model = FindModel (Arg); Model = FindModel (Arg);
if (Model == O65_MODEL_INVALID) { if (Model == O65_MODEL_INVALID) {
Error ("Unknown o65 model `%s'", Arg); Error ("Unknown o65 model '%s'", Arg);
} }
} }
@ -387,7 +387,7 @@ int main (int argc, char* argv [])
} else { } else {
/* Filename. Check if we already had one */ /* Filename. Check if we already had one */
if (InputName) { if (InputName) {
Error ("Don't know what to do with `%s'", Arg); Error ("Don't know what to do with '%s'", Arg);
} else { } else {
InputName = Arg; InputName = Arg;
} }

View File

@ -361,7 +361,7 @@ O65Data* ReadO65File (const char* Name)
/* Open the o65 input file */ /* Open the o65 input file */
FILE* F = fopen (Name, "rb"); FILE* F = fopen (Name, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", Name, strerror (errno)); Error ("Cannot open '%s': %s", Name, strerror (errno));
} }
/* Read the file data */ /* Read the file data */

View File

@ -75,5 +75,5 @@ static void DefaultCheckFailed (const char* Msg, const char* Cond,
const char* File, unsigned Line) const char* File, unsigned Line)
{ {
/* Output a diagnostic and abort */ /* Output a diagnostic and abort */
AbEnd ("%s%s, file `%s', line %u", Msg, Cond, File, Line); AbEnd ("%s%s, file '%s', line %u", Msg, Cond, File, Line);
} }

View File

@ -239,7 +239,7 @@ void NeedArg (const char* Opt)
void InvArg (const char* Opt, const char* Arg) void InvArg (const char* Opt, const char* Arg)
/* Print an error about an invalid option argument and exit. */ /* Print an error about an invalid option argument and exit. */
{ {
AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); AbEnd ("Invalid argument for %s: '%s'", Opt, Arg);
} }
@ -247,7 +247,7 @@ void InvArg (const char* Opt, const char* Arg)
void InvDef (const char* Def) void InvDef (const char* Def)
/* Print an error about an invalid definition and die */ /* Print an error about an invalid definition and die */
{ {
AbEnd ("Invalid definition: `%s'", Def); AbEnd ("Invalid definition: '%s'", Def);
} }

View File

@ -148,7 +148,7 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
++L; ++L;
} else { } else {
if (!IgnoreUnknown) { if (!IgnoreUnknown) {
Error ("%s(%u): Missing `='", Filename, Line); Error ("%s(%u): Missing '='", Filename, Line);
} }
continue; continue;
} }

View File

@ -78,12 +78,12 @@ void LoadCode (void)
/* Open the file */ /* Open the file */
F = fopen (InFile, "rb"); F = fopen (InFile, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", InFile, strerror (errno)); Error ("Cannot open '%s': %s", InFile, strerror (errno));
} }
/* Seek to the end to get the size of the file */ /* Seek to the end to get the size of the file */
if (fseek (F, 0, SEEK_END) != 0) { if (fseek (F, 0, SEEK_END) != 0) {
Error ("Cannot seek on file `%s': %s", InFile, strerror (errno)); Error ("Cannot seek on file '%s': %s", InFile, strerror (errno));
} }
Size = ftell (F); Size = ftell (F);
@ -101,7 +101,7 @@ void LoadCode (void)
** the file. ** the file.
*/ */
if (fseek (F, InputOffs, SEEK_SET) != 0) { if (fseek (F, InputOffs, SEEK_SET) != 0) {
Error ("Cannot seek on file `%s': %s", InFile, strerror (errno)); Error ("Cannot seek on file '%s': %s", InFile, strerror (errno));
} }
Size -= InputOffs; Size -= InputOffs;
@ -130,10 +130,10 @@ void LoadCode (void)
/* Check if the size is larger than what we can read */ /* Check if the size is larger than what we can read */
if (Size == 0) { if (Size == 0) {
Error ("Nothing to read from input file `%s'", InFile); Error ("Nothing to read from input file '%s'", InFile);
} }
if (Size > MaxCount) { if (Size > MaxCount) {
Warning ("File `%s' is too large, ignoring %ld bytes", Warning ("File '%s' is too large, ignoring %ld bytes",
InFile, Size - MaxCount); InFile, Size - MaxCount);
} else if (MaxCount > Size) { } else if (MaxCount > Size) {
MaxCount = (unsigned) Size; MaxCount = (unsigned) Size;
@ -142,7 +142,7 @@ void LoadCode (void)
/* Read from the file and remember the number of bytes read */ /* Read from the file and remember the number of bytes read */
Count = fread (CodeBuf + StartAddr, 1, MaxCount, F); Count = fread (CodeBuf + StartAddr, 1, MaxCount, F);
if (ferror (F) || Count != MaxCount) { if (ferror (F) || Count != MaxCount) {
Error ("Error reading from `%s': %s", InFile, strerror (errno)); Error ("Error reading from '%s': %s", InFile, strerror (errno));
} }
/* Close the file */ /* Close the file */

View File

@ -617,7 +617,7 @@ int main (int argc, char* argv [])
} else { } else {
/* Filename. Check if we already had one */ /* Filename. Check if we already had one */
if (InFile) { 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); ProgName, Arg);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} else { } else {

View File

@ -96,7 +96,7 @@ void OpenOutput (const char* Name)
if (Name != 0) { if (Name != 0) {
F = fopen (Name, "w"); F = fopen (Name, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", Name, strerror (errno)); Error ("Cannot open '%s': %s", Name, strerror (errno));
} }
} else { } else {
F = stdout; F = stdout;

View File

@ -7,7 +7,7 @@
/* */ /* */
/* */ /* */
/* (C) 2000-2005 Ullrich von Bassewitz */ /* (C) 2000-2005 Ullrich von Bassewitz */
/* Römerstrasse 52 */ /* Roemerstrasse 52 */
/* D-70794 Filderstadt */ /* D-70794 Filderstadt */
/* EMail: uz@cc65.org */ /* EMail: uz@cc65.org */
/* */ /* */
@ -466,7 +466,7 @@ Again:
/* C++ style comment */ /* C++ style comment */
NextChar (); NextChar ();
if (C != '/') { if (C != '/') {
InfoError ("Invalid token `/'"); InfoError ("Invalid token '/'");
} }
do { do {
NextChar (); NextChar ();
@ -482,7 +482,7 @@ Again:
break; break;
default: default:
InfoError ("Invalid character `%c'", C); InfoError ("Invalid character '%c'", C);
} }
} }
@ -503,7 +503,7 @@ void InfoConsume (unsigned T, const char* Msg)
void InfoConsumeLCurly (void) void InfoConsumeLCurly (void)
/* Consume a left curly brace */ /* Consume a left curly brace */
{ {
InfoConsume (INFOTOK_LCURLY, "`{' expected"); InfoConsume (INFOTOK_LCURLY, "'{' expected");
} }
@ -511,7 +511,7 @@ void InfoConsumeLCurly (void)
void InfoConsumeRCurly (void) void InfoConsumeRCurly (void)
/* Consume a right curly brace */ /* Consume a right curly brace */
{ {
InfoConsume (INFOTOK_RCURLY, "`}' expected"); InfoConsume (INFOTOK_RCURLY, "'}' expected");
} }
@ -519,7 +519,7 @@ void InfoConsumeRCurly (void)
void InfoConsumeSemi (void) void InfoConsumeSemi (void)
/* Consume a semicolon */ /* Consume a semicolon */
{ {
InfoConsume (INFOTOK_SEMI, "`;' expected"); InfoConsume (INFOTOK_SEMI, "';' expected");
} }
@ -527,7 +527,7 @@ void InfoConsumeSemi (void)
void InfoConsumeColon (void) void InfoConsumeColon (void)
/* Consume a colon */ /* Consume a colon */
{ {
InfoConsume (INFOTOK_COLON, "`:' expected"); InfoConsume (INFOTOK_COLON, "':' expected");
} }
@ -683,7 +683,7 @@ void InfoOpenInput (void)
/* Open the file */ /* Open the file */
InputFile = fopen (InfoFile, "r"); InputFile = fopen (InfoFile, "r");
if (InputFile == 0) { if (InputFile == 0) {
Error ("Cannot open `%s': %s", InfoFile, strerror (errno)); Error ("Cannot open '%s': %s", InfoFile, strerror (errno));
} }
/* Initialize variables */ /* Initialize variables */

View File

@ -2687,7 +2687,7 @@ static void NextToken (InputData* D)
break; break;
default: default:
ParseError (D, CC65_ERROR, "Invalid input character `%c'", D->C); ParseError (D, CC65_ERROR, "Invalid input character '%c'", D->C);
} }
} }

View File

@ -151,12 +151,12 @@ static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
break; break;
case TGT_UNKNOWN: case TGT_UNKNOWN:
AbEnd ("Unknown target system `%s'", Arg); AbEnd ("Unknown target system '%s'", Arg);
break; break;
default: default:
/* Target is known but unsupported */ /* Target is known but unsupported */
AbEnd ("Unsupported target system `%s'", Arg); AbEnd ("Unsupported target system '%s'", Arg);
break; break;
} }
} }

View File

@ -129,7 +129,7 @@ void CheckAssertions (void)
/* If the expression is not constant, we're not able to handle it */ /* If the expression is not constant, we're not able to handle it */
if (!IsConstExpr (A->Expr)) { if (!IsConstExpr (A->Expr)) {
Warning ("Cannot evaluate assertion in module `%s', line %u", Warning ("Cannot evaluate assertion in module '%s', line %u",
Module, Line); Module, Line);
} else if (GetExprVal (A->Expr) == 0) { } else if (GetExprVal (A->Expr) == 0) {
@ -149,7 +149,7 @@ void CheckAssertions (void)
break; break;
default: default:
Internal ("Invalid assertion action (%u) in module `%s', " Internal ("Invalid assertion action (%u) in module '%s', "
"line %u (file corrupt?)", "line %u (file corrupt?)",
A->Action, Module, Line); A->Action, Module, Line);
break; break;

View File

@ -154,7 +154,7 @@ static void BinWriteMem (BinDesc* D, MemoryArea* M)
SegDesc* S = CollAtUnchecked (&M->SegList, I); SegDesc* S = CollAtUnchecked (&M->SegList, I);
/* Keep the user happy */ /* Keep the user happy */
Print (stdout, 1, " Writing `%s'\n", GetString (S->Name)); Print (stdout, 1, " Writing '%s'\n", GetString (S->Name));
/* Writes do only occur in the load area and not for BSS segments */ /* Writes do only occur in the load area and not for BSS segments */
DoWrite = (S->Flags & SF_BSS) == 0 && /* No BSS segment */ DoWrite = (S->Flags & SF_BSS) == 0 && /* No BSS segment */
@ -286,23 +286,23 @@ void BinWriteTarget (BinDesc* D, struct File* F)
/* Open the file */ /* Open the file */
D->F = fopen (D->Filename, "wb"); D->F = fopen (D->Filename, "wb");
if (D->F == 0) { if (D->F == 0) {
Error ("Cannot open `%s': %s", D->Filename, strerror (errno)); Error ("Cannot open '%s': %s", D->Filename, strerror (errno));
} }
/* Keep the user happy */ /* Keep the user happy */
Print (stdout, 1, "Opened `%s'...\n", D->Filename); Print (stdout, 1, "Opened '%s'...\n", D->Filename);
/* Dump all memory areas */ /* Dump all memory areas */
for (I = 0; I < CollCount (&F->MemoryAreas); ++I) { for (I = 0; I < CollCount (&F->MemoryAreas); ++I) {
/* Get this entry */ /* Get this entry */
MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, I); MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, I);
Print (stdout, 1, " Dumping `%s'\n", GetString (M->Name)); Print (stdout, 1, " Dumping '%s'\n", GetString (M->Name));
BinWriteMem (D, M); BinWriteMem (D, M);
} }
/* Close the file */ /* Close the file */
if (fclose (D->F) != 0) { if (fclose (D->F) != 0) {
Error ("Cannot write to `%s': %s", D->Filename, strerror (errno)); Error ("Cannot write to '%s': %s", D->Filename, strerror (errno));
} }
/* Reset the file and filename */ /* Reset the file and filename */

View File

@ -226,7 +226,7 @@ static MemoryArea* CfgGetMemory (unsigned Name)
{ {
MemoryArea* M = CfgFindMemory (Name); MemoryArea* M = CfgFindMemory (Name);
if (M == 0) { if (M == 0) {
CfgError (&CfgErrorPos, "Invalid memory area `%s'", GetString (Name)); CfgError (&CfgErrorPos, "Invalid memory area '%s'", GetString (Name));
} }
return M; return M;
} }
@ -320,7 +320,7 @@ static MemoryArea* CreateMemoryArea (const FilePos* Pos, unsigned Name)
MemoryArea* M = CfgFindMemory (Name); MemoryArea* M = CfgFindMemory (Name);
if (M) { if (M) {
CfgError (&CfgErrorPos, CfgError (&CfgErrorPos,
"Memory area `%s' defined twice", "Memory area '%s' defined twice",
GetString (Name)); GetString (Name));
} }
@ -343,7 +343,7 @@ static SegDesc* NewSegDesc (unsigned Name)
/* Check for duplicate names */ /* Check for duplicate names */
SegDesc* S = CfgFindSegDesc (Name); SegDesc* S = CfgFindSegDesc (Name);
if (S) { if (S) {
CfgError (&CfgErrorPos, "Segment `%s' defined twice", GetString (Name)); CfgError (&CfgErrorPos, "Segment '%s' defined twice", GetString (Name));
} }
/* Allocate memory */ /* Allocate memory */
@ -566,7 +566,7 @@ static void ParseFiles (void)
F = FindFile (GetStrBufId (&CfgSVal)); F = FindFile (GetStrBufId (&CfgSVal));
if (F == 0) { if (F == 0) {
CfgError (&CfgErrorPos, CfgError (&CfgErrorPos,
"File `%s' not found in MEMORY section", "File '%s' not found in MEMORY section",
SB_GetConstBuf (&CfgSVal)); SB_GetConstBuf (&CfgSVal));
} }
@ -798,7 +798,7 @@ static void ParseSegments (void)
*/ */
if ((S->Flags & SF_BSS) != 0 && (S->Load != S->Run)) { if ((S->Flags & SF_BSS) != 0 && (S->Load != S->Run)) {
CfgWarning (&CfgErrorPos, CfgWarning (&CfgErrorPos,
"Segment with type `bss' has both LOAD and RUN " "Segment with type 'bss' has both LOAD and RUN "
"memory areas assigned"); "memory areas assigned");
} }
@ -806,7 +806,7 @@ static void ParseSegments (void)
if ((S->Flags & SF_RO) == 0) { if ((S->Flags & SF_RO) == 0) {
if (S->Run->Flags & MF_RO) { if (S->Run->Flags & MF_RO) {
CfgError (&CfgErrorPos, CfgError (&CfgErrorPos,
"Cannot put r/w segment `%s' in r/o memory area `%s'", "Cannot put r/w segment '%s' in r/o memory area '%s'",
GetString (S->Name), GetString (S->Run->Name)); GetString (S->Name), GetString (S->Run->Name));
} }
} }
@ -1511,7 +1511,7 @@ static void ParseConfig (void)
CfgNextTok (); CfgNextTok ();
/* Expected a curly brace */ /* Expected a curly brace */
CfgConsume (CFGTOK_LCURLY, "`{' expected"); CfgConsume (CFGTOK_LCURLY, "'{' expected");
/* Read the block */ /* Read the block */
switch (BlockTok) { switch (BlockTok) {
@ -1546,7 +1546,7 @@ static void ParseConfig (void)
} }
/* Skip closing brace */ /* Skip closing brace */
CfgConsume (CFGTOK_RCURLY, "`}' expected"); CfgConsume (CFGTOK_RCURLY, "'}' expected");
} while (CfgTok != CFGTOK_EOF); } while (CfgTok != CFGTOK_EOF);
} }
@ -1603,7 +1603,7 @@ static void ProcessSegments (void)
*/ */
if ((S->Flags & SF_BSS) != 0 && S->Seg != 0 && !IsBSSType (S->Seg)) { if ((S->Flags & SF_BSS) != 0 && S->Seg != 0 && !IsBSSType (S->Seg)) {
CfgWarning (GetSourcePos (S->LI), CfgWarning (GetSourcePos (S->LI),
"Segment `%s' with type `bss' contains initialized data", "Segment '%s' with type 'bss' contains initialized data",
GetString (S->Name)); GetString (S->Name));
} }
@ -1632,7 +1632,7 @@ static void ProcessSegments (void)
/* Print a warning if the segment is not optional */ /* Print a warning if the segment is not optional */
if ((S->Flags & SF_OPTIONAL) == 0) { if ((S->Flags & SF_OPTIONAL) == 0) {
CfgWarning (&CfgErrorPos, CfgWarning (&CfgErrorPos,
"Segment `%s' does not exist", "Segment '%s' does not exist",
GetString (S->Name)); GetString (S->Name));
} }
@ -1665,7 +1665,7 @@ static void ProcessSymbols (void)
if (O65GetImport (O65FmtDesc, Sym->Name) != 0) { if (O65GetImport (O65FmtDesc, Sym->Name) != 0) {
CfgError ( CfgError (
GetSourcePos (Sym->LI), GetSourcePos (Sym->LI),
"Exported o65 symbol `%s' cannot also be an o65 import", "Exported o65 symbol '%s' cannot also be an o65 import",
GetString (Sym->Name) GetString (Sym->Name)
); );
} }
@ -1677,7 +1677,7 @@ static void ProcessSymbols (void)
if (O65GetExport (O65FmtDesc, Sym->Name) != 0) { if (O65GetExport (O65FmtDesc, Sym->Name) != 0) {
CfgError ( CfgError (
GetSourcePos (Sym->LI), GetSourcePos (Sym->LI),
"Duplicate exported o65 symbol: `%s'", "Duplicate exported o65 symbol: '%s'",
GetString (Sym->Name) GetString (Sym->Name)
); );
} }
@ -1691,7 +1691,7 @@ static void ProcessSymbols (void)
if (O65GetExport (O65FmtDesc, Sym->Name) != 0) { if (O65GetExport (O65FmtDesc, Sym->Name) != 0) {
CfgError ( CfgError (
GetSourcePos (Sym->LI), GetSourcePos (Sym->LI),
"Imported o65 symbol `%s' cannot also be an o65 export", "Imported o65 symbol '%s' cannot also be an o65 export",
GetString (Sym->Name) GetString (Sym->Name)
); );
} }
@ -1703,7 +1703,7 @@ static void ProcessSymbols (void)
if (O65GetImport (O65FmtDesc, Sym->Name) != 0) { if (O65GetImport (O65FmtDesc, Sym->Name) != 0) {
CfgError ( CfgError (
GetSourcePos (Sym->LI), GetSourcePos (Sym->LI),
"Duplicate imported o65 symbol: `%s'", "Duplicate imported o65 symbol: '%s'",
GetString (Sym->Name) GetString (Sym->Name)
); );
} }
@ -1813,7 +1813,7 @@ unsigned CfgProcess (void)
*/ */
if (!IsConstExpr (M->StartExpr)) { if (!IsConstExpr (M->StartExpr)) {
CfgError (GetSourcePos (M->LI), CfgError (GetSourcePos (M->LI),
"Start address of memory area `%s' is not constant", "Start address of memory area '%s' is not constant",
GetString (M->Name)); GetString (M->Name));
} }
Addr = M->Start = GetExprVal (M->StartExpr); Addr = M->Start = GetExprVal (M->StartExpr);
@ -1838,7 +1838,7 @@ unsigned CfgProcess (void)
/* Resolve the size expression */ /* Resolve the size expression */
if (!IsConstExpr (M->SizeExpr)) { if (!IsConstExpr (M->SizeExpr)) {
CfgError (GetSourcePos (M->LI), CfgError (GetSourcePos (M->LI),
"Size of memory area `%s' is not constant", "Size of memory area '%s' is not constant",
GetString (M->Name)); GetString (M->Name));
} }
M->Size = GetExprVal (M->SizeExpr); M->Size = GetExprVal (M->SizeExpr);
@ -1859,15 +1859,15 @@ unsigned CfgProcess (void)
++Overwrites; ++Overwrites;
} else { } else {
CfgError (GetSourcePos (M->LI), CfgError (GetSourcePos (M->LI),
"Segment `%s' of type `overwrite' requires either" "Segment '%s' of type 'overwrite' requires either"
" `Start' or `Offset' attribute to be specified", " 'Start' or 'Offset' attribute to be specified",
GetString (S->Name)); GetString (S->Name));
} }
} else { } else {
if (Overwrites > 0) { if (Overwrites > 0) {
CfgError (GetSourcePos (M->LI), CfgError (GetSourcePos (M->LI),
"Segment `%s' is preceded by at least one segment" "Segment '%s' is preceded by at least one segment"
" of type `overwrite'", " of type 'overwrite'",
GetString (S->Name)); GetString (S->Name));
} }
} }
@ -1893,7 +1893,7 @@ unsigned CfgProcess (void)
** in the linker. ** in the linker.
*/ */
CfgWarning (GetSourcePos (S->LI), CfgWarning (GetSourcePos (S->LI),
"Segment `%s' isn't aligned properly; the" "Segment '%s' isn't aligned properly; the"
" resulting executable might not be functional.", " resulting executable might not be functional.",
GetString (S->Name)); GetString (S->Name));
} }
@ -1908,7 +1908,7 @@ unsigned CfgProcess (void)
*/ */
if (M->FillLevel == 0 && NewAddr > Addr) { if (M->FillLevel == 0 && NewAddr > Addr) {
CfgWarning (GetSourcePos (S->LI), CfgWarning (GetSourcePos (S->LI),
"The first segment in memory area `%s' " "The first segment in memory area '%s' "
"needs fill bytes for alignment.", "needs fill bytes for alignment.",
GetString (M->Name)); GetString (M->Name));
} }
@ -1929,7 +1929,7 @@ unsigned CfgProcess (void)
if (S->Flags & SF_OVERWRITE) { if (S->Flags & SF_OVERWRITE) {
if (NewAddr < M->Start) { if (NewAddr < M->Start) {
CfgError (GetSourcePos (S->LI), CfgError (GetSourcePos (S->LI),
"Segment `%s' begins before memory area `%s'", "Segment '%s' begins before memory area '%s'",
GetString (S->Name), GetString (M->Name)); GetString (S->Name), GetString (M->Name));
} else { } else {
Addr = NewAddr; Addr = NewAddr;
@ -1940,12 +1940,12 @@ unsigned CfgProcess (void)
++Overflows; ++Overflows;
if (S->Flags & SF_OFFSET) { if (S->Flags & SF_OFFSET) {
CfgWarning (GetSourcePos (S->LI), CfgWarning (GetSourcePos (S->LI),
"Segment `%s' offset is too small in `%s' by %lu byte%c", "Segment '%s' offset is too small in '%s' by %lu byte%c",
GetString (S->Name), GetString (M->Name), GetString (S->Name), GetString (M->Name),
Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's'); Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's');
} else { } else {
CfgWarning (GetSourcePos (S->LI), CfgWarning (GetSourcePos (S->LI),
"Segment `%s' start address is too low in `%s' by %lu byte%c", "Segment '%s' start address is too low in '%s' by %lu byte%c",
GetString (S->Name), GetString (M->Name), GetString (S->Name), GetString (M->Name),
Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's'); Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's');
} }
@ -1992,7 +1992,7 @@ unsigned CfgProcess (void)
++Overflows; ++Overflows;
M->Flags |= MF_OVERFLOW; M->Flags |= MF_OVERFLOW;
CfgWarning (GetSourcePos (M->LI), CfgWarning (GetSourcePos (M->LI),
"Segment `%s' overflows memory area `%s' by %lu byte%c", "Segment '%s' overflows memory area '%s' by %lu byte%c",
GetString (S->Name), GetString (M->Name), GetString (S->Name), GetString (M->Name),
M->FillLevel - M->Size, (M->FillLevel - M->Size == 1) ? ' ' : 's'); M->FillLevel - M->Size, (M->FillLevel - M->Size == 1) ? ' ' : 's');
} }
@ -2117,7 +2117,7 @@ void CfgWriteTarget (void)
MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, J); MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, J);
/* Debugging */ /* Debugging */
Print (stdout, 2, "Skipping `%s'...\n", GetString (M->Name)); Print (stdout, 2, "Skipping '%s'...\n", GetString (M->Name));
/* Walk throught the segments */ /* Walk throught the segments */
for (K = 0; K < CollCount (&M->SegList); ++K) { for (K = 0; K < CollCount (&M->SegList); ++K) {

View File

@ -107,7 +107,7 @@ void CreateDbgFile (void)
/* Open the debug info file */ /* Open the debug info file */
FILE* F = fopen (DbgFileName, "w"); FILE* F = fopen (DbgFileName, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot create debug file `%s': %s", DbgFileName, strerror (errno)); Error ("Cannot create debug file '%s': %s", DbgFileName, strerror (errno));
} }
/* Output version information */ /* Output version information */
@ -166,6 +166,6 @@ void CreateDbgFile (void)
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing debug file `%s': %s", DbgFileName, strerror (errno)); Error ("Error closing debug file '%s': %s", DbgFileName, strerror (errno));
} }
} }

View File

@ -166,13 +166,13 @@ Import* ReadImport (FILE* F, ObjData* Obj)
*/ */
if (ObjHasFiles (I->Obj)) { if (ObjHasFiles (I->Obj)) {
const LineInfo* LI = GetImportPos (I); const LineInfo* LI = GetImportPos (I);
Error ("Invalid import size in for `%s', imported from %s(%u): 0x%02X", Error ("Invalid import size in for '%s', imported from %s(%u): 0x%02X",
GetString (I->Name), GetString (I->Name),
GetSourceName (LI), GetSourceName (LI),
GetSourceLine (LI), GetSourceLine (LI),
I->AddrSize); I->AddrSize);
} else { } else {
Error ("Invalid import size in for `%s', imported from %s: 0x%02X", Error ("Invalid import size in for '%s', imported from %s: 0x%02X",
GetString (I->Name), GetString (I->Name),
GetObjFileName (I->Obj), GetObjFileName (I->Obj),
I->AddrSize); I->AddrSize);
@ -199,7 +199,7 @@ Import* GenImport (unsigned Name, unsigned char AddrSize)
/* We have no object file information and no line info for a new /* We have no object file information and no line info for a new
** import ** import
*/ */
Error ("Invalid import size 0x%02X for symbol `%s'", Error ("Invalid import size 0x%02X for symbol '%s'",
I->AddrSize, I->AddrSize,
GetString (I->Name)); GetString (I->Name));
} }
@ -483,7 +483,7 @@ void InsertExport (Export* E)
} }
} else { } else {
/* Duplicate entry, ignore it */ /* Duplicate entry, ignore it */
Warning ("Duplicate external identifier: `%s'", Warning ("Duplicate external identifier: '%s'",
GetString (L->Name)); GetString (L->Name));
} }
return; return;
@ -662,7 +662,7 @@ long GetExportVal (const Export* E)
{ {
if (E->Expr == 0) { if (E->Expr == 0) {
/* OOPS */ /* OOPS */
Internal ("`%s' is an undefined external", GetString (E->Name)); Internal ("'%s' is an undefined external", GetString (E->Name));
} }
return GetExprVal (E->Expr); return GetExprVal (E->Expr);
} }
@ -720,9 +720,9 @@ static void CheckSymType (const Export* E)
} }
/* Output the diagnostic */ /* Output the diagnostic */
Warning ("Address size mismatch for `%s': " Warning ("Address size mismatch for '%s': "
"Exported from %s as `%s', " "Exported from %s as '%s', "
"import in %s as `%s'", "import in %s as '%s'",
GetString (E->Name), GetString (E->Name),
SB_GetConstBuf (&ExportLoc), SB_GetConstBuf (&ExportLoc),
ExpAddrSize, ExpAddrSize,
@ -770,7 +770,7 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data)
/* Unresolved external */ /* Unresolved external */
Import* Imp = E->ImpList; Import* Imp = E->ImpList;
fprintf (stderr, fprintf (stderr,
"Unresolved external `%s' referenced in:\n", "Unresolved external '%s' referenced in:\n",
GetString (E->Name)); GetString (E->Name));
while (Imp) { while (Imp) {
unsigned J; unsigned J;
@ -1053,7 +1053,7 @@ void CircularRefError (const Export* E)
/* Print an error about a circular reference using to define the given export */ /* Print an error about a circular reference using to define the given export */
{ {
const LineInfo* LI = GetExportPos (E); const LineInfo* LI = GetExportPos (E);
Error ("Circular reference for symbol `%s', %s(%u)", Error ("Circular reference for symbol '%s', %s(%u)",
GetString (E->Name), GetString (E->Name),
GetSourceName (LI), GetSourceName (LI),
GetSourceLine (LI)); GetSourceLine (LI));

View File

@ -407,12 +407,12 @@ long GetExprVal (ExprNode* Expr)
Error ("Argument for .BANK is not segment relative or too complex"); Error ("Argument for .BANK is not segment relative or too complex");
} }
if (D.Seg->MemArea == 0) { if (D.Seg->MemArea == 0) {
Error ("Segment `%s' is referenced by .BANK but " Error ("Segment '%s' is referenced by .BANK but "
"not assigned to a memory area", "not assigned to a memory area",
GetString (D.Seg->Name)); GetString (D.Seg->Name));
} }
if (D.Seg->MemArea->BankExpr == 0) { if (D.Seg->MemArea->BankExpr == 0) {
Error ("Memory area `%s' is referenced by .BANK but " Error ("Memory area '%s' is referenced by .BANK but "
"has no BANK attribute", "has no BANK attribute",
GetString (D.Seg->MemArea->Name)); GetString (D.Seg->MemArea->Name));
} }

View File

@ -89,7 +89,7 @@ ExtSym* NewExtSym (ExtSymTab* Tab, unsigned Name)
ExtSym* E = GetExtSym (Tab, Name); ExtSym* E = GetExtSym (Tab, Name);
if (E != 0) { if (E != 0) {
/* We do already have a symbol with this name */ /* We do already have a symbol with this name */
Error ("Duplicate external symbol `%s'", GetString (Name)); Error ("Duplicate external symbol '%s'", GetString (Name));
} }
/* Allocate memory for the structure */ /* Allocate memory for the structure */

View File

@ -112,7 +112,7 @@ static void CloseLibrary (Library* L)
{ {
/* Close the library file */ /* Close the library file */
if (fclose (L->F) != 0) { if (fclose (L->F) != 0) {
Error ("Error closing `%s': %s", GetString (L->Name), strerror (errno)); Error ("Error closing '%s': %s", GetString (L->Name), strerror (errno));
} }
L->F = 0; L->F = 0;
} }
@ -144,7 +144,7 @@ static void LibSeek (Library* L, unsigned long Offs)
/* Do a seek in the library checking for errors */ /* Do a seek in the library checking for errors */
{ {
if (fseek (L->F, Offs, SEEK_SET) != 0) { if (fseek (L->F, Offs, SEEK_SET) != 0) {
Error ("Seek error in `%s' (%lu): %s", Error ("Seek error in '%s' (%lu): %s",
GetString (L->Name), Offs, strerror (errno)); GetString (L->Name), Offs, strerror (errno));
} }
} }
@ -158,7 +158,7 @@ static void LibReadHeader (Library* L)
L->Header.Magic = LIB_MAGIC; L->Header.Magic = LIB_MAGIC;
L->Header.Version = Read16 (L->F); L->Header.Version = Read16 (L->F);
if (L->Header.Version != LIB_VERSION) { if (L->Header.Version != LIB_VERSION) {
Error ("Wrong data version in `%s'", GetString (L->Name)); Error ("Wrong data version in '%s'", GetString (L->Name));
} }
L->Header.Flags = Read16 (L->F); L->Header.Flags = Read16 (L->F);
L->Header.IndexOffs = Read32 (L->F); L->Header.IndexOffs = Read32 (L->F);
@ -171,12 +171,12 @@ static void LibReadObjHeader (Library* L, ObjData* O)
{ {
O->Header.Magic = Read32 (L->F); O->Header.Magic = Read32 (L->F);
if (O->Header.Magic != OBJ_MAGIC) { if (O->Header.Magic != OBJ_MAGIC) {
Error ("Object file `%s' in library `%s' is invalid", Error ("Object file '%s' in library '%s' is invalid",
GetObjFileName (O), GetString (L->Name)); GetObjFileName (O), GetString (L->Name));
} }
O->Header.Version = Read16 (L->F); O->Header.Version = Read16 (L->F);
if (O->Header.Version != OBJ_VERSION) { if (O->Header.Version != OBJ_VERSION) {
Error ("Object file `%s' in library `%s' has wrong version", Error ("Object file '%s' in library '%s' has wrong version",
GetObjFileName (O), GetString (L->Name)); GetObjFileName (O), GetString (L->Name));
} }
O->Header.Flags = Read16 (L->F); O->Header.Flags = Read16 (L->F);

View File

@ -162,7 +162,7 @@ void ReadLineInfoList (FILE* F, ObjData* O, Collection* LineInfos)
** therefore be part of the line infos read from the object file. ** therefore be part of the line infos read from the object file.
*/ */
if (LineInfoIndex >= CollCount (&O->LineInfos)) { if (LineInfoIndex >= CollCount (&O->LineInfos)) {
Internal ("Invalid line info index %u in module `%s' - max is %u", Internal ("Invalid line info index %u in module '%s' - max is %u",
LineInfoIndex, LineInfoIndex,
GetObjFileName (O), GetObjFileName (O),
CollCount (&O->LineInfos)); CollCount (&O->LineInfos));

View File

@ -123,7 +123,7 @@ static void Usage (void)
" -m name\t\tCreate a map file\n" " -m name\t\tCreate a map file\n"
" -o name\t\tName the default output file\n" " -o name\t\tName the default output file\n"
" -t sys\t\tSet the target system\n" " -t sys\t\tSet the target system\n"
" -u sym\t\tForce an import of symbol `sym'\n" " -u sym\t\tForce an import of symbol 'sym'\n"
" -v\t\t\tVerbose mode\n" " -v\t\t\tVerbose mode\n"
" -vm\t\t\tVerbose map file\n" " -vm\t\t\tVerbose map file\n"
"\n" "\n"
@ -133,7 +133,7 @@ static void Usage (void)
" --dbgfile name\tGenerate debug information\n" " --dbgfile name\tGenerate debug information\n"
" --define sym=val\tDefine a symbol\n" " --define sym=val\tDefine a symbol\n"
" --end-group\t\tEnd a library group\n" " --end-group\t\tEnd a library group\n"
" --force-import sym\tForce an import of symbol `sym'\n" " --force-import sym\tForce an import of symbol 'sym'\n"
" --help\t\tHelp (this text)\n" " --help\t\tHelp (this text)\n"
" --lib file\t\tLink this library\n" " --lib file\t\tLink this library\n"
" --lib-path path\tSpecify a library search path\n" " --lib-path path\tSpecify a library search path\n"
@ -214,13 +214,13 @@ static void LinkFile (const char* Name, FILETYPE Type)
/* We must have a valid name now */ /* We must have a valid name now */
if (PathName == 0) { if (PathName == 0) {
Error ("Input file `%s' not found", Name); Error ("Input file '%s' not found", Name);
} }
/* Try to open the file */ /* Try to open the file */
F = fopen (PathName, "rb"); F = fopen (PathName, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", PathName, strerror (errno)); Error ("Cannot open '%s': %s", PathName, strerror (errno));
} }
/* Read the magic word */ /* Read the magic word */
@ -246,7 +246,7 @@ static void LinkFile (const char* Name, FILETYPE Type)
default: default:
fclose (F); fclose (F);
Error ("File `%s' has unknown type", PathName); Error ("File '%s' has unknown type", PathName);
} }
@ -322,7 +322,7 @@ static void OptConfig (const char* Opt attribute ((unused)), const char* Arg)
PathName = SearchFile (CfgDefaultPath, Arg); PathName = SearchFile (CfgDefaultPath, Arg);
} }
if (PathName == 0) { if (PathName == 0) {
Error ("Cannot find config file `%s'", Arg); Error ("Cannot find config file '%s'", Arg);
} }
/* Read the config */ /* Read the config */
@ -376,7 +376,7 @@ static void OptForceImport (const char* Opt attribute ((unused)), const char* Ar
/* Get the address size and check it */ /* Get the address size and check it */
unsigned char AddrSize = AddrSizeFromStr (ColPos+1); unsigned char AddrSize = AddrSizeFromStr (ColPos+1);
if (AddrSize == ADDR_SIZE_INVALID) { if (AddrSize == ADDR_SIZE_INVALID) {
Error ("Invalid address size `%s'", ColPos+1); Error ("Invalid address size '%s'", ColPos+1);
} }
/* Create a copy of the argument */ /* Create a copy of the argument */
@ -509,7 +509,7 @@ static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
/* Map the target name to a target id */ /* Map the target name to a target id */
Target = FindTarget (Arg); Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) { if (Target == TGT_UNKNOWN) {
Error ("Invalid target name: `%s'", Arg); Error ("Invalid target name: '%s'", Arg);
} }
/* Set the target binary format */ /* Set the target binary format */
@ -526,7 +526,7 @@ static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
PathName = SearchFile (CfgDefaultPath, SB_GetBuf (&FileName)); PathName = SearchFile (CfgDefaultPath, SB_GetBuf (&FileName));
} }
if (PathName == 0) { if (PathName == 0) {
Error ("Cannot find config file `%s'", SB_GetBuf (&FileName)); Error ("Cannot find config file '%s'", SB_GetBuf (&FileName));
} }
/* Free file name memory */ /* Free file name memory */

View File

@ -67,7 +67,7 @@ void CreateMapFile (int ShortMap)
/* Open the map file */ /* Open the map file */
FILE* F = fopen (MapFileName, "w"); FILE* F = fopen (MapFileName, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot create map file `%s': %s", MapFileName, strerror (errno)); Error ("Cannot create map file '%s': %s", MapFileName, strerror (errno));
} }
/* Write a modules list */ /* Write a modules list */
@ -132,7 +132,7 @@ void CreateMapFile (int ShortMap)
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing map file `%s': %s", MapFileName, strerror (errno)); Error ("Error closing map file '%s': %s", MapFileName, strerror (errno));
} }
} }
@ -144,7 +144,7 @@ void CreateLabelFile (void)
/* Open the label file */ /* Open the label file */
FILE* F = fopen (LabelFileName, "w"); FILE* F = fopen (LabelFileName, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot create label file `%s': %s", LabelFileName, strerror (errno)); Error ("Cannot create label file '%s': %s", LabelFileName, strerror (errno));
} }
/* Print the labels for the export symbols */ /* Print the labels for the export symbols */
@ -155,6 +155,6 @@ void CreateLabelFile (void)
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing label file `%s': %s", LabelFileName, strerror (errno)); Error ("Error closing label file '%s': %s", LabelFileName, strerror (errno));
} }
} }

View File

@ -784,7 +784,7 @@ static void O65WriteSeg (O65Desc* D, SegDesc** Seg, unsigned Count, int DoWrite)
S = Seg [I]; S = Seg [I];
/* Keep the user happy */ /* Keep the user happy */
Print (stdout, 1, " Writing `%s'\n", GetString (S->Name)); Print (stdout, 1, " Writing '%s'\n", GetString (S->Name));
/* Write this segment */ /* Write this segment */
if (DoWrite) { if (DoWrite) {
@ -805,7 +805,7 @@ static void O65WriteSeg (O65Desc* D, SegDesc** Seg, unsigned Count, int DoWrite)
/* Check the size of the segment for overflow */ /* Check the size of the segment for overflow */
if ((D->Header.Mode & MF_SIZE_MASK) == MF_SIZE_16BIT && D->SegSize > 0xFFFF) { if ((D->Header.Mode & MF_SIZE_MASK) == MF_SIZE_16BIT && D->SegSize > 0xFFFF) {
Error ("Segment overflow in file `%s'", D->Filename); Error ("Segment overflow in file '%s'", D->Filename);
} }
} }
@ -940,7 +940,7 @@ static void O65WriteExports (O65Desc* D)
*/ */
Export* E = FindExport (NameIdx); Export* E = FindExport (NameIdx);
if (E == 0 || IsUnresolvedExport (E)) { if (E == 0 || IsUnresolvedExport (E)) {
Internal ("Unresolved export `%s' found in O65WriteExports", Name); Internal ("Unresolved export '%s' found in O65WriteExports", Name);
} }
/* Get the expression for the symbol */ /* Get the expression for the symbol */
@ -958,7 +958,7 @@ static void O65WriteExports (O65Desc* D)
/* Bail out if we cannot handle the expression */ /* Bail out if we cannot handle the expression */
if (ED.TooComplex) { if (ED.TooComplex) {
Error ("Expression for symbol `%s' is too complex", Name); Error ("Expression for symbol '%s' is too complex", Name);
} }
/* Determine the segment id for the expression */ /* Determine the segment id for the expression */
@ -977,7 +977,7 @@ static void O65WriteExports (O65Desc* D)
/* For some reason, we didn't find this segment in the list of /* For some reason, we didn't find this segment in the list of
** segments written to the o65 file. ** segments written to the o65 file.
*/ */
Error ("Segment for symbol `%s' is undefined", Name); Error ("Segment for symbol '%s' is undefined", Name);
} }
SegmentID = O65SegType (Seg); SegmentID = O65SegType (Seg);
@ -1207,7 +1207,7 @@ void O65SetExport (O65Desc* D, unsigned Ident)
*/ */
Export* E = FindExport (Ident); Export* E = FindExport (Ident);
if (E == 0 || IsUnresolvedExport (E)) { if (E == 0 || IsUnresolvedExport (E)) {
Error ("Unresolved export: `%s'", GetString (Ident)); Error ("Unresolved export: '%s'", GetString (Ident));
} }
/* Insert the entry into the table */ /* Insert the entry into the table */
@ -1370,11 +1370,11 @@ void O65WriteTarget (O65Desc* D, File* F)
/* Open the file */ /* Open the file */
D->F = fopen (D->Filename, "wb"); D->F = fopen (D->Filename, "wb");
if (D->F == 0) { if (D->F == 0) {
Error ("Cannot open `%s': %s", D->Filename, strerror (errno)); Error ("Cannot open '%s': %s", D->Filename, strerror (errno));
} }
/* Keep the user happy */ /* Keep the user happy */
Print (stdout, 1, "Opened `%s'...\n", D->Filename); Print (stdout, 1, "Opened '%s'...\n", D->Filename);
/* Define some more options: A timestamp, the linker version and the /* Define some more options: A timestamp, the linker version and the
** filename ** filename
@ -1428,7 +1428,7 @@ void O65WriteTarget (O65Desc* D, File* F)
/* Close the file */ /* Close the file */
if (fclose (D->F) != 0) { if (fclose (D->F) != 0) {
Error ("Cannot write to `%s': %s", D->Filename, strerror (errno)); Error ("Cannot write to '%s': %s", D->Filename, strerror (errno));
} }
/* Reset the file and filename */ /* Reset the file and filename */

View File

@ -184,7 +184,7 @@ unsigned MakeGlobalStringId (const ObjData* O, unsigned Index)
/* Convert a local string id into a global one and return it. */ /* Convert a local string id into a global one and return it. */
{ {
if (Index >= O->StringCount) { if (Index >= O->StringCount) {
Error ("Invalid string index (%u) in module `%s'", Error ("Invalid string index (%u) in module '%s'",
Index, GetObjFileName (O)); Index, GetObjFileName (O));
} }
return O->Strings[Index]; return O->Strings[Index];
@ -214,7 +214,7 @@ struct Section* GetObjSection (const ObjData* O, unsigned Id)
/* Get a section from an object file checking for a valid index */ /* Get a section from an object file checking for a valid index */
{ {
if (Id >= CollCount (&O->Sections)) { if (Id >= CollCount (&O->Sections)) {
Error ("Invalid section index (%u) in module `%s'", Error ("Invalid section index (%u) in module '%s'",
Id, GetObjFileName (O)); Id, GetObjFileName (O));
} }
return CollAtUnchecked (&O->Sections, Id); return CollAtUnchecked (&O->Sections, Id);
@ -226,7 +226,7 @@ struct Import* GetObjImport (const ObjData* O, unsigned Id)
/* Get an import from an object file checking for a valid index */ /* Get an import from an object file checking for a valid index */
{ {
if (Id >= CollCount (&O->Imports)) { if (Id >= CollCount (&O->Imports)) {
Error ("Invalid import index (%u) in module `%s'", Error ("Invalid import index (%u) in module '%s'",
Id, GetObjFileName (O)); Id, GetObjFileName (O));
} }
return CollAtUnchecked (&O->Imports, Id); return CollAtUnchecked (&O->Imports, Id);
@ -238,7 +238,7 @@ struct Export* GetObjExport (const ObjData* O, unsigned Id)
/* Get an export from an object file checking for a valid index */ /* Get an export from an object file checking for a valid index */
{ {
if (Id >= CollCount (&O->Exports)) { if (Id >= CollCount (&O->Exports)) {
Error ("Invalid export index (%u) in module `%s'", Error ("Invalid export index (%u) in module '%s'",
Id, GetObjFileName (O)); Id, GetObjFileName (O));
} }
return CollAtUnchecked (&O->Exports, Id); return CollAtUnchecked (&O->Exports, Id);
@ -250,7 +250,7 @@ struct DbgSym* GetObjDbgSym (const ObjData* O, unsigned Id)
/* Get a debug symbol from an object file checking for a valid index */ /* Get a debug symbol from an object file checking for a valid index */
{ {
if (Id >= CollCount (&O->DbgSyms)) { if (Id >= CollCount (&O->DbgSyms)) {
Error ("Invalid debug symbol index (%u) in module `%s'", Error ("Invalid debug symbol index (%u) in module '%s'",
Id, GetObjFileName (O)); Id, GetObjFileName (O));
} }
return CollAtUnchecked (&O->DbgSyms, Id); return CollAtUnchecked (&O->DbgSyms, Id);
@ -262,7 +262,7 @@ struct Scope* GetObjScope (const ObjData* O, unsigned Id)
/* Get a scope from an object file checking for a valid index */ /* Get a scope from an object file checking for a valid index */
{ {
if (Id >= CollCount (&O->Scopes)) { if (Id >= CollCount (&O->Scopes)) {
Error ("Invalid scope index (%u) in module `%s'", Error ("Invalid scope index (%u) in module '%s'",
Id, GetObjFileName (O)); Id, GetObjFileName (O));
} }
return CollAtUnchecked (&O->Scopes, Id); return CollAtUnchecked (&O->Scopes, Id);

View File

@ -67,7 +67,7 @@ static unsigned GetModule (const char* Name)
/* Make a module name from the file name */ /* Make a module name from the file name */
const char* Module = FindName (Name); const char* Module = FindName (Name);
if (*Module == 0) { if (*Module == 0) {
Error ("Cannot make module name from `%s'", Name); Error ("Cannot make module name from '%s'", Name);
} }
return GetStringId (Module); return GetStringId (Module);
} }
@ -79,7 +79,7 @@ static void ObjReadHeader (FILE* Obj, ObjHeader* H, const char* Name)
{ {
H->Version = Read16 (Obj); H->Version = Read16 (Obj);
if (H->Version != OBJ_VERSION) { if (H->Version != OBJ_VERSION) {
Error ("Object file `%s' has wrong version, expected %08X, got %08X", Error ("Object file '%s' has wrong version, expected %08X, got %08X",
Name, OBJ_VERSION, H->Version); Name, OBJ_VERSION, H->Version);
} }
H->Flags = Read16 (Obj); H->Flags = Read16 (Obj);

View File

@ -196,7 +196,7 @@ static void StrVal (void)
default: default:
CfgWarning (&CfgErrorPos, CfgWarning (&CfgErrorPos,
"Unkown escape sequence `%%%c'", C); "Unkown escape sequence '%%%c'", C);
SB_AppendChar (&CfgSVal, '%'); SB_AppendChar (&CfgSVal, '%');
SB_AppendChar (&CfgSVal, C); SB_AppendChar (&CfgSVal, C);
NextChar (); NextChar ();
@ -389,7 +389,7 @@ Again:
break; break;
default: default:
CfgError (&CfgErrorPos, "Invalid character `%c'", C); CfgError (&CfgErrorPos, "Invalid character '%c'", C);
} }
} }
@ -410,7 +410,7 @@ void CfgConsume (cfgtok_t T, const char* Msg)
void CfgConsumeSemi (void) void CfgConsumeSemi (void)
/* Consume a semicolon */ /* Consume a semicolon */
{ {
CfgConsume (CFGTOK_SEMI, "`;' expected"); CfgConsume (CFGTOK_SEMI, "';' expected");
} }
@ -418,7 +418,7 @@ void CfgConsumeSemi (void)
void CfgConsumeColon (void) void CfgConsumeColon (void)
/* Consume a colon */ /* Consume a colon */
{ {
CfgConsume (CFGTOK_COLON, "`:' expected"); CfgConsume (CFGTOK_COLON, "':' expected");
} }
@ -556,7 +556,7 @@ void CfgOpenInput (void)
/* Open the file */ /* Open the file */
InputFile = fopen (CfgName, "r"); InputFile = fopen (CfgName, "r");
if (InputFile == 0) { if (InputFile == 0) {
Error ("Cannot open `%s': %s", CfgName, strerror (errno)); Error ("Cannot open '%s': %s", CfgName, strerror (errno));
} }
/* Initialize variables */ /* Initialize variables */

View File

@ -147,7 +147,7 @@ void PrintDbgScopes (FILE* F)
case SCOPE_ENUM: fputs (",type=enum", F); break; case SCOPE_ENUM: fputs (",type=enum", F); break;
default: default:
Error ("Module `%s': Unknown scope type %u", Error ("Module '%s': Unknown scope type %u",
GetObjFileName (O), S->Type); GetObjFileName (O), S->Type);
} }

View File

@ -144,7 +144,7 @@ Segment* GetSegment (unsigned Name, unsigned char AddrSize, const char* ObjName)
if (ObjName == 0) { if (ObjName == 0) {
ObjName = "[linker generated]"; ObjName = "[linker generated]";
} }
Error ("Module `%s': Type mismatch for segment `%s'", ObjName, Error ("Module '%s': Type mismatch for segment '%s'", ObjName,
GetString (Name)); GetString (Name));
} }
} }
@ -210,7 +210,7 @@ Section* ReadSection (FILE* F, ObjData* O)
/* Print some data */ /* Print some data */
Print (stdout, 2, Print (stdout, 2,
"Module `%s': Found segment `%s', size = %u, alignment = %lu, type = %u\n", "Module '%s': Found segment '%s', size = %u, alignment = %lu, type = %u\n",
GetObjFileName (O), GetString (Name), Size, Alignment, Type); GetObjFileName (O), GetString (Name), Size, Alignment, Type);
/* Get the segment for this section */ /* Get the segment for this section */
@ -226,13 +226,13 @@ Section* ReadSection (FILE* F, ObjData* O)
if (Sec->Alignment > 1) { if (Sec->Alignment > 1) {
Alignment = LeastCommonMultiple (S->Alignment, Sec->Alignment); Alignment = LeastCommonMultiple (S->Alignment, Sec->Alignment);
if (Alignment > MAX_ALIGNMENT) { if (Alignment > MAX_ALIGNMENT) {
Error ("Combined alignment for segment `%s' is %lu which exceeds " Error ("Combined alignment for segment '%s' is %lu which exceeds "
"%lu. Last module requiring alignment was `%s'.", "%lu. Last module requiring alignment was '%s'.",
GetString (Name), Alignment, MAX_ALIGNMENT, GetString (Name), Alignment, MAX_ALIGNMENT,
GetObjFileName (O)); GetObjFileName (O));
} else if (Alignment >= LARGE_ALIGNMENT) { } else if (Alignment >= LARGE_ALIGNMENT) {
Warning ("Combined alignment for segment `%s' is suspiciously " Warning ("Combined alignment for segment '%s' is suspiciously "
"large (%lu). Last module requiring alignment was `%s'.", "large (%lu). Last module requiring alignment was '%s'.",
GetString (Name), Alignment, GetObjFileName (O)); GetString (Name), Alignment, GetObjFileName (O));
} }
S->Alignment = Alignment; S->Alignment = Alignment;
@ -270,7 +270,7 @@ Section* ReadSection (FILE* F, ObjData* O)
break; break;
default: default:
Error ("Unknown fragment type in module `%s', segment `%s': %02X", Error ("Unknown fragment type in module '%s', segment '%s': %02X",
GetObjFileName (O), GetString (S->Name), Type); GetObjFileName (O), GetString (S->Name), Type);
/* NOTREACHED */ /* NOTREACHED */
return 0; return 0;
@ -502,19 +502,19 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
break; break;
case SEG_EXPR_RANGE_ERROR: case SEG_EXPR_RANGE_ERROR:
Error ("Range error in module `%s', line %u", Error ("Range error in module '%s', line %u",
GetFragmentSourceName (Frag), GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag)); GetFragmentSourceLine (Frag));
break; break;
case SEG_EXPR_TOO_COMPLEX: case SEG_EXPR_TOO_COMPLEX:
Error ("Expression too complex in module `%s', line %u", Error ("Expression too complex in module '%s', line %u",
GetFragmentSourceName (Frag), GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag)); GetFragmentSourceLine (Frag));
break; break;
case SEG_EXPR_INVALID: case SEG_EXPR_INVALID:
Error ("Invalid expression in module `%s', line %u", Error ("Invalid expression in module '%s', line %u",
GetFragmentSourceName (Frag), GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag)); GetFragmentSourceLine (Frag));
break; break;
@ -657,7 +657,7 @@ void CheckSegments (void)
/* Check it */ /* Check it */
if (S->Size > 0 && S->Dumped == 0) { if (S->Size > 0 && S->Dumped == 0) {
Error ("Missing memory area assignment for segment `%s'", Error ("Missing memory area assignment for segment '%s'",
GetString (S->Name)); GetString (S->Name));
} }
} }

View File

@ -222,7 +222,7 @@ static void DumpFile (const char* Name)
/* Try to open the file */ /* Try to open the file */
FILE* F = fopen (Name, "rb"); FILE* F = fopen (Name, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", Name, strerror (errno)); Error ("Cannot open '%s': %s", Name, strerror (errno));
} }
/* Read the magic word */ /* Read the magic word */

View File

@ -141,13 +141,13 @@ static void ReadProgramFile (void)
/* Open the file */ /* Open the file */
FILE* F = fopen (ProgramFile, "rb"); FILE* F = fopen (ProgramFile, "rb");
if (F == 0) { if (F == 0) {
Error ("Cannot open `%s': %s", ProgramFile, strerror (errno)); Error ("Cannot open '%s': %s", ProgramFile, strerror (errno));
} }
/* Get the CPU type from the file header */ /* Get the CPU type from the file header */
if ((Val = fgetc(F)) != EOF) { if ((Val = fgetc(F)) != EOF) {
if (Val != CPU_6502 && Val != CPU_65C02) { if (Val != CPU_6502 && Val != CPU_65C02) {
Error ("`%s': Invalid CPU type", ProgramFile); Error ("'%s': Invalid CPU type", ProgramFile);
} }
CPU = Val; CPU = Val;
} }
@ -155,20 +155,20 @@ static void ReadProgramFile (void)
/* Read the file body into memory */ /* Read the file body into memory */
while ((Val = fgetc(F)) != EOF) { while ((Val = fgetc(F)) != EOF) {
if (Addr == 0xFF00) { if (Addr == 0xFF00) {
Error ("`%s': To large to fit into $0200-$FFF0", ProgramFile); Error ("'%s': To large to fit into $0200-$FFF0", ProgramFile);
} }
MemWriteByte (Addr++, (unsigned char) Val); MemWriteByte (Addr++, (unsigned char) Val);
} }
/* Check for errors */ /* Check for errors */
if (ferror (F)) { if (ferror (F)) {
Error ("Error reading from `%s': %s", ProgramFile, strerror (errno)); Error ("Error reading from '%s': %s", ProgramFile, strerror (errno));
} }
/* Close the file */ /* Close the file */
fclose (F); fclose (F);
Print (stderr, 1, "Loaded `%s' at $0200-$%04X\n", ProgramFile, Addr - 1); Print (stderr, 1, "Loaded '%s' at $0200-$%04X\n", ProgramFile, Addr - 1);
} }

View File

@ -89,7 +89,7 @@ static unsigned GetBytesPerLine (const Collection* A)
const char* V = GetAttrVal (A, "bytesperline"); const char* V = GetAttrVal (A, "bytesperline");
if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) || if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) ||
(BytesPerLine < 1 || BytesPerLine > 64)) { (BytesPerLine < 1 || BytesPerLine > 64)) {
Error ("Invalid value for attribute `bytesperline'"); Error ("Invalid value for attribute 'bytesperline'");
} }
return BytesPerLine; return BytesPerLine;
} }
@ -106,7 +106,7 @@ static unsigned GetBase (const Collection* A)
const char* V = GetAttrVal (A, "base"); const char* V = GetAttrVal (A, "base");
if ((V && sscanf (V, "%u%c", &Base, &C) != 1) || if ((V && sscanf (V, "%u%c", &Base, &C) != 1) ||
(Base != 2 && Base != 10 && Base != 16)) { (Base != 2 && Base != 10 && Base != 16)) {
Error ("Invalid value for attribute `base'"); Error ("Invalid value for attribute 'base'");
} }
return Base; return Base;
} }
@ -119,7 +119,7 @@ static const char* GetIdentifier (const Collection* A)
/* Check for a ident attribute */ /* Check for a ident attribute */
const char* Ident = GetAttrVal (A, "ident"); const char* Ident = GetAttrVal (A, "ident");
if (Ident && !ValidIdentifier (Ident)) { if (Ident && !ValidIdentifier (Ident)) {
Error ("Invalid value for attribute `ident'"); Error ("Invalid value for attribute 'ident'");
} }
return Ident; return Ident;
} }
@ -152,7 +152,7 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
/* Open the output file */ /* Open the output file */
F = fopen (Name, "w"); F = fopen (Name, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot open output file `%s': %s", Name, strerror (errno)); Error ("Cannot open output file '%s': %s", Name, strerror (errno));
} }
/* Write a readable header */ /* Write a readable header */
@ -235,6 +235,6 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing output file `%s': %s", Name, strerror (errno)); Error ("Error closing output file '%s': %s", Name, strerror (errno));
} }
} }

View File

@ -160,7 +160,7 @@ const Attr* NeedAttr (const Collection* C, const char* Name, const char* Op)
/* Search for the attribute and return it */ /* Search for the attribute and return it */
unsigned Index; unsigned Index;
if (!FindAttr (C, Name, &Index)) { if (!FindAttr (C, Name, &Index)) {
Error ("Found no attribute named `%s' for operation %s", Name, Op); Error ("Found no attribute named '%s' for operation %s", Name, Op);
} }
return CollConstAt (C, Index); return CollConstAt (C, Index);
} }
@ -201,7 +201,7 @@ void AddAttr (Collection* C, const char* Name, const char* Value)
*/ */
unsigned Index; unsigned Index;
if (FindAttr (C, Name, &Index)) { if (FindAttr (C, Name, &Index)) {
Error ("Duplicate command line attribute `%s'", Name); Error ("Duplicate command line attribute '%s'", Name);
} }
/* Insert the attribute */ /* Insert the attribute */
@ -221,7 +221,7 @@ void SplitAddAttr (Collection* C, const char* Combined, const char* Name)
if (Pos == 0) { if (Pos == 0) {
/* Combined is actually a value */ /* Combined is actually a value */
if (Name == 0) { if (Name == 0) {
Error ("Command line attribute `%s' doesn't contain a name", Combined); Error ("Command line attribute '%s' doesn't contain a name", Combined);
} }
AddAttr (C, Name, Combined); AddAttr (C, Name, Combined);
} else { } else {

View File

@ -65,7 +65,7 @@ void WriteBinFile (const StrBuf* Data, const Collection* A,
/* Open the output file */ /* Open the output file */
FILE* F = fopen (Name, "wb"); FILE* F = fopen (Name, "wb");
if (F == 0) { if (F == 0) {
Error ("Cannot open output file `%s': %s", Name, strerror (errno)); Error ("Cannot open output file '%s': %s", Name, strerror (errno));
} }
/* Write to the file. We will use fwrite here instead of the fileio /* Write to the file. We will use fwrite here instead of the fileio
@ -75,11 +75,11 @@ void WriteBinFile (const StrBuf* Data, const Collection* A,
*/ */
Size = SB_GetLen (Data); Size = SB_GetLen (Data);
if (fwrite (SB_GetConstBuf (Data), 1, Size, F) != Size) { if (fwrite (SB_GetConstBuf (Data), 1, Size, F) != Size) {
Error ("Error writing to output file `%s': %s", Name, strerror (errno)); Error ("Error writing to output file '%s': %s", Name, strerror (errno));
} }
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing output file `%s': %s", Name, strerror (errno)); Error ("Error closing output file '%s': %s", Name, strerror (errno));
} }
} }

View File

@ -89,7 +89,7 @@ static unsigned GetBytesPerLine (const Collection* A)
const char* V = GetAttrVal (A, "bytesperline"); const char* V = GetAttrVal (A, "bytesperline");
if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) || if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) ||
(BytesPerLine < 1 || BytesPerLine > 64)) { (BytesPerLine < 1 || BytesPerLine > 64)) {
Error ("Invalid value for attribute `bytesperline'"); Error ("Invalid value for attribute 'bytesperline'");
} }
return BytesPerLine; return BytesPerLine;
} }
@ -105,7 +105,7 @@ static unsigned GetBase (const Collection* A)
/* Check for a base attribute */ /* Check for a base attribute */
const char* V = GetAttrVal (A, "base"); const char* V = GetAttrVal (A, "base");
if ((V && sscanf (V, "%u%c", &Base, &C) != 1) || (Base != 10 && Base != 16)) { if ((V && sscanf (V, "%u%c", &Base, &C) != 1) || (Base != 10 && Base != 16)) {
Error ("Invalid value for attribute `base'"); Error ("Invalid value for attribute 'base'");
} }
return Base; return Base;
} }
@ -118,7 +118,7 @@ static const char* GetIdentifier (const Collection* A)
/* Check for a ident attribute */ /* Check for a ident attribute */
const char* Ident = GetAttrVal (A, "ident"); const char* Ident = GetAttrVal (A, "ident");
if (Ident && !ValidIdentifier (Ident)) { if (Ident && !ValidIdentifier (Ident)) {
Error ("Invalid value for attribute `ident'"); Error ("Invalid value for attribute 'ident'");
} }
return Ident; return Ident;
} }
@ -151,7 +151,7 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
/* Open the output file */ /* Open the output file */
F = fopen (Name, "w"); F = fopen (Name, "w");
if (F == 0) { if (F == 0) {
Error ("Cannot open output file `%s': %s", Name, strerror (errno)); Error ("Cannot open output file '%s': %s", Name, strerror (errno));
} }
/* Write a readable header */ /* Write a readable header */
@ -220,6 +220,6 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
/* Close the file */ /* Close the file */
if (fclose (F) != 0) { if (fclose (F) != 0) {
Error ("Error closing output file `%s': %s", Name, strerror (errno)); Error ("Error closing output file '%s': %s", Name, strerror (errno));
} }
} }

View File

@ -106,7 +106,7 @@ StrBuf* ConvertTo (const Bitmap* B, const Collection* A)
sizeof (ConverterMap[0]), sizeof (ConverterMap[0]),
Compare); Compare);
if (E == 0) { if (E == 0) {
Error ("No such target format: `%s'", Format); Error ("No such target format: '%s'", Format);
} }
/* Do the conversion */ /* Do the conversion */

View File

@ -103,7 +103,7 @@ Bitmap* ReadInputFile (const Collection* A)
sizeof (FormatTable[0]), sizeof (FormatTable[0]),
CompareFileId); CompareFileId);
if (F == 0) { if (F == 0) {
Error ("Unknown input format `%s'", Format); Error ("Unknown input format '%s'", Format);
} }
} else { } else {
/* No format given, use file name extension */ /* No format given, use file name extension */
@ -112,7 +112,7 @@ Bitmap* ReadInputFile (const Collection* A)
sizeof (FormatTable) / sizeof (FormatTable[0])); sizeof (FormatTable) / sizeof (FormatTable[0]));
/* Found? */ /* Found? */
if (F == 0) { if (F == 0) {
Error ("Cannot determine file format of input file `%s'", Name); Error ("Cannot determine file format of input file '%s'", Name);
} }
} }

View File

@ -80,7 +80,7 @@ static enum Mode GetMode (const Collection* A)
} else if (strcmp (Mode, "shaped") == 0) { } else if (strcmp (Mode, "shaped") == 0) {
return smShaped; return smShaped;
} else { } else {
Error ("Invalid value for attribute `mode'"); Error ("Invalid value for attribute 'mode'");
} }
} }

View File

@ -392,7 +392,7 @@ int main (int argc, char* argv [])
} }
} else { } else {
/* We don't accept anything else */ /* We don't accept anything else */
AbEnd ("Don't know what to do with `%s'", Arg); AbEnd ("Don't know what to do with '%s'", Arg);
} }
/* Next argument */ /* Next argument */

View File

@ -124,7 +124,7 @@ void WriteOutputFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
sizeof (FormatTable[0]), sizeof (FormatTable[0]),
CompareFileId); CompareFileId);
if (F == 0) { if (F == 0) {
Error ("Unknown output format `%s'", Format); Error ("Unknown output format '%s'", Format);
} }
} else { } else {
/* No format given, use file name extension */ /* No format given, use file name extension */
@ -133,7 +133,7 @@ void WriteOutputFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
sizeof (FormatTable) / sizeof (FormatTable[0])); sizeof (FormatTable) / sizeof (FormatTable[0]));
/* Found? */ /* Found? */
if (F == 0) { if (F == 0) {
Error ("Cannot determine file format of output file `%s'", Name); Error ("Cannot determine file format of output file '%s'", Name);
} }
} }

Some files were not shown because too many files have changed in this diff Show More