From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24453 invoked by alias); 15 Nov 2005 19:06:37 -0000 Received: (qmail 24438 invoked by uid 22791); 15 Nov 2005 19:06:35 -0000 Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 15 Nov 2005 19:06:35 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-46-90.inter.net.il [80.230.46.90]) by nitzan.inter.net.il (MOS 3.6.5-GR) with ESMTP id BYM80700 (AUTH halo1); Tue, 15 Nov 2005 20:13:38 +0200 (IST) Date: Wed, 16 Nov 2005 04:52:00 -0000 Message-Id: From: Eli Zaretskii To: Andrew STUBBS CC: gdb-patches@sources.redhat.com In-reply-to: <4379EC0A.3060601@st.com> (message from Andrew STUBBS on Tue, 15 Nov 2005 14:09:14 +0000) Subject: Re: [PATCH] Fix 'Undefined command' error message Reply-to: Eli Zaretskii References: <4379EC0A.3060601@st.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00212.txt.bz2 > Date: Tue, 15 Nov 2005 14:09:14 +0000 > From: Andrew STUBBS > > - while (isalnum (*p) || *p == '-') > + while (*p && (isalnum (*p) || *p == '-' || *p == '_' || Why is there a need for testing *p to be non-zero? AFAIK, isalnum is well defined for a zero argument. > +#if defined(TUI) > + (tui_active && > + (*p == '+' || *p == '<' || *p == '>' || *p == '$')) || > +#endif What is the reason for additional tests under TUI? > + (xdb_commands && (*p == '!' || *p == '/' || *p == '?')))) Is this for some kind of compatibility with XDB? (Yes, I know that you simply lifted code from elsewhere in cli-decode.c, but still... At the very least, the non-trivial characters warrant a comment that explains why they are there.)