bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Yet another editor thingy.


From: Juergen Sauermann
Subject: Re: [Bug-apl] Yet another editor thingy.
Date: Mon, 30 Jul 2018 16:52:47 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Hi Chris,

thanks, done in SVN 1060.

/// Jürgen


On 07/30/2018 03:59 PM, Chris Moller wrote:

Here's an even simpler, more direct, patch:

Index: LineInput.cc
===================================================================
--- LineInput.cc        (revision 1054)
+++ LineInput.cc        (working copy)
@@ -966,6 +966,11 @@
 const int b0 = fgetc(stdin);
    if (b0 == EOF)
       {
+       if (errno == EINTR) {
+         clearerr (stdin);
+         CIN.unsetf( std::ios_base::unitbuf );
+         goto again;
+       }
        if (got_WINCH)
           {
             got_WINCH = false;


On 29/07/18 22:00, Chris Moller wrote:

Ultimately, that's exactly what happens, but "goto again;" didn't work

Though I just thought of something I'll try in the morning...


On 29/07/18 21:19, Xiao-Yong Jin wrote:
EINTR could happen in many situations.
The usual resolution for EINTR is to retry whatever system call that failed because of EINTR.
Here, we should call fgetc again.

Best,
Xiao-Yong


On Jul 29, 2018, at 4:10 PM, Chris Moller <address@hidden> wrote:

Hi, Jürgen,

So far as I  can tell, after all the testing I can throw at it, my editor interface function is ready for the world.  Unfortunately, it needs a small patch to APL itself:




reply via email to

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