mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
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 svn path=/trunk/; revision=31815
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
@@ -549,12 +552,7 @@ int main(int argc,char *argv[])
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user