summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-08-20 14:19:53 +1000
committerNathan Scott <nathans@redhat.com>2020-08-20 14:19:53 +1000
commita82fd262d75f8494c34416e49c6241c29692676e (patch)
tree5c4ff9b8a872ca06e8e200a034099c736da1e160 /htop.c
parentcdff8aea2ab10870af1aad5bdb6949ea0fd407b0 (diff)
parent63fbc3b51704b4b122d2cab57de7e7f9dfcc03b1 (diff)
Merge branch 'hishamhm-pull-960'
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/htop.c b/htop.c
index 93b788fb..53490a7c 100644
--- a/htop.c
+++ b/htop.c
@@ -34,7 +34,7 @@ static void printVersionFlag() {
stdout);
exit(0);
}
-
+
static void printHelpFlag() {
fputs("htop " VERSION " - " COPYRIGHT "\n"
"Released under the GNU GPL.\n\n"
@@ -196,12 +196,12 @@ int main(int argc, char** argv) {
exit(1);
}
#endif
-
+
Process_setupColumnWidths();
-
+
UsersTable* ut = UsersTable_new();
ProcessList* pl = ProcessList_new(ut, flags.pidWhiteList, flags.userId);
-
+
Settings* settings = Settings_new(pl->cpuCount);
pl->settings = settings;
@@ -211,18 +211,18 @@ int main(int argc, char** argv) {
if (flags.delay != -1)
settings->delay = flags.delay;
- if (!flags.useColors)
+ if (!flags.useColors)
settings->colorScheme = COLORSCHEME_MONOCHROME;
if (flags.treeView)
settings->treeView = true;
CRT_init(settings->delay, settings->colorScheme);
-
+
MainPanel* panel = MainPanel_new();
ProcessList_setPanel(pl, (Panel*) panel);
MainPanel_updateTreeFunctions(panel, settings->treeView);
-
+
if (flags.sortKey > 0) {
settings->sortKey = flags.sortKey;
settings->treeView = false;
@@ -238,7 +238,7 @@ int main(int argc, char** argv) {
.header = header,
};
MainPanel_setState(panel, &state);
-
+
ScreenManager* scr = ScreenManager_new(0, header->height, 0, -1, HORIZONTAL, header, settings, true);
ScreenManager_add(scr, (Panel*) panel, -1);
@@ -246,13 +246,13 @@ int main(int argc, char** argv) {
millisleep(75);
ProcessList_scan(pl);
- ScreenManager_run(scr, NULL, NULL);
-
+ ScreenManager_run(scr, NULL, NULL);
+
attron(CRT_colors[RESET_COLOR]);
mvhline(LINES-1, 0, ' ', COLS);
attroff(CRT_colors[RESET_COLOR]);
refresh();
-
+
CRT_done();
if (settings->changed)
Settings_write(settings);
@@ -260,10 +260,10 @@ int main(int argc, char** argv) {
ProcessList_delete(pl);
ScreenManager_delete(scr);
-
+
UsersTable_delete(ut);
Settings_delete(settings);
-
+
if(flags.pidWhiteList) {
Hashtable_delete(flags.pidWhiteList);
}

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