From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29706 invoked from network); 5 Aug 2000 00:52:38 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Aug 2000 00:52:38 -0000 Received: (qmail 18895 invoked by alias); 5 Aug 2000 00:52:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12540 Received: (qmail 18888 invoked from network); 5 Aug 2000 00:52:30 -0000 Date: Fri, 4 Aug 2000 20:52:27 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: pathconf() again Message-ID: <20000804205227.B7925@dman.com> References: <1000804070216.ZM23696@candle.brasslantern.com> <20000804091955.A4368@dman.com> <000804111549.ZM28988@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <000804111549.ZM28988@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Fri, Aug 04, 2000 at 11:15:49AM -0700 > But ... readlink() doesn't have any provision to "read more of the link" > and doesn't tell you if it truncated what it did read. I didn't realize that readlink() was so unfriendly. You could memset() the buffer with 0 and then test to see if the final octet of the buffer was still zero. If it is, you have a complete, zero-terminated string. If not, realloc the buffer and try again. I don't know if that's more or less ugly. > Only if it's a relative rather than absolute link. I don't understand the significance.