qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefan Weil <sw@weilnetz.de>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix spelling in comments (iff -> if)
Date: Sun, 26 Feb 2012 14:01:56 -0600	[thread overview]
Message-ID: <4F4A8FB4.1060207@codemonkey.ws> (raw)
In-Reply-To: <4F4A80DC.6000106@weilnetz.de>

On 02/26/2012 12:58 PM, Stefan Weil wrote:
> Am 26.02.2012 17:39, schrieb Anthony Liguori:
>> On 02/26/2012 07:39 AM, Stefan Weil wrote:
>>> Signed-off-by: Stefan Weil<sw@weilnetz.de>
>>> ---
>>> 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'.

Yup, just pointing out that in some cases it may be intentional.

Regards,

Anthony Liguori

>
> Regards,
>
> Stefan Weil
>
>

      parent reply	other threads:[~2012-02-26 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 13:39 [Qemu-devel] [PATCH] Fix spelling in comments (iff -> if) Stefan Weil
2012-02-26 16:39 ` Anthony Liguori
2012-02-26 18:58   ` Stefan Weil
2012-02-26 19:09     ` Peter Maydell
2012-02-26 20:01     ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F4A8FB4.1060207@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).