version 1.3 | | version 1.4 |
---|
| | |
/* | | /* |
* static char *rcsid_porting_c = | | * static char *rcsid_porting_c = |
* "$Id: porting.c,v 1.3 2000/06/21 05:03:46 cvs Exp $"; | | * "$Id: porting.c,v 1.4 2001/02/07 07:54:47 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
****************************************************************************/ | | ****************************************************************************/ |
| | |
| | |
/* clean_path takes a path and replaces all / with _ | | |
* We do a strcpy so that we do not change the original string. | | |
*/ | | |
char *clean_path(char *file) | | |
{ | | |
static char newpath[MAX_BUF],*cp; | | |
| | |
strncpy(newpath, file, MAX_BUF-1); | | |
newpath[MAX_BUF-1]='\0'; | | |
for (cp=newpath; *cp!='\0'; cp++) { | | |
if (*cp=='/') *cp='_'; | | |
} | | |
return newpath; | | |
} | | |
| | |
| | |
/* | | /* |
* A replacement of strdup(), since it's not defined at some | | * A replacement of strdup(), since it's not defined at some |