reg: Introduce a partial state machine for importing Windows 3.1 registry data.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-08-18 09:30:04 +00:00 committed by Alexandre Julliard
parent aa386af42a
commit 3e87a70e82
52 changed files with 978 additions and 57 deletions

View File

@ -12455,6 +12455,18 @@ msgstr "(القيمة غير مضبوطة)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "لم يتم تحديد أي أمر."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "خطأ : تعذر إضافة المفاتيح للجهاز البعيد\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "ال&سجل"

View File

@ -12021,6 +12021,17 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
msgid "reg: The file '%1' was not found.\n"
msgstr "Файлът не е намерен.\n"
#: reg.rc:68
#, fuzzy
#| msgid "Are you sure you want to delete '%1'?"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Наистина ли искате да изтриете '%1'?"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Регистър"

View File

@ -12317,6 +12317,18 @@ msgstr "(valor no definit)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: No s'ha trobat el fitxer '%1'.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: No s'ha pogut obrir la clau de registre '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registre"

View File

@ -12144,6 +12144,18 @@ msgstr "(hodnota nenastavena)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Nebyl zadán žádný příkaz."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Chyba: Nepodařilo se přidat klíče na vzdálený stroj\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registr"

View File

@ -12410,6 +12410,18 @@ msgstr "(værdi ikke sat)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Der blev ikke specificeret nogen kommando."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Fejl: Kunne ikke tilføje nøgler til fjern maskinen\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -12215,6 +12215,18 @@ msgstr "(Wert nicht gesetzt)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Die Datei '%1' wurde nicht gefunden.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Der Schlüssel '%1' konnte nicht geöffnet werden.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registrierung"

View File

@ -11792,6 +11792,15 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
msgid "reg: The file '%1' was not found.\n"
msgstr "Το αρχείο δε βρέθηκε.\n"
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12128,6 +12128,14 @@ msgstr "(value not set)"
msgid "REG IMPORT file.reg\n"
msgstr "REG IMPORT file.reg\n"
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr "reg: The file '%1' was not found.\n"
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "reg: Unable to open the registry key '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -12128,6 +12128,14 @@ msgstr "(value not set)"
msgid "REG IMPORT file.reg\n"
msgstr "REG IMPORT file.reg\n"
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr "reg: The file '%1' was not found.\n"
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "reg: Unable to open the registry key '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -11733,6 +11733,18 @@ msgstr "(valoro ne elektita)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "Search string '%s' not found"
msgid "reg: The file '%1' was not found.\n"
msgstr "Mi ne trovis la ĉenon %s"
#: reg.rc:68
#, fuzzy
#| msgid "Are you sure you want to delete '%1'?"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Ĉu vi estas certa pri forigo de '%1'?"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registrejo"

View File

@ -12489,6 +12489,18 @@ msgstr "(valor no definido)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "No se ha especificado un comando."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Error: No se puede agregar claves al equipo remoto\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -11777,6 +11777,15 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
#, fuzzy
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "پرونده‌های متنی (*.txt).\n"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12119,6 +12119,18 @@ msgstr "(arvoa ei asetettu)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Tiedostoa '%1' ei löydy.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Rekisteriavainta '%1' ei voida avata.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Rekisteri"

View File

@ -12360,6 +12360,18 @@ msgstr "(valeur non définie)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit : le fichier « %1 » est introuvable.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit : impossible d'ouvrir la clé de registre « %1 ».\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registre"

View File

@ -12201,6 +12201,18 @@ msgstr "(לא הוגדר ערך)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "Search string '%s' not found"
msgid "reg: The file '%1' was not found.\n"
msgstr "מחרוזת החיפוש ׳%s׳ לא נמצאה"
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Error: Unable to add keys to remote machine\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&רישום המערכת"

View File

