ipconfig: Fix the string resources so their format placeholders can be reordered.
diff --git a/po/ar.po b/po/ar.po
index daee023..02b435f 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -8389,7 +8389,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/bg.po b/po/bg.po
index 7157400..9788cdb 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8510,7 +8510,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/ca.po b/po/ca.po
index f143119..8539def 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -8823,7 +8823,8 @@
"especificats\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s adaptador %s\n"
#: ipconfig.rc:30
diff --git a/po/cs.po b/po/cs.po
index 72edd81..3647a69 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8891,7 +8891,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/da.po b/po/da.po
index fa45f38..eb5566b 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8925,7 +8925,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/de.po b/po/de.po
index 7691ed7..3df56e7 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8833,7 +8833,8 @@
msgstr "Fehler: Unbekannte oder ungültige Kommandozeilenparameter angegeben\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s Adapter %s\n"
#: ipconfig.rc:30
diff --git a/po/el.po b/po/el.po
index 8a42fa0..5b48a1c 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8414,7 +8414,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/en.po b/po/en.po
index 14beab7..3168e96 100644
--- a/po/en.po
+++ b/po/en.po
@@ -8604,8 +8604,8 @@
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
-msgstr "%s adapter %s\n"
+msgid "%1 adapter %2\n"
+msgstr "%1 adapter %2\n"
#: ipconfig.rc:30
msgid "Ethernet"
diff --git a/po/en_US.po b/po/en_US.po
index 2581417..2132c72 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -8753,8 +8753,8 @@
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
-msgstr "%s adapter %s\n"
+msgid "%1 adapter %2\n"
+msgstr "%1 adapter %2\n"
#: ipconfig.rc:30
msgid "Ethernet"
diff --git a/po/eo.po b/po/eo.po
index 7cfe14a..90a1375 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8523,7 +8523,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/es.po b/po/es.po
index 29674f0..ad5697a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -9127,7 +9127,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/fa.po b/po/fa.po
index 91def36..66e5b3d 100644
--- a/po/fa.po
+++ b/po/fa.po
@@ -8391,7 +8391,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/fi.po b/po/fi.po
index 3f72921..080d6e0 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -8621,7 +8621,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/fr.po b/po/fr.po
index 2921b5c..bf5f080 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8856,7 +8856,8 @@
"invalides\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "Adaptateur %s %s\n"
#: ipconfig.rc:30
diff --git a/po/he.po b/po/he.po
index f9f0ca2..21fbd5d 100644
--- a/po/he.po
+++ b/po/he.po
@@ -8822,7 +8822,8 @@
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s adapter %s\n"
#: ipconfig.rc:30
diff --git a/po/hi.po b/po/hi.po
index b7b1340..89e6369 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -8290,7 +8290,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/hu.po b/po/hu.po
index 0634a1c..b79f87c 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -8817,7 +8817,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/it.po b/po/it.po
index 3927290..d5f885e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8808,7 +8808,8 @@
"validi\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s adattatore %s\n"
#: ipconfig.rc:30
diff --git a/po/ja.po b/po/ja.po
index b748f8c..30448d9 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8750,7 +8750,8 @@
msgstr "エラー: 不明または無効なコマンド ライン パラメータが指定されました\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s アダプタ %s\n"
#: ipconfig.rc:30
diff --git a/po/ko.po b/po/ko.po
index 0b1ae0d..9d714fc 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8719,7 +8719,8 @@
msgstr "오류: 알수 없거나 올바르지 않은 명령어 라인 매개변수가 지정됨\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s 어댑터 %s\n"
#: ipconfig.rc:30
diff --git a/po/lt.po b/po/lt.po
index d0a79e2..7bae857 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -8770,7 +8770,8 @@
"Klaida: nurodytas nežinomas arba netinkamas komandinės eilutės parametras\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s adapteris %s\n"
#: ipconfig.rc:30
diff --git a/po/ml.po b/po/ml.po
index b5f200a..505ab20 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -8290,7 +8290,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 6abe6c7..bcadb6c 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -8994,7 +8994,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/nl.po b/po/nl.po
index 70c6119..9943dce 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8864,7 +8864,8 @@
msgstr "Fout: Onbekende of ongeldige commandoregelparameters gespecificeerd\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s adapter %s\n"
#: ipconfig.rc:30
diff --git a/po/or.po b/po/or.po
index 9a68f525..b1a0b2b 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8290,7 +8290,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/pa.po b/po/pa.po
index 8ad7069..3451427 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8290,7 +8290,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/pl.po b/po/pl.po
index cbca874..0ecd5b5 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8793,7 +8793,8 @@
msgstr "Błąd: Nierozpoznany lub niepełny wiersz polecenia\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s karta %s\n"
#: ipconfig.rc:30
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 7efd228..baacfb7 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -9026,7 +9026,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/pt_PT.po b/po/pt_PT.po
index f4ee0f9..67a49bd 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -9039,7 +9039,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/rm.po b/po/rm.po
index a35889d..940555f 100644
--- a/po/rm.po
+++ b/po/rm.po
@@ -8332,7 +8332,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/ro.po b/po/ro.po
index afb215c..6fdc218 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -9268,7 +9268,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/ru.po b/po/ru.po
index aa21a61..821b22d 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8762,7 +8762,8 @@
msgstr "Ошибка: Указаны неизвестные или неверные параметры командной строки\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30
diff --git a/po/sk.po b/po/sk.po
index ed0b852..281f6cc 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8421,7 +8421,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/sl.po b/po/sl.po
index e9a84ef..8c0f51f 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -8769,7 +8769,8 @@
"Napaka: navedeni so bili nepoznani ali neveljavni parametri ukazne vrstice\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s prilagodilnik %s\n"
#: ipconfig.rc:30
diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po
index 177c6c8..39540dd 100644
--- a/po/sr_RS@cyrillic.po
+++ b/po/sr_RS@cyrillic.po
@@ -8700,7 +8700,8 @@
"Грешка: унесени су непознати или неисправни параметри наредбене линије\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30
diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po
index 5f71ad4..6c667c9 100644
--- a/po/sr_RS@latin.po
+++ b/po/sr_RS@latin.po
@@ -8741,7 +8741,7 @@
"Greška: uneseni su nepoznati ili neispravni parametri naredbene linije\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/sv.po b/po/sv.po
index 5cf6e13..676511b 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8723,7 +8723,8 @@
msgstr "Fel: Okända eller ogiltiga kommandoradsparametrar angavs\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s-adapter %s\n"
#: ipconfig.rc:30
diff --git a/po/te.po b/po/te.po
index 147be06..610cb53 100644
--- a/po/te.po
+++ b/po/te.po
@@ -8290,7 +8290,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/th.po b/po/th.po
index ad115b7..bd2175f 100644
--- a/po/th.po
+++ b/po/th.po
@@ -8417,7 +8417,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/tr.po b/po/tr.po
index 1881f51..d2b0d79 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8997,7 +8997,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/uk.po b/po/uk.po
index ca1e816..5e92395 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8720,7 +8720,8 @@
msgstr "Помилка: Вказані невідомі чи невірні параметри командного рядка\n"
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+#, fuzzy
+msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30
diff --git a/po/wa.po b/po/wa.po
index 42d9ecd..0be4c39 100644
--- a/po/wa.po
+++ b/po/wa.po
@@ -8369,7 +8369,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/wine.pot b/po/wine.pot
index 86f0ff2..8ac30f3 100644
--- a/po/wine.pot
+++ b/po/wine.pot
@@ -8264,7 +8264,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 71ef863..2254c61 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8657,7 +8657,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/po/zh_TW.po b/po/zh_TW.po
index b263d4b..9a54573 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8690,7 +8690,7 @@
msgstr ""
#: ipconfig.rc:29
-msgid "%s adapter %s\n"
+msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30
diff --git a/programs/ipconfig/ipconfig.c b/programs/ipconfig/ipconfig.c
index 37e7099..1f45e0e 100644
--- a/programs/ipconfig/ipconfig.c
+++ b/programs/ipconfig/ipconfig.c
@@ -26,13 +26,14 @@
#include "ipconfig.h"
-static int ipconfig_vprintfW(const WCHAR *msg, va_list va_args)
+static int ipconfig_vprintfW(const WCHAR *msg, __ms_va_list va_args)
{
int wlen;
DWORD count, ret;
WCHAR msg_buffer[8192];
- wlen = vsprintfW(msg_buffer, msg, va_args);
+ wlen = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, msg, 0, 0, msg_buffer,
+ sizeof(msg_buffer)/sizeof(*msg_buffer), &va_args);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL);
if (!ret)
@@ -59,37 +60,37 @@
return count;
}
-static int ipconfig_printfW(const WCHAR *msg, ...)
+static int CDECL ipconfig_printfW(const WCHAR *msg, ...)
{
- va_list va_args;
+ __ms_va_list va_args;
int len;
- va_start(va_args, msg);
+ __ms_va_start(va_args, msg);
len = ipconfig_vprintfW(msg, va_args);
- va_end(va_args);
+ __ms_va_end(va_args);
return len;
}
-static int ipconfig_message_printfW(int msg, ...)
+static int CDECL ipconfig_message_printfW(int msg, ...)
{
- va_list va_args;
+ __ms_va_list va_args;
WCHAR msg_buffer[8192];
int len;
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
sizeof(msg_buffer)/sizeof(WCHAR));
- va_start(va_args, msg);
+ __ms_va_start(va_args, msg);
len = ipconfig_vprintfW(msg_buffer, va_args);
- va_end(va_args);
+ __ms_va_end(va_args);
return len;
}
static int ipconfig_message(int msg)
{
- static const WCHAR formatW[] = {'%','s',0};
+ static const WCHAR formatW[] = {'%','1',0};
WCHAR msg_buffer[8192];
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
@@ -123,7 +124,7 @@
static void print_field(int msg, const WCHAR *value)
{
- static const WCHAR formatW[] = {' ',' ',' ',' ','%','s',':',' ','%','s','\n',0};
+ static const WCHAR formatW[] = {' ',' ',' ',' ','%','1',':',' ','%','2','\n',0};
WCHAR field[] = {'.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',
' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ',0};
@@ -141,7 +142,7 @@
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
- '%','s','\n',0};
+ '%','1','\n',0};
ipconfig_printfW(formatW, value);
}
diff --git a/programs/ipconfig/ipconfig.rc b/programs/ipconfig/ipconfig.rc
index b8809e1..3c1f9d1 100644
--- a/programs/ipconfig/ipconfig.rc
+++ b/programs/ipconfig/ipconfig.rc
@@ -26,7 +26,7 @@
{
STRING_USAGE, "Usage: ipconfig [ /? | /all ]\n"
STRING_INVALID_CMDLINE, "Error: Unknown or invalid command line parameters specified\n"
- STRING_ADAPTER_FRIENDLY, "%s adapter %s\n"
+ STRING_ADAPTER_FRIENDLY, "%1 adapter %2\n"
STRING_ETHERNET, "Ethernet"
STRING_UNKNOWN, "Unknown"
STRING_CONN_DNS_SUFFIX, "Connection-specific DNS suffix"