wok-next diff hardinfo/stuff/patches/languages.patch @ rev 20661

Unification of the patch system
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 10 21:12:00 2018 +0300 (2018-05-10)
parents hardinfo/stuff/languages.patch@4de2c7803ae7
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hardinfo/stuff/patches/languages.patch	Thu May 10 21:12:00 2018 +0300
     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 +	    (void)fgets(buf, 128, locale);