From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80951 invoked by alias); 29 Jun 2017 08:42:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 80928 invoked by uid 89); 29 Jun 2017 08:42:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-it0-f46.google.com Received: from mail-it0-f46.google.com (HELO mail-it0-f46.google.com) (209.85.214.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Jun 2017 08:42:30 +0000 Received: by mail-it0-f46.google.com with SMTP id k192so3240094ith.1 for ; Thu, 29 Jun 2017 01:42:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=aYcphtgqcwQd0maTC78gooEG3Wc14sxIzuW8BVaLgHU=; b=CwhDTKhBdXi86bEVnUkqFxAsqj5LffGdBM1YxGgg64T5SmOZJKfm6LrlHtu2FJLigr jcqxbTpaM2en0uYH08MVX6ClDogB0zNz3ZsiJkElsKB22NxcmGhmhIVpGnYLT0sfUPYC I3BGxEDDKqZgSGYkCcpps6exqwohifRSKGoAoNVQW4G0QwMekHL8IDt0MDuBa2yrwn1+ gTKs3zdXu1Sa2z3jlHmZHWiyHjzdBXDTlsXeXyA+RW8sw/n1+TbvnQpCNd/8Q2gxa1O0 Sq7jWDoevZUj8I+Y/bsLzdNXgdxDgAoZ/BcPjqkfSXJmeAAEPZfGF6CiI8CRI8xdt6ni VYeg== X-Gm-Message-State: AKS2vOxah7UfYysHLoqhLBySxeKYLPuquP21TCwF6VbJCh+S4eyytHtj eInOPrMu6gu0OAqh X-Received: by 10.36.34.132 with SMTP id o126mr827003ito.67.1498725749184; Thu, 29 Jun 2017 01:42:29 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id j186sm288622itj.11.2017.06.29.01.41.57 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 29 Jun 2017 01:41:58 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 13/40] Introduce strncmp_iw References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-14-git-send-email-palves@redhat.com> Date: Thu, 29 Jun 2017 08:42:00 -0000 In-Reply-To: <1496406158-12663-14-git-send-email-palves@redhat.com> (Pedro Alves's message of "Fri, 2 Jun 2017 13:22:11 +0100") Message-ID: <86d19ndw31.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00780.txt.bz2 Pedro Alves writes: > +/* Do a strncmp() type operation on STRING1 and STRING2, ignoring any > + differences in whitespace. STRING2_LEN is STRING2's length. > + Returns 0 if STRING1 matches STRING2_LEN characters of STRING2, > + non-zero otherwise (slightly different than strncmp()'s range of > + return values). */ > +extern int strncmp_iw (const char *, const char *, size_t); Use parameter name in the declaration, otherwise, STRING1, STRING2 and STRING2_LEN in comments are pointless. > + > +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any > + differences in whitespace. Returns 0 if they match, non-zero if > + they don't (slightly different than strcmp()'s range of return > + values). > + > + As an extra hack, string1=3D=3D"FOO(ARGS)" matches string2=3D=3D"FOO". > + This "feature" is useful when searching for matching C++ function > + names (such as if the user types 'break FOO', where FOO is a > + mangled C++ function). */ > extern int strcmp_iw (const char *, const char *); Otherwise, patch is good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)