mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 04:21:19 +00:00
Reordered this code somewhat
This commit is contained in:
parent
e7b73e179a
commit
53f3199652
@ -326,11 +326,11 @@ static void add_sub_conf(config_file_t *conf, char *path, config_file_cb_t *cb)
|
||||
static bool parse_line(config_file_t *conf,
|
||||
struct config_entry_list *list, char *line, config_file_cb_t *cb)
|
||||
{
|
||||
char *key = NULL;
|
||||
char *key_tmp = NULL;
|
||||
size_t cur_size = 8;
|
||||
size_t idx = 0;
|
||||
char *comment = NULL;
|
||||
char *key = NULL;
|
||||
char *key_tmp = NULL;
|
||||
|
||||
/* Ignore empty lines */
|
||||
if (string_is_empty(line))
|
||||
@ -341,12 +341,17 @@ static bool parse_line(config_file_t *conf,
|
||||
|
||||
if (comment)
|
||||
{
|
||||
char *path = NULL;
|
||||
char *include_line = NULL;
|
||||
|
||||
/* Starting a line with '#include' appends a
|
||||
* sub-config file */
|
||||
if (string_starts_with(comment, "include "))
|
||||
{
|
||||
char *include_line = comment + STRLEN_CONST("include ");
|
||||
char *path = NULL;
|
||||
|
||||
/* All other comment lines are ignored */
|
||||
if (!string_starts_with(comment, "include "))
|
||||
return false;
|
||||
|
||||
include_line = comment + STRLEN_CONST("include ");
|
||||
|
||||
if (string_is_empty(include_line))
|
||||
return false;
|
||||
@ -373,10 +378,6 @@ static bool parse_line(config_file_t *conf,
|
||||
free(path);
|
||||
return true;
|
||||
}
|
||||
/* All other comment lines are ignored */
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Skips to first character. */
|
||||
while (isspace((int)*line))
|
||||
|
Loading…
x
Reference in New Issue
Block a user