|
|
len = strlen(palfile) + 1; | len = strlen(palfile) + 1; |
if (! (buffer = malloc(len))) | if (! (buffer = malloc(len))) |
{ | { |
perror (__FUNCTION__ ": malloc"); |
perror ("loadpal: malloc"); |
return; | return; |
} | } |
memcpy (buffer, palfile, len); | memcpy (buffer, palfile, len); |
|
|
len = strlen(filename) + 1; | len = strlen(filename) + 1; |
if (! (buffer = malloc(len))) | if (! (buffer = malloc(len))) |
{ | { |
perror (__FUNCTION__ ": malloc"); |
perror ("loadpal: malloc"); |
return; | return; |
} | } |
memcpy (buffer, filename, len); | memcpy (buffer, filename, len); |
|
|
return; | return; |
if (!(palfile = malloc ((len = strlen (filename)) + 11))) | if (!(palfile = malloc ((len = strlen (filename)) + 11))) |
{ | { |
perror (__FUNCTION__ ": malloc"); |
perror ("loadpal: malloc"); |
return; | return; |
} | } |
strcpy (palfile, filename); | strcpy (palfile, filename); |
|
|
| |
if (! (basefilename = malloc(baseend - basestart + 1))) | if (! (basefilename = malloc(baseend - basestart + 1))) |
{ | { |
perror (__FUNCTION__ ": malloc"); |
perror ("main: malloc"); |
exit (1); | exit (1); |
} | } |
| |