summaryrefslogtreecommitdiff
path: root/arch/common/languages.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/common/languages.h')
-rw-r--r--arch/common/languages.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/common/languages.h b/arch/common/languages.h
index 71e05dab..786b829f 100644
--- a/arch/common/languages.h
+++ b/arch/common/languages.h
@@ -1,6 +1,6 @@
/*
* HardInfo - Displays System Information
- * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.br>
+ * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@linuxmag.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
void
scan_languages(OperatingSystem * os)
{
@@ -65,6 +66,7 @@ scan_languages(OperatingSystem * os)
retval = g_strdup_printf("%s$%s$%s=%s\n", retval, name, name, title);
+#define FIELD(f) f ? f : "(Unknown)"
currlocale = g_strdup_printf("[Locale Information]\n"
"Name=%s (%s)\n"
"Source=%s\n"
@@ -74,10 +76,13 @@ scan_languages(OperatingSystem * os)
"Territory=%s\n"
"Revision=%s\n"
"Date=%s\n"
- "Codeset=%s\n", name, title,
- source, address, email, language,
- territory, revision, date,
- codeset);
+ "Codeset=%s\n",
+ FIELD(name), FIELD(title),
+ FIELD(source), FIELD(address),
+ FIELD(email), FIELD(language),
+ FIELD(territory), FIELD(revision),
+ FIELD(date), FIELD(codeset));
+#undef FIELD
g_hash_table_insert(moreinfo, g_strdup(name), currlocale);