widl: Support Windows pathes in dup_basename and make_token=0A=

Colin Finck mail at colinfinck.de
Thu Feb 7 17:41:00 CST 2008


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

------=_NextPart_000_0020_01C869B0.EC5408F0--




More information about the wine-patches mailing list