From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19974 invoked by alias); 13 Nov 2003 17:46:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19964 invoked from network); 13 Nov 2003 17:46:27 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 13 Nov 2003 17:46:27 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9EF482B8F; Thu, 13 Nov 2003 12:46:24 -0500 (EST) Message-ID: <3FB3C370.4050801@redhat.com> Date: Thu, 13 Nov 2003 17:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Andrew Cagney , Richard Henderson , gdb-patches@sources.redhat.com, "J. Johnston" Subject: Re: [commit] Order parameters "rw", not "wr" References: <3FB0010D.7040108@redhat.com> <20031112021817.GA27225@redhat.com> <3FB3A2E8.8050003@redhat.com> <20031113154027.GA12374@nevyn.them.org> <3FB3B2EC.10607@redhat.com> <20031113163907.GA19010@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00267.txt.bz2 > 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