all: $(BINS)
$(BINS): $(OBJDIR) $(OBJS) $(SLIBOBJS)
- $(CC) $(LDFLAGS) -o $(BINS) $(OBJS) $(SLIBOBJS)
+ $(CC) $(LDFLAGS) -g -o $(BINS) $(OBJS) $(SLIBOBJS)
$(OBJDIR):
mkdir -p $(OBJDIR)
#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
#include <stdio.h>
#include <string.h>
-//#include <alloc.h>
+#include <stdlib.h>
#include "aslink.h"
-#include "newalloc.h"
/*)Module lklibr.c
*
int loaded;
char *libspc;
char *str;
- char relfil[80];
- char filename[80];
+ char relfil[FILSPC];
+ char filename[FILSPC];
pmlibrarysymbol symbols;
pmlibraryfile next;
};
#ifdef INDEXLIB
/* First entry in the library object symbol cache */
-mlibraryfile libr = {
- 0, "", NULL, NULL
-};
+mlibraryfile libr;
int fndsym( char *name )
{
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
}
#endif
} else {
- str = (char *)Safe_malloc(strlen(relfil) + 5);
+ str = (char *)new(strlen(relfil) + 5);
}
#ifdef SDK
#ifdef UNIX
/*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);