summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-02-25 01:37:31 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-02-25 01:37:31 +0000
commit8f230920cd7f4e8f2c0c261f9b0ce8e39c3a1f8a (patch)
tree9e90c0aaaef44c8b7bd6d458b9226c0c46db0f37 /Settings.c
parentaff118ab39b6e47a808f9cb01bd9c9fffe9bc485 (diff)
show custom thread names
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Settings.c b/Settings.c
index 2d55afdb..9a48bda2 100644
--- a/Settings.c
+++ b/Settings.c
@@ -98,6 +98,8 @@ static bool Settings_read(Settings* this, char* fileName) {
this->pl->hideUserlandThreads = atoi(option[1]);
} else if (String_eq(option[0], "shadow_other_users")) {
this->pl->shadowOtherUsers = atoi(option[1]);
+ } else if (String_eq(option[0], "show_thread_names")) {
+ this->pl->showThreadNames = atoi(option[1]);
} else if (String_eq(option[0], "highlight_base_name")) {
this->pl->highlightBaseName = atoi(option[1]);
} else if (String_eq(option[0], "highlight_megabytes")) {
@@ -163,6 +165,7 @@ bool Settings_write(Settings* this) {
fprintf(fd, "hide_kernel_threads=%d\n", (int) this->pl->hideKernelThreads);
fprintf(fd, "hide_userland_threads=%d\n", (int) this->pl->hideUserlandThreads);
fprintf(fd, "shadow_other_users=%d\n", (int) this->pl->shadowOtherUsers);
+ fprintf(fd, "show_thread_names=%d\n", (int) this->pl->showThreadNames);
fprintf(fd, "highlight_base_name=%d\n", (int) this->pl->highlightBaseName);
fprintf(fd, "highlight_megabytes=%d\n", (int) this->pl->highlightMegabytes);
fprintf(fd, "highlight_threads=%d\n", (int) this->pl->highlightThreads);
@@ -201,7 +204,7 @@ Settings* Settings_new(ProcessList* pl, Header* header) {
Settings* this = malloc(sizeof(Settings));
this->pl = pl;
this->header = header;
- char* home;
+ const char* home;
char* rcfile;
home = getenv("HOME_ETC");
if (!home) home = getenv("HOME");

© 2014-2024 Faster IT GmbH | imprint | privacy policy