-static int CmpLineInfo (void* Data, const void* LI1_, const void* LI2_)
+static int CmpLineInfo (void* Data attribute ((unused)),
+ const void* LI1_, const void* LI2_)
/* Compare function for the sort */
{
/* Cast the pointers */
}
}
-
+
void MakeLineInfoIndex (void)
/* Sort the line infos and drop all unreferenced ones */
int IsMacro (const char* Name)
/* Return true if the given name is the name of a macro */
{
- return MacFind (SVal, HashStr (SVal) % HASHTAB_SIZE) != 0;
+ return MacFind (Name, HashStr (Name) % HASHTAB_SIZE) != 0;
}
int IsDefine (const char* Name)
/* Return true if the given name is the name of a define style macro */
{
- Macro* M = MacFind (SVal, HashStr (SVal) % HASHTAB_SIZE);
+ Macro* M = MacFind (Name, HashStr (Name) % HASHTAB_SIZE);
return (M != 0 && M->Style == MAC_STYLE_DEFINE);
}
-static void OptAutoImport (const char* Opt, const char* Arg)
+static void OptAutoImport (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Mark unresolved symbols as imported */
{
AutoImport = 1;
-static void OptCPU (const char* Opt, const char* Arg)
+static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --cpu option */
{
- if (Arg == 0) {
- NeedArg (Opt);
- }
if (strcmp (Arg, "6502") == 0) {
SetCPU (CPU_6502);
} else if (strcmp (Arg, "65C02") == 0) {
-static void OptDebugInfo (const char* Opt, const char* Arg)
+static void OptDebugInfo (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Add debug info to the object file */
{
DbgSyms = 1;
-static void OptFeature (const char* Opt, const char* Arg)
+static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
/* Set an emulation feature */
{
/* Set the feature, check for errors */
-static void OptHelp (const char* Opt, const char* Arg)
+static void OptHelp (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print usage information and exit */
{
Usage ();
-static void OptIgnoreCase (const char* Opt, const char* Arg)
+static void OptIgnoreCase (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Ignore case on symbols */
{
IgnoreCase = 1;
-static void OptIncludeDir (const char* Opt, const char* Arg)
+static void OptIncludeDir (const char* Opt attribute ((unused)), const char* Arg)
/* Add an include search path */
{
- if (Arg == 0) {
- NeedArg (Opt);
- }
AddIncludePath (Arg);
}
-static void OptListing (const char* Opt, const char* Arg)
+static void OptListing (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Create a listing file */
{
Listing = 1;
-static void OptPageLength (const char* Opt, const char* Arg)
+static void OptPageLength (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --pagelength option */
{
- int Len;
- if (Arg == 0) {
- NeedArg (Opt);
- }
- Len = atoi (Arg);
+ int Len = atoi (Arg);
if (Len != -1 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
AbEnd ("Invalid page length: %d", Len);
}
-static void OptSmart (const char* Opt, const char* Arg)
+static void OptSmart (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Handle the -s/--smart options */
{
SmartMode = 1;
-static void OptTarget (const char* Opt, const char* Arg)
+static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
/* Set the target system */
{
- if (Arg == 0) {
- NeedArg (Opt);
- }
-
/* Map the target name to a target id */
Target = FindTarget (Arg);
if (Target == TGT_UNKNOWN) {
-static void OptVerbose (const char* Opt, const char* Arg)
+static void OptVerbose (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Increase verbosity */
{
++Verbosity;
-static void OptVersion (const char* Opt, const char* Arg)
+static void OptVersion (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print the assembler version */
{
fprintf (stderr,
# Library dir
COMMON = ../common
-CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON)
+CFLAGS = -g -O2 -Wall -W -I$(COMMON)
CC = gcc
EBIND = emxbind
LDFLAGS =
CHECK (Type >= CD_TYPE_MIN && Type <= CD_TYPE_MAX);
#else
CHECK (Type <= CD_TYPE_MAX);
-#endif
+#endif
CHECK (Prio >= CD_PRIO_MIN && Prio <= CD_PRIO_MAX);
/* Don't accept local symbols */
while (S) {
/* Ignore trampoline symbols */
if ((S->Flags & SF_TRAMPOLINE) != 0) {
- printf ("%-24s %s %s %s %s %s\n",
- S->Name,
- (S->Flags & SF_DEFINED)? "DEF" : "---",
- (S->Flags & SF_REFERENCED)? "REF" : "---",
- (S->Flags & SF_IMPORT)? "IMP" : "---",
- (S->Flags & SF_EXPORT)? "EXP" : "---",
- (S->Flags & SF_ZP)? "ZP" : "--");
+ fprintf (F,
+ "%-24s %s %s %s %s %s\n",
+ S->Name,
+ (S->Flags & SF_DEFINED)? "DEF" : "---",
+ (S->Flags & SF_REFERENCED)? "REF" : "---",
+ (S->Flags & SF_IMPORT)? "IMP" : "---",
+ (S->Flags & SF_EXPORT)? "EXP" : "---",
+ (S->Flags & SF_ZP)? "ZP" : "--");
}
/* Next symbol */
S = S->List;
-static void OptAddSource (const char* Opt, const char* Arg)
+static void OptAddSource (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Strict source code as comments to the generated asm code */
{
CmdAddArg (&CC65, "-T");
-static void OptAnsi (const char* Opt, const char* Arg)
+static void OptAnsi (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Strict ANSI mode (compiler) */
{
CmdAddArg (&CC65, "-A");
-static void OptAsmIncludeDir (const char* Opt, const char* Arg)
+static void OptAsmIncludeDir (const char* Opt attribute ((unused)), const char* Arg)
/* Include directory (assembler) */
{
CmdAddArg (&CA65, "-I");
-static void OptBssName (const char* Opt, const char* Arg)
+static void OptBssName (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --bss-name option */
{
CmdAddArg (&CC65, "--bss-name");
-static void OptCheckStack (const char* Opt, const char* Arg)
+static void OptCheckStack (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Handle the --check-stack option */
{
CmdAddArg (&CC65, "--check-stack");
-static void OptCodeName (const char* Opt, const char* Arg)
+static void OptCodeName (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --code-name option */
{
CmdAddArg (&CC65, "--code-name");
-static void OptCodeSize (const char* Opt, const char* Arg)
+static void OptCodeSize (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --codesize option */
{
CmdAddArg (&CC65, "--codesize");
-static void OptCPU (const char* Opt, const char* Arg)
+static void OptCPU (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --cpu option */
{
/* Add the cpu type to the assembler and compiler */
-static void OptCreateDep (const char* Opt, const char* Arg)
+static void OptCreateDep (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Handle the --create-dep option */
{
CmdAddArg (&CC65, "--create-dep");
-static void OptDataName (const char* Opt, const char* Arg)
+static void OptDataName (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --data-name option */
{
CmdAddArg (&CC65, "--data-name");
-static void OptDebug (const char* Opt, const char* Arg)
+static void OptDebug (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Debug mode (compiler) */
{
CmdAddArg (&CC65, "-d");
-static void OptDebugInfo (const char* Opt, const char* Arg)
+static void OptDebugInfo (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Debug Info - add to compiler and assembler */
{
CmdAddArg (&CC65, "-g");
-static void OptFeature (const char* Opt, const char* Arg)
+static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
/* Emulation features for the assembler */
{
CmdAddArg (&CA65, "--feature");
-static void OptHelp (const char* Opt, const char* Arg)
+static void OptHelp (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print help - cl65 */
{
Usage ();
-static void OptIncludeDir (const char* Opt, const char* Arg)
+static void OptIncludeDir (const char* Opt attribute ((unused)), const char* Arg)
/* Include directory (compiler) */
{
CmdAddArg (&CC65, "-I");
-static void OptListing (const char* Opt, const char* Arg)
+static void OptListing (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Create an assembler listing */
{
CmdAddArg (&CA65, "-l");
-static void OptMapFile (const char* Opt, const char* Arg)
+static void OptMapFile (const char* Opt attribute ((unused)), const char* Arg)
/* Create a map file */
{
/* Create a map file (linker) */
-static void OptRodataName (const char* Opt, const char* Arg)
+static void OptRodataName (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --rodata-name option */
{
CmdAddArg (&CC65, "--rodata-name");
-static void OptSignedChars (const char* Opt, const char* Arg)
+static void OptSignedChars (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Make default characters signed */
{
CmdAddArg (&CC65, "-j");
-static void OptStartAddr (const char* Opt, const char* Arg)
+static void OptStartAddr (const char* Opt attribute ((unused)), const char* Arg)
/* Set the default start address */
{
CmdAddArg (&LD65, "-S");
-static void OptStaticLocals (const char* Opt, const char* Arg)
+static void OptStaticLocals (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Place local variables in static storage */
{
CmdAddArg (&CC65, "-Cl");
-static void OptTarget (const char* Opt, const char* Arg)
+static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
/* Set the target system */
{
Target = FindTarget (Arg);
-static void OptVerbose (const char* Opt, const char* Arg)
+static void OptVerbose (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Verbose mode (compiler, assembler, linker) */
{
CmdAddArg (&CC65, "-v");
-static void OptVersion (const char* Opt, const char* Arg)
+static void OptVersion (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print version number */
{
fprintf (stderr,
COMMON = ../common
CC=gcc
-CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON)
+CFLAGS = -O2 -g -Wall -W -I$(COMMON)
EBIND = emxbind
LDFLAGS=
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
+
+/* common */
+#include "attrib.h"
+/* cl65 */
#include "error.h"
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
-int spawnvp (int Mode, const char* File, char* const argv [])
+int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv [])
/* Execute the given program searching and wait til it terminates. The Mode
* argument is ignored (compatibility only). The result of the function is
* the return code of the program. The function will terminate the program
-void OH_AbsoluteLong (const OpcDesc* D)
+void OH_AbsoluteLong (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_AbsoluteLongX (const OpcDesc* D)
+void OH_AbsoluteLongX (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_RelativeLong (const OpcDesc* D)
+void OH_RelativeLong (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_StackRelative (const OpcDesc* D)
+void OH_StackRelative (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_DirectIndirectLongX (const OpcDesc* D)
+void OH_DirectIndirectLongX (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_StackRelativeIndirectY (const OpcDesc* D)
+void OH_StackRelativeIndirectY (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_DirectIndirectLong (const OpcDesc* D)
+void OH_DirectIndirectLong (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_DirectIndirectLongY (const OpcDesc* D)
+void OH_DirectIndirectLongY (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_BlockMove (const OpcDesc* D)
+void OH_BlockMove (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-void OH_AbsoluteXIndirect (const OpcDesc* D)
+void OH_AbsoluteXIndirect (const OpcDesc* D attribute ((unused)))
{
Error ("Not implemented");
}
-
-static void OptFormFeeds (const char* Opt, const char* Arg)
+static void OptFormFeeds (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Add form feeds to the output */
{
FormFeeds = 1;
-static void OptHelp (const char* Opt, const char* Arg)
+static void OptHelp (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print usage information and exit */
{
Usage ();
-static void OptPageLength (const char* Opt, const char* Arg)
+static void OptPageLength (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --pagelength option */
{
- int Len;
- if (Arg == 0) {
- NeedArg (Opt);
- }
- Len = atoi (Arg);
+ int Len = atoi (Arg);
if (Len != 0 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
AbEnd ("Invalid page length: %d", Len);
}
-static void OptVerbose (const char* Opt, const char* Arg)
+static void OptVerbose (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Increase verbosity */
{
++Verbosity;
-static void OptVersion (const char* Opt, const char* Arg)
+static void OptVersion (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print the disassembler version */
{
fprintf (stderr,
case atDWordTab:
DWordTable ();
- break;
+ break;
case atAddrTab:
AddrTable ();
# Library dir
COMMON = ../common
-CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON)
+CFLAGS = -g -O2 -Wall -W -I$(COMMON)
CC=gcc
EBIND=emxbind
LDFLAGS=
-static void OptDumpAll (const char* Opt, const char* Arg)
+static void OptDumpAll (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump all object file information */
{
What |= D_ALL;
-static void OptDumpDbgSyms (const char* Opt, const char* Arg)
+static void OptDumpDbgSyms (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump debug symbols contained in the object file */
{
What |= D_DBGSYMS;
-static void OptDumpExports (const char* Opt, const char* Arg)
+static void OptDumpExports (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the exported symbols */
{
What |= D_EXPORTS;
-static void OptDumpFiles (const char* Opt, const char* Arg)
+static void OptDumpFiles (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the source files */
{
What |= D_FILES;
-static void OptDumpHeader (const char* Opt, const char* Arg)
+static void OptDumpHeader (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the object file header */
{
What |= D_HEADER;
-static void OptDumpImports (const char* Opt, const char* Arg)
+static void OptDumpImports (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the imported symbols */
{
What |= D_IMPORTS;
-static void OptDumpLineInfo (const char* Opt, const char* Arg)
+static void OptDumpLineInfo (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the line infos */
{
What |= D_LINEINFO;
-static void OptDumpOptions (const char* Opt, const char* Arg)
+static void OptDumpOptions (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the object file options */
{
What |= D_OPTIONS;
-static void OptDumpSegments (const char* Opt, const char* Arg)
+static void OptDumpSegments (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Dump the segments in the object file */
{
What |= D_SEGMENTS;
-static void OptHelp (const char* Opt, const char* Arg)
+static void OptHelp (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print usage information and exit */
{
Usage ();
-static void OptVersion (const char* Opt, const char* Arg)
+static void OptVersion (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
/* Print the assembler version */
{
fprintf (stderr,
# Library dir
COMMON = ../common
-CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON)
+CFLAGS = -O2 -g -Wall -W -I$(COMMON)
CC=gcc
EBIND=emxbind
LDFLAGS=