mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +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:
parent
b3349ee656
commit
ec72c52773
2 changed files with 7 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue