Quotations that are embraced by tick marks now look better, in most fonts.
$(RM) -r ../html ../info
install:
- $(if $(PREFIX),,$(error variable `PREFIX' must be set))
+ $(if $(PREFIX),,$(error variable "PREFIX" must be set))
ifeq ($(wildcard ../html),../html)
$(INSTALL) -d $(DESTDIR)$(htmldir)
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
V Print the archiver version
</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
may ignore if creation of the library was your intention). You may
specify any number of modules on the command line following the library.
ar65 r mysubs.lib sub1.o sub2.o
</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
sub2.o, they are replaced by the new ones.
ar65 v v r mysubs.lib ofiles/sub1.o ofiles/sub2.o
</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.
Example:
ar65 d mysubs.lib sub1.o
</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.
-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.
Example:
</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
into the current directory.
</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.
In addition to these operations, the archiver will check for, and warn
regarding the MAINHDR segment. Like this:
<tscreen><verb>
-ld65: Error: Missing memory area assignment for segment `MAINHDR'
+ld65: Error: Missing memory area assignment for segment 'MAINHDR'
</verb></tscreen>
The old "HEADER" memory description contained six bytes: $FFFF
<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
feature enabled.
<tag><tt>dollar_in_identifiers</tt><label id="dollar_in_identifiers"></tag>
- Accept the dollar sign (`$') as a valid character in identifiers. The
+ Accept the dollar sign ('$') as a valid character in identifiers. The
dollar character is not allowed to start an identifier, even with this
feature enabled.
<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.
Note: Assignment to the pseudo variable is not allowed.
<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
control directives of other assemblers. Note however, that none of the
reserved keywords built into the assembler, that starts with a dot, may be
<tag><tt>pc_assignment</tt><label id="pc_assignment"></tag>
- Allow assignments to the PC symbol (`*' or `$' if <tt/dollar_is_pc/
+ Allow assignments to the PC symbol ('*' or '$' if <tt/dollar_is_pc/
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
removing the lines with the assignments may also be an option when porting
page and direct (short) addressing is possible for data in this segment.
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.
Please note that a segment cannot have two different address sizes. A
-o name Name the output file
-r Enable register variables
-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
-vm Verbose map file
-C name Use linker config file
--debug Debug mode
--debug-info Add debug info
--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)
--include-dir dir Set a compiler include directory path
--ld-args options Pass options to the linker
DB_VARSTR (TXT_LN_X, TXT_LN_1_Y, &r15),
...
</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.
<p>
<tt/DB_GETSTR(x, y, ptr, length)/ - will add a input-from-keyboard feature. <tt/ptr/ works as in the
-m name Create a map file
-o name Name the default output file
-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
-vm Verbose map file
--dbgfile name Generate debug information
--define sym=val Define a symbol
--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)
--lib file Link this library
--lib-path path Specify a library search path
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
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.
example above. Let's have a look at it now.
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,
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/
sim65 --verbose --verbose samples/gunzip65
</verb></tscreen>
<tscreen><verb>
-Loaded `samples/gunzip65' at $0200-$151F
+Loaded 'samples/gunzip65' at $0200-$151F
PVWrite ($0001, $13C9, $000F)
GZIP file name:PVWrite ($0001, $151F, $0001)
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) -m0644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)
ldx #4-1
set0: ldy SndOffsets,x
lda SndChannel+2,y
- _IFNE ; flag == 0 => don`t set
+ _IFNE ; flag == 0 => don't set
bit #$80
_IFNE ;
samplesdir = $(PREFIX)/share/cc65/samples
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)/geos
$(INSTALL) -d $(DESTDIR)$(samplesdir)/tutorial
endef # UNAVAIL_recipe
install:
- $(if $(PREFIX),,$(error variable `PREFIX' must be set))
+ $(if $(PREFIX),,$(error variable "PREFIX" must be set))
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) ../bin/* $(DESTDIR)$(bindir)
while (1) {
if (strcmp (L->Name, Name) == 0) {
/* Duplicate entry */
- Warning ("External symbol `%s' in module `%s', library `%s', "
- "is duplicated in module `%s'",
+ Warning ("External symbol '%s' in module '%s', library '%s', "
+ "is duplicated in module '%s'",
Name, L->Module->Name, LibName, Module->Name);
}
if (L->Next == 0) {
/* Read the header fields, checking magic and version */
Header.Magic = Read32 (Lib);
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);
if (Header.Version != LIB_VERSION) {
- Error ("Wrong data version in `%s'", LibName);
+ Error ("Wrong data version in '%s'", LibName);
}
Header.Flags = Read16 (Lib);
Header.IndexOffs = Read32 (Lib);
/* File does not exist */
if (MustExist) {
- Error ("Library `%s' does not exist", Name);
+ Error ("Library '%s' does not exist", Name);
} else {
/* Announce the library's creation if ar65 is verbose. */
Print (stdout, 1,
- "%s: Library `%s' will be created.\n", ProgName, Name);
+ "%s: Library '%s' will be created.\n", ProgName, Name);
}
} else {
unsigned I;
/* 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 */
for (I = 0; I < CollCount (&O->Exports); ++I) {
/* Reopen the library and truncate it */
Lib = fopen (LibName, "wb");
if (Lib == 0) {
- Error ("Cannot open library `%s' for writing: %s",
+ Error ("Cannot open library '%s' for writing: %s",
LibName, strerror (errno));
}
fseek (NewLib, 0, SEEK_SET);
while ((Count = fread (Buf, 1, sizeof (Buf), NewLib)) != 0) {
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 */
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) {
Error ("Problem closing temporary library file: %s", strerror (errno));
}
/* Not found! */
- Warning ("Module `%s' not found in library `%s'", Module, LibName);
+ Warning ("Module '%s' not found in library '%s'", Module, LibName);
}
/* Must not end with a path separator */
if (*Module == 0) {
- Error ("Cannot make module name from `%s'", Name);
+ Error ("Cannot make module name from '%s'", Name);
}
/* Done */
{
H->Magic = Read32 (Obj);
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);
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->OptionOffs = Read32 (Obj);
/* Open the object file */
FILE* Obj = fopen (Name, "rb");
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
** here.
*/
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 */
** and the external one.
*/
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);
}
/* Bail out if the module does not exist */
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 */
Obj = fopen (Name, "w+b");
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
/* Close the file */
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 */
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));
}
}
/* Search for the symbol name */
S->Sym = SymFindAny (S->Scope, GetStrBuf (S->AsmName));
if (S->Sym == 0) {
- PError (&S->Pos, "Assembler symbol `%s' not found",
+ PError (&S->Pos, "Assembler symbol '%s' not found",
GetString (S->AsmName));
} else {
/* Set the backlink */
A->AddrModeSet = AM65_STACK_REL_IND_Y;
Consume (IndirectLeave, IndirectExpect);
ConsumeComma ();
- Consume (TOK_Y, "`Y' expected");
+ Consume (TOK_Y, "'Y' expected");
} else {
Error ("Syntax error");
}
A->AddrModeSet = AM65_DIR_IND;
break;
default:
- Consume (TOK_Y, "`Y' expected");
+ Consume (TOK_Y, "'Y' expected");
A->AddrModeSet = AM65_DIR_IND_Y;
break;
}
if (CurTok.Tok == TOK_COMMA) {
/* [dir],y */
NextTok ();
- Consume (TOK_Y, "`Y' expected");
+ Consume (TOK_Y, "'Y' expected");
A->AddrModeSet = AM65_DIR_IND_LONG_Y;
} else {
/* [dir] */
}
/* End of enum definition */
- Consume (TOK_ENDENUM, "`.ENDENUM' expected");
+ Consume (TOK_ENDENUM, "'.ENDENUM' expected");
/* Free the base expression */
FreeExpr (BaseExpr);
/* Cheap local symbol */
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
if (Sym == 0) {
- Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal);
+ Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
} else {
AddrSize = Sym->AddrSize;
}
if (Sym) {
AddrSize = Sym->AddrSize;
} else {
- Error ("Unknown symbol or scope: `%m%p%m%p'", &ScopeName, &Name);
+ Error ("Unknown symbol or scope: '%m%p%m%p'", &ScopeName, &Name);
}
}
if (AddrSize == 0) {
- Warning (1, "Unknown address size: `%m%p%m%p'", &ScopeName, &Name);
+ Warning (1, "Unknown address size: '%m%p%m%p'", &ScopeName, &Name);
}
/* Free the string buffers */
/* Cheap local symbol */
Sym = SymFindLocal (SymLast, &CurTok.SVal, SYM_FIND_EXISTING);
if (Sym == 0) {
- Error ("Unknown symbol or scope: `%m%p'", &CurTok.SVal);
+ Error ("Unknown symbol or scope: '%m%p'", &CurTok.SVal);
} else {
SizeSym = GetSizeOfSymbol (Sym);
}
if (Sym) {
SizeSym = GetSizeOfSymbol (Sym);
} else {
- Error ("Unknown symbol or scope: `%m%p%m%p'",
+ Error ("Unknown symbol or scope: '%m%p%m%p'",
&ScopeName, &Name);
}
}
/* Check if we have a size */
if (SizeSym == 0 || !SymIsConst (SizeSym, &Size)) {
- Error ("Size of `%m%p%m%p' is unknown", &ScopeName, &Name);
+ Error ("Size of '%m%p%m%p' is unknown", &ScopeName, &Name);
Size = 0;
}
/* If we don't have this index, print a diagnostic and use the main file */
if (F == 0) {
- Error ("File name `%m%p' not found in file table", Name);
+ Error ("File name '%m%p' not found in file table", Name);
return 0;
} else {
return F->Index;
/* Open the file */
FILE* F = fopen (Name, "w");
if (F == 0) {
- Fatal ("Cannot open dependency file `%s': %s", Name, strerror (errno));
+ Fatal ("Cannot open dependency file '%s': %s", Name, strerror (errno));
}
/* Print the output file followed by a tab char */
/* Open the real listing file */
F = fopen (SB_GetConstBuf (&ListingName), "w");
if (F == 0) {
- Fatal ("Cannot open listing file `%s': %s",
+ Fatal ("Cannot open listing file '%s': %s",
SB_GetConstBuf (&ListingName),
strerror (errno));
}
if (CurTok.Tok != TOK_EOF) {
SkipUntilSep ();
} else {
- Error ("`.ENDMACRO' expected");
+ Error ("'.ENDMACRO' expected");
}
} else {
/* Skip until end of line */
/* Did we already define that macro? */
if (HT_Find (&MacroTab, &CurTok.SVal) != 0) {
/* Macro is already defined */
- Error ("A macro named `%m%p' is already defined", &CurTok.SVal);
+ Error ("A macro named '%m%p' is already defined", &CurTok.SVal);
/* Skip tokens until we reach the final .endmacro */
MacSkipDef (Style);
return;
IdDesc* List = M->Params;
while (1) {
if (SB_Compare (&List->Id, &CurTok.SVal) == 0) {
- Error ("Duplicate symbol `%m%p'", &CurTok.SVal);
+ Error ("Duplicate symbol '%m%p'", &CurTok.SVal);
}
if (List->Next == 0) {
break;
}
/* May not have end of file in a macro definition */
if (CurTok.Tok == TOK_EOF) {
- Error ("`.ENDMACRO' expected");
+ Error ("'.ENDMACRO' expected");
goto Done;
}
} else {
if (CurTok.Tok == TOK_COMMA) {
NextTok ();
} else {
- Error ("`,' expected");
+ Error ("',' expected");
}
}
}
/* Check if have already a symbol with this name */
if (SymIsDef (Sym)) {
- AbEnd ("`%s' is already defined", SymName);
+ AbEnd ("'%s' is already defined", SymName);
}
/* Generate an expression for the symbol */
break;
case TGT_MODULE:
- AbEnd ("Cannot use `module' as a target for the assembler");
+ AbEnd ("Cannot use 'module' as a target for the assembler");
break;
case TGT_ATARI2600:
break;
default:
- AbEnd ("Invalid target name: `%s'", Sys);
+ AbEnd ("Invalid target name: '%s'", Sys);
}
{
/* Cannot have the option twice */
if (SB_NotEmpty (Name)) {
- AbEnd ("Cannot use option `%s' twice", Opt);
+ AbEnd ("Cannot use option '%s' twice", Opt);
}
/* Remember the file name for later */
SB_CopyStr (Name, Arg);
{
cpu_t CPU = FindCPU (Arg);
if (CPU == CPU_UNKNOWN) {
- AbEnd ("Invalid CPU: `%s'", Arg);
+ AbEnd ("Invalid CPU: '%s'", Arg);
} else {
SetCPU (CPU);
}
/* Set the feature, check for errors */
if (SetFeature (SB_InitFromString (&Feature, Arg)) == FEAT_UNKNOWN) {
- AbEnd ("Illegal emulation feature: `%s'", Arg);
+ AbEnd ("Illegal emulation feature: '%s'", Arg);
}
}
/* Check the bounds */
if (Num != 0 && (Num < MIN_LIST_BYTES || Num > MAX_LIST_BYTES)) {
- AbEnd ("Argument for option `%s' is out of range", Opt);
+ AbEnd ("Argument for option '%s' is out of range", Opt);
}
/* Use the value */
** the filename is empty or begins with the option char.
*/
if (Arg == 0 || *Arg == '\0' || *Arg == '-') {
- Fatal ("The meaning of `%s' has changed. It does now "
+ Fatal ("The meaning of '%s' has changed. It does now "
"expect a file name as argument.", Opt);
}
/* Check the current memory model */
if (MemoryModel != MMODEL_UNKNOWN) {
- AbEnd ("Cannot use option `%s' twice", Opt);
+ AbEnd ("Cannot use option '%s' twice", Opt);
}
/* Translate the memory model name and check it */
*/
if (CurTok.Tok != TOK_COLON) {
if (HadWS || !NoColonLabels) {
- Error ("`:' expected");
+ Error ("':' expected");
/* Try some smart error recovery */
if (CurTok.Tok == TOK_NAMESPACE) {
NextTok ();
} else if (PCAssignment && (CurTok.Tok == TOK_STAR || CurTok.Tok == TOK_PC)) {
NextTok ();
if (CurTok.Tok != TOK_EQ) {
- Error ("`=' expected");
+ Error ("'=' expected");
SkipUntilSep ();
} else {
/* Skip the equal sign */
} else {
/* Filename. Check if we already had one */
if (InFile) {
- fprintf (stderr, "%s: Don't know what to do with `%s'\n",
+ fprintf (stderr, "%s: Don't know what to do with '%s'\n",
ProgName, Arg);
exit (EXIT_FAILURE);
} else {
** by the string token just created.
*/
if (CurTok.Tok != TOK_RPAREN) {
- Error ("`)' expected");
+ Error ("')' expected");
} else {
CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &Buf);
SB_Copy (&Buf, &CurTok.SVal);
NextTok ();
if (CurTok.Tok != TOK_RPAREN) {
- Error ("`)' expected");
+ Error ("')' expected");
} else {
CurTok.Tok = Id;
SB_Copy (&CurTok.SVal, &Buf);
** by the string token just created.
*/
if (CurTok.Tok != TOK_RPAREN) {
- Error ("`)' expected");
+ Error ("')' expected");
} else {
CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &R);
** by the string token just created.
*/
if (CurTok.Tok != TOK_RPAREN) {
- Error ("`)' expected");
+ Error ("')' expected");
} else {
CurTok.Tok = TOK_STRCON;
SB_Copy (&CurTok.SVal, &Buf);
void ConsumeLParen (void)
/* Consume a left paren */
{
- Consume (TOK_LPAREN, "`(' expected");
+ Consume (TOK_LPAREN, "'(' expected");
}
void ConsumeRParen (void)
/* Consume a right paren */
{
- Consume (TOK_RPAREN, "`)' expected");
+ Consume (TOK_RPAREN, "')' expected");
}
void ConsumeComma (void)
/* Consume a comma */
{
- Consume (TOK_COMMA, "`,' expected");
+ Consume (TOK_COMMA, "',' expected");
}
remove (OutFile);
/* Now abort with a fatal error */
- Fatal ("Cannot write to output file `%s': %s", OutFile, strerror (Error));
+ Fatal ("Cannot write to output file '%s': %s", OutFile, strerror (Error));
}
/* Create the output file */
F = fopen (OutFile, "w+b");
if (F == 0) {
- Fatal ("Cannot open output file `%s': %s", OutFile, strerror (errno));
+ Fatal ("Cannot open output file '%s': %s", OutFile, strerror (errno));
}
/* Write a dummy header */
switch (GetSubKey (Keys, sizeof (Keys) / sizeof (Keys [0]))) {
case 0: *Flag = 0; NextTok (); break;
case 1: *Flag = 1; NextTok (); break;
- default: ErrorSkip ("`on' or `off' expected"); break;
+ default: ErrorSkip ("'on' or 'off' expected"); break;
}
} else if (TokIsSep (CurTok.Tok)) {
/* Without anything assume switch on */
*Flag = 1;
} else {
- ErrorSkip ("`on' or `off' expected");
+ ErrorSkip ("'on' or 'off' expected");
}
}
/* Set the feature and check for errors */
if (SetFeature (&CurTok.SVal) == FEAT_UNKNOWN) {
/* Not found */
- ErrorSkip ("Invalid feature: `%m%p'", &CurTok.SVal);
+ ErrorSkip ("Invalid feature: '%m%p'", &CurTok.SVal);
return;
} else {
/* Skip the keyword */
char* PathName = SearchFile (BinSearchPath, SB_GetConstBuf (&Name));
if (PathName == 0 || (F = fopen (PathName, "rb")) == 0) {
/* Not found or cannot open, print an error and bail out */
- ErrorSkip ("Cannot open include file `%m%p': %s", &Name, strerror (errno));
+ ErrorSkip ("Cannot open include file '%m%p': %s", &Name, strerror (errno));
xfree (PathName);
goto ExitPoint;
}
*/
SB_Terminate (&Name);
if (FileStat (SB_GetConstBuf (&Name), &StatBuf) != 0) {
- Fatal ("Cannot stat input file `%m%p': %s", &Name, strerror (errno));
+ Fatal ("Cannot stat input file '%m%p': %s", &Name, strerror (errno));
}
/* Add the file to the input file table */
size_t BytesRead = fread (Buf, 1, BytesToRead, F);
if (BytesToRead != BytesRead) {
/* Some sort of error */
- ErrorSkip ("Cannot read from include file `%m%p': %s",
+ ErrorSkip ("Cannot read from include file '%m%p': %s",
&Name, strerror (errno));
break;
}
static void DoUnexpected (void)
/* Got an unexpected keyword */
{
- Error ("Unexpected `%m%p'", &Keyword);
+ Error ("Unexpected '%m%p'", &Keyword);
SkipUntilSep ();
}
/* Main file */
F = fopen (Name, "r");
if (F == 0) {
- Fatal ("Cannot open input file `%s': %s", Name, strerror (errno));
+ Fatal ("Cannot open input file '%s': %s", Name, strerror (errno));
}
} else {
/* We are on include level. Search for the file in the include
PathName = SearchFile (IncSearchPath, Name);
if (PathName == 0 || (F = fopen (PathName, "r")) == 0) {
/* Not found or cannot open, print an error and bail out */
- Error ("Cannot open include file `%s': %s", Name, strerror (errno));
+ Error ("Cannot open include file '%s': %s", Name, strerror (errno));
goto ExitPoint;
}
** here.
*/
if (FileStat (Name, &Buf) != 0) {
- Fatal ("Cannot stat input file `%s': %s", Name, strerror (errno));
+ Fatal ("Cannot stat input file '%s': %s", Name, strerror (errno));
}
/* Add the file to the input file table and remember the index */
/* Not found */
if (!LeadingDotInIdents) {
/* Invalid pseudo instruction */
- Error ("`%m%p' is not a recognized control command", &CurTok.SVal);
+ Error ("'%m%p' is not a recognized control command", &CurTok.SVal);
goto Again;
}
/* Check the segment name for invalid names */
if (!ValidSegName (Name)) {
- Error ("Illegal segment name: `%s'", Name);
+ Error ("Illegal segment name: '%s'", Name);
}
/* Create a new segment and return it */
/* End of struct/union definition */
if (Type == STRUCT) {
- Consume (TOK_ENDSTRUCT, "`.ENDSTRUCT' expected");
+ Consume (TOK_ENDSTRUCT, "'.ENDSTRUCT' expected");
} else {
- Consume (TOK_ENDUNION, "`.ENDUNION' expected");
+ Consume (TOK_ENDUNION, "'.ENDUNION' expected");
}
/* Return the size of the struct */
if (SymHasUserMark (Sym)) {
LIError (&Sym->DefLines,
- "Circular reference in definition of symbol `%m%p'",
+ "Circular reference in definition of symbol '%m%p'",
GetSymName (Sym));
ED_SetError (D);
} else {
if (Scope == 0) {
/* Scope not found */
SB_Terminate (FullName);
- Error ("No such scope: `%m%p'", FullName);
+ Error ("No such scope: '%m%p'", FullName);
return 0;
}
Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING);
if (Scope == 0) {
/* Scope not found */
- Error ("No such scope: `%m%p'", FullName);
+ Error ("No such scope: '%m%p'", FullName);
return 0;
}
{
if (S->Flags & SF_IMPORT) {
/* Defined symbol is marked as imported external symbol */
- Error ("Symbol `%m%p' is already an import", GetSymName (S));
+ Error ("Symbol '%m%p' is already an import", GetSymName (S));
return;
}
if ((Flags & SF_VAR) != 0 && (S->Flags & (SF_EXPORT | SF_GLOBAL))) {
/* Variable symbols cannot be exports or globals */
- Error ("Var symbol `%m%p' cannot be an export or global symbol", GetSymName (S));
+ Error ("Var symbol '%m%p' cannot be an export or global symbol", GetSymName (S));
return;
}
if (S->Flags & SF_DEFINED) {
/* Multiple definition. In case of a variable, this is legal. */
if ((S->Flags & SF_VAR) == 0) {
- Error ("Symbol `%m%p' is already defined", GetSymName (S));
+ Error ("Symbol '%m%p' is already defined", GetSymName (S));
S->Flags |= SF_MULTDEF;
return;
} else {
/* Redefinition must also be a variable symbol */
if ((Flags & SF_VAR) == 0) {
- Error ("Symbol `%m%p' is already different kind", GetSymName (S));
+ Error ("Symbol '%m%p' is already different kind", GetSymName (S));
return;
}
/* Delete the current symbol expression, since it will get
S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */
- Warning (1, "Symbol `%m%p' is %s but exported %s",
+ Warning (1, "Symbol '%m%p' is %s but exported %s",
GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize));
}
/* Mark the given symbol as an imported symbol */
{
if (S->Flags & SF_DEFINED) {
- Error ("Symbol `%m%p' is already defined", GetSymName (S));
+ Error ("Symbol '%m%p' is already defined", GetSymName (S));
S->Flags |= SF_MULTDEF;
return;
}
if (S->Flags & SF_EXPORT) {
/* The symbol is already marked as exported symbol */
- Error ("Cannot import exported symbol `%m%p'", GetSymName (S));
+ Error ("Cannot import exported symbol '%m%p'", GetSymName (S));
return;
}
*/
if (S->Flags & SF_IMPORT) {
if ((Flags & SF_FORCED) != (S->Flags & SF_FORCED)) {
- Error ("Redeclaration mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Redeclaration mismatch for symbol '%m%p'", GetSymName (S));
}
if (AddrSize != S->AddrSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
}
if (S->Flags & SF_GLOBAL) {
S->Flags &= ~SF_GLOBAL;
if (AddrSize != S->AddrSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
}
/* Check if it's ok to export the symbol */
if (S->Flags & SF_IMPORT) {
/* The symbol is already marked as imported external symbol */
- Error ("Symbol `%m%p' is already an import", GetSymName (S));
+ Error ("Symbol '%m%p' is already an import", GetSymName (S));
return;
}
if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported */
- Error ("Var symbol `%m%p' cannot be exported", GetSymName (S));
+ Error ("Var symbol '%m%p' cannot be exported", GetSymName (S));
return;
}
*/
if (S->Flags & SF_GLOBAL) {
if (AddrSize != S->ExportSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
S->Flags &= ~SF_GLOBAL;
*/
if ((S->Flags & (SF_EXPORT|SF_DEFINED)) == SF_EXPORT) {
if (S->ExportSize != AddrSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
}
S->ExportSize = AddrSize;
S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */
- Warning (1, "Symbol `%m%p' is %s but exported %s",
+ Warning (1, "Symbol '%m%p' is %s but exported %s",
GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize));
}
{
if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported or imported */
- Error ("Var symbol `%m%p' cannot be made global", GetSymName (S));
+ Error ("Var symbol '%m%p' cannot be made global", GetSymName (S));
return;
}
AddrSize = GetCurrentSegAddrSize ();
}
if (AddrSize != S->AddrSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
return;
}
if ((S->Flags & SF_DEFINED) == 0) {
/* Symbol is undefined */
if (AddrSize != S->ExportSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
} else if (AddrSize != ADDR_SIZE_DEFAULT) {
/* Symbol is defined and address size given */
if (AddrSize != S->ExportSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
}
return;
*/
if (S->Flags & SF_GLOBAL) {
if (AddrSize != S->ExportSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
return;
}
S->ExportSize = S->AddrSize;
} else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */
- Warning (1, "Symbol `%m%p' is %s but exported %s",
+ Warning (1, "Symbol '%m%p' is %s but exported %s",
GetSymName (S), AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize));
}
/* Check for errors */
if (S->Flags & SF_IMPORT) {
/* The symbol is already marked as imported external symbol */
- Error ("Symbol `%m%p' is already an import", GetSymName (S));
+ Error ("Symbol '%m%p' is already an import", GetSymName (S));
return;
}
if (S->Flags & SF_VAR) {
/* Variable symbols cannot be exported or imported */
- Error ("Var symbol `%m%p' cannot be exported", GetSymName (S));
+ Error ("Var symbol '%m%p' cannot be exported", GetSymName (S));
return;
}
*/
if (S->Flags & (SF_EXPORT | SF_GLOBAL)) {
if (S->ExportSize != AddrSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
S->Flags &= ~SF_GLOBAL;
}
/* Use the real size of the symbol */
S->ExportSize = S->AddrSize;
} else if (S->AddrSize != S->ExportSize) {
- Error ("Address size mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Address size mismatch for symbol '%m%p'", GetSymName (S));
}
}
*/
if (S->ConDesPrio[Type] != CD_PRIO_NONE) {
if (S->ConDesPrio[Type] != Prio) {
- Error ("Redeclaration mismatch for symbol `%m%p'", GetSymName (S));
+ Error ("Redeclaration mismatch for symbol '%m%p'", GetSymName (S));
}
}
S->ConDesPrio[Type] = Prio;
}
} else {
/* Duplicate scope name */
- Internal ("Duplicate scope name: `%m%p'", Name);
+ Internal ("Duplicate scope name: '%m%p'", Name);
}
}
}
/* Check if the scope has been defined before */
if (CurrentScope->Flags & ST_DEFINED) {
- Error ("Duplicate scope `%m%p'", ScopeName);
+ Error ("Duplicate scope '%m%p'", ScopeName);
}
} else {
if (Sym->Flags & SF_IMPORT) {
/* The symbol is already marked as import */
LIError (&S->RefLines,
- "Symbol `%s' is already an import",
+ "Symbol '%s' is already an import",
GetString (Sym->Name));
}
if ((Sym->Flags & SF_EXPORT) == 0) {
if (Sym->AddrSize > Sym->ExportSize) {
/* We're exporting a symbol smaller than it actually is */
LIWarning (&Sym->DefLines, 1,
- "Symbol `%m%p' is %s but exported %s",
+ "Symbol '%m%p' is %s but exported %s",
GetSymName (Sym),
AddrSizeToStr (Sym->AddrSize),
AddrSizeToStr (Sym->ExportSize));
if (S->Flags & SF_EXPORT) {
/* We will not auto-import an export */
LIError (&S->RefLines,
- "Exported symbol `%m%p' was never defined",
+ "Exported symbol '%m%p' was never defined",
GetSymName (S));
} else {
if (AutoImport) {
} else {
/* Error */
LIError (&S->RefLines,
- "Symbol `%m%p' is undefined",
+ "Symbol '%m%p' is undefined",
GetSymName (S));
}
}
ReleaseFullLineInfo (&S->RefLines);
} else if ((S->Flags & SF_DEFINED) != 0 && (S->Flags & SF_REFERENCED) == 0) {
LIWarning (&S->DefLines, 2,
- "Symbol `%m%p' is defined but never used",
+ "Symbol '%m%p' is defined but never used",
GetSymName (S));
}
if ((S->Flags & (SF_REFERENCED | SF_FORCED)) == SF_NONE) {
/* Imported symbol is not referenced */
LIWarning (&S->DefLines, 2,
- "Symbol `%m%p' is imported but never used",
+ "Symbol '%m%p' is imported but never used",
GetSymName (S));
} else {
/* Give the import an id, count imports */
} else if (S->AddrSize > S->ExportSize) {
/* We're exporting a symbol smaller than it actually is */
LIWarning (&S->DefLines, 1,
- "Symbol `%m%p' is %s but exported %s",
+ "Symbol '%m%p' is %s but exported %s",
GetSymName (S),
AddrSizeToStr (S->AddrSize),
AddrSizeToStr (S->ExportSize));
const FilePos* P = S->GuessedUse[S->AddrSize - 1];
if (P) {
PWarning (P, 0,
- "Didn't use %s addressing for `%m%p'",
+ "Didn't use %s addressing for '%m%p'",
AddrSizeToStr (S->AddrSize),
GetSymName (S));
}
/* Did we find a symbol with this name? */
if (Sym == 0) {
- Error ("Undefined symbol `%s' for argument %u", CurTok.Ident, Arg);
+ Error ("Undefined symbol '%s' for argument %u", CurTok.Ident, Arg);
AsmErrorSkip ();
return 0;
}
** use and change all registers.
*/
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;
*Chg = REG_ALL;
OptFunc* F = FindOptFunc (Name);
if (F == 0) {
/* Not found */
- AbEnd ("Optimization step `%s' not found", Name);
+ AbEnd ("Optimization step '%s' not found", Name);
}
return F;
}
/* Output a header line */
if (Step == 0) {
/* Initial output */
- WriteOutput ("Initial code for function `%s':\n",
+ WriteOutput ("Initial code for function '%s':\n",
S->Func? S->Func->Name : "<global>");
} else {
- WriteOutput ("Code after applying `%s':\n", Step);
+ WriteOutput ("Code after applying '%s':\n", Step);
}
/* Output the code segment */
/* Print the name of the function we are working on */
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 {
Print (stdout, 1, "Running optimizer for global code segment\n");
}
/* Expect zp x indirect */
L = SkipSpace (L+1);
if (toupper (*L) != 'X') {
- Error ("ASM code error: `X' expected");
+ Error ("ASM code error: 'X' expected");
return 0;
}
L = SkipSpace (L+1);
if (*L != ')') {
- Error ("ASM code error: `)' expected");
+ Error ("ASM code error: ')' expected");
return 0;
}
L = SkipSpace (L+1);
if (*L == ',') {
L = SkipSpace (L+1);
if (toupper (*L) != 'Y') {
- Error ("ASM code error: `Y' expected");
+ Error ("ASM code error: 'Y' expected");
return 0;
}
L = SkipSpace (L+1);
/* Check for subroutine call to local label */
if ((OPC->Info & OF_CALL) && IsLocalLabelName (Arg)) {
Error ("ASM code error: "
- "Cannot use local label `%s' in subroutine call",
+ "Cannot use local label '%s' in subroutine call",
Arg);
}
AM = AM65_ABS;
case '.':
/* Control instruction */
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;
default:
if (L) {
/* We found it - be sure it does not already have an owner */
if (L->Owner) {
- Error ("ASM label `%s' is already defined", Name);
+ Error ("ASM label '%s' is already defined", Name);
return L;
}
} else {
/* Safety. This call is quite costly, but safety is better */
if (CollIndex (&S->Labels, L) >= 0) {
- Error ("ASM label `%s' is already defined", Name);
+ Error ("ASM label '%s' is already defined", Name);
return L;
}
/* Print some debugging output */
if (Debug) {
- printf ("Removing unused global label `%s'", X->Name);
+ printf ("Removing unused global label '%s'", X->Name);
}
/* And free the label */
/* This is a definition */
if (SymIsDef (Entry)) {
- Error ("Global variable `%s' has already been defined",
+ Error ("Global variable '%s' has already been defined",
Entry->Name);
}
Entry->Flags |= SC_DEF;
if (!IsTypeVoid (Decl.Type)) {
if (!IsTypeArray (Decl.Type)) {
/* 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) {
/* We cannot declare variables of type void */
- Error ("Illegal type for variable `%s'", Decl.Ident);
+ Error ("Illegal type for variable '%s'", Decl.Ident);
}
}
if (IsTypeVoid (Decl.Type)) {
/* 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);
} else if (Size == 0) {
/* Size is unknown. Is it an array? */
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);
} else {
const char* bssName = GetSegName (SEG_BSS);
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->V.BssName = xstrdup (bssName);
/* Function body. Check for duplicate function definitions */
if (SymIsDef (Entry)) {
- Error ("Body for function `%s' has already been defined",
+ Error ("Body for function '%s' has already been defined",
Entry->Name);
}
static void DuplicateQualifier (const char* Name)
/* Print an error message */
{
- Warning ("Duplicate qualifier: `%s'", Name);
+ Warning ("Duplicate qualifier: '%s'", Name);
}
Entry = AddStructSym (Name, Type, 0, 0);
} else if ((Entry->Flags & SC_TYPEMASK) != Type) {
/* Already defined, but no struct */
- Error ("Symbol `%s' is already different kind", Name);
+ Error ("Symbol '%s' is already different kind", Name);
}
return Entry;
}
Entry = FindTagSym (CurTok.Ident);
if (Entry) {
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 {
/* Insert entry into table ### */
Sym->Flags &= ~SC_DEFTYPE;
} else {
/* Type has already been changed */
- Error ("Redefinition for parameter `%s'", Sym->Name);
+ Error ("Redefinition for parameter '%s'", Sym->Name);
}
} else {
- Error ("Unknown identifier: `%s'", Decl.Ident);
+ Error ("Unknown identifier: '%s'", Decl.Ident);
}
}
/* If the parameter is a struct or union, emit a warning */
if (IsClassStruct (Decl.Type)) {
if (IS_Get (&WarnStructParam)) {
- Warning ("Passing struct by value for parameter `%s'", Decl.Ident);
+ Warning ("Passing struct by value for parameter '%s'", Decl.Ident);
}
}
ConstAbsIntExpr (hie1, &Expr);
if (Expr.IVal <= 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 {
Error ("Size of array is invalid");
}
/* If we have remaining qualifiers, flag them as invalid */
if (Qualifiers & T_QUAL_NEAR) {
- Error ("Invalid `__near__' qualifier");
+ Error ("Invalid '__near__' qualifier");
}
if (Qualifiers & T_QUAL_FAR) {
- Error ("Invalid `__far__' qualifier");
+ Error ("Invalid '__far__' qualifier");
}
if (Qualifiers & T_QUAL_FASTCALL) {
- Error ("Invalid `__fastcall__' qualifier");
+ Error ("Invalid '__fastcall__' qualifier");
}
if (Qualifiers & T_QUAL_CDECL) {
- Error ("Invalid `__cdecl__' qualifier");
+ Error ("Invalid '__cdecl__' qualifier");
}
}
** have the C89 standard enabled explicitly.
*/
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;
}
** for variables with implicit int type.
*/
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");
}
}
unsigned Size = SizeOf (D->Type);
if (Size >= 0x10000) {
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 {
Error ("Invalid size in declaration (0x%06X)", Size);
}
NextToken ();
}
if (BraceCount < BracesNeeded) {
- Error ("`{' expected");
+ Error ("'{' expected");
}
return BraceCount;
}
NextToken ();
NextToken ();
} else {
- Error ("`}' expected");
+ Error ("'}' expected");
return;
}
--BracesExpected;
} else {
/* Attribute not known, maybe typo */
- Error ("Illegal attribute: `%s'", AttrName);
+ Error ("Illegal attribute: '%s'", AttrName);
/* Skip until end of attribute */
ErrorSkip ();
** list and returning int.
*/
if (IS_Get (&Standard) >= STD_C99) {
- Error ("Call to undefined function `%s'", Ident);
+ Error ("Call to undefined function '%s'", Ident);
} 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);
E->Type = Sym->Type;
Sym = AddLocalSym (Ident, type_int, SC_AUTO | SC_REF, 0);
E->Flags = E_LOC_STACK | E_RTYPE_LVAL;
E->Type = type_int;
- Error ("Undefined symbol: `%s'", Ident);
+ Error ("Undefined symbol: '%s'", Ident);
}
}
NextToken ();
Field = FindStructField (Expr->Type, Ident);
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 */
ED_MakeConstAbs (Expr, 0, type_int);
return;
typeadjust (Expr, &Expr2, 1);
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `+'");
+ Error ("Invalid operands for binary operator '+'");
}
} else {
}
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `+'");
+ Error ("Invalid operands for binary operator '+'");
flags = CF_INT;
}
flags = typeadjust (Expr, &Expr2, 1);
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `+'");
+ Error ("Invalid operands for binary operator '+'");
flags = CF_INT;
}
flags = typeadjust (Expr, &Expr2, 0) & ~CF_CONST;
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `+'");
+ Error ("Invalid operands for binary operator '+'");
flags = CF_INT;
}
/* lhs cannot be function or pointer to function */
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 */
Expr->Type = type_uchar;
}
/* rhs cannot be function or pointer to function */
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 */
Expr2.Type = type_uchar;
}
Expr->IVal -= Expr2.IVal;
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `-'");
+ Error ("Invalid operands for binary operator '-'");
}
/* Result is constant, condition codes not set */
flags = typeadjust (Expr, &Expr2, 1);
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `-'");
+ Error ("Invalid operands for binary operator '-'");
flags = CF_INT;
}
flags = typeadjust (Expr, &Expr2, 0);
} else {
/* OOPS */
- Error ("Invalid operands for binary operator `-'");
+ Error ("Invalid operands for binary operator '-'");
flags = CF_INT;
}
/* The rhs must be an integer (or a float, but we don't support that yet */
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
** break, so this is the best error recovery.
*/
*/
hie1 (&Expr2);
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
** break, so this is the best error recovery.
*/
/* Main cannot be a fastcall function */
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
** doesn't return an 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
*/
{
if (!IsXDigit (C)) {
- Error ("Invalid hexadecimal digit: `%c'", C);
+ Error ("Invalid hexadecimal digit: '%c'", C);
}
if (IsDigit (C)) {
return C - '0';
struct stat Buf;
if (FileStat (IF->Name, &Buf) != 0) {
/* 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->MTime = (unsigned long) Buf.st_mtime;
FILE* F = fopen (Name, "r");
if (F == 0) {
/* 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 */
/* Search for the file */
N = SearchFile ((IT == IT_SYSINC)? SysIncSearchPath : UsrIncSearchPath, Name);
if (N == 0) {
- PPError ("Include file `%s' not found", Name);
+ PPError ("Include file '%s' not found", Name);
return;
}
F = fopen (IF->Name, "r");
if (F == 0) {
/* 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;
}
/* 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 */
(void) NewAFile (IF, F);
/* Open the file */
FILE* F = fopen (Name, "w");
if (F == 0) {
- Fatal ("Cannot open dependency file `%s': %s", Name, strerror (errno));
+ Fatal ("Cannot open dependency file '%s': %s", Name, strerror (errno));
}
/* If a dependency target was given, use it, otherwise use the output
** we cannot allow that here.
*/
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 */
/* Cannot allocate a variable of zero size */
if (Size == 0) {
- Error ("Variable `%s' has unknown size", Decl->Ident);
+ Error ("Variable '%s' has unknown size", Decl->Ident);
}
}
/* Cannot allocate a variable of zero size */
if (Size == 0) {
- Error ("Variable `%s' has unknown size", Decl->Ident);
+ Error ("Variable '%s' has unknown size", Decl->Ident);
}
}
/* Cannot allocate a variable of zero size */
if (Size == 0) {
- Error ("Variable `%s' has unknown size", Decl->Ident);
+ Error ("Variable '%s' has unknown size", Decl->Ident);
}
}
for (I = 0; I < CollCount (&M->FormalArgs); ++I) {
if (strcmp (CollAtUnchecked (&M->FormalArgs, I), Arg) == 0) {
/* Found */
- Error ("Duplicate macro parameter: `%s'", Arg);
+ Error ("Duplicate macro parameter: '%s'", Arg);
break;
}
}
break;
case TGT_MODULE:
- AbEnd ("Cannot use `module' as a target for the compiler");
+ AbEnd ("Cannot use 'module' as a target for the compiler");
break;
case TGT_ATARI2600:
{
/* Cannot have the option twice */
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 */
if (Arg == 0) {
{
/* Print an error and abort if the name is not ok */
if (!ValidSegName (Seg)) {
- AbEnd ("Segment name `%s' is invalid", Seg);
+ AbEnd ("Segment name '%s' is invalid", Seg);
}
}
CPU = FindCPU (Arg);
if (CPU != CPU_6502 && CPU != CPU_6502X && CPU != CPU_65SC02 &&
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);
}
}
/* Open the file */
FILE* F = fopen (Arg, "r");
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
/* Check the current memory model */
if (MemoryModel != MMODEL_UNKNOWN) {
- AbEnd ("Cannot use option `%s' twice", Opt);
+ AbEnd ("Cannot use option '%s' twice", Opt);
}
/* Translate the memory model name and check it */
/* Find the standard from the given name */
standard_t Std = FindStandard (Arg);
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) {
AbEnd ("Option %s given more than once", Opt);
} else {
/* Write the output to the file */
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 */
CloseOutputFile ();
/* Open the file */
OutputFile = fopen (OutputFilename, "w");
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);
}
/* Open the file */
OutputFile = fopen (Name, "w");
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);
}
remove (OutputFilename);
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;
}
}
/* 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;
}
} else {
/* Segment name is invalid */
- Error ("Illegal segment name: `%s'", Name);
+ Error ("Illegal segment name: '%s'", Name);
}
** for unknown pragmas, but warn about them if enabled (the default).
*/
if (IS_Get (&WarnUnknownPragma)) {
- Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident));
+ Warning ("Unknown pragma '%s'", SB_GetConstBuf (&Ident));
}
goto ExitPoint;
}
}
} else {
if (CurC == '/' && NextC == '*') {
- PPWarning ("`/*' found inside a comment");
+ PPWarning ("'/*' found inside a comment");
}
NextChar ();
}
NewStyleComment ();
} else if (CurC == '\0') {
/* 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 ();
break;
NextChar ();
SkipWhitespace (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 {
/* Make a valid string from Replacement */
Arg = ME_GetActual (E, ArgIdx);
/* Ellipsis */
NextChar ();
if (CurC != '.' || NextC != '.') {
- PPError ("`...' expected");
+ PPError ("'...' expected");
ClearLine ();
return;
}
/* __VA_ARGS__ is only allowed in C89 mode */
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");
}
/* Check for a right paren and eat it if we find one */
if (CurC != ')') {
- PPError ("`)' expected");
+ PPError ("')' expected");
ClearLine ();
return;
}
if (HaveParen) {
SkipWhitespace (0);
if (CurC != ')') {
- PPError ("`)' expected");
+ PPError ("')' expected");
} else {
NextChar ();
}
break;
default:
- PPError ("`\"' or `<' expected");
+ PPError ("'\"' or '<' expected");
goto Done;
}
NextChar ();
PPError ("Duplicate #else");
}
} else {
- PPError ("Unexpected `#else'");
+ PPError ("Unexpected '#else'");
}
break;
/* Remove the clause that needs a terminator */
Skip = (IfStack[IfIndex--] & IFCOND_SKIP) != 0;
} else {
- PPError ("Unexpected `#endif'");
+ PPError ("Unexpected '#endif'");
}
break;
}
if (NextLine () == 0) {
if (IfIndex >= 0) {
- PPError ("`#endif' expected");
+ PPError ("'#endif' expected");
}
return;
}
/* Check for closing quote */
if (CurC != '\'') {
- Error ("`\'' expected");
+ Error ("'\'' expected");
} else {
/* Skip the quote */
NextChar ();
int ConsumeColon (void)
/* Check for a colon and skip it. */
{
- return Consume (TOK_COLON, "`:' expected");
+ return Consume (TOK_COLON, "':' expected");
}
NextToken ();
return 1;
} else {
- Error ("`;' expected");
+ Error ("';' expected");
if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) {
NextToken ();
}
NextToken ();
return 1;
} else {
- Error ("`,' expected");
+ Error ("',' expected");
if (CurTok.Tok == TOK_SEMI) {
NextToken ();
}
int ConsumeLParen (void)
/* Check for a left parenthesis and skip it */
{
- return Consume (TOK_LPAREN, "`(' expected");
+ return Consume (TOK_LPAREN, "'(' expected");
}
int ConsumeRParen (void)
/* Check for a right parenthesis and skip it */
{
- return Consume (TOK_RPAREN, "`)' expected");
+ return Consume (TOK_RPAREN, "')' expected");
}
int ConsumeLBrack (void)
/* Check for a left bracket and skip it */
{
- return Consume (TOK_LBRACK, "`[' expected");
+ return Consume (TOK_LBRACK, "'[' expected");
}
int ConsumeRBrack (void)
/* Check for a right bracket and skip it */
{
- return Consume (TOK_RBRACK, "`]' expected");
+ return Consume (TOK_RBRACK, "']' expected");
}
int ConsumeLCurly (void)
/* Check for a left curly brace and skip it */
{
- return Consume (TOK_LCURLY, "`{' expected");
+ return Consume (TOK_LCURLY, "'{' expected");
}
int ConsumeRCurly (void)
/* Check for a right curly brace and skip it */
{
- return Consume (TOK_RCURLY, "`}' expected");
+ return Consume (TOK_RCURLY, "'}' expected");
}
SB_Skip (B);
*Val = SignExtendChar (TgtTranslateChar (ParseChar (B)));
if (SB_Peek (B) != '\'') {
- Error ("`\'' expected");
+ Error ("'\'' expected");
return 0;
} else {
/* Skip the quote */
{
int HaveToken = (CurTok.Tok == TOK_SEMI);
if (!HaveToken) {
- Error ("`;' expected");
+ Error ("';' expected");
/* Try to be smart about errors */
if (CurTok.Tok == TOK_COLON || CurTok.Tok == TOK_COMMA) {
HaveToken = 1;
g_defcodelabel (ContinueLabel);
/* Parse the end condition */
- Consume (TOK_WHILE, "`while' expected");
+ Consume (TOK_WHILE, "'while' expected");
TestInParens (LoopLabel, 1);
ConsumeSemi ();
}
} 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 */
/* Check if we are inside a loop */
if (L == 0) {
/* Error: No current loop */
- Error ("`break' statement not within loop or switch");
+ Error ("'break' statement not within loop or switch");
return;
}
/* Did we find it? */
if (L == 0) {
- Error ("`continue' statement not within a loop");
+ Error ("'continue' statement not within a loop");
return;
}
case TOK_LCURLY:
NextToken ();
GotBreak = CompoundStatement ();
- CheckTok (TOK_RCURLY, "`{' expected", PendingToken);
+ CheckTok (TOK_RCURLY, "'{' expected", PendingToken);
return GotBreak;
case TOK_IF:
} else {
/* case keyword outside a switch statement */
- Error ("`default' label not within a switch statement");
+ Error ("'default' label not within a switch statement");
}
!SymHasAttr (Entry, atUnused)) {
if (Flags & SC_PARAM) {
if (IS_Get (&WarnUnusedParam)) {
- Warning ("Parameter `%s' is never used", Entry->Name);
+ Warning ("Parameter '%s' is never used", Entry->Name);
}
} else {
if (IS_Get (&WarnUnusedVar)) {
- Warning ("`%s' is defined but never used", Entry->Name);
+ Warning ("'%s' is defined but never used", Entry->Name);
}
}
}
if (Flags & SC_LABEL) {
if (!SymIsDef (Entry)) {
/* Undefined label */
- Error ("Undefined label: `%s'", Entry->Name);
+ Error ("Undefined label: '%s'", Entry->Name);
} else if (!SymIsRef (Entry)) {
/* Defined but not used */
if (IS_Get (&WarnUnusedLabel)) {
- Warning ("`%s' is defined but never used", Entry->Name);
+ Warning ("'%s' is defined but never used", Entry->Name);
}
}
}
/* We do have an entry. This may be a forward, so check it. */
if ((Entry->Flags & SC_TYPEMASK) != Type) {
/* 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) {
/* Both structs are definitions. */
- Error ("Multiple definition for `%s'", Name);
+ Error ("Multiple definition for '%s'", Name);
} else {
/* Define the struct size if it is given */
if (Size > 0) {
if (Entry) {
/* We have a symbol with this name already */
- Error ("Multiple definition for `%s'", Name);
+ Error ("Multiple definition for '%s'", Name);
} else {
SymEntry* Entry = FindSymInTable (Tab, Name, HashStr (Name));
if (Entry) {
if ((Entry->Flags & SC_CONST) != SC_CONST) {
- Error ("Symbol `%s' is already different kind", Name);
+ Error ("Symbol '%s' is already different kind", Name);
} else {
- Error ("Multiple definition for `%s'", Name);
+ Error ("Multiple definition for '%s'", Name);
}
return Entry;
}
if (SymIsDef (Entry) && (Flags & SC_DEF) != 0) {
/* 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);
if (Entry) {
/* We have a symbol with this name already */
- Error ("Multiple definition for `%s'", Name);
+ Error ("Multiple definition for '%s'", Name);
} else {
** then avoid a compiler crash. See GitHub issue #728.
*/
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 */
if (Entry->Flags & SC_TYPE) {
- Error ("Multiple definition for `%s'", Name);
+ Error ("Multiple definition for '%s'", Name);
return Entry;
}
if ((Size != UNSPECIFIED && ESize != UNSPECIFIED && Size != ESize) ||
TypeCmp (T + 1, EType + 1) < TC_EQUAL) {
/* Types not identical: Conflicting types */
- Error ("Conflicting types for `%s'", Name);
+ Error ("Conflicting types for '%s'", Name);
return Entry;
} else {
/* Check if we have a size in the existing definition */
} else {
/* New type must be identical */
if (TypeCmp (EType, T) < TC_EQUAL) {
- Error ("Conflicting types for `%s'", Name);
+ Error ("Conflicting types for '%s'", Name);
return Entry;
}
** warn about the conflict. (It will compile a public declaration.)
*/
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. */
** warn about the conflict. (It will compile a public declaration.)
*/
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 */
if (Entry) {
Entry->Flags |= SC_ZEROPAGE;
} else {
- Error ("Undefined symbol: `%s'", Name);
+ Error ("Undefined symbol: '%s'", Name);
}
}
/* Don't allow casts from void to something else. */
if (IsTypeVoid (OldType)) {
- Error ("Cannot convert from `void' to something else");
+ Error ("Cannot convert from 'void' to something else");
goto ExitPoint;
}
/* Try to open the file for reading */
FILE* F = fopen (Input, "rb");
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 */
/* Check if the size is reasonable */
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) {
- 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 */
/* Read the file contents into the buffer */
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 */
/* Verify the header */
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);
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) {
- 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) */
if (FirstChar > 0x20 || LastChar < 0x7E) {
Print (stderr, 1, "FirstChar = $%04X, CharCount = %u\n",
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) {
- Error ("File `%s' contains too many character definitions", Input);
+ Error ("File '%s' contains too many character definitions", Input);
}
/* Print the copyright from the header */
/* Check if the offset is valid */
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 */
/* The baseline must be zero, otherwise we cannot convert */
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"
/* Open the output file */
F = fopen (Output, "wb");
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 */
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 */
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 */
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 */
Offs = SB_GetLen (&VectorData);
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 */
if (fclose (F) != 0) {
- Error ("Error closing to `%s': %s", Output, strerror (errno));
+ Error ("Error closing to '%s': %s", Output, strerror (errno));
}
/* Done */
for (I = 0; I < Cmd->FileCount; ++I) {
if (strcmp (Cmd->Files[I], File) == 0) {
/* Duplicate file */
- Warning ("Duplicate file in argument list: `%s'", File);
+ Warning ("Duplicate file in argument list: '%s'", File);
/* No need to search further */
break;
}
/* Check the result code */
if (Status < 0) {
/* 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) {
/* Called program had an error */
exit (Status);
/* Remove the input file */
if (remove (AsmName) < 0) {
- Warning ("Cannot remove temporary file `%s': %s",
+ Warning ("Cannot remove temporary file '%s': %s",
AsmName, strerror (errno));
}
" -o name\t\t\tName the output file\n"
" -r\t\t\t\tEnable register variables\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"
" -vm\t\t\t\tVerbose map file\n"
" -C name\t\t\tUse linker config file\n"
" --debug\t\t\tDebug mode\n"
" --debug-info\t\t\tAdd debug info\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"
" --include-dir dir\t\tSet a compiler include directory path\n"
" --ld-args options\t\tPass options to the linker\n"
{
Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) {
- Error ("No such target system: `%s'", Arg);
+ Error ("No such target system: '%s'", Arg);
} else if (Target == TGT_MODULE) {
- Error ("Cannot use `module' as target, use --module instead");
+ Error ("Cannot use 'module' as target, use --module instead");
}
}
break;
default:
- Error ("Don't know what to do with `%s'", Arg);
+ Error ("Don't know what to do with '%s'", Arg);
}
/* The son - exec the program */
if (execvp (File, argv) < 0) {
- Error ("Cannot exec `%s': %s", File, strerror (errno));
+ Error ("Cannot exec '%s': %s", File, strerror (errno));
}
} else {
/* Examine the child status */
if (!WIFEXITED (Status)) {
- Error ("Subprocess `%s' aborted by signal %d", File, WTERMSIG (Status));
+ Error ("Subprocess '%s' aborted by signal %d", File, WTERMSIG (Status));
}
}
switch (O->Type) {
case O65_OPT_FILENAME:
- Print (stdout, 1, "O65 filename option: `%s'\n",
+ Print (stdout, 1, "O65 filename option: '%s'\n",
GetO65OptionText (O));
break;
if (O->Len == 2) {
Warning ("Operating system option without data found");
} else {
- Print (stdout, 1, "O65 operating system option: `%s'\n",
+ Print (stdout, 1, "O65 operating system option: '%s'\n",
GetO65OSName (O->Data[0]));
switch (O->Data[0]) {
case O65_OS_CC65_MODULE:
break;
case O65_OPT_ASM:
- Print (stdout, 1, "O65 assembler option: `%s'\n",
+ Print (stdout, 1, "O65 assembler option: '%s'\n",
GetO65OptionText (O));
break;
xfree (Author);
}
Author = xstrdup (GetO65OptionText (O));
- Print (stdout, 1, "O65 author option: `%s'\n", Author);
+ Print (stdout, 1, "O65 author option: '%s'\n", Author);
break;
case O65_OPT_TIMESTAMP:
- Print (stdout, 1, "O65 timestamp option: `%s'\n",
+ Print (stdout, 1, "O65 timestamp option: '%s'\n",
GetO65OptionText (O));
break;
/* Open the output file */
F = fopen (OutputName, "w");
if (F == 0) {
- Error ("Cannot open `%s': %s", OutputName, strerror (errno));
+ Error ("Cannot open '%s': %s", OutputName, strerror (errno));
}
/* 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));
/* Select the CPU */
}
if (*L) {
- Error ("Label name `%s' is invalid", Label);
+ Error ("Label name '%s' is invalid", Label);
}
}
{
/* Print an error and abort if the name is not ok */
if (!ValidSegName (Seg)) {
- Error ("Segment name `%s' is invalid", Seg);
+ Error ("Segment name '%s' is invalid", Seg);
}
}
/* Search for the model name */
Model = FindModel (Arg);
if (Model == O65_MODEL_INVALID) {
- Error ("Unknown o65 model `%s'", Arg);
+ Error ("Unknown o65 model '%s'", Arg);
}
}
} else {
/* Filename. Check if we already had one */
if (InputName) {
- Error ("Don't know what to do with `%s'", Arg);
+ Error ("Don't know what to do with '%s'", Arg);
} else {
InputName = Arg;
}
/* Open the o65 input file */
FILE* F = fopen (Name, "rb");
if (F == 0) {
- Error ("Cannot open `%s': %s", Name, strerror (errno));
+ Error ("Cannot open '%s': %s", Name, strerror (errno));
}
/* Read the file data */
const char* File, unsigned Line)
{
/* 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);
}
void InvArg (const char* Opt, const char* Arg)
/* 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);
}
void InvDef (const char* Def)
/* Print an error about an invalid definition and die */
{
- AbEnd ("Invalid definition: `%s'", Def);
+ AbEnd ("Invalid definition: '%s'", Def);
}
++L;
} else {
if (!IgnoreUnknown) {
- Error ("%s(%u): Missing `='", Filename, Line);
+ Error ("%s(%u): Missing '='", Filename, Line);
}
continue;
}
/* Open the file */
F = fopen (InFile, "rb");
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 */
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);
** the file.
*/
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;
/* Check if the size is larger than what we can read */
if (Size == 0) {
- Error ("Nothing to read from input file `%s'", InFile);
+ Error ("Nothing to read from input file '%s'", InFile);
}
if (Size > MaxCount) {
- Warning ("File `%s' is too large, ignoring %ld bytes",
+ Warning ("File '%s' is too large, ignoring %ld bytes",
InFile, Size - MaxCount);
} else if (MaxCount > Size) {
MaxCount = (unsigned) Size;
/* Read from the file and remember the number of bytes read */
Count = fread (CodeBuf + StartAddr, 1, MaxCount, F);
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 */
} else {
/* Filename. Check if we already had one */
if (InFile) {
- fprintf (stderr, "%s: Don't know what to do with `%s'\n",
+ fprintf (stderr, "%s: Don't know what to do with '%s'\n",
ProgName, Arg);
exit (EXIT_FAILURE);
} else {
if (Name != 0) {
F = fopen (Name, "w");
if (F == 0) {
- Error ("Cannot open `%s': %s", Name, strerror (errno));
+ Error ("Cannot open '%s': %s", Name, strerror (errno));
}
} else {
F = stdout;
/* */
/* */
/* (C) 2000-2005 Ullrich von Bassewitz */
-/* Römerstrasse 52 */
+/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* C++ style comment */
NextChar ();
if (C != '/') {
- InfoError ("Invalid token `/'");
+ InfoError ("Invalid token '/'");
}
do {
NextChar ();
break;
default:
- InfoError ("Invalid character `%c'", C);
+ InfoError ("Invalid character '%c'", C);
}
}
void InfoConsumeLCurly (void)
/* Consume a left curly brace */
{
- InfoConsume (INFOTOK_LCURLY, "`{' expected");
+ InfoConsume (INFOTOK_LCURLY, "'{' expected");
}
void InfoConsumeRCurly (void)
/* Consume a right curly brace */
{
- InfoConsume (INFOTOK_RCURLY, "`}' expected");
+ InfoConsume (INFOTOK_RCURLY, "'}' expected");
}
void InfoConsumeSemi (void)
/* Consume a semicolon */
{
- InfoConsume (INFOTOK_SEMI, "`;' expected");
+ InfoConsume (INFOTOK_SEMI, "';' expected");
}
void InfoConsumeColon (void)
/* Consume a colon */
{
- InfoConsume (INFOTOK_COLON, "`:' expected");
+ InfoConsume (INFOTOK_COLON, "':' expected");
}
/* Open the file */
InputFile = fopen (InfoFile, "r");
if (InputFile == 0) {
- Error ("Cannot open `%s': %s", InfoFile, strerror (errno));
+ Error ("Cannot open '%s': %s", InfoFile, strerror (errno));
}
/* Initialize variables */
break;
default:
- ParseError (D, CC65_ERROR, "Invalid input character `%c'", D->C);
+ ParseError (D, CC65_ERROR, "Invalid input character '%c'", D->C);
}
}
break;
case TGT_UNKNOWN:
- AbEnd ("Unknown target system `%s'", Arg);
+ AbEnd ("Unknown target system '%s'", Arg);
break;
default:
/* Target is known but unsupported */
- AbEnd ("Unsupported target system `%s'", Arg);
+ AbEnd ("Unsupported target system '%s'", Arg);
break;
}
}
/* If the expression is not constant, we're not able to handle it */
if (!IsConstExpr (A->Expr)) {
- Warning ("Cannot evaluate assertion in module `%s', line %u",
+ Warning ("Cannot evaluate assertion in module '%s', line %u",
Module, Line);
} else if (GetExprVal (A->Expr) == 0) {
break;
default:
- Internal ("Invalid assertion action (%u) in module `%s', "
+ Internal ("Invalid assertion action (%u) in module '%s', "
"line %u (file corrupt?)",
A->Action, Module, Line);
break;
SegDesc* S = CollAtUnchecked (&M->SegList, I);
/* 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 */
DoWrite = (S->Flags & SF_BSS) == 0 && /* No BSS segment */
/* Open the file */
D->F = fopen (D->Filename, "wb");
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 */
- Print (stdout, 1, "Opened `%s'...\n", D->Filename);
+ Print (stdout, 1, "Opened '%s'...\n", D->Filename);
/* Dump all memory areas */
for (I = 0; I < CollCount (&F->MemoryAreas); ++I) {
/* Get this entry */
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);
}
/* Close the file */
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 */
{
MemoryArea* M = CfgFindMemory (Name);
if (M == 0) {
- CfgError (&CfgErrorPos, "Invalid memory area `%s'", GetString (Name));
+ CfgError (&CfgErrorPos, "Invalid memory area '%s'", GetString (Name));
}
return M;
}
MemoryArea* M = CfgFindMemory (Name);
if (M) {
CfgError (&CfgErrorPos,
- "Memory area `%s' defined twice",
+ "Memory area '%s' defined twice",
GetString (Name));
}
/* Check for duplicate names */
SegDesc* S = CfgFindSegDesc (Name);
if (S) {
- CfgError (&CfgErrorPos, "Segment `%s' defined twice", GetString (Name));
+ CfgError (&CfgErrorPos, "Segment '%s' defined twice", GetString (Name));
}
/* Allocate memory */
F = FindFile (GetStrBufId (&CfgSVal));
if (F == 0) {
CfgError (&CfgErrorPos,
- "File `%s' not found in MEMORY section",
+ "File '%s' not found in MEMORY section",
SB_GetConstBuf (&CfgSVal));
}
*/
if ((S->Flags & SF_BSS) != 0 && (S->Load != S->Run)) {
CfgWarning (&CfgErrorPos,
- "Segment with type `bss' has both LOAD and RUN "
+ "Segment with type 'bss' has both LOAD and RUN "
"memory areas assigned");
}
if ((S->Flags & SF_RO) == 0) {
if (S->Run->Flags & MF_RO) {
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));
}
}
CfgNextTok ();
/* Expected a curly brace */
- CfgConsume (CFGTOK_LCURLY, "`{' expected");
+ CfgConsume (CFGTOK_LCURLY, "'{' expected");
/* Read the block */
switch (BlockTok) {
}
/* Skip closing brace */
- CfgConsume (CFGTOK_RCURLY, "`}' expected");
+ CfgConsume (CFGTOK_RCURLY, "'}' expected");
} while (CfgTok != CFGTOK_EOF);
}
*/
if ((S->Flags & SF_BSS) != 0 && S->Seg != 0 && !IsBSSType (S->Seg)) {
CfgWarning (GetSourcePos (S->LI),
- "Segment `%s' with type `bss' contains initialized data",
+ "Segment '%s' with type 'bss' contains initialized data",
GetString (S->Name));
}
/* Print a warning if the segment is not optional */
if ((S->Flags & SF_OPTIONAL) == 0) {
CfgWarning (&CfgErrorPos,
- "Segment `%s' does not exist",
+ "Segment '%s' does not exist",
GetString (S->Name));
}
if (O65GetImport (O65FmtDesc, Sym->Name) != 0) {
CfgError (
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)
);
}
if (O65GetExport (O65FmtDesc, Sym->Name) != 0) {
CfgError (
GetSourcePos (Sym->LI),
- "Duplicate exported o65 symbol: `%s'",
+ "Duplicate exported o65 symbol: '%s'",
GetString (Sym->Name)
);
}
if (O65GetExport (O65FmtDesc, Sym->Name) != 0) {
CfgError (
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)
);
}
if (O65GetImport (O65FmtDesc, Sym->Name) != 0) {
CfgError (
GetSourcePos (Sym->LI),
- "Duplicate imported o65 symbol: `%s'",
+ "Duplicate imported o65 symbol: '%s'",
GetString (Sym->Name)
);
}
*/
if (!IsConstExpr (M->StartExpr)) {
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));
}
Addr = M->Start = GetExprVal (M->StartExpr);
/* Resolve the size expression */
if (!IsConstExpr (M->SizeExpr)) {
CfgError (GetSourcePos (M->LI),
- "Size of memory area `%s' is not constant",
+ "Size of memory area '%s' is not constant",
GetString (M->Name));
}
M->Size = GetExprVal (M->SizeExpr);
++Overwrites;
} else {
CfgError (GetSourcePos (M->LI),
- "Segment `%s' of type `overwrite' requires either"
- " `Start' or `Offset' attribute to be specified",
+ "Segment '%s' of type 'overwrite' requires either"
+ " 'Start' or 'Offset' attribute to be specified",
GetString (S->Name));
}
} else {
if (Overwrites > 0) {
CfgError (GetSourcePos (M->LI),
- "Segment `%s' is preceded by at least one segment"
- " of type `overwrite'",
+ "Segment '%s' is preceded by at least one segment"
+ " of type 'overwrite'",
GetString (S->Name));
}
}
** in the linker.
*/
CfgWarning (GetSourcePos (S->LI),
- "Segment `%s' isn't aligned properly; the"
+ "Segment '%s' isn't aligned properly; the"
" resulting executable might not be functional.",
GetString (S->Name));
}
*/
if (M->FillLevel == 0 && NewAddr > Addr) {
CfgWarning (GetSourcePos (S->LI),
- "The first segment in memory area `%s' "
+ "The first segment in memory area '%s' "
"needs fill bytes for alignment.",
GetString (M->Name));
}
if (S->Flags & SF_OVERWRITE) {
if (NewAddr < M->Start) {
CfgError (GetSourcePos (S->LI),
- "Segment `%s' begins before memory area `%s'",
+ "Segment '%s' begins before memory area '%s'",
GetString (S->Name), GetString (M->Name));
} else {
Addr = NewAddr;
++Overflows;
if (S->Flags & SF_OFFSET) {
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),
Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's');
} else {
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),
Addr - NewAddr, (Addr - NewAddr == 1) ? ' ' : 's');
}
++Overflows;
M->Flags |= MF_OVERFLOW;
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),
M->FillLevel - M->Size, (M->FillLevel - M->Size == 1) ? ' ' : 's');
}
MemoryArea* M = CollAtUnchecked (&F->MemoryAreas, J);
/* Debugging */
- Print (stdout, 2, "Skipping `%s'...\n", GetString (M->Name));
+ Print (stdout, 2, "Skipping '%s'...\n", GetString (M->Name));
/* Walk throught the segments */
for (K = 0; K < CollCount (&M->SegList); ++K) {
/* Open the debug info file */
FILE* F = fopen (DbgFileName, "w");
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 */
/* Close the file */
if (fclose (F) != 0) {
- Error ("Error closing debug file `%s': %s", DbgFileName, strerror (errno));
+ Error ("Error closing debug file '%s': %s", DbgFileName, strerror (errno));
}
}
*/
if (ObjHasFiles (I->Obj)) {
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),
GetSourceName (LI),
GetSourceLine (LI),
I->AddrSize);
} 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),
GetObjFileName (I->Obj),
I->AddrSize);
/* We have no object file information and no line info for a new
** import
*/
- Error ("Invalid import size 0x%02X for symbol `%s'",
+ Error ("Invalid import size 0x%02X for symbol '%s'",
I->AddrSize,
GetString (I->Name));
}
}
} else {
/* Duplicate entry, ignore it */
- Warning ("Duplicate external identifier: `%s'",
+ Warning ("Duplicate external identifier: '%s'",
GetString (L->Name));
}
return;
{
if (E->Expr == 0) {
/* OOPS */
- Internal ("`%s' is an undefined external", GetString (E->Name));
+ Internal ("'%s' is an undefined external", GetString (E->Name));
}
return GetExprVal (E->Expr);
}
}
/* Output the diagnostic */
- Warning ("Address size mismatch for `%s': "
- "Exported from %s as `%s', "
- "import in %s as `%s'",
+ Warning ("Address size mismatch for '%s': "
+ "Exported from %s as '%s', "
+ "import in %s as '%s'",
GetString (E->Name),
SB_GetConstBuf (&ExportLoc),
ExpAddrSize,
/* Unresolved external */
Import* Imp = E->ImpList;
fprintf (stderr,
- "Unresolved external `%s' referenced in:\n",
+ "Unresolved external '%s' referenced in:\n",
GetString (E->Name));
while (Imp) {
unsigned J;
/* Print an error about a circular reference using to define the given export */
{
const LineInfo* LI = GetExportPos (E);
- Error ("Circular reference for symbol `%s', %s(%u)",
+ Error ("Circular reference for symbol '%s', %s(%u)",
GetString (E->Name),
GetSourceName (LI),
GetSourceLine (LI));
Error ("Argument for .BANK is not segment relative or too complex");
}
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",
GetString (D.Seg->Name));
}
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",
GetString (D.Seg->MemArea->Name));
}
ExtSym* E = GetExtSym (Tab, Name);
if (E != 0) {
/* 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 */
{
/* Close the library file */
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;
}
/* Do a seek in the library checking for errors */
{
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));
}
}
L->Header.Magic = LIB_MAGIC;
L->Header.Version = Read16 (L->F);
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.IndexOffs = Read32 (L->F);
{
O->Header.Magic = Read32 (L->F);
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));
}
O->Header.Version = Read16 (L->F);
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));
}
O->Header.Flags = Read16 (L->F);
** therefore be part of the line infos read from the object file.
*/
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,
GetObjFileName (O),
CollCount (&O->LineInfos));
" -m name\t\tCreate a map file\n"
" -o name\t\tName the default output file\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"
" -vm\t\t\tVerbose map file\n"
"\n"
" --dbgfile name\tGenerate debug information\n"
" --define sym=val\tDefine a symbol\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"
" --lib file\t\tLink this library\n"
" --lib-path path\tSpecify a library search path\n"
/* We must have a valid name now */
if (PathName == 0) {
- Error ("Input file `%s' not found", Name);
+ Error ("Input file '%s' not found", Name);
}
/* Try to open the file */
F = fopen (PathName, "rb");
if (F == 0) {
- Error ("Cannot open `%s': %s", PathName, strerror (errno));
+ Error ("Cannot open '%s': %s", PathName, strerror (errno));
}
/* Read the magic word */
default:
fclose (F);
- Error ("File `%s' has unknown type", PathName);
+ Error ("File '%s' has unknown type", PathName);
}
PathName = SearchFile (CfgDefaultPath, Arg);
}
if (PathName == 0) {
- Error ("Cannot find config file `%s'", Arg);
+ Error ("Cannot find config file '%s'", Arg);
}
/* Read the config */
/* Get the address size and check it */
unsigned char AddrSize = AddrSizeFromStr (ColPos+1);
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 */
/* Map the target name to a target id */
Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) {
- Error ("Invalid target name: `%s'", Arg);
+ Error ("Invalid target name: '%s'", Arg);
}
/* Set the target binary format */
PathName = SearchFile (CfgDefaultPath, SB_GetBuf (&FileName));
}
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 */
/* Open the map file */
FILE* F = fopen (MapFileName, "w");
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 */
/* Close the file */
if (fclose (F) != 0) {
- Error ("Error closing map file `%s': %s", MapFileName, strerror (errno));
+ Error ("Error closing map file '%s': %s", MapFileName, strerror (errno));
}
}
/* Open the label file */
FILE* F = fopen (LabelFileName, "w");
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 */
/* Close the file */
if (fclose (F) != 0) {
- Error ("Error closing label file `%s': %s", LabelFileName, strerror (errno));
+ Error ("Error closing label file '%s': %s", LabelFileName, strerror (errno));
}
}
S = Seg [I];
/* 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 */
if (DoWrite) {
/* Check the size of the segment for overflow */
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);
}
}
*/
Export* E = FindExport (NameIdx);
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 */
/* Bail out if we cannot handle the expression */
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 */
/* For some reason, we didn't find this segment in the list of
** 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);
*/
Export* E = FindExport (Ident);
if (E == 0 || IsUnresolvedExport (E)) {
- Error ("Unresolved export: `%s'", GetString (Ident));
+ Error ("Unresolved export: '%s'", GetString (Ident));
}
/* Insert the entry into the table */
/* Open the file */
D->F = fopen (D->Filename, "wb");
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 */
- 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
** filename
/* Close the file */
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 */
/* Convert a local string id into a global one and return it. */
{
if (Index >= O->StringCount) {
- Error ("Invalid string index (%u) in module `%s'",
+ Error ("Invalid string index (%u) in module '%s'",
Index, GetObjFileName (O));
}
return O->Strings[Index];
/* Get a section from an object file checking for a valid index */
{
if (Id >= CollCount (&O->Sections)) {
- Error ("Invalid section index (%u) in module `%s'",
+ Error ("Invalid section index (%u) in module '%s'",
Id, GetObjFileName (O));
}
return CollAtUnchecked (&O->Sections, Id);
/* Get an import from an object file checking for a valid index */
{
if (Id >= CollCount (&O->Imports)) {
- Error ("Invalid import index (%u) in module `%s'",
+ Error ("Invalid import index (%u) in module '%s'",
Id, GetObjFileName (O));
}
return CollAtUnchecked (&O->Imports, Id);
/* Get an export from an object file checking for a valid index */
{
if (Id >= CollCount (&O->Exports)) {
- Error ("Invalid export index (%u) in module `%s'",
+ Error ("Invalid export index (%u) in module '%s'",
Id, GetObjFileName (O));
}
return CollAtUnchecked (&O->Exports, Id);
/* Get a debug symbol from an object file checking for a valid index */
{
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));
}
return CollAtUnchecked (&O->DbgSyms, Id);
/* Get a scope from an object file checking for a valid index */
{
if (Id >= CollCount (&O->Scopes)) {
- Error ("Invalid scope index (%u) in module `%s'",
+ Error ("Invalid scope index (%u) in module '%s'",
Id, GetObjFileName (O));
}
return CollAtUnchecked (&O->Scopes, Id);
/* Make a module name from the file name */
const char* Module = FindName (Name);
if (*Module == 0) {
- Error ("Cannot make module name from `%s'", Name);
+ Error ("Cannot make module name from '%s'", Name);
}
return GetStringId (Module);
}
{
H->Version = Read16 (Obj);
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);
}
H->Flags = Read16 (Obj);
default:
CfgWarning (&CfgErrorPos,
- "Unkown escape sequence `%%%c'", C);
+ "Unkown escape sequence '%%%c'", C);
SB_AppendChar (&CfgSVal, '%');
SB_AppendChar (&CfgSVal, C);
NextChar ();
break;
default:
- CfgError (&CfgErrorPos, "Invalid character `%c'", C);
+ CfgError (&CfgErrorPos, "Invalid character '%c'", C);
}
}
void CfgConsumeSemi (void)
/* Consume a semicolon */
{
- CfgConsume (CFGTOK_SEMI, "`;' expected");
+ CfgConsume (CFGTOK_SEMI, "';' expected");
}
void CfgConsumeColon (void)
/* Consume a colon */
{
- CfgConsume (CFGTOK_COLON, "`:' expected");
+ CfgConsume (CFGTOK_COLON, "':' expected");
}
/* Open the file */
InputFile = fopen (CfgName, "r");
if (InputFile == 0) {
- Error ("Cannot open `%s': %s", CfgName, strerror (errno));
+ Error ("Cannot open '%s': %s", CfgName, strerror (errno));
}
/* Initialize variables */
case SCOPE_ENUM: fputs (",type=enum", F); break;
default:
- Error ("Module `%s': Unknown scope type %u",
+ Error ("Module '%s': Unknown scope type %u",
GetObjFileName (O), S->Type);
}
if (ObjName == 0) {
ObjName = "[linker generated]";
}
- Error ("Module `%s': Type mismatch for segment `%s'", ObjName,
+ Error ("Module '%s': Type mismatch for segment '%s'", ObjName,
GetString (Name));
}
}
/* Print some data */
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);
/* Get the segment for this section */
if (Sec->Alignment > 1) {
Alignment = LeastCommonMultiple (S->Alignment, Sec->Alignment);
if (Alignment > MAX_ALIGNMENT) {
- Error ("Combined alignment for segment `%s' is %lu which exceeds "
- "%lu. Last module requiring alignment was `%s'.",
+ Error ("Combined alignment for segment '%s' is %lu which exceeds "
+ "%lu. Last module requiring alignment was '%s'.",
GetString (Name), Alignment, MAX_ALIGNMENT,
GetObjFileName (O));
} else if (Alignment >= LARGE_ALIGNMENT) {
- Warning ("Combined alignment for segment `%s' is suspiciously "
- "large (%lu). Last module requiring alignment was `%s'.",
+ Warning ("Combined alignment for segment '%s' is suspiciously "
+ "large (%lu). Last module requiring alignment was '%s'.",
GetString (Name), Alignment, GetObjFileName (O));
}
S->Alignment = Alignment;
break;
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);
/* NOTREACHED */
return 0;
break;
case SEG_EXPR_RANGE_ERROR:
- Error ("Range error in module `%s', line %u",
+ Error ("Range error in module '%s', line %u",
GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag));
break;
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),
GetFragmentSourceLine (Frag));
break;
case SEG_EXPR_INVALID:
- Error ("Invalid expression in module `%s', line %u",
+ Error ("Invalid expression in module '%s', line %u",
GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag));
break;
/* Check it */
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));
}
}
/* Try to open the file */
FILE* F = fopen (Name, "rb");
if (F == 0) {
- Error ("Cannot open `%s': %s", Name, strerror (errno));
+ Error ("Cannot open '%s': %s", Name, strerror (errno));
}
/* Read the magic word */
/* Open the file */
FILE* F = fopen (ProgramFile, "rb");
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 */
if ((Val = fgetc(F)) != EOF) {
if (Val != CPU_6502 && Val != CPU_65C02) {
- Error ("`%s': Invalid CPU type", ProgramFile);
+ Error ("'%s': Invalid CPU type", ProgramFile);
}
CPU = Val;
}
/* Read the file body into memory */
while ((Val = fgetc(F)) != EOF) {
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);
}
/* Check for errors */
if (ferror (F)) {
- Error ("Error reading from `%s': %s", ProgramFile, strerror (errno));
+ Error ("Error reading from '%s': %s", ProgramFile, strerror (errno));
}
/* Close the file */
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);
}
const char* V = GetAttrVal (A, "bytesperline");
if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) ||
(BytesPerLine < 1 || BytesPerLine > 64)) {
- Error ("Invalid value for attribute `bytesperline'");
+ Error ("Invalid value for attribute 'bytesperline'");
}
return BytesPerLine;
}
const char* V = GetAttrVal (A, "base");
if ((V && sscanf (V, "%u%c", &Base, &C) != 1) ||
(Base != 2 && Base != 10 && Base != 16)) {
- Error ("Invalid value for attribute `base'");
+ Error ("Invalid value for attribute 'base'");
}
return Base;
}
/* Check for a ident attribute */
const char* Ident = GetAttrVal (A, "ident");
if (Ident && !ValidIdentifier (Ident)) {
- Error ("Invalid value for attribute `ident'");
+ Error ("Invalid value for attribute 'ident'");
}
return Ident;
}
/* Open the output file */
F = fopen (Name, "w");
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 */
/* Close the file */
if (fclose (F) != 0) {
- Error ("Error closing output file `%s': %s", Name, strerror (errno));
+ Error ("Error closing output file '%s': %s", Name, strerror (errno));
}
}
/* Search for the attribute and return it */
unsigned 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);
}
*/
unsigned Index;
if (FindAttr (C, Name, &Index)) {
- Error ("Duplicate command line attribute `%s'", Name);
+ Error ("Duplicate command line attribute '%s'", Name);
}
/* Insert the attribute */
if (Pos == 0) {
/* Combined is actually a value */
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);
} else {
/* Open the output file */
FILE* F = fopen (Name, "wb");
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
*/
Size = SB_GetLen (Data);
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 */
if (fclose (F) != 0) {
- Error ("Error closing output file `%s': %s", Name, strerror (errno));
+ Error ("Error closing output file '%s': %s", Name, strerror (errno));
}
}
const char* V = GetAttrVal (A, "bytesperline");
if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) ||
(BytesPerLine < 1 || BytesPerLine > 64)) {
- Error ("Invalid value for attribute `bytesperline'");
+ Error ("Invalid value for attribute 'bytesperline'");
}
return BytesPerLine;
}
/* Check for a base attribute */
const char* V = GetAttrVal (A, "base");
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;
}
/* Check for a ident attribute */
const char* Ident = GetAttrVal (A, "ident");
if (Ident && !ValidIdentifier (Ident)) {
- Error ("Invalid value for attribute `ident'");
+ Error ("Invalid value for attribute 'ident'");
}
return Ident;
}
/* Open the output file */
F = fopen (Name, "w");
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 */
/* Close the file */
if (fclose (F) != 0) {
- Error ("Error closing output file `%s': %s", Name, strerror (errno));
+ Error ("Error closing output file '%s': %s", Name, strerror (errno));
}
}
sizeof (ConverterMap[0]),
Compare);
if (E == 0) {
- Error ("No such target format: `%s'", Format);
+ Error ("No such target format: '%s'", Format);
}
/* Do the conversion */
sizeof (FormatTable[0]),
CompareFileId);
if (F == 0) {
- Error ("Unknown input format `%s'", Format);
+ Error ("Unknown input format '%s'", Format);
}
} else {
/* No format given, use file name extension */
sizeof (FormatTable) / sizeof (FormatTable[0]));
/* Found? */
if (F == 0) {
- Error ("Cannot determine file format of input file `%s'", Name);
+ Error ("Cannot determine file format of input file '%s'", Name);
}
}
} else if (strcmp (Mode, "shaped") == 0) {
return smShaped;
} else {
- Error ("Invalid value for attribute `mode'");
+ Error ("Invalid value for attribute 'mode'");
}
}
}
} 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 */
sizeof (FormatTable[0]),
CompareFileId);
if (F == 0) {
- Error ("Unknown output format `%s'", Format);
+ Error ("Unknown output format '%s'", Format);
}
} else {
/* No format given, use file name extension */
sizeof (FormatTable) / sizeof (FormatTable[0]));
/* Found? */
if (F == 0) {
- Error ("Cannot determine file format of output file `%s'", Name);
+ Error ("Cannot determine file format of output file '%s'", Name);
}
}
/* Check the header data */
if (P->Id != PCX_MAGIC_ID || P->FileVersion == 1 || P->FileVersion > 5) {
- Error ("`%s' is not a PCX file", Name);
+ Error ("'%s' is not a PCX file", Name);
}
if (P->Compressed > 1) {
- Error ("Unsupported compression (%d) in PCX file `%s'",
+ Error ("Unsupported compression (%d) in PCX file '%s'",
P->Compressed, Name);
}
/* We support:
if (!((P->BPP == 1 && P->Planes == 1) ||
(P->BPP == 8 && (P->Planes == 1 || P->Planes == 3 || P->Planes == 4)))) {
/* We could support others, but currently we don't */
- Error ("Unsupported PCX format: %u planes, %u bpp in PCX file `%s'",
+ Error ("Unsupported PCX format: %u planes, %u bpp in PCX file '%s'",
P->Planes, P->BPP, Name);
}
if (P->PalInfo != 1 && P->PalInfo != 2) {
- Error ("Unsupported palette info (%u) in PCX file `%s'",
+ Error ("Unsupported palette info (%u) in PCX file '%s'",
P->PalInfo, Name);
}
if (!ValidBitmapSize (P->Width, P->Height)) {
- Error ("PCX file `%s' has an unsupported size (w=%u, h=%d)",
+ Error ("PCX file '%s' has an unsupported size (w=%u, h=%d)",
Name, P->Width, P->Height);
}
/* Open the file */
FILE* F = fopen (Name, "rb");
if (F == 0) {
- Error ("Cannot open PCX file `%s': %s", Name, strerror (errno));
+ Error ("Cannot open PCX file '%s': %s", Name, strerror (errno));
}
/* Read the PCX header */
/* Check for palette marker */
if (Read8 (F) != 0x0C) {
- Error ("Invalid palette marker in PCX file `%s'", Name);
+ Error ("Invalid palette marker in PCX file '%s'", Name);
}
} else if (EndPos == CurPos) {
/* Check the maximum index for safety */
if (MaxIdx > 15) {
- Error ("PCX file `%s' contains more than 16 indexed colors "
+ Error ("PCX file '%s' contains more than 16 indexed colors "
"but no extra palette", Name);
}
} else {
- Error ("Error in PCX file `%s': %lu bytes at end of pixel data",
+ Error ("Error in PCX file '%s': %lu bytes at end of pixel data",
Name, EndPos - CurPos);
}
} else if (strcmp (Mode, "multicolor") == 0) {
return smMultiColor;
} else {
- Error ("Invalid value for attribute `mode'");
+ Error ("Invalid value for attribute 'mode'");
}
}
goto.c(8): Warning: Goto at line 8 to label start jumps into a block with initialization of an object that has automatic storage duration
-goto.c(97): Warning: `a' is defined but never used
-goto.c(117): Warning: `a' is defined but never used
-goto.c(137): Warning: `a' is defined but never used
+goto.c(97): Warning: 'a' is defined but never used
+goto.c(117): Warning: 'a' is defined but never used
+goto.c(137): Warning: 'a' is defined but never used
goto.c(159): Warning: Goto at line 23 to label l8 jumps into a block with initialization of an object that has automatic storage duration
goto.c(159): Warning: Goto at line 44 to label l8 jumps into a block with initialization of an object that has automatic storage duration
goto.c(159): Warning: Goto at line 65 to label l8 jumps into a block with initialization of an object that has automatic storage duration
fs=(func((fd/a),(func(2,0x0082c90f))));
}
-i get "Error: `)' expected" on that line. (this is with the snapshot, freshly
+i get "Error: ')' expected" on that line. (this is with the snapshot, freshly
compiled 5 minutes ago)
*/
#include <stdio.h>
/*
-...gives "test.c(2): Error: Variable `foo' has unknown size" using -Cl.
+...gives "test.c(2): Error: Variable 'foo' has unknown size" using -Cl.
Is it really unknown?
cc65 V2.13.0, SVN version: 4384
Expected results and also what I get from this without any optimisations
are: 48663 and 49218
-When I turn on ``-O``: 58096 and 58096. After swapping the two variable
-declaration lines in `calculate_checksum()` the results are correct
-with ``-O``.
+When I turn on ''-O'': 58096 and 58096. After swapping the two variable
+declaration lines in 'calculate_checksum()' the results are correct
+with ''-O''.
-But with ``--O --static-locals`` the results are incorrect again (31757
-and 15408). ``--static-locals`` alone works though.
+But with ''--O --static-locals'' the results are incorrect again (31757
+and 15408). ''--static-locals'' alone works though.
*/
#include <stdio.h>
with SVN version: 4973M
$ cl65 -v -o test.prg tests/cc65110210.c
-Opened include file `/usr/local/lib/cc65/include/stdio.h'
-Opened include file `/usr/local/lib/cc65/include/stddef.h'
-Opened include file `/usr/local/lib/cc65/include/stdarg.h'
-Opened include file `/usr/local/lib/cc65/include/limits.h'
+Opened include file '/usr/local/lib/cc65/include/stdio.h'
+Opened include file '/usr/local/lib/cc65/include/stddef.h'
+Opened include file '/usr/local/lib/cc65/include/stdarg.h'
+Opened include file '/usr/local/lib/cc65/include/limits.h'
0 errors, 0 warnings
-Opened output file `tests/cc65110210.s'
-Wrote output to `tests/cc65110210.s'
-Closed output file `tests/cc65110210.s'
-cl65: Subprocess `ld65' aborted by signal 11
+Opened output file 'tests/cc65110210.s'
+Wrote output to 'tests/cc65110210.s'
+Closed output file 'tests/cc65110210.s'
+cl65: Subprocess 'ld65' aborted by signal 11
*/
overflow:
sigsave = 0;
Z = V9;
- printf("Can `Z = -Y' overflow?\n");
+ printf("Can 'Z = -Y' overflow?\n");
printf("Trying it on Y = %.17e .\n", Y);
V9 = - Y;
V0 = V9;
{
static char *instr[] = {
"Lest this program stop prematurely, i.e. before displaying\n",
- " `END OF TEST',\n",
+ " 'END OF TEST',\n",
"try to persuade the computer NOT to terminate execution when an",
"error like Over/Underflow or Division by Zero occurs, but rather",
"to persevere with a surrogate value after, perhaps, displaying some",
" FAILUREs, like 2+2 == 5 .",
"Failures may confound subsequent diagnoses.\n",
"The diagnostic capabilities of this program go beyond an earlier",
- "program called `MACHAR', which can be found at the end of the",
- "book `Software Manual for the Elementary Functions' (1980) by",
+ "program called 'MACHAR', which can be found at the end of the",
+ "book 'Software Manual for the Elementary Functions' (1980) by",
"W. J. Cody and W. Waite. Although both programs try to discover",
"the Radix, Precision and range (over/underflow thresholds)",
"of the arithmetic, this program tries to cope with a wider variety",
failures++;
}
-/* achar0 should be `5' */
+/* achar0 should be '5' */
void
compare_char_to_lits2 (void)
{
failures++;
}
-/* aint0 should be `5' */
+/* aint0 should be '5' */
void
compare_int_to_lits2 (void)
{
failures++;
}
-/* aint0 should be `0x1234' */
+/* aint0 should be '0x1234' */
void
compare_int_to_lits3 (void)
{