Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6be25f8c
Commit
6be25f8c
authored
Oct 29, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Simplify the RtlIsDosDeviceName_U implementation.
parent
6b4d22ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
path.c
dlls/ntdll/path.c
+11
-17
No files found.
dlls/ntdll/path.c
View file @
6be25f8c
...
...
@@ -287,30 +287,24 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
if
(
!
strcmpiW
(
dos_name
,
consoleW
))
return
MAKELONG
(
sizeof
(
conW
),
4
*
sizeof
(
WCHAR
)
);
/* 4 is length of \\.\ prefix */
return
0
;
case
ABSOLUTE_DRIVE_PATH
:
case
RELATIVE_DRIVE_PATH
:
start
=
dos_name
+
2
;
/* skip drive letter */
break
;
default:
start
=
dos_name
;
break
;
}
end
=
dos_name
+
strlenW
(
dos_name
)
-
1
;
while
(
end
>=
dos_name
&&
*
end
==
':'
)
end
--
;
/* remove all trailing ':' */
/* find start of file name */
for
(
start
=
end
;
start
>=
dos_name
;
start
--
)
{
if
(
IS_SEPARATOR
(
start
[
0
]))
break
;
/* check for ':' but ignore if before extension (for things like NUL:.txt) */
if
(
start
[
0
]
==
':'
&&
start
[
1
]
!=
'.'
)
break
;
}
start
++
;
for
(
p
=
start
;
*
p
;
p
++
)
if
(
IS_SEPARATOR
(
*
p
))
start
=
p
+
1
;
/* truncate at extension and ':' */
for
(
end
=
start
;
*
end
;
end
++
)
if
(
*
end
==
'.'
||
*
end
==
':'
)
break
;
end
--
;
/* remove extension */
if
((
p
=
strchrW
(
start
,
'.'
)))
{
end
=
p
-
1
;
if
(
end
>=
dos_name
&&
*
end
==
':'
)
end
--
;
/* remove trailing ':' before extension */
}
/* remove trailing spaces */
while
(
end
>=
dos_name
&&
*
end
==
' '
)
end
--
;
while
(
end
>=
start
&&
*
end
==
' '
)
end
--
;
/* now we have a potential device name between start and end, check it */
switch
(
end
-
start
+
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment