components/prboom/d_main.c
// NormalizeSlashes
//
// Remove trailing slashes, translate backslashes to slashes
// The string to normalize is passed and returned in str
//
// jff 4/19/98 Make killoughs slash fixer a subroutine
//
NormalizeSlashes
Remove trailing slashes, translate backslashes to slashes
The string to normalize is passed and returned in str

jff 4/19/98 Make killoughs slash fixer a subroutine
NormalizeSlashes Remove trailing slashes translate backslashes to slashes The string to normalize is passed and returned in str jff 4 / 19 / 98 Make killoughs slash fixer a subroutine
static void NormalizeSlashes(char *str)
{
  int l;
  if (!str || !(l = strlen(str)))
    return;
  if (str[--l]=='/' || str[l]=='\\')     
    str[l]=0;
  while (l--)
    if (str[l]=='\\')
      str[l]='/';
}
static void NormalizeSlashes ( char * str ) { int l ; if ( ! str || ! ( l = strlen ( str ) ) ) return ; if ( str [ -- l ] == ' ' || str [ l ] == ' \\ ' ) str [ l ] = 0 ; while ( l -- ) if ( str [ l ] == ' \\ ' ) str [ l ] = ' ' ; }
NormalizeSlashes
Remove trailing slashes, translate backslashes to slashes
The string to normalize is passed and returned in str
NormalizeSlashes Remove trailing slashes translate backslashes to slashes The string to normalize is passed and returned in str
// killough 1/18/98: Neater / \ handling. // Remove trailing / or \ to prevent // /\ \/ \\, and change \ to / // killough 1/18/98