#include <stdio.h>
#include <string.h>
-#include <alloc.h>
+#include <stdlib.h>
#include "aslink.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;
};
search()
{
register struct sym *sp;
- register i,symfnd;
+ register int i, symfnd;
/*
* Look for undefined symbols. Keep
#ifdef INDEXLIB
/* First entry in the library object symbol cache */
-mlibraryfile libr = {
- "", NULL, NULL
-};
+mlibraryfile libr;
int fndsym( char *name )
{
relfil[NINPUT+1] = '\0';
relfil[strlen(relfil) - 1] = '\0';
if (path != NULL) {
- str = (char *)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 *)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)malloc( sizeof( mlibraryfile ));
+ This->next = (pmlibraryfile)new( sizeof( mlibraryfile ));
if (This->next == NULL) {
printf("panic: cant allocate memory.\n");
exit(-1);