title: Does fwrite flush the buffer on '\n'?
body: <p>I have my own implementation of <code>_open()</code>, <code>_close()</code>, <code>_write()</code>, <code>_read()</code>.</p>
  
  <p>My code:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p><code>BUFSIZE</code> is 1024</p>
  
  <p>Compiler: <code>arm-none-eabi-gcc</code>/ Version: <code>5.4.1</code></p>
  
  <p>Why does <code>fwrite()</code> interpret <code>'\n'</code> even though I have the flags <code>"wb"</code>?</p>
  
  <p>Does <code>fopen()</code> interpret the filename <code>"0:test"</code>?</p>