From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104788 invoked by alias); 27 Jan 2016 11:53:12 -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 104778 invoked by uid 89); 27 Jan 2016 11:53:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:813 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 27 Jan 2016 11:53:10 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 61A73ADAC; Wed, 27 Jan 2016 11:53:06 +0000 (UTC) From: Andreas Schwab To: Pedro Alves Cc: Sergio Durigan Junior , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Introduce skip_to_char and use it References: <1453845250-30360-1-git-send-email-simon.marchi@ericsson.com> <878u3b24f8.fsf@redhat.com> <56A8A855.8050208@redhat.com> X-Yow: NATHAN... your PARENTS were in a CARCRASH!! They're VOIDED - They COLLAPSED They had no CHAINSAWS... They had no MONEY MACHINES... They did PILLS in SKIMPY GRASS SKIRTS... Nathan, I EMULATED them... but they were OFF-KEY... Date: Wed, 27 Jan 2016 11:53:00 -0000 In-Reply-To: <56A8A855.8050208@redhat.com> (Pedro Alves's message of "Wed, 27 Jan 2016 11:21:57 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-01/txt/msg00670.txt.bz2 Pedro Alves writes: > On 01/27/2016 01:32 AM, Sergio Durigan Junior wrote: > >> The problem with skip_to_char IMO is that it leads the reader to believe >> that this function performs the same job as strchr (in fact, my first >> reaction when I read this introduction was to think "why not use >> strchr?"). The main difference, however, is that this function actually >> skips everything if the char was not found. >> >> I believe a name like "skip_to_char_or_nul" may be more appropriate. >> What do you think? > > That sounds just like strchrnul, though. Or strcspn. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."