diff options
Diffstat (limited to 'reference/C/CONTRIB/SNIP/unix2dos.c')
-rwxr-xr-x | reference/C/CONTRIB/SNIP/unix2dos.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/reference/C/CONTRIB/SNIP/unix2dos.c b/reference/C/CONTRIB/SNIP/unix2dos.c new file mode 100755 index 0000000..739d096 --- /dev/null +++ b/reference/C/CONTRIB/SNIP/unix2dos.c @@ -0,0 +1,15 @@ +/*
+** UNIX2DOS.C - Convert Unix-style pathnames to DOS-style
+**
+** public domain by Bob Stout
+*/
+
+char *unix2dos(char *path)
+{
+ char *p;
+
+ for (p = path; *p; ++p)
+ if ('/' == *p)
+ *p = '\\';
+ return path;
+}
|