#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);