Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-09 Thread Christo Crause via fpc-devel
On Tue, Jun 9, 2020 at 3:19 PM wrote: > On 6/9/20 2:55 AM, Christo Crause via fpc-devel wrote: > > for c := 'A' to 'Z" do write(c); > > oops! i failed to note that the above is character by character whereas > what i > spoke of in my previous post is line by line :/ > Indeed, the first modificat

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-09 Thread Christo Crause via fpc-devel
On Tue, Jun 9, 2020 at 10:55 AM Tomas Hajny wrote: > Note that there is an (intended) difference between output to console > and output to files (Do_IsDevice provides this differentiation in > standard RTL). Output to console is supposed to be flushed after every > Write(Ln) statement, because it

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-09 Thread wkitty42
On 6/9/20 2:55 AM, Christo Crause via fpc-devel wrote: for c := 'A' to 'Z" do write(c); oops! i failed to note that the above is character by character whereas what i spoke of in my previous post is line by line :/ -- NOTE: No off-list assistance is given without prior approval. *Pl

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-09 Thread wkitty42
On 6/9/20 2:55 AM, Christo Crause via fpc-devel wrote: I will of course submit a patch once I'm satisfied it is good enough.  My concern with the current patch is that a low level flush is called after every write statement, so a simple loop like the following: for c := 'A' to 'Z" do write(c);

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-09 Thread Tomas Hajny
On 2020-06-09 08:55, Christo Crause via fpc-devel wrote: On Tue, Jun 9, 2020 at 12:03 AM Michael Van Canneyt wrote: Could you please submit a patch with this modification to the bugtracker ? We don't as a rule follow up on such things in github. I will of course submit a patch once I'm s

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Christo Crause via fpc-devel
On Tue, Jun 9, 2020 at 12:03 AM Michael Van Canneyt wrote: > Could you please submit a patch with this modification to the bugtracker ? > > We don't as a rule follow up on such things in github. > I will of course submit a patch once I'm satisfied it is good enough. My concern with the current

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Michael Van Canneyt
On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: Thank you Michael and Jonas for your help and suggestions. I think I ended up merging your suggestions, which does work for my corner case. If anyone is interested this change can be viewed here: https://github.com/ccrause/freepascal/co

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Christo Crause via fpc-devel
Thank you Michael and Jonas for your help and suggestions. I think I ended up merging your suggestions, which does work for my corner case. If anyone is interested this change can be viewed here: https://github.com/ccrause/freepascal/commit/b28ab72ed07f11677493d5d0e37ee451d2313323 I must admit t

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Jonas Maebe
On 07/06/2020 19:16, Christo Crause via fpc-devel wrote: > I want to change the _haltproc for freertos ESP controllers to use > normal write/writeln functionality to send information to standard > output.  On these targets the output is typically buffered serial > provided by the OS.  Text output w

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Michael Van Canneyt
On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: Michael, it is entirely possible that I am misunderstanding your suggestion, I probably don't grasp the complexities of the RTL texmode IO system and also not explaining my intention clearly, for this I apologise. Take for example the esp

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Christo Crause via fpc-devel
Michael, it is entirely possible that I am misunderstanding your suggestion, I probably don't grasp the complexities of the RTL texmode IO system and also not explaining my intention clearly, for this I apologise. Take for example the esp32 unit provided by Florian, here the link between the underl

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Michael Van Canneyt
On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: On Mon, Jun 8, 2020 at 12:15 PM Tomas Hajny wrote: On 2020-06-08 11:39, Michael Van Canneyt wrote: On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: . . Thanks for your response Michael. Using InOutFunc to also flush the

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Christo Crause via fpc-devel
On Mon, Jun 8, 2020 at 12:15 PM Tomas Hajny wrote: > On 2020-06-08 11:39, Michael Van Canneyt wrote: > > On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: > . > . > >> Thanks for your response Michael. Using InOutFunc to also flush the > >> output > >> buffer will work, but that seems

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Michael Van Canneyt
On Mon, 8 Jun 2020, Tomas Hajny wrote: On 2020-06-08 11:39, Michael Van Canneyt wrote: On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: . . Thanks for your response Michael. Using InOutFunc to also flush the output buffer will work, but that seems inefficient, since the flush need

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Tomas Hajny
On 2020-06-08 11:39, Michael Van Canneyt wrote: On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: . . Thanks for your response Michael. Using InOutFunc to also flush the output buffer will work, but that seems inefficient, since the flush needs to wait until the transmit buffer is em

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Michael Van Canneyt
On Mon, 8 Jun 2020, Christo Crause via fpc-devel wrote: On Sun, Jun 7, 2020 at 11:54 PM Michael Van Canneyt wrote: On Sun, 7 Jun 2020, Christo Crause via fpc-devel wrote: I want to change the _haltproc for freertos ESP controllers to use normal write/writeln functionality to send informa

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-08 Thread Christo Crause via fpc-devel
On Sun, Jun 7, 2020 at 11:54 PM Michael Van Canneyt wrote: > > On Sun, 7 Jun 2020, Christo Crause via fpc-devel wrote: > > > I want to change the _haltproc for freertos ESP controllers to use normal > > write/writeln functionality to send information to standard output. On > > these targets the

Re: [fpc-devel] ConsoleIO and flushing buffered output

2020-06-07 Thread Michael Van Canneyt
On Sun, 7 Jun 2020, Christo Crause via fpc-devel wrote: I want to change the _haltproc for freertos ESP controllers to use normal write/writeln functionality to send information to standard output. On these targets the output is typically buffered serial provided by the OS. Text output writte

[fpc-devel] ConsoleIO and flushing buffered output

2020-06-07 Thread Christo Crause via fpc-devel
I want to change the _haltproc for freertos ESP controllers to use normal write/writeln functionality to send information to standard output. On these targets the output is typically buffered serial provided by the OS. Text output written just prior to setting the cpu to sleep doesn't get sent, he