#include <string.h>
butstring.h
in Teeworlds code, use functions from system.h
insteadstr_comp
replaces strcmp
, memset(x, 0, y)
is replaced by mem_zero(x, y)
system.c
you don't (edited)system.cpp
io_write
ing what's in buf1io_write
ing the stuffio_write
ing the contents into the filebuffer_len
e.g.if(abc) {
return 1;
} else {
foobar();
}
#########
W R
(edited)io_write
ing from R
to W
io_write
with the old buffermalloc
failure isn't really a thing thereio_write
ing right?io_write
was using the old_buffer
how do you sync up the read_pos
and write_pos
to the new buffer? You also don't seem to check the return of io_write
is it right to assume the entire buffer was written?read_pos
and write_pos
to the new buffer by just setting read_pos
to 0read_pos
after it is donefwrite
always writes the full number of bytesaio
structure should only be freed after both exitedasync_new