Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pathconf() again
- X-seq: zsh-workers 12540
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: pathconf() again
- Date: Fri, 4 Aug 2000 20:52:27 -0400
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <000804111549.ZM28988@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Fri, Aug 04, 2000 at 11:15:49AM -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <1000804070216.ZM23696@xxxxxxxxxxxxxxxxxxxxxxx> <20000804091955.A4368@xxxxxxxx> <000804111549.ZM28988@xxxxxxxxxxxxxxxxxxxxxxx>
> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author