[vlc-devel] [PATCH 16/41] Convert '/' to '\' on OS/2

KO Myung-Hun komh at chollian.net
Mon Oct 10 13:43:55 CEST 2011


This allows a mixed usage of '\' and '/'.
---
 src/text/strings.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index d5cae97..93ae149 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -1074,6 +1074,16 @@ char *make_URI (const char *path, const char *scheme)
     /* Note: VLC cannot handle URI schemes without double slash after the
      * scheme name (such as mailto: or news:). */
 
+#ifdef __OS2__
+    char *p = alloca (strlen (path) + 1);
+    strcpy (p, path);
+    path = p;
+
+    for (; *p; p++)
+        if (*p == '/')
+            *p = DIR_SEP_CHAR;
+#endif
+
     char *buf;
 #if defined( WIN32 ) || defined( __OS2__ )
     /* Drive letter */
-- 
1.7.3.2



More information about the vlc-devel mailing list