@ -11579,6 +11579,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11961,6 +11961,18 @@ msgstr "(vrijednost nije postavljena)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "File not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "Datoteka nije pronađena.\n"
#: reg.rc:68
#, fuzzy
#| msgid "Could not open the file."
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Datoteka se ne može otvoriti."
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registar"

View File

@ -12404,6 +12404,18 @@ msgstr "(nem beállított)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Nem volt parancs meghatározva."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Hiba: nem lehet kulcsokat hozzáadni a távoli gépnél\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Fájl"

View File

@ -12490,6 +12490,18 @@ msgstr "(valore non immesso)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Non è stato specificato nessun comando."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Errore: impossibile aggiungere chiavi alla macchina remota\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -12131,6 +12131,18 @@ msgstr "(値の設定なし)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: ファイル '%1' が見つかりません。\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: レジストリ キー '%1' を開けません。\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "レジストリ(&R)"

View File

@ -12479,6 +12479,18 @@ msgstr "(값이 정해지지 않음)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "어떤 명령도 정의되지 않았습니다."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "오류: 원격 머신에 키를 더하는 것은 가능하지 않습니다\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "레지스트리(&R)"

View File

@ -12142,6 +12142,18 @@ msgstr "(reikšmė nenustatyta)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Failas „%1“ nerastas.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Nepavyko atverti registro rakto „%1“.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "R&egistras"

View File

@ -11579,6 +11579,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12133,6 +12133,18 @@ msgstr "(verdi ikke oppgitt)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Filen \"%1\" ble ikke funnet.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Kan ikke åpne registernøkkelen \"%1\".\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -12456,6 +12456,18 @@ msgstr "(Geen waarde ingesteld)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Er was geen opdracht opgegeven."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Fout: Sleutels konden niet toegevoegd worden aan de remote machine\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registerbestand"

View File

@ -11579,6 +11579,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11579,6 +11579,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12190,6 +12190,18 @@ msgstr "(wartość nie ustalona)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Nie znaleziono pliku '%1'.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Nie udało się otworzyć klucza rejestru '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Rejestr"

View File

@ -12278,6 +12278,18 @@ msgstr "(valor não dado)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: O arquivo '%1' não foi encontrado.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Não foi possível abrir a chave de registro '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -12281,6 +12281,18 @@ msgstr "(valor não dado)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Nenhum comando indicado."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Erro: Incapaz de adicionar chaves à máquina remota\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registo"

View File

@ -11663,6 +11663,15 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
#, fuzzy
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Tuot las datotecas (*.*).\n"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12215,6 +12215,18 @@ msgstr "(valoare nestabilită)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Fișierul „%1” nu a fost găsit.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Nu s-a putut deschide cheia de registru „%1”.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registru"

View File

@ -12139,6 +12139,18 @@ msgstr "(значение не задано)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: файл «%1» не найден.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: не удалось открыть ключ «%1».\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Реестр"

View File

@ -11896,6 +11896,18 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Nebol špecifikovaný žiadny príkaz."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to terminate process \"%1\".\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Chyba: Nemožno ukončiť proces \"%1\".\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -12433,6 +12433,18 @@ msgstr "(vrednost ni nastavljena)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Ukaz ni bil naveden."
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Napaka: ni mogoče dodati ključa na oddaljen računalnik\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -12280,6 +12280,17 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
msgid "reg: The file '%1' was not found.\n"
msgstr "%s путања није пронађена"
#: reg.rc:68
#, fuzzy
#| msgid "Are you sure you want to delete '%1'?"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Желите ли да избришете „%1“?"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12438,6 +12438,17 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
msgid "reg: The file '%1' was not found.\n"
msgstr "%s putanja nije pronađena"
#: reg.rc:68
#, fuzzy
#| msgid "Are you sure you want to delete '%1'?"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Želite li da izbrišete „%1“?"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12105,6 +12105,18 @@ msgstr "(värde ej angivet)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "Inget kommando angavs."
#: reg.rc:68
#, fuzzy
#| msgid "reg: Unable to access remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "reg: Kan inte få tillgång till fjärrmaskin\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -11579,6 +11579,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11823,6 +11823,16 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
msgid "reg: The file '%1' was not found.\n"
msgstr "ไม่พบแฟ้ม.\n"
#: reg.rc:68
#, fuzzy
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "แฟ้มตํารา (*.txt).\n"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -12157,6 +12157,18 @@ msgstr "(değer belirlenmemiş)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: '%1' dosyası bulunamadı.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: '%1' kayıt anahtarıılamıyor.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Kayıt Defteri"

