aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2024-04-06 17:36:24 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2024-04-06 23:56:58 +0300
commit758a72f55360a1f3a5400aeca29bc2ea0647bad1 (patch)
tree9b49a9c30dc1ac476ddb8d19955a476ba0a60540 /init
parent2b8bc1b4760d8ecb4fdcdd79923d29d0ab20b908 (diff)
downloadbusybox-w32-758a72f55360a1f3a5400aeca29bc2ea0647bad1.tar.gz
busybox-w32-758a72f55360a1f3a5400aeca29bc2ea0647bad1.tar.bz2
busybox-w32-758a72f55360a1f3a5400aeca29bc2ea0647bad1.zip
win32: ascii-optimize winansi_fputc, winansi_putchar
Other winansi IO wrappers, like winansi_fputs, optimize by calling the libc API directly if no special handling is needed, e.g. if the input is fully ASCII and without escape sequences - without converting the output codepage or interpreting escapes. Now the fputc and putchar wrappers do that as well. And as a simplification, putchar is now also a wrapper of fputc. Other than possibly minor speedup, this can also help buffered streams remain buffered, because the codepage conversion using writeCon_utf8 is unbuffered and first flushes the stream, so by avoiding the conversion and calling the libc API directly, we also avoid premature flush of a buffered stream. This did happen, as "time" is buffered since commit 54dbf0fa5, so previously it was flushed early when using putchar, while now it remains buffered by default (but can still be flushed early if the -f format string contains non-ASCII chars).
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions