wok annotate hardinfo/stuff/languages.patch @ rev 15014

giac: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 11 14:06:30 2013 +0000 (2013-08-11)
parents c5069bc9ff25
children
rev   line source
pascal@694 1 --- arch/common/languages.h 2008-04-26 10:04:42.000000000 +0200
pascal@694 2 +++ arch/common/languages.h 2008-04-26 10:51:31.000000000 +0200
pascal@694 3 @@ -21,6 +21,7 @@
pascal@694 4 {
pascal@694 5 FILE *locale;
pascal@694 6 gchar buf[512], *retval = NULL;
pascal@694 7 + int last = 0;
pascal@694 8
pascal@694 9 locale = popen("locale -va", "r");
pascal@694 10 if (!locale)
pascal@694 11 @@ -37,7 +38,8 @@
pascal@694 12 *date = NULL,
pascal@694 13 *codeset = NULL;
pascal@694 14
pascal@694 15 - while (fgets(buf, 512, locale)) {
pascal@694 16 + while (fgets(buf, 512, locale) || last++ == 0) {
pascal@694 17 + if (last) buf[0] = 0;
pascal@694 18 if (!strncmp(buf, "locale:", 7)) {
pascal@694 19 sscanf(buf, "locale: %s", name);
slaxemulator@6223 20 (void)fgets(buf, 128, locale);