View File

@ -12234,6 +12234,18 @@ msgstr "(значення не задане)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: Файл '%1' не знайдено.\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: Неможливо відкрити ключ '%1'.\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Реєстр"

View File

@ -11727,6 +11727,15 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
#, fuzzy
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "Fitchîs tekse (*.txt).\n"
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11506,6 +11506,14 @@ msgstr ""
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
msgid "reg: The file '%1' was not found.\n"
msgstr ""
#: reg.rc:68
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11925,6 +11925,18 @@ msgstr "(没有设值)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "regedit: The file '%1' was not found.\n"
msgid "reg: The file '%1' was not found.\n"
msgstr "regedit: 找不到文件 '%1'。\n"
#: reg.rc:68
#, fuzzy
#| msgid "regedit: Unable to open the registry key '%1'.\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "regedit: 无法打开注册表键 '%1'。\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "注册表(&R)"

View File

@ -12364,6 +12364,18 @@ msgstr "(沒有設值)"
msgid "REG IMPORT file.reg\n"
msgstr ""
#: reg.rc:67
#, fuzzy
#| msgid "No command was specified."
msgid "reg: The file '%1' was not found.\n"
msgstr "沒有任何命令被指定。"
#: reg.rc:68
#, fuzzy
#| msgid "Error: Unable to add keys to remote machine\n"
msgid "reg: Unable to open the registry key '%1'.\n"
msgstr "錯誤:無法加入索引鍵到遠端機器\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "註冊表(&R)"

View File

