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
e14b2d48
Commit
e14b2d48
authored
Oct 05, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0df592b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
net.c
programs/net/net.c
+9
-16
No files found.
programs/net/net.c
View file @
e14b2d48
...
@@ -155,7 +155,6 @@ static BOOL net_use(int argc, const WCHAR* argv[])
...
@@ -155,7 +155,6 @@ static BOOL net_use(int argc, const WCHAR* argv[])
static
BOOL
net_enum_services
(
void
)
static
BOOL
net_enum_services
(
void
)
{
{
static
const
WCHAR
runningW
[]
=
{
' '
,
' '
,
' '
,
' '
,
'%'
,
'1'
,
'\n'
,
0
};
SC_HANDLE
SCManager
;
SC_HANDLE
SCManager
;
LPENUM_SERVICE_STATUS_PROCESSW
services
;
LPENUM_SERVICE_STATUS_PROCESSW
services
;
DWORD
size
,
i
,
count
,
resume
;
DWORD
size
,
i
,
count
,
resume
;
...
@@ -184,7 +183,7 @@ static BOOL net_enum_services(void)
...
@@ -184,7 +183,7 @@ static BOOL net_enum_services(void)
output_string
(
STRING_RUNNING_HEADER
);
output_string
(
STRING_RUNNING_HEADER
);
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
{
output_printf
(
runningW
,
services
[
i
].
lpDisplayName
);
output_printf
(
L" %1
\n
"
,
services
[
i
].
lpDisplayName
);
WINE_TRACE
(
"service=%s state=%d controls=%x
\n
"
,
WINE_TRACE
(
"service=%s state=%d controls=%x
\n
"
,
wine_dbgstr_w
(
services
[
i
].
lpServiceName
),
wine_dbgstr_w
(
services
[
i
].
lpServiceName
),
services
[
i
].
ServiceStatusProcess
.
dwCurrentState
,
services
[
i
].
ServiceStatusProcess
.
dwCurrentState
,
...
@@ -295,19 +294,13 @@ static BOOL arg_is(const WCHAR* str1, const WCHAR* str2)
...
@@ -295,19 +294,13 @@ static BOOL arg_is(const WCHAR* str1, const WCHAR* str2)
int
__cdecl
wmain
(
int
argc
,
const
WCHAR
*
argv
[])
int
__cdecl
wmain
(
int
argc
,
const
WCHAR
*
argv
[])
{
{
static
const
WCHAR
helpW
[]
=
{
'h'
,
'e'
,
'l'
,
'p'
,
0
};
static
const
WCHAR
shelpW
[]
=
{
'/'
,
'h'
,
'e'
,
'l'
,
'p'
,
0
};
static
const
WCHAR
startW
[]
=
{
's'
,
't'
,
'a'
,
'r'
,
't'
,
0
};
static
const
WCHAR
stopW
[]
=
{
's'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
useW
[]
=
{
'u'
,
's'
,
'e'
,
0
};
if
(
argc
<
2
)
if
(
argc
<
2
)
{
{
output_string
(
STRING_USAGE
);
output_string
(
STRING_USAGE
);
return
1
;
return
1
;
}
}
if
(
arg_is
(
argv
[
1
],
helpW
))
if
(
arg_is
(
argv
[
1
],
L"help"
))
{
{
if
(
argc
>
3
)
if
(
argc
>
3
)
{
{
...
@@ -316,14 +309,14 @@ int __cdecl wmain(int argc, const WCHAR* argv[])
...
@@ -316,14 +309,14 @@ int __cdecl wmain(int argc, const WCHAR* argv[])
}
}
if
(
argc
==
2
)
if
(
argc
==
2
)
output_string
(
STRING_USAGE
);
output_string
(
STRING_USAGE
);
else
if
(
arg_is
(
argv
[
2
],
startW
))
else
if
(
arg_is
(
argv
[
2
],
L"start"
))
output_string
(
STRING_START_USAGE
);
output_string
(
STRING_START_USAGE
);
else
if
(
arg_is
(
argv
[
2
],
stopW
))
else
if
(
arg_is
(
argv
[
2
],
L"stop"
))
output_string
(
STRING_STOP_USAGE
);
output_string
(
STRING_STOP_USAGE
);
else
else
output_string
(
STRING_USAGE
);
output_string
(
STRING_USAGE
);
}
}
else
if
(
arg_is
(
argv
[
1
],
startW
))
else
if
(
arg_is
(
argv
[
1
],
L"start"
))
{
{
if
(
argc
>
3
)
if
(
argc
>
3
)
{
{
...
@@ -335,24 +328,24 @@ int __cdecl wmain(int argc, const WCHAR* argv[])
...
@@ -335,24 +328,24 @@ int __cdecl wmain(int argc, const WCHAR* argv[])
if
(
!
net_enum_services
())
if
(
!
net_enum_services
())
return
1
;
return
1
;
}
}
else
if
(
arg_is
(
argv
[
2
],
shelpW
))
else
if
(
arg_is
(
argv
[
2
],
L"/help"
))
output_string
(
STRING_START_USAGE
);
output_string
(
STRING_START_USAGE
);
else
if
(
!
net_service
(
NET_START
,
argv
[
2
]))
else
if
(
!
net_service
(
NET_START
,
argv
[
2
]))
return
1
;
return
1
;
}
}
else
if
(
arg_is
(
argv
[
1
],
stopW
))
else
if
(
arg_is
(
argv
[
1
],
L"stop"
))
{
{
if
(
argc
!=
3
)
if
(
argc
!=
3
)
{
{
output_string
(
STRING_STOP_USAGE
);
output_string
(
STRING_STOP_USAGE
);
return
1
;
return
1
;
}
}
if
(
arg_is
(
argv
[
2
],
shelpW
))
if
(
arg_is
(
argv
[
2
],
L"/help"
))
output_string
(
STRING_STOP_USAGE
);
output_string
(
STRING_STOP_USAGE
);
else
if
(
!
net_service
(
NET_STOP
,
argv
[
2
]))
else
if
(
!
net_service
(
NET_STOP
,
argv
[
2
]))
return
1
;
return
1
;
}
}
else
if
(
arg_is
(
argv
[
1
],
useW
))
else
if
(
arg_is
(
argv
[
1
],
L"use"
))
{
{
if
(
!
net_use
(
argc
,
argv
))
return
1
;
if
(
!
net_use
(
argc
,
argv
))
return
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