wok-6.x annotate hardinfo/stuff/languages.patch @ rev 3134

newt: fix compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 20 17:32:15 2009 +0200 (2009-05-20)
parents
children 4de2c7803ae7
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);
pascal@694 20 fgets(buf, 128, locale);