diff --git a/po/ar.po b/po/ar.po index 978170b9785..40f0bffa512 100644 --- a/po/ar.po +++ b/po/ar.po @@ -11532,6 +11532,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "خطأ : فشل النظام في العثور على المفتاح أو القيمة المحددة\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "النوع غير مدعوم.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "ال&سجل" diff --git a/po/bg.po b/po/bg.po index 0cdfd53baef..8d015495dfa 100644 --- a/po/bg.po +++ b/po/bg.po @@ -11355,6 +11355,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "&Регистър" diff --git a/po/ca.po b/po/ca.po index 01c2ff22903..6307f216bc4 100644 --- a/po/ca.po +++ b/po/ca.po @@ -11759,6 +11759,12 @@ msgstr "" "Error: El sistema no ha pogut trobar la clau o valor de registre " "especificada\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tipus incompatible.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registre" diff --git a/po/cs.po b/po/cs.po index b344f6b4ae7..03bc22b1d41 100644 --- a/po/cs.po +++ b/po/cs.po @@ -11408,6 +11408,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Chyba: Systém nemohl najít specifikovaný klíč registru nebo hodnotu\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nepodporovaný typ.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registr" diff --git a/po/da.po b/po/da.po index 6f4f6519cd8..4ef29553bb5 100644 --- a/po/da.po +++ b/po/da.po @@ -11667,6 +11667,12 @@ msgstr "" "Fejl: Systemet kunne ikke finde, den angivet registrerings nøgle eller " "værdi\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Ikke-understøttet type.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Register" diff --git a/po/de.po b/po/de.po index 09781409ac6..ec5cc565e62 100644 --- a/po/de.po +++ b/po/de.po @@ -11588,6 +11588,12 @@ msgid "" msgstr "" "Fehler: Der angegebene Schlüssel oder Wert konnte nicht gefunden werden\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nicht unterstützter Typ.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registry" diff --git a/po/el.po b/po/el.po index ef5f2a64b29..f25ece7e69a 100644 --- a/po/el.po +++ b/po/el.po @@ -11149,6 +11149,11 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +#, fuzzy +msgid "Error: Unsupported type\n" +msgstr "Επιλογές.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/en.po b/po/en.po index 284056e3aa0..2baa4eddf94 100644 --- a/po/en.po +++ b/po/en.po @@ -11509,6 +11509,10 @@ msgid "" msgstr "" "Error: The system was unable to find the specified registry key or value\n" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "Error: Unsupported type\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registry" diff --git a/po/en_US.po b/po/en_US.po index 3bc7fdcca3e..2dbc8e5761d 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -11509,6 +11509,10 @@ msgid "" msgstr "" "Error: The system was unable to find the specified registry key or value\n" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "Error: Unsupported type\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registry" diff --git a/po/eo.po b/po/eo.po index 8940c27435d..ba02708bbdc 100644 --- a/po/eo.po +++ b/po/eo.po @@ -11041,6 +11041,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registrejo" diff --git a/po/es.po b/po/es.po index 4d25db559f2..1840d31bc9e 100644 --- a/po/es.po +++ b/po/es.po @@ -11747,6 +11747,12 @@ msgstr "" "Error: El sistema no pudo encontrar la clave o el valor del Registro " "especificado\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tipo no soportado.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registro" diff --git a/po/fa.po b/po/fa.po index 6feba064bcb..394cc061019 100644 --- a/po/fa.po +++ b/po/fa.po @@ -11148,6 +11148,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/fi.po b/po/fi.po index 129365c9f7f..56fbb3b173d 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11496,6 +11496,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Virhe: järjestelmä ei löytänyt annettua rekisteriavainta tai -arvoa\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tyyppiä ei tueta.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Rekisteri" diff --git a/po/fr.po b/po/fr.po index fe8f906ceec..ff5f8788fa6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -11654,6 +11654,12 @@ msgstr "" "Erreur : le système n'a pas pu trouver la clé ou la valeur de registre " "spécifiée\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Type non pris en charge.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registre" diff --git a/po/he.po b/po/he.po index dfced64faf9..b5be9b70b73 100644 --- a/po/he.po +++ b/po/he.po @@ -11727,6 +11727,12 @@ msgid "" msgstr "" "Error: The system was unable to find the specified registry key or value\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Command line not supported\n" +msgid "Error: Unsupported type\n" +msgstr "Error: Command line not supported\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&רישום המערכת" diff --git a/po/hi.po b/po/hi.po index 24972a90c9e..cfaec91af6c 100644 --- a/po/hi.po +++ b/po/hi.po @@ -10961,6 +10961,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/hr.po b/po/hr.po index 7a286992a80..51a5e58ce06 100644 --- a/po/hr.po +++ b/po/hr.po @@ -11227,6 +11227,12 @@ msgid "" msgstr "" "Greška: Sustav nije mogao pronaći navedeni ključ ili vrijednost u registru.\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nepodržan tip.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registar" diff --git a/po/hu.po b/po/hu.po index a56a27bde96..4634c7cade7 100644 --- a/po/hu.po +++ b/po/hu.po @@ -11670,6 +11670,12 @@ msgid "" msgstr "" "Hiba: A rendszer nem találta a megadott regisztrációs kulcsot vagy értéket\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nem támogatott típus.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Fájl" diff --git a/po/it.po b/po/it.po index 244d864058b..9821054a871 100644 --- a/po/it.po +++ b/po/it.po @@ -11748,6 +11748,12 @@ msgstr "" "Errore: il sistema non è riuscito a trovare la chiave di registro o il " "valore specificati\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tipo non supportato.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registro" diff --git a/po/ja.po b/po/ja.po index 4444bd3d594..078e967c78a 100644 --- a/po/ja.po +++ b/po/ja.po @@ -11502,6 +11502,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "エラー: システムは指定されたキーまたは値を見つけられませんでした\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "サポートされていない種類です。\n" + #: regedit.rc:34 msgid "&Registry" msgstr "レジストリ(&R)" diff --git a/po/ko.po b/po/ko.po index ad047647721..94e5ac2e96b 100644 --- a/po/ko.po +++ b/po/ko.po @@ -11556,6 +11556,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "오류: 이 시스템에서 지정된 레지스트리 키나 값을 찾을수 없습니다\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "지원하지 않는 형식.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "레지스트리(&R)" diff --git a/po/lt.po b/po/lt.po index c9de47f43f2..a0e0d032a93 100644 --- a/po/lt.po +++ b/po/lt.po @@ -11517,6 +11517,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Klaida: Sistemai nepavyko rasti nurodyto registro rakto ar reikšmės\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nepalaikomas tipas.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "R&egistras" diff --git a/po/ml.po b/po/ml.po index 54a25744b62..9b4690d0850 100644 --- a/po/ml.po +++ b/po/ml.po @@ -10961,6 +10961,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/nb_NO.po b/po/nb_NO.po index 7cbacb01a8f..30eefc7b9de 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -11573,6 +11573,12 @@ msgstr "" "Feil: Systemet klarte ikke finne den angitte registernøkkelen eller -" "verdien\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Typen støttes ikke.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Register" diff --git a/po/nl.po b/po/nl.po index c89e88c61cc..b652d6bf0a6 100644 --- a/po/nl.po +++ b/po/nl.po @@ -11714,6 +11714,12 @@ msgstr "" "Fout: Het systeem kon de gespecificeerde registersleutel of waarde niet " "vinden\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Niet-ondersteund type.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registerbestand" diff --git a/po/or.po b/po/or.po index f69b1eee1d6..206d65bee61 100644 --- a/po/or.po +++ b/po/or.po @@ -10961,6 +10961,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/pa.po b/po/pa.po index 8b879400a28..61df1ce5082 100644 --- a/po/pa.po +++ b/po/pa.po @@ -10961,6 +10961,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/pl.po b/po/pl.po index fab441881fd..ce59116c468 100644 --- a/po/pl.po +++ b/po/pl.po @@ -11565,6 +11565,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Błąd: System nie mógł znaleźć podanej wartości lub klucza rejestru\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Niewspierany typ.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Rejestr" diff --git a/po/pt_BR.po b/po/pt_BR.po index 3e9bfd5b7be..666e4cbbd38 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -11572,6 +11572,12 @@ msgstr "" "Erro: O sistema foi incapaz de encontrar a chave de registo ou valor " "especificado\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tipo não suportado.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registro" diff --git a/po/pt_PT.po b/po/pt_PT.po index 0d06c2bdfb1..c9838fb6e99 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -11541,6 +11541,12 @@ msgstr "" "Erro: O sistema foi incapaz de encontrar a chave de registo ou valor " "especificado\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Tipo não suportado.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registo" diff --git a/po/rm.po b/po/rm.po index 65919bb9fbe..f18bc911daa 100644 --- a/po/rm.po +++ b/po/rm.po @@ -11039,6 +11039,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/ro.po b/po/ro.po index 3b167e16e35..e5566092f64 100644 --- a/po/ro.po +++ b/po/ro.po @@ -11754,6 +11754,12 @@ msgid "" msgstr "" "Eroare: Sistemul nu a putut găsi cheia sau valoarea de registru specificată\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Command line not supported\n" +msgid "Error: Unsupported type\n" +msgstr "Eroare: Linie de comandă nesuportată\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registru" diff --git a/po/ru.po b/po/ru.po index 3fce967dcb7..84d23eba106 100644 --- a/po/ru.po +++ b/po/ru.po @@ -11522,6 +11522,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Ошибка: не удалось найти указанный раздел реестра или значение\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Неподдерживаемый тип.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Реестр" diff --git a/po/sk.po b/po/sk.po index 211fdd8a97a..99561a35e26 100644 --- a/po/sk.po +++ b/po/sk.po @@ -11191,6 +11191,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nepodporovaný typ.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Registry" diff --git a/po/sl.po b/po/sl.po index d85952009f1..435d5b84f9f 100644 --- a/po/sl.po +++ b/po/sl.po @@ -11696,6 +11696,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Napaka: sistem ni našel navedenega ključa ali vrednosti registra\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Nepodprta vrsta.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Register" diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po index aa526f83332..ac43aa4a642 100644 --- a/po/sr_RS@cyrillic.po +++ b/po/sr_RS@cyrillic.po @@ -11592,6 +11592,13 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Invalid command line parameters\n" +msgid "Error: Unsupported type\n" +msgstr "" +"Грешка: унесени су непознати или неисправни параметри наредбене линије\n" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po index 19a9c70244b..d637dac324e 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -11730,6 +11730,13 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Invalid command line parameters\n" +msgid "Error: Unsupported type\n" +msgstr "" +"Greška: uneseni su nepoznati ili neispravni parametri naredbene linije\n" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/sv.po b/po/sv.po index fbfc93725ec..bd0abc15f9a 100644 --- a/po/sv.po +++ b/po/sv.po @@ -11463,6 +11463,12 @@ msgid "" msgstr "" "Fel: Systemet kunde inte hitta angiven nyckel eller värde i registret\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Ej stödd typ.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Register" diff --git a/po/te.po b/po/te.po index 58ab7877542..e62759de5ac 100644 --- a/po/te.po +++ b/po/te.po @@ -10961,6 +10961,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/th.po b/po/th.po index 40abbf875ca..b6bfbe77e44 100644 --- a/po/th.po +++ b/po/th.po @@ -11186,6 +11186,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/tr.po b/po/tr.po index fa6163fb29e..d3b68a9b028 100644 --- a/po/tr.po +++ b/po/tr.po @@ -11522,6 +11522,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Command line not supported\n" +msgid "Error: Unsupported type\n" +msgstr "Hata: Komut satırı desteklenmiyor\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Kayıt" diff --git a/po/uk.po b/po/uk.po index 2c6ab6a9197..dccf77f2ffc 100644 --- a/po/uk.po +++ b/po/uk.po @@ -11604,6 +11604,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "Помилка: не вдалось знайти вказаний ключ реєстру чи значення\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "Непідтримуваний тип.\n" + #: regedit.rc:34 msgid "&Registry" msgstr "&Реєстр" diff --git a/po/wa.po b/po/wa.po index 5aaa1173679..dcf6f3302f7 100644 --- a/po/wa.po +++ b/po/wa.po @@ -11091,6 +11091,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/wine.pot b/po/wine.pot index 3626d88dba9..a3058f19642 100644 --- a/po/wine.pot +++ b/po/wine.pot @@ -10900,6 +10900,10 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +#: reg.rc:39 +msgid "Error: Unsupported type\n" +msgstr "" + #: regedit.rc:34 msgid "&Registry" msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index 8dd3fe1eb20..d1c63496a5f 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -11054,6 +11054,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "错误:系统无法找到指定的注册表键或值\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Error: Command line not supported\n" +msgid "Error: Unsupported type\n" +msgstr "错误:不支持此命令行\n" + #: regedit.rc:34 msgid "&Registry" msgstr "注册表(&R)" diff --git a/po/zh_TW.po b/po/zh_TW.po index e9de30a2ef8..661ac0a4a79 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -11441,6 +11441,12 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "錯誤:系統無法找到指定的註冊表索引鍵或值\n" +#: reg.rc:39 +#, fuzzy +#| msgid "Unsupported type.\n" +msgid "Error: Unsupported type\n" +msgstr "不受支援的型態。\n" + #: regedit.rc:34 msgid "&Registry" msgstr "註冊表(&R)" diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 0fd579c9d9b..4ec25bc133b 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -20,6 +20,34 @@ #include #include "reg.h" +#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) + +static const WCHAR type_none[] = {'R','E','G','_','N','O','N','E',0}; +static const WCHAR type_sz[] = {'R','E','G','_','S','Z',0}; +static const WCHAR type_expand_sz[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}; +static const WCHAR type_binary[] = {'R','E','G','_','B','I','N','A','R','Y',0}; +static const WCHAR type_dword[] = {'R','E','G','_','D','W','O','R','D',0}; +static const WCHAR type_dword_le[] = {'R','E','G','_','D','W','O','R','D','_','L','I','T','T','L','E','_','E','N','D','I','A','N',0}; +static const WCHAR type_dword_be[] = {'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0}; +static const WCHAR type_multi_sz[] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0}; + +static const struct +{ + DWORD type; + const WCHAR *name; +} +type_rels[] = +{ + {REG_NONE, type_none}, + {REG_SZ, type_sz}, + {REG_EXPAND_SZ, type_expand_sz}, + {REG_BINARY, type_binary}, + {REG_DWORD, type_dword}, + {REG_DWORD_LITTLE_ENDIAN, type_dword_le}, + {REG_DWORD_BIG_ENDIAN, type_dword_be}, + {REG_MULTI_SZ, type_multi_sz}, +}; + static int reg_printfW(const WCHAR *msg, ...) { va_list va_args; @@ -114,30 +142,20 @@ static HKEY get_rootkey(LPWSTR key) else return NULL; } -static DWORD get_regtype(LPWSTR type) +static DWORD wchar_get_type(const WCHAR *type_name) { - static const WCHAR szREG_SZ[] = {'R','E','G','_','S','Z',0}; - static const WCHAR szREG_MULTI_SZ[] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0}; - static const WCHAR szREG_DWORD_BIG_ENDIAN[] = {'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0}; - static const WCHAR szREG_DWORD[] = {'R','E','G','_','D','W','O','R','D',0}; - static const WCHAR szREG_BINARY[] = {'R','E','G','_','B','I','N','A','R','Y',0}; - static const WCHAR szREG_DWORD_LITTLE_ENDIAN[] = {'R','E','G','_','D','W','O','R','D','_','L','I','T','T','L','E','_','E','N','D','I','A','N',0}; - static const WCHAR szREG_NONE[] = {'R','E','G','_','N','O','N','E',0}; - static const WCHAR szREG_EXPAND_SZ[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}; + DWORD i; - if (!type) + if (!type_name) return REG_SZ; - if (lstrcmpiW(type,szREG_SZ)==0) return REG_SZ; - if (lstrcmpiW(type,szREG_DWORD)==0) return REG_DWORD; - if (lstrcmpiW(type,szREG_MULTI_SZ)==0) return REG_MULTI_SZ; - if (lstrcmpiW(type,szREG_EXPAND_SZ)==0) return REG_EXPAND_SZ; - if (lstrcmpiW(type,szREG_DWORD_BIG_ENDIAN)==0) return REG_DWORD_BIG_ENDIAN; - if (lstrcmpiW(type,szREG_DWORD_LITTLE_ENDIAN)==0) return REG_DWORD_LITTLE_ENDIAN; - if (lstrcmpiW(type,szREG_BINARY)==0) return REG_BINARY; - if (lstrcmpiW(type,szREG_NONE)==0) return REG_NONE; + for (i = 0; i < ARRAY_SIZE(type_rels); i++) + { + if (!strcmpiW(type_rels[i].name, type_name)) + return type_rels[i].type; + } - return -1; + return ~0u; } static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *reg_count) @@ -246,11 +264,11 @@ static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, } } - reg_type = get_regtype(type); - if (reg_type == -1) + reg_type = wchar_get_type(type); + if (reg_type == ~0u) { RegCloseKey(subkey); - reg_message(STRING_INVALID_CMDLINE); + reg_message(STRING_UNSUPPORTED_TYPE); return 1; } diff --git a/programs/reg/reg.h b/programs/reg/reg.h index 2221647168c..6fca7eb0273 100644 --- a/programs/reg/reg.h +++ b/programs/reg/reg.h @@ -30,3 +30,4 @@ #define STRING_INVALID_CMDLINE 107 #define STRING_NO_REMOTE 108 #define STRING_CANNOT_FIND 109 +#define STRING_UNSUPPORTED_TYPE 110 diff --git a/programs/reg/reg.rc b/programs/reg/reg.rc index 6f4c0c84e35..94dddf2ffa2 100644 --- a/programs/reg/reg.rc +++ b/programs/reg/reg.rc @@ -35,4 +35,5 @@ STRINGTABLE STRING_INVALID_CMDLINE, "Error: Invalid command line parameters\n" STRING_NO_REMOTE, "Error: Unable to access remote machine\n" STRING_CANNOT_FIND, "Error: The system was unable to find the specified registry key or value\n" + STRING_UNSUPPORTED_TYPE, "Error: Unsupported type\n" }