28 #include "wine/list.h" 78 if (!sec)
return NULL;
91 const char *
p, *var_start =
NULL;
92 int var_len = 0,
len = 0;
93 const char *substitution;
142 int sub_len =
strlen(substitution);
187 struct list *next_entry, *cur_position;
190 cur_position = &(*sec)->entry;
195 if (!next_entry)
return FALSE;
221 struct list *next_entry, *cur_position;
224 cur_position = &(*value)->entry;
226 cur_position = &sec->
values;
229 if (!next_entry)
return FALSE;
264 if (*
str !=
'\t' && *
str !=
' ')
270 if (last_chr) *last_chr =
str;
285 if (*
last ==
'"' && *
str ==
'"')
292 if (last_chr) *last_chr =
last;
311 else if (in_next_line)
341 if (*last_chr !=
']')
348 sec = heap_alloc_zero(
sizeof(*sec));
376 key_val = heap_alloc_zero(
sizeof(*key_val));
391 char *
line, *last_chr;
416 inf = heap_alloc_zero(
sizeof(*inf));
417 if (!inf)
goto error;
static void inf_section_free(struct inf_section *section)
static UCHAR ULONG UCHAR ULONG UCHAR * output
struct inf_value * inf_get_value(struct inf_section *sec, const char *key)
static char * get_next_line(char **str, char **last_chr)
ACPI_SIZE strlen(const char *String)
static HRESULT inf_section_parse(struct inf_file *inf, char *line, char *last_chr, struct inf_section **section)
GLboolean GLenum GLenum GLvoid * values
#define INVALID_HANDLE_VALUE
static HRESULT inf_value_parse(struct inf_section *sec, char *line)
char * inf_value_get_value(struct inf_value *value)
#define comment(fmt, arg1)
static void * heap_alloc(size_t len)
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
char * inf_section_get_name(struct inf_section *section)
struct inf_section * inf_get_section(struct inf_file *inf, const char *name)
void inf_free(struct inf_file *inf)
static int expand_variables_buffer(struct inf_file *inf, const char *str, char *output)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
BOOL inf_next_section(struct inf_file *inf, struct inf_section **sec)
static void inf_value_free(struct inf_value *value)
#define FILE_ATTRIBUTE_NORMAL
HRESULT inf_load(const char *path, struct inf_file **inf_file)
#define memcpy(s1, s2, n)
static HRESULT inf_process_content(struct inf_file *inf)
GLsizei const GLfloat * value
static VOID del(LPHIST_ENTRY item)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
BOOL inf_section_next_value(struct inf_section *sec, struct inf_value **value)
static const char * get_substitution(struct inf_file *inf, const char *name, int len)
static char * expand_variables(struct inf_file *inf, const char *str)
#define ReadFile(a, b, c, d, e)
char * strchr(const char *String, int ch)
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
char * inf_value_get_key(struct inf_value *value)
static void strip_quotes(WCHAR *word, WCHAR **end)
#define CreateFileA(a, b, c, d, e, f, g)
char * trim(char *str, char **last_chr, BOOL strip_quotes)
static LPSTR strdupA(LPCSTR str)
struct inf_section * section
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
static BOOL heap_free(void *mem)
GLuint const GLchar * name