From owner-freebsd-doc@FreeBSD.ORG Fri Mar 27 13:03:31 2009 Return-Path: Delivered-To: doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08C821065689; Fri, 27 Mar 2009 13:03:31 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 4A49A8FC1C; Fri, 27 Mar 2009 13:03:29 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: by ey-out-2122.google.com with SMTP id 4so205227eyf.7 for ; Fri, 27 Mar 2009 06:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type; bh=njpRCT5cF9qYDNiMIFJwx+NKCZ+EZUy1qXvnHufiVYs=; b=L56G9BmcpOWIEtOu0GJ806WdpRtC2Lt5fXc3Yofj3/WgWm3uitmEiiT+k9gTdok6x8 Xeq76crc/vH4ePUl18jL6GMkvAO4UHNKTqAO9raUG4vfOchDKvohWYC0h6fB4tTcTyvX dbAmWpqua71k8UdCRRH/pLjkKAzAvMDVqGdec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type; b=em8Z7/ZdffPuw4+Zu5aWtTZl0gbTO1/VCilom/VP7C0dlWYMnm9XMv5cy+Z2++HkAb VmGq+4+kHPtiJVJsPdfzTcppzeIzG2fbr2rv67uexzaSGD2fmkLVSHnOyC1RmyxQJFlF 3KjakSg9tYn5wB5ALOwo53k9C3pzpPa4mn7EU= Received: by 10.216.28.207 with SMTP id g57mr778924wea.163.1238159008234; Fri, 27 Mar 2009 06:03:28 -0700 (PDT) Received: from self.rene-ladan.nl ([77.163.174.49]) by mx.google.com with ESMTPS id 23sm1893434eya.6.2009.03.27.06.03.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Mar 2009 06:03:27 -0700 (PDT) Sender: Rene Ladan Message-ID: <49CCCE52.3000603@freebsd.org> Date: Fri, 27 Mar 2009 14:02:10 +0100 From: Rene Ladan Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= References: <200903131040.n2DAecSO061131@svn.freebsd.org> <49BB0DF0.3020907@FreeBSD.org> <49CBFC02.2000506@FreeBSD.org> In-Reply-To: <49CBFC02.2000506@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2895A9050401B4689F52741E" Cc: Tom Rhodes , doc@FreeBSD.org, Gabor Pali , Robert Watson , Giorgos Keramidas , svn-src-head@freebsd.org, "Sean C. Farley" Subject: Re: NLS additions to I18N chapter of developers-handbook [Was: Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls] X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 13:03:32 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2895A9050401B4689F52741E Content-Type: multipart/mixed; boundary="------------090604030101000804030602" This is a multi-part message in MIME format. --------------090604030101000804030602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable G=E1bor K=F6vesd=E1n schreef: > Robert Watson escribi=F3: >> Do you have any advice on what to do for libraries that provide error = >> strings in their own error spaces? Is it intended that the library's = >> init and destroy functions will open and close catalogues? Will this = >> work if the application the library is used by doesn't know about=20 >> catalogues? Etc... > I've made one more little addition, which can be useful to spare with=20 > error strings. :) > http://kovesdan.org/patches/nls-doc2.diff >=20 Looks nice. I corrected a few minor mistakes in the attached patch. On my 8.0 box with localized libc, I get the English message when setting errno to ENOTDIR and calling err(1, NULL) in a test program. Is this to be expected? Regards, Rene --=20 http://www.rene-ladan.nl/ GPG fingerprint =3D ADBC ECCD EB5F A6B4 549F 600D 8C9E 647A E564 2BFC (s= ubkeys.pgp.net) --------------090604030101000804030602 Content-Type: text/plain; name="nls-doc2.rene.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="nls-doc2.rene.diff" --- nls-doc2.diff 2009-03-27 13:37:58.000000000 +0100 +++ rene-nls-doc2.diff 2009-03-27 13:48:11.000000000 +0100 @@ -11,16 +11,16 @@ #endif + + -+ Reducing strings to localize ++ Reducing Strings to Localize + + There is a good way of reducing the strings that -+ needs to be localized by using libc ++ need to be localized by using libc + error messages. This is also useful to just avoid duplication + and provide consistent error messages for the common errors + that can be encountered by a great many of programs. + -+ First, here is an example that do not use -+ libc error messages. ++ First, here is an example that does not use ++ libc error messages: + + +#include <err.h> @@ -48,7 +48,7 @@ + and users will see the usual Not a directory + error message when they encounter this error. This message + will probably seem more familiar to them. Please note that -+ it was necessary to include errno.h in order to directly + access errno. + --------------090604030101000804030602-- --------------enig2895A9050401B4689F52741E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknMzp0ACgkQjJ5keuVkK/xnjgCeN4kf4wV28N/Cb2PP1lCf/TUj fEQAoLfyE0Sr/64/2kOuyW4yT8pztE6X =sX/N -----END PGP SIGNATURE----- --------------enig2895A9050401B4689F52741E--