Hi Jürgen:
Well please help me properly understand the no_readline function in Input.cc.
Because it's called instead of the readline library because of the --rawCIN.
I've made comments of my interpretation of the code but am probably wrong.
So I'd appreciate any contribution to my very rusty C++.

no_readline(const UCS_string * prompt)
{
   if (prompt)                  // points at 6 spaces x'20'
      {
        CIN << '\r' << *prompt << flush;        // CIN is an ostream see 
Output.cc
        UTF8_string prompt_utf(*prompt);
        loop(p, prompt_utf.size())      // ungets those spaces from stdin
           {
             const int cc = prompt_utf[prompt_utf.size() - p - 1];
             ungetc(cc & 0xFF, stdin);
           }
      }
etc

Much appreciated and

respect…

Peter

On 2014-05-31, at 11:13 AM, Juergen Sauermann <[email protected]> 
wrote:
> Hi Peter,
> 
> looks OK to me. (Note: as of recently apl -s does the same as your command 
> line options).
> 
> --rawCIN reads directly from the file (stdin in this case) without outputting 
> any prompts.
> The line numbers in the ∇-editor count as prompts and are therefore 
> suppressed as well.
> 
> However when you display the function with [⎕] then the line numbers are not 
> prompts
> but output of the editor.
> 
> /// Jürgen

Reply via email to