From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2735 Path: news.gmane.org!not-for-mail From: nwmcsween@gmail.com Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 3/4] String: expand to word-at-a-time Date: Sun, 3 Feb 2013 18:55:31 -0800 Message-ID: References: <1359936735-31915-1-git-send-email-nwmcsween@gmail.com> <1359936735-31915-4-git-send-email-nwmcsween@gmail.com> <20130203182420.0349d5b2.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1359946556 31195 80.91.229.3 (4 Feb 2013 02:55:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 02:55:56 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-2736-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 04 03:56:17 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 1U2CEA-0005vE-H3 for gllmg-musl@plane.gmane.org; Mon, 04 Feb 2013 03:56:14 +0100 Original-Received: (qmail 32594 invoked by uid 550); 4 Feb 2013 02:55:55 -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 32586 invoked from network); 4 Feb 2013 02:55:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:subject:references:from:content-type:x-mailer :in-reply-to:message-id:date:to:content-transfer-encoding :mime-version; bh=fW97pfKUsXNV1j4yFIiHk29rsAY3IvyxLsaLRBmN1mA=; b=rIy6KqUeZGYqBpqmD/LWVM4lDeCnmqtDkhXmRiCcBI7YxisfAV8mp2JquVKdrhk1Pn ag2tEiXJJHvxMC/fb8L503yr7/NEr30aFjugEUfDimSPav3urWBvDwXpF3e1E5TOKGxz VLfTkFvNBWe8bqnUoLGXz6wJG1FirDQn5pKSWs450bB5Swk8e61jEosB0HxtQ4KKQYUY Rx2BeWh9Y39xtU5/Idbq7IraqATCbFF5cFuhehmHJNSu3P7vYbfhRYU775/JErKD+n1T RmFJCwg4/uii0X00iVVPb80/9KipJZLMlHDsMomwYJvPvjIIsRBK9CBOK7N/6TxeoYgt u0dg== X-Received: by 10.66.72.226 with SMTP id g2mr47672059pav.67.1359946542171; Sun, 03 Feb 2013 18:55:42 -0800 (PST) X-Mailer: iPhone Mail (10A523) In-Reply-To: <20130203182420.0349d5b2.idunham@lavabit.com> Xref: news.gmane.org gmane.linux.lib.musl.general:2735 Archived-At: On Feb 3, 2013, at 6:24 PM, Isaac Dunham wrote: > On Mon, 4 Feb 2013 00:12:14 +0000 > Nathan McSween wrote: >=20 >> -int strcmp(const char *l, const char *r) >> +/** >> + * strcmp - Word sized c standard strcmp. >> + * @c: Comparative >> + * @s: Source >> + */ > I have a few comments: >=20 > 1: Why "comparative" and "source" instead of left/right? > Source implies that there's copying going on, which there isn't (at least i= n 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=20 > with it. Just personal preference really. It's nicer imo to have short args names and= a blurb on what they stand for >> +#undef strcmp > Huh? > I don't see why this is needed, unless you messed up your build environmen= t. >=20 >> +int strcmp(const char *c, const char *s) >=20 > What's the effect of all this on size of the binary? > I see that all this ends up adding ~150 lines. With the expanded to word-at-a-time fns it adds a bit with just the refactor= ings it removes a bit. Not at my workstation atm though. > Is shortening the length of the variable names really useful? Preference, the only reason for the longer names in the args is usually due t= o say void * to unsigned char * for comparison, etc purposes > --=20 > Isaac Dunham >=20