On Sun, 27 Nov 2016, Adriaan van Os wrote:
Dmitry Boyarintsev wrote:
I'd think you want something simlar on unix.
Take a look at man 4 termios
specifically at local flag named "ECHO".
you want to disable it via tcsetattr() Â (TermIO unit)
Thanks for the hint. I haven't yet tried it, but I would expect it to
fail,as stty (see stty.c in GNU coreutils) calls tcsetattr and stty fails
reporting 'stty: stdin isn't a terminal' .
No, it was my own fault. I were executing '/bin/stty -echo' with
AssignStreams and then StdIn is indeed not a terminal, but a pipe. When I
execute it normally, then stty does work, so I expect tcsetattr to work too.
So, we can now use Readln without echoing in Terminal.app. There is still
echoing to the Xcode Console window, but let's assume that is a bug or
limitation of Xcode.
Maybe something to add to the fpc runtime libs ?
If you mean in a cross-platform way, I think we would welcome patches :)
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal