Re: [Toybox] [PATCH] xputs: Do flush

2024-05-22 Thread Rob Landley
On 5/20/24 08:32, Yi-Yo Chiang wrote: > Thanks! Adding TOYFLAG_NOBUF worked. > > I feel the same way about "manual flushing of the output buffer is a terrible > interface". I asked myself the question "Why am I manually flushing so much? > There must be a better way..." multiple times when I

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-22 Thread Rob Landley
On 5/20/24 07:36, enh wrote: >> Adding flushing to xputs() is an Elliott question is because he's the one who >> can presumably keep stdio buffer semantics in his head. They make zero sense >> to >> me. I added a flush to xputsn() because in line buffering mode it was the >> "dangerous" one that

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-20 Thread Yi-Yo Chiang via Toybox
Thanks! Adding TOYFLAG_NOBUF worked. I feel the same way about "manual flushing of the output buffer is a terrible interface". I asked myself the question "Why am I manually flushing so much? There must be a better way..." multiple times when I wrote the other patch that does s/xprintf/dprintf/,

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-20 Thread enh via Toybox
On Sun, May 19, 2024 at 10:56 PM Rob Landley wrote: > > On 5/18/24 21:53, Yi-Yo Chiang wrote: > > What I wanted to address with this patch are: > > > > 1. Fix this line of > > xputs() > > https://github.com/landley/toybox/blob/master/toys/net/microcom.c#L113 > > The prompt text is not flushed

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-19 Thread Rob Landley
On 5/18/24 21:53, Yi-Yo Chiang wrote: > What I wanted to address with this patch are: > > 1. Fix this line of > xputs() https://github.com/landley/toybox/blob/master/toys/net/microcom.c#L113 > The prompt text is not flushed immediately, so it is not shown to the user > until > the escape char is

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-18 Thread Yi-Yo Chiang via Toybox
What I wanted to address with this patch are: 1. Fix this line of xputs() https://github.com/landley/toybox/blob/master/toys/net/microcom.c#L113 The prompt text is not flushed immediately, so it is not shown to the user until the escape char is entered (which defeats the purpose of the prompt,

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-18 Thread Rob Landley
On 5/16/24 06:46, Yi-Yo Chiang via Toybox wrote: > The comment string claims xputs() to write, flush and check error. > However the 'flush' operation is actually missing due to 3e0e8c6 > changing the default buffering mode from 'line' to 'block'. That's sort of an Elliott question? Originally,

[Toybox] [PATCH] xputs: Do flush

2024-05-16 Thread Yi-Yo Chiang via Toybox
The comment string claims xputs() to write, flush and check error. However the 'flush' operation is actually missing due to 3e0e8c6 changing the default buffering mode from 'line' to 'block'. From 861e020ceb5971ba202fbd75ad2669c9e5e94dad Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Thu, 16