NetBSD-Bugs archive

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

Re: lib/56647: Fix misbehaviour in libedit support for readline



The following reply was made to PR lib/56647; it has been noted by GNATS.

From: Walter Lozano <walter.lozano%collabora.com@localhost>
To: gnats-bugs%netbsd.org@localhost, lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/56647: Fix misbehaviour in libedit support for readline
Date: Mon, 24 Jan 2022 10:10:10 -0300

 This is a multi-part message in MIME format.
 --------------YxbVEabjAisKkv17iQN7OiCj
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi Christos,
 
 Thank you for your quick review, let me comment
 
 On 1/22/22 14:40, Christos Zoulas wrote:
 > The following reply was made to PR lib/56647; it has been noted by GNATS.
 >
 > From: Christos Zoulas<christos%zoulas.com@localhost>
 > To:gnats-bugs%netbsd.org@localhost
 > Cc:lib-bug-people%netbsd.org@localhost,
 >   gnats-admin%netbsd.org@localhost,
 >   netbsd-bugs%netbsd.org@localhost
 > Subject: Re: lib/56647: Fix misbehaviour in libedit support for readline
 > Date: Sat, 22 Jan 2022 12:35:17 -0500
 >
 >   --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693
 >   Content-Transfer-Encoding: 7bit
 >   Content-Type: text/plain;
 >   	charset=us-ascii
 >   
 >   Hi Walter,
 >   
 >   Please submit patches with diff -u so we can get some context.
 
 You are completely right, I missed it this time.
 
 >   It would also be nice if you had a description how to reproduce the issue.
 
 This is a difficult part since I'm improving libedit compatibility with 
 readline in order to make it work with Linux packages such as connman 
 [1] [2] and bluez [3][4]. Both these packages use a cli application to 
 connect to services, which might report their status as events while the 
 user is typing a line. In order to make it simpler I have written a 
 simple test application to test the changes, will that be enough? How 
 should I provided it?
 
 >   Anyway is this what you mean in your patch?
 
 Yes, exactly that, thank you for trying it find out the change. As 
 mentioned with these changes the compatibility has improved but 
 additional work needs to be done.
 
 >   
 >   Thanks,
 
 Thank you for taking the time to review this patch. Please let me know 
 if there is a way to submit patches that will make your like easier 
 besides the comments you have already shared.
 
 Walter
 
 
 [1] https://salsa.debian.org/debian/connman
 
 [2] https://gitlab.apertis.org/pkg/connman
 
 [3] https://salsa.debian.org/bluetooth-team/bluez
 
 [4] https://gitlab.apertis.org/pkg/bluez
 
 >   
 >   christos
 >   
 >   Index: readline.c
 >   ===================================================================
 >   RCS file: /cvsroot/src/lib/libedit/readline.c,v
 >   retrieving revision 1.169
 >   diff -u -p -u -r1.169 readline.c
 >   --- readline.c  11 Jan 2022 18:30:15 -0000      1.169
 >   +++ readline.c  22 Jan 2022 17:34:06 -0000
 >   @@ -2149,6 +2149,7 @@ rl_callback_read_char(void)
 >                           wbuf = NULL;
 >                   (*(void (*)(const char *))rl_linefunc)(wbuf);
 >           }
 >   +       _rl_update_pos();
 >    }
 >   
 >    void
 >   @@ -2176,6 +2177,7 @@ rl_redisplay(void)
 >           a[0] = (char)e->el_tty.t_c[TS_IO][C_REPRINT];
 >           a[1] = '\0';
 >           el_push(e, a);
 >   +       rl_forced_update_display();
 >    }
 >   
 >    int
 >   
 >   
 >   --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693
 >   Content-Transfer-Encoding: 7bit
 >   Content-Disposition: attachment;
 >   	filename=signature.asc
 >   Content-Type: application/pgp-signature;
 >   	name=signature.asc
 >   Content-Description: Message signed with OpenPGP
 >   
 >   -----BEGIN PGP SIGNATURE-----
 >   Comment: GPGTools -http://gpgtools.org
 >   
 >   iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCYexAVQAKCRBxESqxbLM7
 >   OuRiAJ0UXp/HxtaQ4HYRZEuhQongOV410ACcDvUFNDdWeF34bpCeyLtCypK6aS8=
 >   =p4aS
 >   -----END PGP SIGNATURE-----
 >   
 >   --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693--
 >   
 
 -- 
 Walter Lozano
 Collabora Ltd.
 
 --------------YxbVEabjAisKkv17iQN7OiCj
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: 7bit
 
 <html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   </head>
   <body>
     <p>Hi Christos,</p>
     <p>Thank you for your quick review, let me comment<br>
     </p>
     <div class="moz-cite-prefix">On 1/22/22 14:40, Christos Zoulas
       wrote:<br>
     </div>
     <blockquote type="cite"
       cite="mid:20220122174001.9912D1A923B%mollari.NetBSD.org@localhost">
       <pre class="moz-quote-pre" wrap="">The following reply was made to PR lib/56647; it has been noted by GNATS.
 
 From: Christos Zoulas <a class="moz-txt-link-rfc2396E" href="mailto:christos%zoulas.com@localhost";>&lt;christos%zoulas.com@localhost&gt;</a>
 To: <a class="moz-txt-link-abbreviated" href="mailto:gnats-bugs%netbsd.org@localhost";>gnats-bugs%netbsd.org@localhost</a>
 Cc: <a class="moz-txt-link-abbreviated" href="mailto:lib-bug-people%netbsd.org@localhost";>lib-bug-people%netbsd.org@localhost</a>,
  <a class="moz-txt-link-abbreviated" href="mailto:gnats-admin%netbsd.org@localhost";>gnats-admin%netbsd.org@localhost</a>,
  <a class="moz-txt-link-abbreviated" href="mailto:netbsd-bugs%netbsd.org@localhost";>netbsd-bugs%netbsd.org@localhost</a>
 Subject: Re: lib/56647: Fix misbehaviour in libedit support for readline
 Date: Sat, 22 Jan 2022 12:35:17 -0500
 
  --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693
  Content-Transfer-Encoding: 7bit
  Content-Type: text/plain;
  	charset=us-ascii
  
  Hi Walter,
  
  Please submit patches with diff -u so we can get some context.</pre>
     </blockquote>
     <p>You are completely right, I missed it this time.<br>
     </p>
     <blockquote type="cite"
       cite="mid:20220122174001.9912D1A923B%mollari.NetBSD.org@localhost">
       <pre class="moz-quote-pre" wrap="">
  It would also be nice if you had a description how to reproduce the issue.</pre>
     </blockquote>
     <p>This is a difficult part since I'm improving libedit
       compatibility with readline in order to make it work with Linux
       packages such as connman [1] [2] and bluez [3]<span
         class="transaction-comment" data-sigil="transaction-comment"
         data-meta="40_1"></span> [4]. Both these packages use a cli
       application to connect to services, which might report their
       status as events while the user is typing a line. In order to make
       it simpler I have written a simple test application to test the
       changes, will that be enough? How should I provided it?<br>
     </p>
     <blockquote type="cite"
       cite="mid:20220122174001.9912D1A923B%mollari.NetBSD.org@localhost">
       <pre class="moz-quote-pre" wrap="">
  Anyway is this what you mean in your patch?</pre>
     </blockquote>
     <p>Yes, exactly that, thank you for trying it find out the change.
       As mentioned with these changes the compatibility has improved but
       additional work needs to be done.</p>
     <blockquote type="cite"
       cite="mid:20220122174001.9912D1A923B%mollari.NetBSD.org@localhost">
       <pre class="moz-quote-pre" wrap="">
  
  Thanks,</pre>
     </blockquote>
     <p>Thank you for taking the time to review this patch. Please let me
       know if there is a way to submit patches that will make your like
       easier besides the comments you have already shared.</p>
     <p>Walter</p>
     <p><br>
     </p>
     <p>[1] <a class="moz-txt-link-freetext" href="https://salsa.debian.org/debian/connman";>https://salsa.debian.org/debian/connman</a></p>
     <p>[2] <a class="moz-txt-link-freetext" href="https://gitlab.apertis.org/pkg/connman";>https://gitlab.apertis.org/pkg/connman</a><br>
     </p>
     <p>[3] <a class="moz-txt-link-freetext" href="https://salsa.debian.org/bluetooth-team/bluez";>https://salsa.debian.org/bluetooth-team/bluez</a></p>
     <p>[4] <a class="moz-txt-link-freetext" href="https://gitlab.apertis.org/pkg/bluez";>https://gitlab.apertis.org/pkg/bluez</a><br>
     </p>
     <blockquote type="cite"
       cite="mid:20220122174001.9912D1A923B%mollari.NetBSD.org@localhost">
       <pre class="moz-quote-pre" wrap="">
  
  christos
  
  Index: readline.c
  ===================================================================
  RCS file: /cvsroot/src/lib/libedit/readline.c,v
  retrieving revision 1.169
  diff -u -p -u -r1.169 readline.c
  --- readline.c  11 Jan 2022 18:30:15 -0000      1.169
  +++ readline.c  22 Jan 2022 17:34:06 -0000
  @@ -2149,6 +2149,7 @@ rl_callback_read_char(void)
                          wbuf = NULL;
                  (*(void (*)(const char *))rl_linefunc)(wbuf);
          }
  +       _rl_update_pos();
   }
  
   void
  @@ -2176,6 +2177,7 @@ rl_redisplay(void)
          a[0] = (char)e-&gt;el_tty.t_c[TS_IO][C_REPRINT];
          a[1] = '\0';
          el_push(e, a);
  +       rl_forced_update_display();
   }
  
   int
  
  
  --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693
  Content-Transfer-Encoding: 7bit
  Content-Disposition: attachment;
  	filename=signature.asc
  Content-Type: application/pgp-signature;
  	name=signature.asc
  Content-Description: Message signed with OpenPGP
  
  -----BEGIN PGP SIGNATURE-----
  Comment: GPGTools - <a class="moz-txt-link-freetext" href="http://gpgtools.org";>http://gpgtools.org</a>
  
  iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCYexAVQAKCRBxESqxbLM7
  OuRiAJ0UXp/HxtaQ4HYRZEuhQongOV410ACcDvUFNDdWeF34bpCeyLtCypK6aS8=
  =p4aS
  -----END PGP SIGNATURE-----
  
  --Apple-Mail=_1043A9AA-0694-4C68-ACF4-DA26BA94C693--
  
 </pre>
     </blockquote>
     <pre class="moz-signature" cols="72">-- 
 Walter Lozano
 Collabora Ltd.</pre>
   </body>
 </html>
 
 --------------YxbVEabjAisKkv17iQN7OiCj--
 



Home | Main Index | Thread Index | Old Index