mod_file does not compile
Current mod_file is not compiling. Last changes broke it. Please, have a look whenever you will :)
[21/81] Building C object modules/mod_file/mod_file.c.obj
FAILED: modules/mod_file/mod_file.c.obj
pxtrtm\CMakeFiles\pxtrtm.dir\D_\msys64\home\panreyes\proyectos\pixtudio-panreyes\modules\mod_file\mod_file.c.obj.d -o modules/mod_file/mod_file.c.obj -c modules/mod_file/mod_file.c
modules/mod_file/mod_file.c: In function 'modfile_fopen':
modules/mod_file/mod_file.c:129:8: error: incompatible types when assigning to type 'file {aka struct <anonymous>}' from type 'file * {aka struct <anonymous> *}'
fd = file_open(string_get(params[0]), ops[params[1]]);
^
modules/mod_file/mod_file.c:131:8: error: wrong type argument to unary exclamation mark
if(!fd) {
^
In file included from modules/mod_file/mod_file.c:42:0:
3rdparty/stb/stretchy_buffer.h:176:75: error: incompatible types when assigning to type 'file * {aka struct <anonymous> *}' from type 'file {aka struct <anonymous>}'
#define stb_sb_push(a,v) (stb__sbmaybegrow(a,1), (a)[stb__sbn(a)++] = (v))
^
3rdparty/stb/stretchy_buffer.h:169:19: note: in expansion of macro 'stb_sb_push'
#define sb_push stb_sb_push
^~~~~~~~~~~
modules/mod_file/mod_file.c:139:9: note: in expansion of macro 'sb_push'
sb_push(loaded_files, fd);
^~~~~~~
modules/mod_file/mod_file.c:142:30: error: incompatible types when assigning to type 'file * {aka struct <anonymous> *}' from type 'file {aka struct <anonymous>}'
loaded_files[id - 1] = fd;
^
modules/mod_file/mod_file.c: In function 'modfile_feof':
modules/mod_file/mod_file.c:303:48: error: expected ')' before 's'
return file_eof(loaded_files[params[0]]s);
^
modules/mod_file/mod_file.c: In function 'mod_file_module_finalize':
modules/mod_file/mod_file.c:350:5: error: 'n' undeclared (first use in this function)
n = sb_count(loaded_files);
^
modules/mod_file/mod_file.c:350:5: note: each undeclared identifier is reported only once for each function it appears in
modules/mod_file/mod_file.c:351:10: error: 'i' undeclared (first use in this function)
for (i = 0; i < n; i++) {
^
Edited by Pablo A. Navarro Reyes