Turned on aux memory support

This commit is contained in:
Bobbi Webber-Manners 2020-05-26 00:44:32 -04:00
parent 2eabedc761
commit a6b7f2bab5
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@
#define CHECK /* Perform additional integrity checking */ #define CHECK /* Perform additional integrity checking */
#define SORT /* Enable sorting code */ #define SORT /* Enable sorting code */
#undef FREELIST /* Checking of free list */ #undef FREELIST /* Checking of free list */
#undef AUXMEM /* Auxiliary memory support on //e and up */ #define AUXMEM /* Auxiliary memory support on //e and up */
#define NLEVELS 4 /* Number of nested sorts permitted */ #define NLEVELS 4 /* Number of nested sorts permitted */
@ -47,7 +47,7 @@ typedef unsigned int uint;
typedef unsigned long ulong; typedef unsigned long ulong;
#define NMLEN 15 /* Length of filename */ #define NMLEN 15 /* Length of filename */
#define MAXFILES 200 /* Max files per directory */ #define MAXFILES 220 /* Max files per directory */
/* /*
* ProDOS directory header * ProDOS directory header
@ -182,7 +182,7 @@ static char sortopts[NLEVELS+1] = ""; /* -s:abc list of sort options */
static char caseopts[2] = ""; /* -c:x case conversion option */ static char caseopts[2] = ""; /* -c:x case conversion option */
static char fixopts[2] = ""; /* -f:x fix mode option */ static char fixopts[2] = ""; /* -f:x fix mode option */
static char dateopts[2] = ""; /* -d:x date conversion option */ static char dateopts[2] = ""; /* -d:x date conversion option */
static struct fileent filelist[MAXFILES]; /* Used for qsort() */ static struct fileent *filelist; /* Used for qsort() */
// Allocated dynamically in main() // Allocated dynamically in main()
static char *buf; /* General purpose scratch buffer */ static char *buf; /* General purpose scratch buffer */
@ -1267,7 +1267,7 @@ int readdir(uint device, uint blocknum) {
#endif #endif
++numfiles; ++numfiles;
if (numfiles == MAXFILES) { if (numfiles == MAXFILES) {
err(NONFATAL, "Too many files!"); err(NONFATAL, "Too many files!\n");
return 1; return 1;
} }
if (errcount == errsbeforeent) { if (errcount == errsbeforeent) {
@ -2063,7 +2063,7 @@ int main() {
_heapadd((void*)0x0800, 0x1800); _heapadd((void*)0x0800, 0x1800);
//printf("\nHeap: %u %u\n", _heapmemavail(), _heapmaxavail()); //printf("\nHeap: %u %u\n", _heapmemavail(), _heapmaxavail());
//filelist = (struct fileent*)malloc(sizeof(struct fileent) * MAXFILES); filelist = (struct fileent*)malloc(sizeof(struct fileent) * MAXFILES);
buf = (char*)malloc(sizeof(char) * BLKSZ); buf = (char*)malloc(sizeof(char) * BLKSZ);
buf2 = (char*)malloc(sizeof(char) * BLKSZ); buf2 = (char*)malloc(sizeof(char) * BLKSZ);
dirblkbuf = (char*)malloc(sizeof(char) * BLKSZ); dirblkbuf = (char*)malloc(sizeof(char) * BLKSZ);

Binary file not shown.