Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Message-Id: <3.0.5.32.20030202070014.007fb4d0@h00207811519c.ne.client2.attbi.com> X-Sender: pierre AT h00207811519c DOT ne DOT client2 DOT attbi DOT com Date: Sun, 02 Feb 2003 07:00:14 -0500 To: cygwin-developers AT cygwin DOT com From: "Pierre A. Humblet" Subject: Re: 1.3.20 In-Reply-To: <20030201183003.GB3005@redhat.com> References: <3 DOT 0 DOT 5 DOT 32 DOT 20030201061709 DOT 0080be50 AT h00207811519c DOT ne DOT client2 DOT attbi DOT com> <20030201041117 DOT GA20843 AT redhat DOT com> <3 DOT 0 DOT 5 DOT 32 DOT 20030201061709 DOT 0080be50 AT h00207811519c DOT ne DOT client2 DOT attbi DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 01:30 PM 2/1/2003 -0500, Christopher Faylor wrote: >I think I'll just get rid of the default entirely. Nearly every time I >use a default arg, I end up regretting it, just like this time. Yep, I don't like this feature either, it makes the code hard to read. Perhaps you should have Cygwin coding guidelines that the only allowed default values are 0/false/NULL. >Ok. Don't you still have to call pr.refresh in the get??ent case in >case it isn't initialized? Is it guaranteed to be initialized by the time it >gets to the get* functions? Otherwise, I agree with your assessment. Your idea of calling only when the position is 0 is right: "When first called, getgrent() shall return a pointer to a group structure containing the first entry in the group database. Thereafter, it shall return a pointer to a group structure containing the next group structure in the group database, so successive calls may be used to search the entire database." I mistakenly thought that setgrent had to be called initially. Pierre