From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2734 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 3/4] String: expand to word-at-a-time Date: Sun, 3 Feb 2013 18:24:20 -0800 Message-ID: <20130203182420.0349d5b2.idunham@lavabit.com> References: <1359936735-31915-1-git-send-email-nwmcsween@gmail.com> <1359936735-31915-4-git-send-email-nwmcsween@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359944676 18323 80.91.229.3 (4 Feb 2013 02:24:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 02:24:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2735-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 04 03:24:55 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U2Bjq-0002s0-Ij for gllmg-musl@plane.gmane.org; Mon, 04 Feb 2013 03:24:54 +0100 Original-Received: (qmail 20082 invoked by uid 550); 4 Feb 2013 02:24:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20074 invoked from network); 4 Feb 2013 02:24:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=48T0T3dCl4sjYYV7+BlhmfRsgfCRvBshB9yqMIe3KJVvpFRr4LzVXrrM9pRnuR0g2BK3BdrWSypH7KR+JOY2J70OEOfVZJz1G2p+fs1lzdn4lULcTVlB5E9CH46ckfZSZs7gzH+uT1O33x8tFn8T+6xYbVHb7vpN++BMR2Mf4wQ=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <1359936735-31915-4-git-send-email-nwmcsween@gmail.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2734 Archived-At: On Mon, 4 Feb 2013 00:12:14 +0000 Nathan McSween wrote: > -int strcmp(const char *l, const char *r) > +/** > + * strcmp - Word sized c standard strcmp. > + * @c: Comparative > + * @s: Source > + */ I have a few comments: 1: Why "comparative" and "source" instead of left/right? Source implies that there's copying going on, which there isn't (at least in terms of the API). s1/s2 or l/r is much more understandable. 2: For that many lines, you might as well explain what's going on: /* Indicate whether string c is less than, greater than, or equal to string s */ The comments are useless without the standard, and superfluous with it. > +#undef strcmp Huh? I don't see why this is needed, unless you messed up your build environment. > +int strcmp(const char *c, const char *s) What's the effect of all this on size of the binary? I see that all this ends up adding ~150 lines. Is shortening the length of the variable names really useful? -- Isaac Dunham