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

Add alarm-clock-applet
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Feb 07 01:18:17 2013 +0000 (2013-02-07)
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);