@ -17,14 +17,420 @@
*/
#include <windows.h>
#include <stdio.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "reg.h"
WINE_DEFAULT_DEBUG_CHANNEL(reg);
static WCHAR *GetWideString(const char *strA)
{
if (strA)
{
WCHAR *strW;
int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0);
strW = heap_xalloc(len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len);
return strW;
}
return NULL;
}
static WCHAR *(*get_line)(FILE *);
/* parser definitions */
enum parser_state
{
HEADER, /* parsing the registry file version header */
PARSE_WIN31_LINE, /* parsing a Windows 3.1 registry line */
SET_VALUE, /* adding a value to the registry */
NB_PARSER_STATES
};
struct parser
{
FILE *file; /* pointer to a registry file */
WCHAR two_wchars[2]; /* first two characters from the encoding check */
BOOL is_unicode; /* parsing Unicode or ASCII data */
short int reg_version; /* registry file version */
HKEY hkey; /* current registry key */
WCHAR *key_name; /* current key name */
WCHAR *value_name; /* value name */
DWORD data_type; /* data type */
void *data; /* value data */
DWORD data_size; /* size of the data (in bytes) */
enum parser_state state; /* current parser state */
};
typedef WCHAR *(*parser_state_func)(struct parser *parser, WCHAR *pos);
/* parser state machine functions */
static WCHAR *header_state(struct parser *parser, WCHAR *pos);
static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos);
static WCHAR *set_value_state(struct parser *parser, WCHAR *pos);
static const parser_state_func parser_funcs[NB_PARSER_STATES] =
{
header_state, /* HEADER */
parse_win31_line_state, /* PARSE_WIN31_LINE */
set_value_state, /* SET_VALUE */
};
/* set the new parser state and return the previous one */
static inline enum parser_state set_state(struct parser *parser, enum parser_state state)
{
enum parser_state ret = parser->state;
parser->state = state;
return ret;
}
static HKEY parse_key_name(WCHAR *key_name, WCHAR **key_path)
{
if (!key_name) return 0;
*key_path = strchrW(key_name, '\\');
if (*key_path) (*key_path)++;
return path_get_rootkey(key_name);
}
static void close_key(struct parser *parser)
{
if (parser->hkey)
{
heap_free(parser->key_name);
parser->key_name = NULL;
RegCloseKey(parser->hkey);
parser->hkey = NULL;
}
}
static LONG open_key(struct parser *parser, WCHAR *path)
{
HKEY key_class;
WCHAR *key_path;
LONG res;
close_key(parser);
/* Get the registry class */
if (!path || !(key_class = parse_key_name(path, &key_path)))
return ERROR_INVALID_PARAMETER;
res = RegCreateKeyExW(key_class, key_path, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &parser->hkey, NULL);
if (res == ERROR_SUCCESS)
{
parser->key_name = heap_xalloc((lstrlenW(path) + 1) * sizeof(WCHAR));
lstrcpyW(parser->key_name, path);
}
else
parser->hkey = NULL;
return res;
}
static void free_parser_data(struct parser *parser)
{
parser->data = NULL;
parser->data_size = 0;
}
enum reg_versions {
REG_VERSION_31,
REG_VERSION_40,
REG_VERSION_50,
REG_VERSION_FUZZY,
REG_VERSION_INVALID
};
static enum reg_versions parse_file_header(const WCHAR *s)
{
static const WCHAR header_31[] = {'R','E','G','E','D','I','T',0};
static const WCHAR header_40[] = {'R','E','G','E','D','I','T','4',0};
static const WCHAR header_50[] = {'W','i','n','d','o','w','s',' ',
'R','e','g','i','s','t','r','y',' ','E','d','i','t','o','r',' ',
'V','e','r','s','i','o','n',' ','5','.','0','0',0};
while (*s == ' ' || *s == '\t') s++;
if (!strcmpW(s, header_31))
return REG_VERSION_31;
if (!strcmpW(s, header_40))
return REG_VERSION_40;
if (!strcmpW(s, header_50))
return REG_VERSION_50;
/* The Windows version accepts registry file headers beginning with "REGEDIT" and ending
* with other characters, as long as "REGEDIT" appears at the start of the line. For example,
* "REGEDIT 4", "REGEDIT9" and "REGEDIT4FOO" are all treated as valid file headers.
* In all such cases, however, the contents of the registry file are not imported.
*/
if (!strncmpW(s, header_31, 7)) /* "REGEDIT" without NUL */
return REG_VERSION_FUZZY;
return REG_VERSION_INVALID;
}
/* handler for parser HEADER state */
static WCHAR *header_state(struct parser *parser, WCHAR *pos)
{
WCHAR *line, *header;
if (!(line = get_line(parser->file)))
return NULL;
if (!parser->is_unicode)
{
header = heap_xalloc((lstrlenW(line) + 3) * sizeof(WCHAR));
header[0] = parser->two_wchars[0];
header[1] = parser->two_wchars[1];
lstrcpyW(header + 2, line);
parser->reg_version = parse_file_header(header);
heap_free(header);
}
else parser->reg_version = parse_file_header(line);
switch (parser->reg_version)
{
case REG_VERSION_31:
set_state(parser, PARSE_WIN31_LINE);
break;
case REG_VERSION_40:
case REG_VERSION_50:
default:
get_line(NULL); /* Reset static variables */
return NULL;
}
return line;
}
/* handler for parser PARSE_WIN31_LINE state */
static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
{
WCHAR *line, *value;
static WCHAR hkcr[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T'};
unsigned int key_end = 0;
if (!(line = get_line(parser->file)))
return NULL;
if (strncmpW(line, hkcr, ARRAY_SIZE(hkcr)))
return line;
/* get key name */
while (line[key_end] && !isspaceW(line[key_end])) key_end++;
value = line + key_end;
while (*value == ' ' || *value == '\t') value++;
if (*value == '=') value++;
if (*value == ' ') value++; /* at most one space is skipped */
line[key_end] = 0;
if (open_key(parser, line) != ERROR_SUCCESS)
{
output_message(STRING_OPEN_KEY_FAILED, line);
return line;
}
parser->value_name = NULL;
parser->data_type = REG_SZ;
parser->data = value;
parser->data_size = (lstrlenW(value) + 1) * sizeof(WCHAR);
set_state(parser, SET_VALUE);
return value;
}
/* handler for parser SET_VALUE state */
static WCHAR *set_value_state(struct parser *parser, WCHAR *pos)
{
RegSetValueExW(parser->hkey, parser->value_name, 0, parser->data_type,
parser->data, parser->data_size);
free_parser_data(parser);
set_state(parser, PARSE_WIN31_LINE);
return pos;
}
#define REG_VAL_BUF_SIZE 4096
static WCHAR *get_lineA(FILE *fp)
{
static WCHAR *lineW;
static size_t size;
static char *buf, *next;
char *line;
heap_free(lineW);
if (!fp) goto cleanup;
if (!size)
{
size = REG_VAL_BUF_SIZE;
buf = heap_xalloc(size);
*buf = 0;
next = buf;
}
line = next;
while (next)
{
char *p = strpbrk(line, "\r\n");
if (!p)
{
size_t len, count;
len = strlen(next);
memmove(buf, next, len + 1);
if (size - len < 3)
{
size *= 2;
buf = heap_xrealloc(buf, size);
}
if (!(count = fread(buf + len, 1, size - len - 1, fp)))
{
next = NULL;
lineW = GetWideString(buf);
return lineW;
}
buf[len + count] = 0;
next = buf;
line = buf;
continue;
}
next = p + 1;
if (*p == '\r' && *(p + 1) == '\n') next++;
*p = 0;
lineW = GetWideString(line);
return lineW;
}
cleanup:
lineW = NULL;
if (size) heap_free(buf);
size = 0;
return NULL;
}
static WCHAR *get_lineW(FILE *fp)
{
static size_t size;
static WCHAR *buf, *next;
WCHAR *line;
if (!fp) goto cleanup;
if (!size)
{
size = REG_VAL_BUF_SIZE;
buf = heap_xalloc(size * sizeof(WCHAR));
*buf = 0;
next = buf;
}
line = next;
while (next)
{
static const WCHAR line_endings[] = {'\r','\n',0};
WCHAR *p = strpbrkW(line, line_endings);
if (!p)
{
size_t len, count;
len = strlenW(next);
memmove(buf, next, (len + 1) * sizeof(WCHAR));
if (size - len < 3)
{
size *= 2;
buf = heap_xrealloc(buf, size * sizeof(WCHAR));
}
if (!(count = fread(buf + len, sizeof(WCHAR), size - len - 1, fp)))
{
next = NULL;
return buf;
}
buf[len + count] = 0;
next = buf;
line = buf;
continue;
}
next = p + 1;
if (*p == '\r' && *(p + 1) == '\n') next++;
*p = 0;
return line;
}
cleanup:
if (size) heap_free(buf);
size = 0;
return NULL;
}
int reg_import(const WCHAR *filename)
{
FIXME(": operation not yet implemented\n");
FILE *fp;
static const WCHAR rb_mode[] = {'r','b',0};
BYTE s[2];
struct parser parser;
WCHAR *pos;
fp = _wfopen(filename, rb_mode);
if (!fp)
{
output_message(STRING_FILE_NOT_FOUND, filename);
return 1;
}
if (fread(s, sizeof(WCHAR), 1, fp) != 1)
goto error;
parser.is_unicode = (s[0] == 0xff && s[1] == 0xfe);
get_line = parser.is_unicode ? get_lineW : get_lineA;
parser.file = fp;
parser.two_wchars[0] = s[0];
parser.two_wchars[1] = s[1];
parser.reg_version = -1;
parser.hkey = NULL;
parser.key_name = NULL;
parser.data_type = 0;
parser.data = NULL;
parser.data_size = 0;
parser.state = HEADER;
pos = parser.two_wchars;
/* parser main loop */
while (pos)
pos = (parser_funcs[parser.state])(&parser, pos);
if (parser.reg_version == REG_VERSION_INVALID)
goto error;
else if (parser.reg_version == REG_VERSION_40 || parser.reg_version == REG_VERSION_50)
{
FIXME(": operation not yet implemented\n");
goto error;
}
close_key(&parser);
fclose(fp);
return 0;
error:
fclose(fp);
return 1;
}

View File

@ -23,8 +23,6 @@
#include <wine/debug.h>
#include "reg.h"
#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A))
WINE_DEFAULT_DEBUG_CHANNEL(reg);
static const WCHAR short_hklm[] = {'H','K','L','M',0};
@ -79,7 +77,7 @@ type_rels[] =
{REG_MULTI_SZ, type_multi_sz},
};
static void *heap_xalloc(size_t size)
void *heap_xalloc(size_t size)
{
void *buf = HeapAlloc(GetProcessHeap(), 0, size);
if (!buf)
@ -90,7 +88,7 @@ static void *heap_xalloc(size_t size)
return buf;
}
static void *heap_xrealloc(void *buf, size_t size)
void *heap_xrealloc(void *buf, size_t size)
{
void *new_buf;
@ -108,7 +106,7 @@ static void *heap_xrealloc(void *buf, size_t size)
return new_buf;
}
static BOOL heap_free(void *buf)
BOOL heap_free(void *buf)
{
return HeapFree(GetProcessHeap(), 0, buf);
}
@ -153,7 +151,7 @@ static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args)
LocalFree(str);
}
static void __cdecl output_message(unsigned int id, ...)
void __cdecl output_message(unsigned int id, ...)
{
WCHAR fmt[1024];
__ms_va_list va_args;
@ -216,7 +214,7 @@ static inline BOOL path_rootname_cmp(const WCHAR *input_path, const WCHAR *rootk
(input_path[length] == 0 || input_path[length] == '\\'));
}
static HKEY path_get_rootkey(const WCHAR *path)
HKEY path_get_rootkey(const WCHAR *path)
{
DWORD i;

View File

@ -21,6 +21,16 @@
#include "resource.h"
#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A))
/* reg.c */
void *heap_xalloc(size_t size);
void *heap_xrealloc(void *buf, size_t size);
BOOL heap_free(void *buf);
void __cdecl output_message(unsigned int id, ...);
HKEY path_get_rootkey(const WCHAR *path);
/* import.c */
int reg_import(const WCHAR *filename);
#endif /* __REG_H__ */

View File

@ -63,4 +63,6 @@ STRINGTABLE
STRING_FUNC_HELP, "Type \"REG %1 /?\" for help.\n"
STRING_VALUE_NOT_SET, "(value not set)"
STRING_IMPORT_USAGE, "REG IMPORT file.reg\n"
STRING_FILE_NOT_FOUND, "reg: The file '%1' was not found.\n"
STRING_OPEN_KEY_FAILED, "reg: Unable to open the registry key '%1'.\n"
}

