160 while (*
str ==
' ' || *
str ==
'\t')
str++;
172 while (*
p ==
' ' || *
p ==
'\t')
p++;
173 if (*
p && *
p !=
';')
goto error;
210 if (wc > 0xff)
return FALSE;
212 if (
s ==
end && wc == 0)
214 while (*
end ==
' ' || *
end ==
'\t')
end++;
221 else if (*
end ==
';')
231 while (*
end ==
' ' || *
end ==
'\t')
end++;
254 static const WCHAR hex[] = {
'h',
'e',
'x',
':'};
255 static const WCHAR dword[] = {
'd',
'w',
'o',
'r',
'd',
':'};
256 static const WCHAR hexp[] = {
'h',
'e',
'x',
'('};
258 static const struct data_type data_types[] = {
267 const struct data_type *
ptr;
313 for (str_idx = 0; str_idx <
len; str_idx++, val_idx++)
315 if (
str[str_idx] ==
'\\')
318 switch (
str[str_idx])
331 str[val_idx] =
str[str_idx];
336 str[val_idx] =
str[str_idx];
340 else if (
str[str_idx] ==
'"')
343 str[val_idx] =
str[str_idx];
346 ret = (
str[str_idx] ==
'"');
347 *unparsed =
str + str_idx + 1;
357 if (*key_path) (*key_path)++;
452 static const WCHAR header_31[] = {
'R',
'E',
'G',
'E',
'D',
'I',
'T',0};
453 static const WCHAR header_40[] = {
'R',
'E',
'G',
'E',
'D',
'I',
'T',
'4',0};
454 static const WCHAR header_50[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
455 'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
' ',
'E',
'd',
'i',
't',
'o',
'r',
' ',
456 'V',
'e',
'r',
's',
'i',
'o',
'n',
' ',
'5',
'.',
'0',
'0',0};
458 while (*
s ==
' ' || *
s ==
'\t')
s++;
520 static WCHAR hkcr[] = {
'H',
'K',
'E',
'Y',
'_',
'C',
'L',
'A',
'S',
'S',
'E',
'S',
'_',
'R',
'O',
'O',
'T'};
521 unsigned int key_end = 0;
592 if (*
p ==
' ' || *
p ==
'\t' || !(key_end =
wcsrchr(
p,
']')))
617 if (*
p ==
'H' || *
p ==
'h')
671 while (*
p ==
' ' || *
p ==
'\t')
p++;
674 while (*
p ==
' ' || *
p ==
'\t')
p++;
678 while (
len > 0 && (
p[
len - 1] ==
' ' ||
p[
len - 1] ==
'\t'))
len--;
697 while (*
p ==
' ' || *
p ==
'\t')
p++;
698 if (*
p && *
p !=
';')
goto done;
815 while (*
p ==
' ' || *
p ==
'\t')
p++;
878 #define REG_VAL_BUF_SIZE 4096 925 if (*
p ==
'\r' && *(
p + 1) ==
'\n')
next++;
957 static const WCHAR line_endings[] = {
'\r',
'\n',0};
980 if (*
p ==
'\r' && *(
p + 1) ==
'\n')
next++;
994 static const WCHAR rb_mode[] = {
'r',
'b',0};
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static WCHAR * quoted_value_name_state(struct parser *parser, WCHAR *pos)
#define ERROR_INVALID_PARAMETER
static WCHAR * parse_win31_line_state(struct parser *parser, WCHAR *pos)
static const WCHAR invalid[]
static WCHAR * eol_backslash_state(struct parser *parser, WCHAR *pos)
#define memmove(s1, s2, n)
static WCHAR * get_lineA(FILE *fp)
static WCHAR * set_value_state(struct parser *parser, WCHAR *pos)
static void close_key(struct parser *parser)
static WCHAR * GetWideStringN(const char *strA, int size, DWORD *len)
ACPI_SIZE strlen(const char *String)
char * strpbrk(const char *String, const char *Delimiters)
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
static HKEY parse_key_name(WCHAR *key_name, WCHAR **key_path)
GLsizei const GLchar ** path
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
static WCHAR * header_state(struct parser *parser, WCHAR *pos)
WINE_DEFAULT_DEBUG_CHANNEL(reg)
void WINAPIV output_message(unsigned int id,...)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
static WCHAR * GetWideString(const char *strA)
static const char hex[16]
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
static void prepare_hex_string_data(struct parser *parser)
GLenum GLuint GLenum GLsizei const GLchar * buf
LONG WINAPI RegCloseKey(HKEY hKey)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
static enum parser_state set_state(struct parser *parser, enum parser_state state)
REFIID LPVOID DWORD_PTR dw
static WCHAR * unknown_data_state(struct parser *parser, WCHAR *pos)
static HRESULT set_value(struct d3dx_parameter *param, const void *data, unsigned int bytes, void *dst_data)
static WCHAR * key_name_state(struct parser *parser, WCHAR *pos)
#define REG_OPTION_NON_VOLATILE
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
static WCHAR * line_start_state(struct parser *parser, WCHAR *pos)
static WCHAR * data_type_state(struct parser *parser, WCHAR *pos)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
static WCHAR * delete_value_state(struct parser *parser, WCHAR *pos)
#define STRING_FILE_NOT_FOUND
int parse_type(Type t, const vector< string > &tokens, int off, vector< string > &names, vector< string > &dependencies)
static WCHAR * get_lineW(FILE *fp)
int reg_import(const WCHAR *filename)
GLsizei const GLfloat * value
void * heap_xrealloc(void *buf, size_t size)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define STRING_OPEN_KEY_FAILED
static BOOL convert_hex_to_dword(WCHAR *str, DWORD *dw)
static BOOL parse_data_type(struct parser *parser, WCHAR **line)
#define STRING_ESCAPE_SEQUENCE
static WCHAR *(* get_line)(FILE *)
LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
static BOOL unescape_string(WCHAR *str, WCHAR **unparsed)
static unsigned __int64 next
static WCHAR * string_data_state(struct parser *parser, WCHAR *pos)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcspbrk(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control)
#define MultiByteToWideChar
static WCHAR * dword_data_state(struct parser *parser, WCHAR *pos)
HKEY path_get_rootkey(const WCHAR *path)
static LONG open_key(struct parser *parser, WCHAR *path)
static WCHAR * delete_key_state(struct parser *parser, WCHAR *pos)
static WCHAR * data_start_state(struct parser *parser, WCHAR *pos)
static const parser_state_func parser_funcs[NB_PARSER_STATES]
static enum reg_versions parse_file_header(const WCHAR *s)
char * cleanup(char *str)
void * heap_xalloc(size_t size)
static WCHAR * hex_multiline_state(struct parser *parser, WCHAR *pos)
GLuint GLuint GLsizei GLenum type
static BOOL convert_hex_csv_to_hex(struct parser *parser, WCHAR **str)
static WCHAR * hex_data_state(struct parser *parser, WCHAR *pos)
static WCHAR * default_value_name_state(struct parser *parser, WCHAR *pos)
static void free_parser_data(struct parser *parser)
WCHAR *(* parser_state_func)(struct parser *parser, WCHAR *pos)
static BOOL heap_free(void *mem)