Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0898bd22
Commit
0898bd22
authored
Feb 19, 2015
by
Jonathan Vollebregt
Committed by
Alexandre Julliard
Feb 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Add wchar/type conversion functions.
parent
513505d6
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
292 additions
and
23 deletions
+292
-23
ar.po
po/ar.po
+6
-0
bg.po
po/bg.po
+4
-0
ca.po
po/ca.po
+6
-0
cs.po
po/cs.po
+6
-0
da.po
po/da.po
+6
-0
de.po
po/de.po
+6
-0
el.po
po/el.po
+5
-0
en.po
po/en.po
+4
-0
en_US.po
po/en_US.po
+4
-0
eo.po
po/eo.po
+4
-0
es.po
po/es.po
+6
-0
fa.po
po/fa.po
+4
-0
fi.po
po/fi.po
+6
-0
fr.po
po/fr.po
+6
-0
he.po
po/he.po
+6
-0
hi.po
po/hi.po
+4
-0
hr.po
po/hr.po
+6
-0
hu.po
po/hu.po
+6
-0
it.po
po/it.po
+6
-0
ja.po
po/ja.po
+6
-0
ko.po
po/ko.po
+6
-0
lt.po
po/lt.po
+6
-0
ml.po
po/ml.po
+4
-0
nb_NO.po
po/nb_NO.po
+6
-0
nl.po
po/nl.po
+6
-0
or.po
po/or.po
+4
-0
pa.po
po/pa.po
+4
-0
pl.po
po/pl.po
+6
-0
pt_BR.po
po/pt_BR.po
+6
-0
pt_PT.po
po/pt_PT.po
+6
-0
rm.po
po/rm.po
+4
-0
ro.po
po/ro.po
+6
-0
ru.po
po/ru.po
+6
-0
sk.po
po/sk.po
+6
-0
sl.po
po/sl.po
+6
-0
sr_RS@cyrillic.po
po/sr_RS@cyrillic.po
+7
-0
sr_RS@latin.po
po/sr_RS@latin.po
+7
-0
sv.po
po/sv.po
+6
-0
te.po
po/te.po
+4
-0
th.po
po/th.po
+4
-0
tr.po
po/tr.po
+6
-0
uk.po
po/uk.po
+6
-0
wa.po
po/wa.po
+4
-0
wine.pot
po/wine.pot
+4
-0
zh_CN.po
po/zh_CN.po
+6
-0
zh_TW.po
po/zh_TW.po
+6
-0
reg.c
programs/reg/reg.c
+41
-23
reg.h
programs/reg/reg.h
+1
-0
reg.rc
programs/reg/reg.rc
+1
-0
No files found.
po/ar.po
View file @
0898bd22
...
...
@@ -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 "ال&سجل"
...
...
po/bg.po
View file @
0898bd22
...
...
@@ -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 "&Регистър"
...
...
po/ca.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/cs.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/da.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/de.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/el.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/en.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/en_US.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/eo.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/es.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/fa.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/fi.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/fr.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/he.po
View file @
0898bd22
...
...
@@ -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 "&רישום המערכת"
...
...
po/hi.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/hr.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/hu.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/it.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/ja.po
View file @
0898bd22
...
...
@@ -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)"
...
...
po/ko.po
View file @
0898bd22
...
...
@@ -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)"
...
...
po/lt.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/ml.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/nb_NO.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/nl.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/or.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/pa.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/pl.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/pt_BR.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/pt_PT.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/rm.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/ro.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/ru.po
View file @
0898bd22
...
...
@@ -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 "&Реестр"
...
...
po/sk.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/sl.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/sr_RS@cyrillic.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/sr_RS@latin.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/sv.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/te.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/th.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/tr.po
View file @
0898bd22
...
...
@@ -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"
...
...
po/uk.po
View file @
0898bd22
...
...
@@ -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 "&Реєстр"
...
...
po/wa.po
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/wine.pot
View file @
0898bd22
...
...
@@ -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 ""
...
...
po/zh_CN.po
View file @
0898bd22
...
...
@@ -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)"
...
...
po/zh_TW.po
View file @
0898bd22
...
...
@@ -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)"
...
...
programs/reg/reg.c
View file @
0898bd22
...
...
@@ -20,6 +20,34 @@
#include <wine/unicode.h>
#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
typ
e
)
static
DWORD
wchar_get_type
(
const
WCHAR
*
type_nam
e
)
{
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
};
if
(
!
type
)
DWORD
i
;
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_reg
type
(
type
);
if
(
reg_type
==
-
1
)
reg_type
=
wchar_get_
type
(
type
);
if
(
reg_type
==
~
0u
)
{
RegCloseKey
(
subkey
);
reg_message
(
STRING_
INVALID_CMDLIN
E
);
reg_message
(
STRING_
UNSUPPORTED_TYP
E
);
return
1
;
}
...
...
programs/reg/reg.h
View file @
0898bd22
...
...
@@ -30,3 +30,4 @@
#define STRING_INVALID_CMDLINE 107
#define STRING_NO_REMOTE 108
#define STRING_CANNOT_FIND 109
#define STRING_UNSUPPORTED_TYPE 110
programs/reg/reg.rc
View file @
0898bd22
...
...
@@ -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"
}
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