78 if (!sec)
return NULL;
91 const char *
p, *var_start =
NULL;
92 int var_len = 0,
len = 0;
93 const char *substitution;
135 memcpy(output, var_start, var_len + 2);
136 output += var_len + 2;
142 int sub_len =
strlen(substitution);
146 memcpy(output, substitution, sub_len);
155 if (output) *output = 0;
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;
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void strip_quotes(WCHAR *word, WCHAR **end)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static VOID del(LPHIST_ENTRY item)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
static LPSTR strdupA(LPCSTR str)
GLboolean GLenum GLenum GLvoid * values
static char * get_next_line(char **str, char **last_chr)
char * inf_section_get_name(struct inf_section *section)
static int expand_variables_buffer(struct inf_file *inf, const char *str, char *output)
BOOL inf_section_next_value(struct inf_section *sec, struct inf_value **value)
char * inf_value_get_value(struct inf_value *value)
char * trim(char *str, char **last_chr, BOOL strip_quotes)
struct inf_section * inf_get_section(struct inf_file *inf, const char *name)
void inf_free(struct inf_file *inf)
BOOL inf_next_section(struct inf_file *inf, struct inf_section **sec)
static HRESULT inf_process_content(struct inf_file *inf)
static const char * get_substitution(struct inf_file *inf, const char *name, int len)
static HRESULT inf_value_parse(struct inf_section *sec, char *line)
static void inf_value_free(struct inf_value *value)
static char * expand_variables(struct inf_file *inf, const char *str)
struct inf_value * inf_get_value(struct inf_section *sec, const char *key)
char * inf_value_get_key(struct inf_value *value)
static void inf_section_free(struct inf_section *section)
static HRESULT inf_section_parse(struct inf_file *inf, char *line, char *last_chr, struct inf_section **section)
HRESULT inf_load(const char *path, struct inf_file **inf_file)
#define memcpy(s1, s2, n)
#define comment(fmt, arg1)
static unsigned __int64 next
static unsigned int file_size
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
struct inf_section * section
#define CONTAINING_RECORD(address, type, field)