X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:subject:to:references :content-type; q=dns; s=default; b=AfV+SZwDEXODM/Z9QJiZspgOhQf99 ZkXKVaty5GiPgjl2tj7+D371f+LKmI5m4SzZU0RxHdWrYLNNWa3bTnGTzLTkxl+P Tow/7V92oG3MUJ/3zwzw4M7NTwfOtonTemXQmvF0xj6ZNpcapr6j+AuM60GPTrHF ZYKaA0IUCnKDY4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:subject:to:references :content-type; s=default; bh=jvRZXbwNtVr8l5poO49SYJGP+v4=; b=ATD ci4f6zBxOzbk/Lwd0ZHjVOKLm+k2PCiKC3ygP7E0cLgceMCYr5K0TdaJpII5j+zw eYHj22A0PKEjN8jdWmV13MCtLsWZYUpfJm7K86C+JRATD/KutggqAqQEuQXsBvGj qEzDak+5ZK2+QzacjygX/T8FI0G1D8j6R3PXWY6U= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=checkout, Hx-languages-length:2961, H*M:8160, H*MI:sk:bb08ea5 X-HELO: mail-oi0-f44.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:references :user-agent; bh=Q0cqEcsu5fjo+f2Wsog4sM5Rofgsgt+3g5baR+eYUlw=; b=Rf+/S/tSCtC55y6xfRRDxwie1TrwkEDiPq4BN2fmjurWEYdOM+cBS6sam+rr0KuZGg Bh99CN9vUIT8o6toDnly5RsDsre6TySqYUgBOhGMKAWn1xsYWBOcayh0aBUTW8ox5mbF DhUQCEw0nhT/pc84hQ7JzbyGkuAHwGcLdE1krjHOoOmpQL1If4EaNAGg6HqPpzVF+Sph raXJIVgv6OkyroZIIZSBghOEATQZcvHiWQQqJWpOTfzOT03p7a04yXeiG/VsX1vEcIm+ W+VHBvk3zt8qNlBRprfUT0CcyMrbUkovk/L8XWyAanPZd5n7OU8LcABQo743kcchFkp5 VKLQ== X-Gm-Message-State: AN3rC/7e4dMczLpdr1jOL8YK17Sk7DiEqeQgIjr5wnxalPSPqB3gqDys FnGn7hlxjSTYnOyv X-Received: by 10.157.68.159 with SMTP id v31mr423680ote.250.1492230799056; Fri, 14 Apr 2017 21:33:19 -0700 (PDT) Message-ID: <58f1a28e.0a2c9d0a.f2ec.8160@mx.google.com> Date: Fri, 14 Apr 2017 21:33:18 -0700 (PDT) From: Steven Penny X-Google-Original-From: Steven Penny Subject: Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.3-3 To: cygwin AT cygwin DOT com References: Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) Note-from-DJ: This may be spam On Thu, 13 Apr 2017 13:48:04, Eric Blake wrote: > Is it still a problem with pselect, where rebuilding with the same > configuration as 7.0.1-2 fixes things? I'm really not sure how to even > go about debugging this one, and it's not my highest priority at the > moment (I've got coreutils 8.27 to build for cygwin, and autoconf 2.70 > to release upstream). So any help is welcome. Ok. I have not gone through the whole commit, as it is huge: http://cygwin.com/ml/cygwin/2017-01/msg00204.html but I did find something. Using: git checkout readline-7.0-alpha~1 for the last good commit and: git checkout readline-7.0-alpha for the first bad commit, I found that the change to the "rl_insert" function in "text.c" breaks pasting and Alt codes with "chcp.com 65001". Can you work with this? http://git.savannah.gnu.org/cgit/readline.git/tree/text.c?h=readline-7.0-alpha#n891 --- a/text.c +++ b/text.c @@ -71,6 +71,8 @@ static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *)); rl_insert_text. Text blocks larger than this are divided. */ #define TEXT_COUNT_MAX 1024 +int _rl_optimize_typeahead = 1; /* rl_insert tries to read typeahead */ + /* **************************************************************** */ /* */ /* Insert and Delete */ @@ -890,8 +892,42 @@ int rl_insert (count, c) int count, c; { - return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c) - : _rl_overwrite_char (count, c)); + int r, n, x; + + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (count, c) : _rl_overwrite_char (count, c); + + /* XXX -- attempt to batch-insert pending input that maps to self-insert */ + x = 0; + n = (unsigned short)-2; + while (_rl_optimize_typeahead && + (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) && + _rl_pushed_input_available () == 0 && + _rl_input_queued (0) && + (n = rl_read_key ()) > 0 && + _rl_keymap[(unsigned char)n].type == ISFUNC && + _rl_keymap[(unsigned char)n].function == rl_insert) + { + r = (rl_insert_mode == RL_IM_INSERT) ? _rl_insert_char (1, n) : _rl_overwrite_char (1, n); + /* _rl_insert_char keeps its own set of pending characters to compose a + complete multibyte character, and only returns 1 if it sees a character + that's part of a multibyte character but too short to complete one. We + can try to read another character in the hopes that we will get the + next one or just punt. Right now we try to read another character. + We don't want to call rl_insert_next if _rl_insert_char has already + stored the character in the pending_bytes array because that will + result in doubled input. */ + n = (unsigned short)-2; + x++; /* count of bytes of typeahead read, currently unused */ + if (r == 1) /* read partial multibyte character */ + continue; + if (rl_done || r != 0) + break; + } + + if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */ + r = rl_execute_next (n); + + return r; } -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple