Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-31 Thread Johannes Stezenbach
On Thu, May 30, 2013 at 04:25:10PM +, Nathan Hjelm wrote: > The contents of gettext-runtime/COPYING: > > The gettext-runtime package is partially under the LGPL and partially under > the GPL. > > The following parts are under the LGPL, see file intl/COPYING.LIB: >   - the libintl and libaspri

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Pete Batard
On 2013.05.30 16:08, Sean McBride wrote: > Aside: would be nice to add "What is the license?" to the FAQ here: > Done. Regards, /Pete -- Introducing AppDynamics Lite, a fre

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Pete Batard
On 2013.05.30 17:24, Orin Eman wrote: > So I'm in the English ASCII only and have done with it camp. Well, I'm firmly in the let's get done with it camp. And like Orin I'm not entirely sure about the whole point of localizing our error strings or just how much usage this localization will actual

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Nathan Hjelm
The contents of gettext-runtime/COPYING:The gettext-runtime package is partially under the LGPL and partially underthe GPL.The following parts are under the LGPL, see file intl/COPYING.LIB:  - the libintl and libasprintf libraries and their header files,  - the libintl.jar Java library,  - the GNU.

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Orin Eman
On Thu, May 30, 2013 at 2:30 AM, Hans de Goede wrote: > Hi, > > On 05/30/2013 09:44 AM, Xiaofan Chen wrote: > > On Tue, May 28, 2013 at 6:25 PM, Hans de Goede > wrote: > >> This patch adds the much requested libusb_strerror() function, taking > into > >> account all issues people raised wrt prev

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Nathan Hjelm
On May 30, 2013, at 10:17 AM, Ludovic Rousseau wrote:2013/5/30 Nathan Hjelm : > > > On May 30, 2013, at 09:08 AM, Sean McBride wrote: > > On Thu, 30 May 2013 09:35:06 +0200, Johannes Stezenbach said: > >>I can't comment on gettext on Windows, only that a qu

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Ludovic Rousseau
2013/5/30 Nathan Hjelm : > > > On May 30, 2013, at 09:08 AM, Sean McBride wrote: > > On Thu, 30 May 2013 09:35:06 +0200, Johannes Stezenbach said: > >>I can't comment on gettext on Windows, only that a quick search >>shows there are several projects using it. Anyway, I trust you >>to do the right

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Nathan Hjelm
On May 30, 2013, at 09:08 AM, Sean McBride wrote:On Thu, 30 May 2013 09:35:06 +0200, Johannes Stezenbach said: >I can't comment on gettext on Windows, only that a quick search >shows there are several projects using it. Anyway, I trust you >to do the right decision for Windows, but it feels wrong

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Sean McBride
On Thu, 30 May 2013 09:35:06 +0200, Johannes Stezenbach said: >I can't comment on gettext on Windows, only that a quick search >shows there are several projects using it. Anyway, I trust you >to do the right decision for Windows, but it feels wrong >to not use gettext on Linux and BSD. But you a

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Hans de Goede
Hi, On 05/30/2013 09:44 AM, Xiaofan Chen wrote: > On Tue, May 28, 2013 at 6:25 PM, Hans de Goede wrote: >> This patch adds the much requested libusb_strerror() function, taking into >> account all issues people raised wrt previous attempts. >> >> Criteria / Decisions underlying this implementatio

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Hans de Goede
Hi, On 05/30/2013 12:50 AM, Pete Batard wrote: > PS: I also think that if we go for adding a stelocale, it should be > called libusb_setlocale() rather than libusb_set_strerror_locale(). Or > do we plan to have different setlocale for different API calls? Sound reasonable, I will fix this in t

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Kustaa Nyholm
On 30/05/2013 10:44, "Xiaofan Chen" wrote: >On Tue, May 28, 2013 at 6:25 PM, Hans de Goede >wrote: >> This patch adds the much requested libusb_strerror() function, taking >>into >> account all issues people raised wrt previous attempts. >> >> Criteria / Decisions underlying this implementation:

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Kustaa Nyholm
On 30/05/2013 10:35, "Johannes Stezenbach" wrote: >How do native Windows programs handle thandle translations? Sorry to jump in, especially as I've not followed the discussion in detail (and the earlier discussion the more or less same discussion on libusb-devel) and not specifically commenting a

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Xiaofan Chen
On Tue, May 28, 2013 at 6:25 PM, Hans de Goede wrote: > This patch adds the much requested libusb_strerror() function, taking into > account all issues people raised wrt previous attempts. > > Criteria / Decisions underlying this implementation: > -Must support translated messages > -Must not use

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Johannes Stezenbach
On Wed, May 29, 2013 at 11:50:39PM +0100, Pete Batard wrote: > On 2013.05.29 23:25, Hans de Goede wrote: > > Hi, > > > > On 05/30/2013 12:17 AM, Sean McBride wrote: > >> On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said: > >> > IMHO you should use LC_MESSAGES in the usual way instead > >>

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Pete Batard
On 2013.05.29 23:25, Hans de Goede wrote: > Hi, > > On 05/30/2013 12:17 AM, Sean McBride wrote: >> On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said: >> IMHO you should use LC_MESSAGES in the usual way instead of inventing your own API. I.e. libusb_strerror() internally calls s

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Pete Batard
On 2013.05.29 13:01, Ludovic Rousseau wrote: >> Why not go: >> const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode, >> const char *locale); >> ? > > Because very few people will need to change the locale parameter for > different calls to libusb_strerror()? That wasn't the point. Th

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Sean McBride
On Thu, 30 May 2013 00:25:53 +0200, Hans de Goede said: >> Wouldn't that be getlocale()? With a name like setlocale(), and from >my reading of the man page, that API changes the locale, does it not? > >If you pass in a second argument it changes things, if you pass >in NULL it queries the current

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Hans de Goede
Hi, On 05/30/2013 12:17 AM, Sean McBride wrote: > On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said: > >>> IMHO you should use LC_MESSAGES in the usual way instead >>> of inventing your own API. I.e. libusb_strerror() internally >>> calls setlocale(LC_MESSAGES, NULL) to query the locale. >>

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Sean McBride
On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said: >> IMHO you should use LC_MESSAGES in the usual way instead >> of inventing your own API. I.e. libusb_strerror() internally >> calls setlocale(LC_MESSAGES, NULL) to query the locale. > >Which is exactly what it does when the apps does not ma

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Hans de Goede
Hi, On 05/29/2013 10:00 PM, Johannes Stezenbach wrote: > On Tue, May 28, 2013 at 12:25:42PM +0200, Hans de Goede wrote: >> This patch adds the much requested libusb_strerror() function, taking into >> account all issues people raised wrt previous attempts. >> >> Criteria / Decisions underlying thi

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Johannes Stezenbach
On Tue, May 28, 2013 at 12:25:42PM +0200, Hans de Goede wrote: > This patch adds the much requested libusb_strerror() function, taking into > account all issues people raised wrt previous attempts. > > Criteria / Decisions underlying this implementation: > -Must support translated messages > -Must

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Hans de Goede
Hi, On 05/29/2013 02:59 AM, Pete Batard wrote: > On 2013.05.28 11:25, Hans de Goede wrote: >> +int LIBUSB_CALL libusb_set_strerror_locale(const char *locale); >> +const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode); > > Why not go: > const char * LIBUSB_CALL libusb_strerror(enum li

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-29 Thread Ludovic Rousseau
2013/5/29 Pete Batard : > On 2013.05.28 11:25, Hans de Goede wrote: >> +int LIBUSB_CALL libusb_set_strerror_locale(const char *locale); >> +const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode); > > Why not go: > const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode, > co

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-28 Thread Pete Batard
On 2013.05.28 11:25, Hans de Goede wrote: > +int LIBUSB_CALL libusb_set_strerror_locale(const char *locale); > +const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode); Why not go: const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode, const char *locale); ? Since it's b

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-28 Thread Hans de Goede
Hi, Thanks for the comments and the review. On 05/28/2013 01:10 PM, Ludovic Rousseau wrote: > Hello, > > 2013/5/28 Hans de Goede : >> This patch adds the much requested libusb_strerror() function, taking into >> account all issues people raised wrt previous attempts. >> >> Criteria / Decisions un

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-28 Thread Ludovic Rousseau
Hello, 2013/5/28 Hans de Goede : > This patch adds the much requested libusb_strerror() function, taking into > account all issues people raised wrt previous attempts. > > Criteria / Decisions underlying this implementation: > -Must support translated messages > -Must not use gettext as that does