Colin Finck : widl: Support Windows paths in dup_basename and make_token.

Alexandre Julliard julliard at winehq.org
Fri Feb 8 06:19:58 CST 2008


Module: wine
Branch: master
Commit: 0fae921727a2c7b973172e10977bfb01863ea457
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0fae921727a2c7b973172e10977bfb01863ea457

Author: Colin Finck <mail at colinfinck.de>
Date:   Thu Feb  7 17:41:00 2008 +0100

widl: Support Windows paths in dup_basename and make_token.

---

 tools/widl/utils.c |    3 +++
 tools/widl/widl.c  |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/widl/utils.c b/tools/widl/utils.c
index e77361c..ed950f6 100644
--- a/tools/widl/utils.c
+++ b/tools/widl/utils.c
@@ -136,6 +136,9 @@ char *dup_basename(const char *name, const char *ext)
 		name = "widl.tab";
 
 	slash = strrchr(name, '/');
+	if (!slash)
+		slash = strrchr(name, '\\');
+
 	if (slash)
 		name = slash + 1;
 
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 7945694..07f024c 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -166,6 +166,9 @@ static char *make_token(const char *name)
   int i;
 
   slash = strrchr(name, '/');
+  if(!slash)
+    slash = strrchr(name, '\\');
+
   if (slash) name = slash + 1;
 
   token = xstrdup(name);




More information about the wine-cvs mailing list