wok-current view hardinfo/stuff/languages.patch @ rev 19808
Improve MATE full desktop environment meta package
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 26 15:58:33 2017 +0100 (2017-02-26) |
parents | c5069bc9ff25 |
children |
line source
1 --- arch/common/languages.h 2008-04-26 10:04:42.000000000 +0200
2 +++ arch/common/languages.h 2008-04-26 10:51:31.000000000 +0200
3 @@ -21,6 +21,7 @@
4 {
5 FILE *locale;
6 gchar buf[512], *retval = NULL;
7 + int last = 0;
9 locale = popen("locale -va", "r");
10 if (!locale)
11 @@ -37,7 +38,8 @@
12 *date = NULL,
13 *codeset = NULL;
15 - while (fgets(buf, 512, locale)) {
16 + while (fgets(buf, 512, locale) || last++ == 0) {
17 + if (last) buf[0] = 0;
18 if (!strncmp(buf, "locale:", 7)) {
19 sscanf(buf, "locale: %s", name);
20 (void)fgets(buf, 128, locale);