Received: from eggs.gnu.org ([208.118.235.92]:53137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1jIu-0007Et-D9 for qemu-devel@nongnu.org; Sun, 26 Feb 2012 13:58:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1jIt-0007LL-2j for qemu-devel@nongnu.org; Sun, 26 Feb 2012 13:58:40 -0500 Message-ID: <4F4A80DC.6000106@weilnetz.de> Date: Sun, 26 Feb 2012 19:58:36 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1330263596-4988-1-git-send-email-sw@weilnetz.de> <4F4A6041.5060102@codemonkey.ws> In-Reply-To: <4F4A6041.5060102@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Fix spelling in comments (iff -> if) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: QEMU Trivial , qemu-devel@nongnu.org Am 26.02.2012 17:39, schrieb Anthony Liguori: > On 02/26/2012 07:39 AM, Stefan Weil wrote: >> Signed-off-by: Stefan Weil >> --- >> a.out.h | 2 +- >> arm-dis.c | 22 +++++++++++----------- >> block.c | 2 +- >> block/qcow2-refcount.c | 4 ++-- >> hw/alpha_typhoon.c | 2 +- >> hw/hid.h | 2 +- >> hw/pcnet.c | 2 +- >> m68k-dis.c | 4 ++-- >> memory.h | 4 ++-- >> monitor.c | 2 +- >> net/socket.c | 2 +- >> qemu-img.c | 2 +- >> tcg/hppa/tcg-target.c | 6 +++--- >> 13 files changed, 28 insertions(+), 28 deletions(-) >> >> diff --git a/a.out.h b/a.out.h >> index 33ca7f7..7ea8d5a 100644 >> --- a/a.out.h >> +++ b/a.out.h >> @@ -136,7 +136,7 @@ struct external_scnhdr { >> */ >> struct external_lineno { >> union { >> - host_ulong l_symndx; /* function name symbol index, iff l_lnno 0 */ > > I don't know if this is the intention but this may be short hand for > 'if and only if'. I do use this short hand quite a bit myself. > > http://en.wikipedia.org/wiki/If_and_only_if > > Regards, > > Anthony Liguori Thank you for this information which was new for me. I reviewed my own patch, and there are indeed some 'iff' which might be used for 'if and only if'. Others cannot have this meaning because there are several alternatives with the same result. For the description of function return values 'if and only if' also looks strange. Some comments just translate an if statement in text. Here 'if and only if' would not match the C code which only says 'if'. I'll send new patches for these different categories, then it will be easier to accept or reject them. Many authors regard "iff" as unsuitable in formal writing (citation from Wikipedia).Personally, I'd also prefer to see 'if and only if' in full length or in symbolic notation (<==>) when this is the intention, not an abbreviation like 'iff'. Regards, Stefan Weil