From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Andrew Cagney <ac131313@redhat.com>,
Richard Henderson <rth@redhat.com>,
gdb-patches@sources.redhat.com,
"J. Johnston" <jjohnstn@redhat.com>
Subject: Re: [commit] Order parameters "rw", not "wr"
Date: Thu, 13 Nov 2003 17:46:00 -0000 [thread overview]
Message-ID: <3FB3C370.4050801@redhat.com> (raw)
In-Reply-To: <20031113163907.GA19010@nevyn.them.org>
> On Thu, Nov 13, 2003 at 11:35:56AM -0500, Andrew Cagney wrote:
>
>>
>
>> >>O_RDWR Open for reading and writing
>> >>S_IRWXU 00700 user (file owner) has read, write and execute permission
>> >>drwxr-xr-x 2 cagney cagney 8192 Nov 11 13:52 bin
>
>> >
>> >
>> >Those aren't arguments, just a couple occurances of "read, write", so I
>> >fail to see the connection. Consider memcpy, strcat, fgets, sprintf.
>
>>
>> What you list here have little if any relevance to the interfaces in
>> question.
>
>
> There are, as far as I know, no examples of functions in the standard
> library which take an output buffer last. As much of a C convention as
> there is suggests they belong at the beginning.
>
> If you're going to ignore that very weak precedent, that's your
> perogative, go right ahead. But please don't claim that "O_RDWR" is in
> any way relevant to the argument ordering on target_xfer_partial
> either.
The xfer functions in question take _three_ [relevant] parameters:
- an object
- a read param
- a write param
while the examples you cite take only _two_ [relevant] parameters:
- an object
- a read XOR write param
where, in the second case, the parameters are ordered randomly vis:
- write/read, object first (strcat, sprintf, write):
- the write object
- a read param
- read/write, object first (write):
- the read object
- a write param
- read/write, object last (fwrite):
- a read param
- the write object
- write/read, object last (fgets)
- a write param
- the read object
Consequently, as I've repeatedly stated, I see no relevance.
Andrew
next prev parent reply other threads:[~2003-11-13 17:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-10 21:20 Andrew Cagney
2003-11-12 2:18 ` Richard Henderson
2003-11-13 15:27 ` Andrew Cagney
2003-11-13 15:40 ` Daniel Jacobowitz
2003-11-13 16:36 ` Andrew Cagney
2003-11-13 16:39 ` Daniel Jacobowitz
2003-11-13 17:46 ` Andrew Cagney [this message]
2003-11-13 18:01 ` Andrew Cagney
2003-11-13 19:19 ` Daniel Jacobowitz
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=3FB3C370.4050801@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
--cc=rth@redhat.com \
/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