wok diff hardinfo/stuff/languages.patch @ rev 6037

Up java-jre/java-jdk (1.8.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 16 22:22:10 2010 +0200 (2010-08-16)
parents
children 4de2c7803ae7
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hardinfo/stuff/languages.patch	Mon Aug 16 22:22:10 2010 +0200
     1.3 @@ -0,0 +1,20 @@
     1.4 +--- arch/common/languages.h	2008-04-26 10:04:42.000000000 +0200
     1.5 ++++ arch/common/languages.h	2008-04-26 10:51:31.000000000 +0200
     1.6 +@@ -21,6 +21,7 @@
     1.7 + {
     1.8 +     FILE *locale;
     1.9 +     gchar buf[512], *retval = NULL;
    1.10 ++    int last = 0;
    1.11 + 
    1.12 +     locale = popen("locale -va", "r");
    1.13 +     if (!locale)
    1.14 +@@ -37,7 +38,8 @@
    1.15 + 	  *date = NULL,
    1.16 + 	  *codeset = NULL;
    1.17 + 
    1.18 +-    while (fgets(buf, 512, locale)) {
    1.19 ++    while (fgets(buf, 512, locale) || last++ == 0) {
    1.20 ++	if (last) buf[0] = 0;
    1.21 + 	if (!strncmp(buf, "locale:", 7)) {
    1.22 + 	    sscanf(buf, "locale: %s", name);
    1.23 + 	    fgets(buf, 128, locale);