View File

@ -53,3 +53,5 @@
#define STRING_FUNC_HELP 130
#define STRING_VALUE_NOT_SET 131
#define STRING_IMPORT_USAGE 132
#define STRING_FILE_NOT_FOUND 133
#define STRING_OPEN_KEY_FAILED 134

View File

@ -847,10 +847,10 @@ static void test_import(void)
"got exit code %d, expected 1\n", r);
test_import_str("REGEDIT", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT4\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
@ -874,19 +874,19 @@ static void test_import(void)
"got exit code %d, expected 1\n", r);
test_import_str("REGEDIT3\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT5\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT9\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT 4\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT4 FOO\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_str("REGEDIT4\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n", &r);
@ -898,7 +898,7 @@ static void test_import(void)
test_import_str("REGEDIT3\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test1\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test1");
test_import_str("regedit4\n\n"
@ -918,31 +918,31 @@ static void test_import(void)
test_import_str("REGEDIT 4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test4\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test4");
test_import_str("REGEDIT4FOO\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test5\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test5");
test_import_str("REGEDIT4 FOO\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test6\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test6");
test_import_str("REGEDIT5\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test7\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test7");
test_import_str("REGEDIT9\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test8\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test8");
test_import_str("Windows Registry Editor Version 4.00\n\n"
@ -2304,10 +2304,10 @@ static void test_unicode_import(void)
"got exit code %d, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT4", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
@ -2335,7 +2335,7 @@ static void test_unicode_import(void)
test_import_wstr("\xef\xbb\xbfREGEDIT3\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test1\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test1");
test_import_wstr("\xef\xbb\xbfregedit4\n\n"
@ -2355,31 +2355,31 @@ static void test_unicode_import(void)
test_import_wstr("\xef\xbb\xbfREGEDIT 4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test4\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test4");
test_import_wstr("\xef\xbb\xbfREGEDIT4FOO\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test5\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test5");
test_import_wstr("\xef\xbb\xbfREGEDIT4 FOO\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test6\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test6");
test_import_wstr("\xef\xbb\xbfREGEDIT5\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test7\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test7");
test_import_wstr("\xef\xbb\xbfREGEDIT9\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
"\"Test8\"=\"Value\"\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg_nonexist(hkey, "Test8");
test_import_wstr("\xef\xbb\xbfREGEDIT4\n"
@ -4074,94 +4074,94 @@ static void test_import_31(void)
/* Test simple value */
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " = Value0\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "Value0", 7, 0);
"HKEY_CLASSES_ROOT\\" KEY_BASE " = Value0\r\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "Value0", 7, 0);
/* Test proper handling of spaces and equals signs */
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " =Value1\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "Value1", 7, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "Value1", 7, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " = Value2\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, " Value2", 8, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, " Value2", 8, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " = Value3 \r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "Value3 ", 8, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "Value3 ", 8, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " Value4\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "Value4", 7, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "Value4", 7, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " Value5\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "Value5", 7, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "Value5", 7, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE "\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "", 1, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "", 1, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " \r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "", 1, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "", 1, 0);
test_import_str("REGEDIT\r\n"
"HKEY_CLASSES_ROOT\\" KEY_BASE " = No newline", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
todo_wine verify_reg(hkey, "", REG_SZ, "No newline", 11, 0);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "No newline", 11, 0);
err = RegDeleteValueW(hkey, NULL);
todo_wine ok(err == ERROR_SUCCESS, "RegDeleteValue failed: %d\n", err);
ok(err == ERROR_SUCCESS, "RegDeleteValue failed: %d\n", err);
/* Test character validity at the start of the line */
test_import_str("REGEDIT\r\n"
" HKEY_CLASSES_ROOT\\" KEY_BASE " = Value1a\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
" HKEY_CLASSES_ROOT\\" KEY_BASE " = Value1b\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
"\tHKEY_CLASSES_ROOT\\" KEY_BASE " = Value1c\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
";HKEY_CLASSES_ROOT\\" KEY_BASE " = Value2a\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
"#HKEY_CLASSES_ROOT\\" KEY_BASE " = Value2b\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
/* Test case sensitivity */
test_import_str("REGEDIT\r\n"
"hkey_classes_root\\" KEY_BASE " = Value3a\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
"hKEY_CLASSES_ROOT\\" KEY_BASE " = Value3b\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n"
"Hkey_Classes_Root\\" KEY_BASE " = Value3c\r\n", &r);
todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg_nonexist(hkey, "");
RegCloseKey(hkey);