delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/03/28/11:27:28

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99EA83858433
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1711639647;
bh=6oPrMQqvPnq70LqG/b2jlU4mcyFYMXZNgoBZzqAx8/0=;
h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=m+nvUqaWhewgS+9QP6z89AYncpAUPyjNNGaerRrDlfGjKtrOjmtVjrdT0E8GWLkuz
EWBejobY38NJwsUyUkMIoogEV9rcx3d7/akxf1633eLGF1pWZcyiBrDlTf4IfsXdY1
jMG6HSlprKWyS1Zbq2mlvCZ5j+dIcFpB+fapouFw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 67CBD3858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 67CBD3858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711639588; cv=none;
b=En/O2Gtc/bE6vs7qeuB9ARTL5ENY7m/ek68BSl08i5e2R5MS4xO0OXaq4ZZzIQTcj5P/GdPm8oByLKumu4+9Zt1L+J1C6wnzbT/5YSM6F7aQYjzA4uxMRhxj0C48J+HiUu6G39ZcT9jt+SMtagz0ZleIc0Nt5I7uGKmKdT1Sqvw=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1711639588; c=relaxed/simple;
bh=qSFEm7mmaDr/+R46/tSukTqOYTtNqHHjko3aHNEQSBA=;
h=DKIM-Signature:From:To:Subject:Mime-Version:Date:Message-ID;
b=eaEK+xT8yWislv8D8+xsH1qb3UUvvby0TVZMPDf3eLSih5T32ay0vmcfdTf0Ywx6Vd5JOuc4cFmzdSQG+K3JIRGHOVegJrtEUC8ps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m16nl9rz2P9lmHlFCNhSrTJ7Jui82k4rd5Gk/5HRHa7fPnctAVLDbo0gw3jldiItTIU
juvsN6j46LMHBFYSqwDyDNrur0BOh4TDwzt8x1/dvHCheFTyVEAXGDk+Wp5jVo2
X-HAS-ATTACH: no
X-QQ-BUSINESS-ORIGIN: 2
X-Originating-IP: 123.234.15.119
X-QQ-STYLE:
X-QQ-mid: webmail344t1711639581t290390
To: "=?gb18030?B?Y3lnd2luQGN5Z3dpbi5jb20=?=" <cygwin AT cygwin DOT com>
Subject: When displaying Chinese help information,
the program does not respond. The code enters a dead loop.
Mime-Version: 1.0
Date: Thu, 28 Mar 2024 23:26:20 +0800
X-Priority: 3
Message-ID: <tencent_1D4A1965D169D6E2B9F6CA21B7160E3A8C09@qq.com>
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,
CHARSET_FARAWAY_HEADER, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF,
FREEMAIL_FROM, GIT_PATCH_0, HELO_DYNAMIC_IPADDR, NO_FM_NAME_IP_HOSTN,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RDNS_DYNAMIC,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?b?6LW15LyfIHZpYSBDeWd3aW4=?= <cygwin AT cygwin DOT com>
Reply-To: =?gb18030?B?1dTOsA==?= <qdzhaov AT qq DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 42SFRSGd3877502

When displaying Chinese help information, the program does not respond. 
The code enters a dead loop in file "libgetopt++/include/getopt++/DefaultFormatter.h"£¬Because some Chinese help information does not contain spaces.
diff --git a/libgetopt++/include/getopt++/DefaultFormatter.h b/libgetopt++/include/getopt++/DefaultFormatter.h
index ee2397f5..19ac67e1 100644
--- a/libgetopt++/include/getopt++/DefaultFormatter.h
+++ b/libgetopt++/include/getopt++/DefaultFormatter.h
@@ -64,6 +64,7 @@ class DefaultFormatter {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // TODO: consider using a line breaking strategy here.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; int pos = helpmsg.substr(0,h_len).find_last_of(" ");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if(pos&lt;=0)break;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; theStream &lt;&lt; helpmsg.substr(0,pos)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &lt;&lt; std::endl &lt;&lt; std::string (o_len, ' ');
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; helpmsg.erase (0,pos+1);

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019