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
68a1a267
Commit
68a1a267
authored
Sep 07, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipconfig: Permit the "Yes/No" strings to be localized.
parent
3eb49852
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
En.rc
programs/ipconfig/En.rc
+2
-0
ipconfig.c
programs/ipconfig/ipconfig.c
+12
-4
ipconfig.h
programs/ipconfig/ipconfig.h
+2
-0
No files found.
programs/ipconfig/En.rc
View file @
68a1a267
...
@@ -42,4 +42,6 @@ STRINGTABLE
...
@@ -42,4 +42,6 @@ STRINGTABLE
STRING_DESCRIPTION, "Description"
STRING_DESCRIPTION, "Description"
STRING_PHYS_ADDR, "Physical address"
STRING_PHYS_ADDR, "Physical address"
STRING_DHCP_ENABLED, "DHCP enabled"
STRING_DHCP_ENABLED, "DHCP enabled"
STRING_YES, "Yes"
STRING_NO, "No"
}
}
programs/ipconfig/ipconfig.c
View file @
68a1a267
...
@@ -229,10 +229,18 @@ static WCHAR *physaddr_to_string(WCHAR *buf, BYTE *addr, DWORD len)
...
@@ -229,10 +229,18 @@ static WCHAR *physaddr_to_string(WCHAR *buf, BYTE *addr, DWORD len)
return
buf
;
return
buf
;
}
}
static
const
WCHAR
*
boolean_to_string
(
int
value
)
{
static
WCHAR
msg_buffer
[
15
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
value
?
STRING_YES
:
STRING_NO
,
msg_buffer
,
sizeof
(
msg_buffer
)
/
sizeof
(
WCHAR
));
return
msg_buffer
;
}
static
void
print_full_information
(
void
)
static
void
print_full_information
(
void
)
{
{
static
const
WCHAR
yesW
[]
=
{
'Y'
,
'e'
,
's'
,
0
};
static
const
WCHAR
noW
[]
=
{
'N'
,
'o'
,
0
};
static
const
WCHAR
newlineW
[]
=
{
'\n'
,
0
};
static
const
WCHAR
newlineW
[]
=
{
'\n'
,
0
};
FIXED_INFO
*
info
;
FIXED_INFO
*
info
;
...
@@ -255,7 +263,7 @@ static void print_full_information(void)
...
@@ -255,7 +263,7 @@ static void print_full_information(void)
/* FIXME: Output primary DNS suffix. */
/* FIXME: Output primary DNS suffix. */
print_field
(
STRING_NODE_TYPE
,
nodetype_to_string
(
info
->
NodeType
));
print_field
(
STRING_NODE_TYPE
,
nodetype_to_string
(
info
->
NodeType
));
print_field
(
STRING_IP_ROUTING
,
info
->
EnableRouting
?
yesW
:
noW
);
print_field
(
STRING_IP_ROUTING
,
boolean_to_string
(
info
->
EnableRouting
)
);
/* FIXME: Output WINS proxy status and DNS suffix search list. */
/* FIXME: Output WINS proxy status and DNS suffix search list. */
...
@@ -285,7 +293,7 @@ static void print_full_information(void)
...
@@ -285,7 +293,7 @@ static void print_full_information(void)
print_field
(
STRING_CONN_DNS_SUFFIX
,
p
->
DnsSuffix
);
print_field
(
STRING_CONN_DNS_SUFFIX
,
p
->
DnsSuffix
);
print_field
(
STRING_DESCRIPTION
,
p
->
Description
);
print_field
(
STRING_DESCRIPTION
,
p
->
Description
);
print_field
(
STRING_PHYS_ADDR
,
physaddr_to_string
(
physaddr_buf
,
p
->
PhysicalAddress
,
p
->
PhysicalAddressLength
));
print_field
(
STRING_PHYS_ADDR
,
physaddr_to_string
(
physaddr_buf
,
p
->
PhysicalAddress
,
p
->
PhysicalAddressLength
));
print_field
(
STRING_DHCP_ENABLED
,
(
p
->
Flags
&
IP_ADAPTER_DHCP_ENABLED
)
?
yesW
:
noW
);
print_field
(
STRING_DHCP_ENABLED
,
boolean_to_string
(
p
->
Flags
&
IP_ADAPTER_DHCP_ENABLED
)
);
/* FIXME: Output autoconfiguration status. */
/* FIXME: Output autoconfiguration status. */
...
...
programs/ipconfig/ipconfig.h
View file @
68a1a267
...
@@ -38,3 +38,5 @@
...
@@ -38,3 +38,5 @@
#define STRING_DESCRIPTION 115
#define STRING_DESCRIPTION 115
#define STRING_PHYS_ADDR 116
#define STRING_PHYS_ADDR 116
#define STRING_DHCP_ENABLED 117
#define STRING_DHCP_ENABLED 117
#define STRING_YES 118
#define STRING_NO 119
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