dxx-rebirth/misc/d_slash.c
md2211 d393f32eed * Removed executable flag on most files
* Reverted value of SOUND_MAX_VOLUME
2007-09-21 19:06:05 +00:00

22 lines
352 B
C

/* changes [back]slashes to appropriate format */
#include <stdio.h>
#include <string.h>
#include "d_slash.h"
#include "u_mem.h"
void d_slash(char *path)
{
char *p;
for(p=path; *p; p++)
if(*p == CHANGESLASH)
*p = USEDSLASH;
if(p == path || p[-1] == ':')
*(p++) = '.';
if(p[-1] != USEDSLASH)
*(p++) = USEDSLASH;
*p=0;
}