bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Two input-related bugs (and their solution)


From: Elias Mårtenson
Subject: [Bug-apl] Two input-related bugs (and their solution)
Date: Mon, 2 Dec 2013 23:13:04 +0800

When working on the interactive APL mode for Emacs I had some very strange problems with the way thr prompt worked. On the Mac, I never got any prompt in the first place, and on Linux I had comint hanging when reading the prompt in the Nabla-editor.

I started looking at how GNU APL handles prompts and I found the problem.

First problem:

In no_readline(), the prompt is written to the wrong stream. It's sent to CINm which is an input stream and naturally is not able to handle input, so it's ignored. This is why the prompt disappeared when running without readline.

Second problem:

In the Nabla editor (get_user_line_1()) and the function below, get_quad_cr_line(), the prompt is displayed by sending it to the input buffer using rt_stuff_char(). I must admit I don't fully understand why that is done, as the prompt should be passed as an argument to the readline() function. If I instead pass the prompt as an argument, all behaves as expected.

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]