Author: cfinck Date: Wed Jan 16 00:34:24 2008 New Revision: 31815
URL: http://svn.reactos.org/svn/reactos?rev=31815&view=rev Log: Change make_token and dup_basename to also support Windows paths. Remove the previous hack for this. Fixes the build for Windows users. I'll update the widl_ros.diff file later :-P
Modified: trunk/reactos/tools/widl/utils.c trunk/reactos/tools/widl/widl.c
Modified: trunk/reactos/tools/widl/utils.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/utils.c?rev=3181... ============================================================================== --- trunk/reactos/tools/widl/utils.c (original) +++ trunk/reactos/tools/widl/utils.c Wed Jan 16 00:34:24 2008 @@ -136,6 +136,9 @@ name = "widl.tab";
slash = strrchr(name, '/'); + if (!slash) + slash = strrchr(name, '\'); + if (slash) name = slash + 1;
Modified: trunk/reactos/tools/widl/widl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl.c?rev=31815... ============================================================================== --- trunk/reactos/tools/widl/widl.c (original) +++ trunk/reactos/tools/widl/widl.c Wed Jan 16 00:34:24 2008 @@ -166,6 +166,9 @@ int i;
slash = strrchr(name, '/'); + if(!slash) + slash = strrchr(name, '\'); + if (slash) name = slash + 1;
token = xstrdup(name); @@ -549,12 +552,7 @@ }
if(do_header) { - if (strrchr(header_name, '\')) - header_token = make_token(strrchr(header_name, '\') + 1); - else if (strrchr(header_name, '/')) - header_token = make_token(strrchr(header_name, '/') + 1); - else - header_token = make_token(header_name); + header_token = make_token(header_name);
if(!(header = fopen(header_name, "w"))) { fprintf(stderr, "Could not open %s for output\n", header_name);