]> git.gag.com Git - fw/sdcc/commitdiff
Lengthened the maximum filename to 100 chars
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 14 May 2001 01:27:00 +0000 (01:27 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 14 May 2001 01:27:00 +0000 (01:27 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@814 4a8a32a2-be11-0410-ad9d-d568d2c75423

link/z80/Makefile
link/z80/aslink.h
link/z80/lkarea.c
link/z80/lklibr.c
link/z80/lklist.c
link/z80/lksym.c

index 39f64dacefda03f044ecd53a2890031ec72bda58..7fc703b4a9a7851b7caa1ceb35dacb3c2376f7fa 100644 (file)
@@ -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)
index 6fcf998013c6a40177d946ab2571044f32ec8694..47a03a482f4b3dce6c856f173c672a4ed139695d 100644 (file)
@@ -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
index f7236b9df3c3861a215dee2e648791fd9f983d0f..deb61c99c89cf6572df42e1a02d2517259c71284 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <stdio.h>
 #include <string.h>
-//#include <alloc.h>
 #include "aslink.h"
 
 /*)Module      lkarea.c
index bc10c17246b605d5da96953b127aa1ca19108c0b..7fd9f3defcbbbcdb0eb846961a77ede0fb769df9 100644 (file)
@@ -21,9 +21,8 @@
 
 #include <stdio.h>
 #include <string.h>
-//#include <alloc.h>
+#include <stdlib.h>
 #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);
index 7f05525273a11b8985e53c611269fa2816dc890c..ff892b1b1c5cbe683730f31206b2a23708bb83b8 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 #include <string.h>
-//#include <alloc.h>
+#include <stdlib.h>
 #include "aslink.h"
 
 /*)Module      lklist.c
index dac3479cd51b1702acffd8aed392e622ca8e7775..19c80ee16f9525428f2e5b6e2a983a0d9e7266ea 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 #include <string.h>
-//#include <alloc.h>
+#include <stdlib.h>
 #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) {