I have my implementation _open(), _close(), _write(), _read().
My code is:
FILE *f = fopen("0:test", "wb"); // calls _open()
fwrite("hello ", 6, 1, f);
fwrite("world\r\n\0", 8, 1, f); // calls _write(3, "hello world\r\n", 13)
fflush(f); // calls _write(3, "\0", 1)
fclose(f); // calls _close(3)
BUFSIZE is 1024
Compiler: arm-none-eabi-gcc/ Version:5.4.1
Why does it fwrite()interpret '\n', although I have flags "wb"?
Does fopen()the file name use "0:test"?
source
share