---
name: "fix_filename_slashes"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fix_filename_slashes/3alleg4"
---

# fix\_filename\_slashes(3alleg4)

Converts all the directory separators to a standard character. Allegro game programming library.

## NAME

fix\_filename\_slashes - Converts all the directory separators to a standard character. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**char \*fix\_filename\_slashes(char \*path);**

## DESCRIPTION

Converts all the directory separators in the filename stored in \`path' to a standard character. On DOS and Windows platforms, this is a backslash. On most other platforms this is a slash. Example:

```
   char buf[200] = "c:/dos\\backup/weirdo\\test";
   ...
   fix_filename_slashes(buf);
   /* Under DOS we would have c:\dos\backup\weirdo\test.
      Under Unix we would have c:/dos/backup/weirdo/test. */
```

## RETURN VALUE

Returns a copy of the \`path' parameter.

## SEE ALSO

**fix\_filename\_case**(3alleg4), **canonicalize\_filename**(3alleg4)
