Skip to content
Snippets Groups Projects
Commit 095781e2 authored by rswindell's avatar rswindell
Browse files

Moved backslash() here (from sbbs3/str_util.c).

parent 0dfc0b88
No related branches found
No related tags found
No related merge requests found
......@@ -716,3 +716,19 @@ char * DLLCALL _fullpath(char *target, const char *path, size_t size) {
return(target);
}
#endif
/****************************************************************************/
/* Adds a trailing slash/backslash on path strings */
/****************************************************************************/
char* DLLCALL backslash(char* path)
{
char* p;
p=lastchar(str);
if(*p!='/' && *p!='\\') {
*(p++)=BACKSLASH;
*p=0;
}
return(path);
}
......@@ -193,6 +193,7 @@ DLLEXPORT char* DLLCALL getfname(const char* path);
DLLEXPORT int DLLCALL getfattr(const char* filename);
DLLEXPORT ulong DLLCALL getfreediskspace(const char* path, ulong unit);
DLLEXPORT ulong DLLCALL delfiles(char *inpath, char *spec);
DLLEXPORT char* DLLCALL backslash(char* path);
#if defined(__unix__)
DLLEXPORT void DLLCALL _splitpath(const char *path, char *drive, char *dir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment