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: Chris Moller
Subject: Re: [Bug-apl] Yet another editor thingy.
Date: Fri, 10 Aug 2018 09:35:23 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

I'm not sure how much the reversion would revert.  If it was the patch I sent you on 2 August:

Index: LineInput.cc
===================================================================
--- LineInput.cc        (revision 1060)
+++ LineInput.cc        (working copy)
@@ -968,9 +968,10 @@
       {
         if (errno == EINTR)
            {
-             clearerr(stdin);
-             CIN.unsetf(ios_base::unitbuf);
-             goto again;
+            clearerr (stdin);
+            CIN.unsetf( std::ios_base::unitbuf );
+            CERR.unsetf( std::ios_base::unitbuf );
+            return UNI_ASCII_CR;
            }
 

I think it's still a good idea to catch EINTR just to avoid having nulls returned:


Index: LineInput.cc
===================================================================
--- LineInput.cc        (revision 1061)
+++ LineInput.cc        (working copy)
@@ -969,7 +969,6 @@
         if (errno == EINTR)
            {
              clearerr(stdin);
-             CIN.unsetf(ios_base::unitbuf);
              goto again;
            }


I.e., getting rid of the CIN.unsetf(ios_base::unitbuf), making the code look like:


const int b0 = fgetc(stdin);
   if (b0 == EOF)
      {
        if (errno == EINTR)
           {
             clearerr(stdin);
             goto again;
           }

       if (got_WINCH)



Thanks,

Chris


On 10/08/18 09:11, Juergen Sauermann wrote:
Hi Chris,

does that mean that I can revert the patch that I have put in for edif recently?

Best Regards,
/// Jürgen


On 08/07/2018 07:09 PM, Chris Moller wrote:

Hans-Peter,

If you want to try it again, I'm pretty sure I've fixed that bug in edif2--I just committed the update to https://github.com/ChrisMoller/edif

--Chris


On 02/08/18 07:12, Hans-Peter Sorge wrote:

Hello Chris,

thank you for this master piece. The line editing in GNU APL is a bit cumbersome.

But the apl session gets blocked during editing (edif2).

Currently I have no clue, how to analyze it.

Thank you again.

Hans-Peter






reply via email to

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