/* */
/* */
/* */
-/* (C) 2000 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2000-2003 Ullrich von Bassewitz */
+/* Römerstraße 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
#include <errno.h>
/* common */
+#include "check.h"
#include "fname.h"
-#include "segdefs.h"
+#include "fragdefs.h"
#include "version.h"
#include "xmalloc.h"
/* ca65 */
#include "error.h"
+#include "filetab.h"
#include "global.h"
-#include "objcode.h"
#include "listing.h"
+#include "segment.h"
/* Page and other formatting */
int PageLength = -1; /* Length of a listing page */
static unsigned PageNumber = 1; /* Current listing page number */
-static unsigned PageLines = 0; /* Current line on page */
+static int PageLines = 0; /* Current line on page */
static unsigned ListBytes = 12; /* Number of bytes to list for one line */
/* Switch the listing on/off */
if (Listing) {
if (ListingEnabled == 0) {
/* Cannot switch the listing off once more */
- Error (ERR_COUNTER_UNDERFLOW);
+ Error ("Counter underflow");
} else {
--ListingEnabled;
}
{
/* Print the header on the new page */
fprintf (F,
- "ca65 V%u.%u.%u - (C) Copyright 1998-2000 Ullrich von Bassewitz\n"
+ "ca65 V%u.%u.%u - %s\n"
"Main file : %s\n"
"Current file: %s\n"
"\n",
VER_MAJOR, VER_MINOR, VER_PATCH,
+ Copyright,
InFile,
GetFileName (L->File));
/* Open the real listing file */
F = fopen (ListFile, "w");
if (F == 0) {
- Fatal (FAT_CANNOT_OPEN_LISTING, strerror (errno));
+ Fatal ("Cannot open listing file: %s", strerror (errno));
}
/* Reset variables, print the header for the first page */