case O65_OS_CC65_MODULE:
if (Model != O65_MODEL_NONE &&
Model != O65_MODEL_CC65_MODULE) {
- Warning ("Wrong o65 model");
+ Warning ("Wrong o65 model for input file specified");
} else {
Model = O65_MODEL_CC65_MODULE;
}
}
}
- /* Open the output file */
+ /* If we shouldn't generate output, we're done here */
+ if (NoOutput) {
+ return;
+ }
+
+ /* Open the output file */
F = fopen (OutputFile, "wb");
if (F == 0) {
Error ("Cannot open `%s': %s", OutputFile, strerror (errno));
" -g\t\t\tAdd debug info to object file\n"
" -h\t\t\tHelp (this text)\n"
" -m model\t\tOverride the o65 model\n"
+ " -n\t\t\tDon't generate an output file\n"
" -o name\t\tName the output file\n"
" -v\t\t\tIncrease verbosity\n"
"\n"
" --data-name seg\tSet the name of the DATA segment\n"
" --debug-info\t\tAdd debug info to object file\n"
" --help\t\tHelp (this text)\n"
+ " --no-output\t\tDon't generate an output file\n"
" --o65-model model\tOverride the o65 model\n"
" --verbose\t\tIncrease verbosity\n"
" --version\t\tPrint the version number\n"
+static void OptNoOutput (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* Handle the --no-output option */
+{
+ NoOutput = 1;
+}
+
+
+
static void OptO65Model (const char* Opt attribute ((unused)), const char* Arg)
/* Handle the --o65-model option */
{
{ "--debug", 0, OptDebug },
{ "--debug-info", 0, OptDebugInfo },
{ "--help", 0, OptHelp },
+ { "--no-output", 0, OptNoOutput },
{ "--o65-model", 1, OptO65Model },
{ "--verbose", 0, OptVerbose },
{ "--version", 0, OptVersion },
OptO65Model (Arg, GetArg (&I, 2));
break;
+ case 'n':
+ OptNoOutput (Arg, 0);
+ break;
+
case 'o':
OutputName = GetArg (&I, 2);
break;
typedef enum {
O65_MODEL_INVALID = -1, /* Invalid model */
O65_MODEL_NONE, /* No model given */
+ O65_MODEL_OSA65, /* Not implemented */
+ O65_MODEL_LUNIX, /* Not implemented */
O65_MODEL_CC65_MODULE,
O65_MODEL_COUNT /* Number of available models */