version 1.3, 2001/11/19 19:02:14 |
version 1.4, 2003/04/05 01:03:35 |
|
|
char *filename; |
char *filename; |
{ |
{ |
char *pathname; |
char *pathname; |
|
size_t len; |
|
|
pathname = calloc(strlen(dirname) + strlen(filename) + 2, sizeof(char)); |
len = strlen(dirname) + strlen(filename) + 2; |
strcpy(pathname, dirname); |
pathname = calloc(len, sizeof(char)); |
|
strlcpy(pathname, dirname, len); |
#if MSOFTC || OS2 |
#if MSOFTC || OS2 |
strcat(pathname, "\\"); |
strlcat(pathname, "\\", len); |
#else |
#else |
strcat(pathname, "/"); |
strlcat(pathname, "/", len); |
#endif |
#endif |
strcat(pathname, filename); |
strlcat(pathname, filename, len); |
return (pathname); |
return (pathname); |
} |
} |
|
|