Date: Fri, 22 May 2009 12:18:55 +0200 From: Gabor Kovesdan <gabor@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: unixmania@gmail.com, danfe@freebsd.org, src-committers@freebsd.org, peterjeremy@optushome.com.au, svn-src-all@freebsd.org, stas@freebsd.org, gnn@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" <imp@bsdimp.com> Subject: Re: svn commit: r192398 - in head/usr.bin: . perror Message-ID: <4A167C0F.7080705@FreeBSD.org> In-Reply-To: <20090522195717.U22330@delplex.bde.org> References: <e71790db0905201558u1c8e3e90n1fbbfc4011e22909@mail.gmail.com> <20090521132404.cc5be268.stas@FreeBSD.org> <20090521110115.GA50355@FreeBSD.org> <20090521.085256.-1989816394.imp@bsdimp.com> <20090522195717.U22330@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans escribió: > On Thu, 21 May 2009, M. Warner Losh wrote: > >> In message: <20090521110115.GA50355@FreeBSD.org> >> Alexey Dokuchaev <danfe@FreeBSD.org> writes: >> : > Given how easy it is to "grep <<errno>> /usr/include/sys/errno.h" or >> : > perl -e '$! = <<errno>>; print "$!\n";' >> : > I'm not sure of the utility of this tool. >> : >> : User scripts should not depend on presence of system include files. >> : Now, just to mention, Nick's suggestion about dropping extra noise >> : actually good one. >> >> There's also internationalization that actually happens too, right? >> That doesn't happen with grep.. > > What about with "man errno". Man pages are slightly more likely to be > present than application (not system) include files, and man should > support localization. It gives more noise than grepping an include > file, but the noise might be signal and can be filtered. Our man page toolset doesn't really support localization. I haven't done big investigations but I remember that lack of ISO8859-2 support prevented us from translating man pages into Hungarian. Beside this, it isn't a flexible way of listing the error messages there because you have to explicitly list them or make some magic to generate the man page. But what if a specific translation changes? What if a new translation is added? One will have to keep these in sync then. While retrieving those messages from C code is trivial and no such considerations are needed, so I vote for the perror utility. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A167C0F.7080705>