From: michaelh Date: Mon, 14 May 2001 01:27:00 +0000 (+0000) Subject: Lengthened the maximum filename to 100 chars X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=164be7481be43b7bce11cf20413fd2ca61101774;p=fw%2Fsdcc Lengthened the maximum filename to 100 chars git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@814 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/link/z80/Makefile b/link/z80/Makefile index 39f64dac..7fc703b4 100644 --- a/link/z80/Makefile +++ b/link/z80/Makefile @@ -22,7 +22,7 @@ CFLAGS += -I$(PRJDIR)/as/$(PORT) -I$(SLIB) all: $(BINS) $(BINS): $(OBJDIR) $(OBJS) $(SLIBOBJS) - $(CC) $(LDFLAGS) -o $(BINS) $(OBJS) $(SLIBOBJS) + $(CC) $(LDFLAGS) -g -o $(BINS) $(OBJS) $(SLIBOBJS) $(OBJDIR): mkdir -p $(OBJDIR) diff --git a/link/z80/aslink.h b/link/z80/aslink.h index 6fcf9980..47a03a48 100644 --- a/link/z80/aslink.h +++ b/link/z80/aslink.h @@ -89,7 +89,8 @@ #define HMASK 077 /* Hash mask */ #define NLPP 60 /* Lines per page */ #define NTXT 16 /* T values */ -#define FILSPC 80 /* File spec length */ +/** PENDING: Taking this to 256 causes a segfault. */ +#define FILSPC 100 /* File spec length */ /* * The "R_" relocation constants define values used in diff --git a/link/z80/lkarea.c b/link/z80/lkarea.c index f7236b9d..deb61c99 100644 --- a/link/z80/lkarea.c +++ b/link/z80/lkarea.c @@ -11,7 +11,6 @@ #include #include -//#include #include "aslink.h" /*)Module lkarea.c diff --git a/link/z80/lklibr.c b/link/z80/lklibr.c index bc10c172..7fd9f3de 100644 --- a/link/z80/lklibr.c +++ b/link/z80/lklibr.c @@ -21,9 +21,8 @@ #include #include -//#include +#include #include "aslink.h" -#include "newalloc.h" /*)Module lklibr.c * @@ -60,8 +59,8 @@ struct slibraryfile { int loaded; char *libspc; char *str; - char relfil[80]; - char filename[80]; + char relfil[FILSPC]; + char filename[FILSPC]; pmlibrarysymbol symbols; pmlibraryfile next; }; @@ -399,9 +398,7 @@ search() #ifdef INDEXLIB /* First entry in the library object symbol cache */ -mlibraryfile libr = { - 0, "", NULL, NULL -}; +mlibraryfile libr; int fndsym( char *name ) { @@ -481,7 +478,7 @@ int buildlibraryindex() relfil[NINPUT+1] = '\0'; relfil[strlen(relfil) - 1] = '\0'; if (path != NULL) { - str = (char *)Safe_malloc(strlen(path)+strlen(relfil)+6); + str = (char *)new(strlen(path)+strlen(relfil)+6); strcpy(str,path); #ifdef OTHERSYSTEM #ifdef SDK @@ -499,7 +496,7 @@ int buildlibraryindex() } #endif } else { - str = (char *)Safe_malloc(strlen(relfil) + 5); + str = (char *)new(strlen(relfil) + 5); } #ifdef SDK #ifdef UNIX @@ -524,7 +521,7 @@ int buildlibraryindex() /*3*/ if ((fp = fopen(str, "r")) != NULL) { /* Opened OK - create a new libraryfile object for it */ - This->next = (pmlibraryfile)Safe_malloc( sizeof( mlibraryfile )); + This->next = (pmlibraryfile)new( sizeof( mlibraryfile )); if (This->next == NULL) { printf("panic: cant allocate memory.\n"); exit(-1); diff --git a/link/z80/lklist.c b/link/z80/lklist.c index 7f055252..ff892b1b 100644 --- a/link/z80/lklist.c +++ b/link/z80/lklist.c @@ -11,7 +11,7 @@ #include #include -//#include +#include #include "aslink.h" /*)Module lklist.c diff --git a/link/z80/lksym.c b/link/z80/lksym.c index dac3479c..19c80ee1 100644 --- a/link/z80/lksym.c +++ b/link/z80/lksym.c @@ -11,7 +11,7 @@ #include #include -//#include +#include #include "aslink.h" /*)Module lksym.c @@ -56,7 +56,6 @@ VOID syminit() { - register int h; struct sym **spp; spp = &symhash[0]; @@ -348,7 +347,7 @@ symmod(fp, tsp) FILE *fp; struct sym *tsp; { - register int i, j; + register int i; struct sym **p; if ((hp = headp) != NULL) {