aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-20 09:19:28 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2017-07-30 10:09:27 -0700
commitefa7586a8fd1c2aaca84841d419c6be4ae4769cd (patch)
tree931a279e12618155f454305f95b71e9465aa33c2
parent54910fb92f3892ab5dc9ea23f0ddfc6c24c589d0 (diff)
boots.c, environment.c: cleanup
* mixed tab/space indent -> all space * break translatable labels out of format strings Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r--modules/computer/boots.c19
-rw-r--r--modules/computer/environment.c10
2 files changed, 15 insertions, 14 deletions
diff --git a/modules/computer/boots.c b/modules/computer/boots.c
index 478e89ac..d8a6d32a 100644
--- a/modules/computer/boots.c
+++ b/modules/computer/boots.c
@@ -30,22 +30,22 @@ scan_boots_real(void)
scan_os(FALSE);
if (!computer->os->boots)
- computer->os->boots = g_strdup(_("[Boots]\n"));
+ computer->os->boots = g_strdup_printf("[%s]\n", _("Boots"));
else
return;
-
+
last = popen("last", "r");
if (last) {
while (fgets(buffer, 256, last)) {
if (strstr(buffer, "system boot")) {
gchar **tmp, *buf = buffer;
-
+
strend(buffer, '\n');
-
+
while (*buf) {
if (*buf == ' ' && *(buf + 1) == ' ') {
memmove(buf, buf + 1, strlen(buf) + 1);
-
+
buf--;
} else {
buf++;
@@ -53,13 +53,14 @@ scan_boots_real(void)
}
tmp = g_strsplit(buffer, " ", 0);
- computer->os->boots = h_strdup_cprintf("\n%s %s %s %s=%s|%s",
- computer->os->boots,
- tmp[4], tmp[5], tmp[6], tmp[7], tmp[3], tmp[8]);
+ computer->os->boots =
+ h_strdup_cprintf("\n%s %s %s %s=%s|%s",
+ computer->os->boots,
+ tmp[4], tmp[5], tmp[6], tmp[7], tmp[3], tmp[8]);
g_strfreev(tmp);
}
}
-
+
pclose(last);
}
}
diff --git a/modules/computer/environment.c b/modules/computer/environment.c
index 2a8d235c..dc0fb6f3 100644
--- a/modules/computer/environment.c
+++ b/modules/computer/environment.c
@@ -23,19 +23,19 @@ static gchar *_env = NULL;
void scan_env_var(gboolean reload)
{
SCAN_START();
-
+
gchar **envlist;
gint i;
-
+
g_free(_env);
-
- _env = g_strdup(_("[Environment Variables]\n"));
+
+ _env = g_strdup_printf("[%s]\n", _("Environment Variables") );
for (i = 0, envlist = g_listenv(); envlist[i]; i++) {
_env = h_strdup_cprintf("%s=%s\n", _env,
envlist[i], g_getenv(envlist[i]));
}
g_strfreev(envlist);
-
+
SCAN_END();
}