]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - opts.c
Refactor some util/platform usage and extend file system file interface to accept...
[xonotic/gmqcc.git] / opts.c
diff --git a/opts.c b/opts.c
index 6c30225324dab1d83c67d072f83254e30959f073..1d8fd73597d6f4ae0d2861347e6422f466bc9891 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -25,7 +25,6 @@
 #include <stdlib.h>
 
 #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)