From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15445 invoked from network); 22 Feb 2005 13:37:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Feb 2005 13:37:14 -0000 Received: (qmail 36673 invoked from network); 22 Feb 2005 13:37:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Feb 2005 13:37:06 -0000 Received: (qmail 3321 invoked by alias); 22 Feb 2005 13:37:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20841 Received: (qmail 3311 invoked from network); 22 Feb 2005 13:37:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 Feb 2005 13:37:03 -0000 Received: (qmail 36370 invoked from network); 22 Feb 2005 13:37:03 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 22 Feb 2005 13:36:58 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-2.tower-36.messagelabs.com!1109079417!3486880!1 X-StarScan-Version: 5.4.11; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 16567 invoked from network); 22 Feb 2005 13:36:57 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-2.tower-36.messagelabs.com with SMTP; 22 Feb 2005 13:36:57 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j1MDau61003870 for ; Tue, 22 Feb 2005 13:36:56 GMT Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 162CC14044 for ; Tue, 22 Feb 2005 14:36:36 +0100 (CET) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <200502221048.j1MAmcQa006265@news01.csr.com> From: Oliver Kiddle References: <20050221133700.27647.qmail@flock1.newmail.ru> <200502211429.j1LETYIr015931@news01.csr.com> <200502212213.28160.arvidjaar@newmail.ru> <200502221012.j1MACuEe005779@news01.csr.com> <200502221048.j1MAmcQa006265@news01.csr.com> To: zsh-workers@sunsite.dk Subject: Re: Latest CVS + ZLE_UNICODE_SUPPORT on RHEL3 Date: Tue, 22 Feb 2005 14:36:36 +0100 Message-ID: <11725.1109079396@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 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