Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Latest CVS + ZLE_UNICODE_SUPPORT on RHEL3
- X-seq: zsh-workers 20841
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Latest CVS + ZLE_UNICODE_SUPPORT on RHEL3
- Date: Tue, 22 Feb 2005 14:36:36 +0100
- In-reply-to: <200502221048.j1MAmcQa006265@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050221133700.27647.qmail@xxxxxxxxxxxxxxxxx> <200502211429.j1LETYIr015931@xxxxxxxxxxxxxx> <200502212213.28160.arvidjaar@xxxxxxxxxx> <200502221012.j1MACuEe005779@xxxxxxxxxxxxxx> <200502221048.j1MAmcQa006265@xxxxxxxxxxxxxx>
Peter wrote:
> An mbstate_t object a can be
> initialized to the initial state by zeroing it, for example using
>
> memset(&a, 0, sizeof(a));
>
> but the standard gives no indication this is portable (though clearly
I think you can safely take it to be portable. I've seen it many times
before (though the last argument is usually written sizeof(mbstate_t))
and just using grep now shows that quite a good few open source programs
use it.
> Alternatively, since we're not going to be using this in multiple
> threads, we could use a NULL pointer and rely on the internal state.
Surely you might use it in another function call while in the middle of
using it. It's probably safest not to rely on the single internal state.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author