lpac/driver/http
Coelacanthus 8f43334888
refactor: always use \n for newline and make fuart unbuffered (#201)
* refactor: revert println refactor

This reverts commit ae3a87803c.
This reverts commit 37ec17eeab.

* fix(apdu/at): make fuart unbuffered

related #167

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>

* refactor: always use \n for newline

> C89 Standard section 5.2.2 Character display semantics
> \n (new line) Moves the active position to the initial position of the next line.

'\n' in C have including meaning of both '\r' and '\n' on Windows, and
libc SHALL translate them when do input and output. If not, it SHALL be
a bug of libc.

FYI, all mingw64 toolchain code use '\n' directly, so it's impossible to
be caused by '\n', otherwise mingw64 itself will broken. Mingw64 also
set _fmode to _O_TEXT by default.[1] So as MSVC documents said[2], it
should do translate between LF and CRLF.

[1]: https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-crt/crt/txtmode.c
[2]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>

---------

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>
2025-03-03 06:19:32 +08:00
..
curl.c refactor: always use \n for newline and make fuart unbuffered (#201) 2025-03-03 06:19:32 +08:00
curl.h driver: refactor namespace and init logic 2024-03-21 23:33:51 +08:00
stdio.c refactor: always use \n for newline and make fuart unbuffered (#201) 2025-03-03 06:19:32 +08:00
stdio.h driver: refactor namespace and init logic 2024-03-21 23:33:51 +08:00