#define EQ(A,B) !strcmp((A),(B))
#define MAXLINE 254 /*when using fgets*/
-#if defined(__APPLE__) && defined(__MACH__)
-#include <sys/types.h>
-#include <sys/malloc.h>
-#else
-#include <malloc.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
That way putting 'path' and 'libfil' together will result into the original filepath
as contained in 'str'.*/
int j;
- path = (char *) new (strlen(str));
+ path = (char *) new (strlen(str) + 1);
strcpy(path, str);
for(j=strlen(path)-1; j>=0; j--)
{