X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=opts.c;h=1d8fd73597d6f4ae0d2861347e6422f466bc9891;hp=6c30225324dab1d83c67d072f83254e30959f073;hb=87d9371a5c08f5b05ba70b11c63df80960b40831;hpb=e9bde1e4e4cd790da6b0ee464cda61cce5a327b8 diff --git a/opts.c b/opts.c index 6c30225..1d8fd73 100644 --- a/opts.c +++ b/opts.c @@ -25,7 +25,6 @@ #include #include "gmqcc.h" -#include "platform.h" const unsigned int opts_opt_oflag[COUNT_OPTIMIZATIONS+1] = { # define GMQCC_TYPE_OPTIMIZATIONS @@ -231,7 +230,7 @@ static size_t opts_ini_parse ( char *read_name; char *read_value; - while (fs_file_getline(&line, &linesize, filehandle) != EOF) { + while (fs_file_getline(&line, &linesize, filehandle) != FS_FILE_EOF) { parse_beg = line; /* handle BOM */ @@ -252,7 +251,7 @@ static size_t opts_ini_parse ( /* section found */ if (*(parse_end = opts_ini_next(parse_beg + 1, ']')) == ']') { * parse_end = '\0'; /* terminate bro */ - platform_strncpy(section_data, parse_beg + 1, sizeof(section_data)); + util_strncpy(section_data, parse_beg + 1, sizeof(section_data)); section_data[sizeof(section_data) - 1] = '\0'; *oldname_data = '\0'; } else if (!error) { @@ -273,7 +272,7 @@ static size_t opts_ini_parse ( opts_ini_rstrip(read_value); /* valid name value pair, lets call down to handler */ - platform_strncpy(oldname_data, read_name, sizeof(oldname_data)); + util_strncpy(oldname_data, read_name, sizeof(oldname_data)); oldname_data[sizeof(oldname_data) - 1] ='\0'; if ((*errorhandle = loadhandle(section_data, read_name, read_value)) && !error)