summaryrefslogtreecommitdiffstats
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
parentcdff8aea2ab10870af1aad5bdb6949ea0fd407b0 (diff)
parent63fbc3b51704b4b122d2cab57de7e7f9dfcc03b1 (diff)
Merge branch 'hishamhm-pull-960'
-rw-r--r--.editorconfig1
-rw-r--r--Action.c4
-rw-r--r--AvailableMetersPanel.c4
-rw-r--r--BatteryMeter.c2
-rw-r--r--CPUMeter.c14
-rw-r--r--CRT.c4
-rw-r--r--CheckItem.c4
-rw-r--r--ColorsPanel.c2
-rw-r--r--ColumnsPanel.c4
-rw-r--r--DisplayOptionsPanel.c2
-rw-r--r--FunctionBar.c2
-rw-r--r--Hashtable.c8
-rw-r--r--Header.c10
-rw-r--r--InfoScreen.c4
-rw-r--r--MainPanel.c6
-rw-r--r--MemoryMeter.c2
-rw-r--r--Meter.c16
-rw-r--r--Meter.h2
-rw-r--r--MetersPanel.c2
-rw-r--r--Object.c2
-rw-r--r--Object.h2
-rw-r--r--Panel.c4
-rw-r--r--Process.c10
-rw-r--r--ProcessList.c10
-rw-r--r--RichString.c2
-rw-r--r--RichString.h2
-rw-r--r--ScreenManager.c6
-rw-r--r--Settings.c16
-rw-r--r--Settings.h2
-rw-r--r--StringUtils.c2
-rw-r--r--TasksMeter.c6
-rw-r--r--Vector.c4
-rw-r--r--darwin/DarwinProcess.c12
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c2
-rw-r--r--htop.c26
-rw-r--r--linux/Battery.c7
-rw-r--r--linux/IOPriority.c2
-rw-r--r--linux/IOPriority.h2
-rw-r--r--linux/LinuxProcess.c4
-rw-r--r--linux/LinuxProcess.h2
-rw-r--r--linux/LinuxProcessList.c38
-rw-r--r--linux/LinuxProcessList.h6
-rw-r--r--openbsd/Battery.c6
-rw-r--r--solaris/Platform.c14
-rw-r--r--solaris/Platform.h2
-rw-r--r--solaris/SolarisProcessList.c22
-rw-r--r--solaris/SolarisProcessList.h2
-rw-r--r--unsupported/UnsupportedProcessList.c2
48 files changed, 155 insertions, 155 deletions
diff --git a/.editorconfig b/.editorconfig
index 18807892..dd881dd0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -14,3 +14,4 @@ charset = utf-8
[*.{c,h}]
indent_style = space
indent_size = 3
+trim_trailing_whitespace = true
diff --git a/Action.c b/Action.c
index 55217c49..825e743d 100644
--- a/Action.c
+++ b/Action.c
@@ -66,7 +66,7 @@ Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess)
Panel* panel = st->panel;
Header* header = st->header;
Settings* settings = st->settings;
-
+
int y = panel->y;
ScreenManager* scr = ScreenManager_new(0, header->height, 0, -1, HORIZONTAL, header, settings, false);
scr->allowFocusChange = false;
@@ -313,7 +313,7 @@ static Htop_Reaction actionSetAffinity(State* st) {
return HTOP_OK;
#if (HAVE_LIBHWLOC || HAVE_LINUX_AFFINITY)
Panel* panel = st->panel;
-
+
Process* p = (Process*) Panel_getSelected(panel);
if (!p) return HTOP_OK;
Affinity* affinity = Affinity_get(p, st->pl);
diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c
index 40534bb7..5dac10b9 100644
--- a/AvailableMetersPanel.c
+++ b/AvailableMetersPanel.c
@@ -52,7 +52,7 @@ static inline void AvailableMetersPanel_addMeter(Header* header, Panel* panel, M
static HandlerResult AvailableMetersPanel_eventHandler(Panel* super, int ch) {
AvailableMetersPanel* this = (AvailableMetersPanel*) super;
Header* header = this->header;
-
+
ListItem* selected = (ListItem*) Panel_getSelected(super);
int param = selected->key & 0xff;
int type = selected->key >> 16;
@@ -104,7 +104,7 @@ AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Header* heade
Panel* super = (Panel*) this;
FunctionBar* fuBar = FunctionBar_newEnterEsc("Add ", "Done ");
Panel_init(super, 1, 1, 1, 1, Class(ListItem), true, fuBar);
-
+
this->settings = settings;
this->header = header;
this->leftPanel = leftMeters;
diff --git a/BatteryMeter.c b/BatteryMeter.c
index 214248e2..716b7750 100644
--- a/BatteryMeter.c
+++ b/BatteryMeter.c
@@ -35,7 +35,7 @@ int BatteryMeter_attributes[] = {
static void BatteryMeter_updateValues(Meter * this, char *buffer, int len) {
ACPresence isOnAC;
double percent;
-
+
Battery_getData(&percent, &isOnAC);
if (percent == -1) {
diff --git a/CPUMeter.c b/CPUMeter.c
index a6449fb7..8a23c487 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -219,7 +219,7 @@ MeterClass CPUMeter_class = {
.defaultMode = BAR_METERMODE,
.maxItems = CPU_METER_ITEMCOUNT,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "CPU",
.uiName = "CPU",
.caption = "CPU",
@@ -234,7 +234,7 @@ MeterClass AllCPUsMeter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "AllCPUs",
.uiName = "CPUs (1/1)",
.description = "CPUs (1/1): all CPUs",
@@ -253,7 +253,7 @@ MeterClass AllCPUs2Meter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "AllCPUs2",
.uiName = "CPUs (1&2/2)",
.description = "CPUs (1&2/2): all CPUs in 2 shorter columns",
@@ -272,7 +272,7 @@ MeterClass LeftCPUsMeter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "LeftCPUs",
.uiName = "CPUs (1/2)",
.description = "CPUs (1/2): first half of list",
@@ -291,7 +291,7 @@ MeterClass RightCPUsMeter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "RightCPUs",
.uiName = "CPUs (2/2)",
.description = "CPUs (2/2): second half of list",
@@ -310,7 +310,7 @@ MeterClass LeftCPUs2Meter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "LeftCPUs2",
.uiName = "CPUs (1&2/4)",
.description = "CPUs (1&2/4): first half in 2 shorter columns",
@@ -329,7 +329,7 @@ MeterClass RightCPUs2Meter_class = {
},
.defaultMode = CUSTOM_METERMODE,
.total = 100.0,
- .attributes = CPUMeter_attributes,
+ .attributes = CPUMeter_attributes,
.name = "RightCPUs2",
.uiName = "CPUs (3&4/4)",
.description = "CPUs (3&4/4): second half in 2 shorter columns",
diff --git a/CRT.c b/CRT.c
index 4d8f9428..98108fa4 100644
--- a/CRT.c
+++ b/CRT.c
@@ -625,12 +625,12 @@ void CRT_init(int delay, int colorScheme) {
}
CRT_colors = CRT_colorSchemes[colorScheme];
CRT_colorScheme = colorScheme;
-
+
for (int i = 0; i < LAST_COLORELEMENT; i++) {
unsigned int color = CRT_colorSchemes[COLORSCHEME_DEFAULT][i];
CRT_colorSchemes[COLORSCHEME_BROKENGRAY][i] = color == (A_BOLD | ColorPairGrayBlack) ? ColorPair(White,Black) : color;
}
-
+
halfdelay(CRT_delay);
nonl();
intrflush(stdscr, false);
diff --git a/CheckItem.c b/CheckItem.c
index b7ba6fec..910981e8 100644
--- a/CheckItem.c
+++ b/CheckItem.c
@@ -66,14 +66,14 @@ CheckItem* CheckItem_newByVal(char* text, bool value) {
}
void CheckItem_set(CheckItem* this, bool value) {
- if (this->ref)
+ if (this->ref)
*(this->ref) = value;
else
this->value = value;
}
bool CheckItem_get(CheckItem* this) {
- if (this->ref)
+ if (this->ref)
return *(this->ref);
else
return this->value;
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 2028335f..b2d3500c 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -56,7 +56,7 @@ static void ColorsPanel_delete(Object* object) {
static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) {
ColorsPanel* this = (ColorsPanel*) super;
-
+
HandlerResult result = IGNORED;
int mark = Panel_getSelectedIndex(super);
diff --git a/ColumnsPanel.c b/ColumnsPanel.c
index 8974ffdc..f982292e 100644
--- a/ColumnsPanel.c
+++ b/ColumnsPanel.c
@@ -40,7 +40,7 @@ static void ColumnsPanel_delete(Object* object) {
static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
ColumnsPanel* const this = (ColumnsPanel*) super;
-
+
int selected = Panel_getSelectedIndex(super);
HandlerResult result = IGNORED;
int size = Panel_size(super);
@@ -87,7 +87,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
case ']':
case '+':
{
- if (selected < size - 2)
+ if (selected < size - 2)
Panel_moveSelectedDown(super);
result = HANDLED;
break;
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index 0ff54e33..40b8d987 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -39,7 +39,7 @@ static void DisplayOptionsPanel_delete(Object* object) {
static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) {
DisplayOptionsPanel* this = (DisplayOptionsPanel*) super;
-
+
HandlerResult result = IGNORED;
CheckItem* selected = (CheckItem*) Panel_getSelected(super);
diff --git a/FunctionBar.c b/FunctionBar.c
index 4e4baaf3..8661bf0c 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -52,7 +52,7 @@ FunctionBar* FunctionBar_new(const char* const* functions, const char* const* ke
this->functions[i] = xStrdup(functions[i]);
}
if (keys && events) {
- this->staticData = false;
+ this->staticData = false;
this->keys = xCalloc(15, sizeof(char*));
this->events = xCalloc(15, sizeof(int));
int i = 0;
diff --git a/Hashtable.c b/Hashtable.c
index b3eac8da..3436dad6 100644
--- a/Hashtable.c
+++ b/Hashtable.c
@@ -63,7 +63,7 @@ int Hashtable_count(Hashtable* this) {
static HashtableItem* HashtableItem_new(unsigned int key, void* value) {
HashtableItem* this;
-
+
this = xMalloc(sizeof(HashtableItem));
this->key = key;
this->value = value;
@@ -73,7 +73,7 @@ static HashtableItem* HashtableItem_new(unsigned int key, void* value) {
Hashtable* Hashtable_new(int size, bool owner) {
Hashtable* this;
-
+
this = xMalloc(sizeof(Hashtable));
this->items = 0;
this->size = size;
@@ -119,10 +119,10 @@ void Hashtable_put(Hashtable* this, unsigned int key, void* value) {
void* Hashtable_remove(Hashtable* this, unsigned int key) {
unsigned int index = key % this->size;
-
+
assert(Hashtable_isConsistent(this));
- HashtableItem** bucket;
+ HashtableItem** bucket;
for (bucket = &(this->buckets[index]); *bucket; bucket = &((*bucket)->next) ) {
if ((*bucket)->key == key) {
void* value = (*bucket)->value;
diff --git a/Header.c b/Header.c
index 1f0028f7..a4075d22 100644
--- a/Header.c
+++ b/Header.c
@@ -76,17 +76,17 @@ void Header_populateFromSettings(Header* this) {
void Header_writeBackToSettings(const Header* this) {
Header_forEachColumn(this, col) {
MeterColumnSettings* colSettings = &this->settings->columns[col];
-
+
String_freeArray(colSettings->names);
free(colSettings->modes);
-
+
Vector* vec = this->columns[col];
int len = Vector_size(vec);
-
+
colSettings->names = xCalloc(len+1, sizeof(char*));
colSettings->modes = xCalloc(len, sizeof(int));
colSettings->len = len;
-
+
for (int i = 0; i < len; i++) {
Meter* meter = (Meter*) Vector_get(vec, i);
char* name = xCalloc(64, sizeof(char));
@@ -188,7 +188,7 @@ void Header_draw(const Header* this) {
}
int width = COLS / this->nrColumns - (pad * this->nrColumns - 1) - 1;
int x = pad;
-
+
Header_forEachColumn(this, col) {
Vector* meters = this->columns[col];
for (int y = (pad / 2), i = 0; i < Vector_size(meters); i++) {
diff --git a/InfoScreen.c b/InfoScreen.c
index 8ff33d0b..a6f56a9c 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -120,7 +120,7 @@ void InfoScreen_run(InfoScreen* this) {
}
set_escdelay(25);
int ch = getch();
-
+
if (ch == ERR) {
if (As_InfoScreen(this)->onErr) {
InfoScreen_onErr(this);
@@ -144,7 +144,7 @@ void InfoScreen_run(InfoScreen* this) {
IncSet_handleKey(this->inc, ch, panel, IncSet_getListItemValue, this->lines);
continue;
}
-
+
switch(ch) {
case ERR:
continue;
diff --git a/MainPanel.c b/MainPanel.c
index 19b09ff1..f8a20da0 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -65,7 +65,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
MainPanel* this = (MainPanel*) super;
HandlerResult result = IGNORED;
-
+
Htop_Reaction reaction = HTOP_OK;
if (EVENT_IS_HEADER_CLICK(ch)) {
@@ -80,7 +80,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
} else {
reaction |= Action_setSortKey(settings, field);
}
- reaction |= HTOP_RECALCULATE | HTOP_REDRAW_BAR | HTOP_SAVE_SETTINGS;
+ reaction |= HTOP_RECALCULATE | HTOP_REDRAW_BAR | HTOP_SAVE_SETTINGS;
result = HANDLED;
} else if (ch != ERR && this->inc->active) {
bool filterChanged = IncSet_handleKey(this->inc, ch, super, (IncMode_GetPanelValue) MainPanel_getValue, NULL);
@@ -117,7 +117,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
}
if (reaction & HTOP_REFRESH) {
result |= REDRAW;
- }
+ }
if (reaction & HTOP_RECALCULATE) {
result |= RESCAN;
}
diff --git a/MemoryMeter.c b/MemoryMeter.c
index fbf5330c..8d5d809e 100644
--- a/MemoryMeter.c
+++ b/MemoryMeter.c
@@ -60,7 +60,7 @@ MeterClass MemoryMeter_class = {
.delete = Meter_delete,
.display = MemoryMeter_display,
},
- .updateValues = MemoryMeter_updateValues,
+ .updateValues = MemoryMeter_updateValues,
.defaultMode = BAR_METERMODE,
.maxItems = 3,
.total = 100.0,
diff --git a/Meter.c b/Meter.c
index d1c33c3b..699a7881 100644
--- a/Meter.c
+++ b/Meter.c
@@ -78,7 +78,7 @@ typedef struct MeterClass_ {
struct Meter_ {
Object super;
Meter_Draw draw;
-
+
char* caption;
int mode;
int param;
@@ -275,7 +275,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
attrset(CRT_colors[BAR_BORDER]);
mvaddch(y, x, '[');
mvaddch(y, x + w, ']');
-
+
w--;
x++;
@@ -284,7 +284,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
return;
}
char bar[w + 1];
-
+
int blockSizes[10];
xSnprintf(bar, w + 1, "%*.*s", w, w, buffer);
@@ -378,7 +378,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
mvaddnstr(y, x, this->caption, captionLen);
x += captionLen;
w -= captionLen;
-
+
struct timeval now;
gettimeofday(&now, NULL);
if (!timercmp(&now, &(data->time), <)) {
@@ -387,10 +387,10 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
for (int i = 0; i < nValues - 1; i++)
data->values[i] = data->values[i+1];
-
+
char buffer[nValues];
Meter_updateValues(this, buffer, nValues - 1);
-
+
double value = 0.0;
int items = Meter_getItems(this);
for (int i = 0; i < items; i++)
@@ -398,7 +398,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
value /= this->total;
data->values[nValues - 1] = value;
}
-
+
int i = nValues - (w*2) + 2, k = 0;
if (i < 0) {
k = -i/2;
@@ -459,7 +459,7 @@ static void LEDMeterMode_draw(Meter* this, int x, int y, int w) {
char buffer[METER_BUFFER_LEN];
Meter_updateValues(this, buffer, METER_BUFFER_LEN - 1);
-
+
RichString_begin(out);
Meter_displayBuffer(this, buffer, &out);
diff --git a/Meter.h b/Meter.h
index 36e0e815..56d46f23 100644
--- a/Meter.h
+++ b/Meter.h
@@ -65,7 +65,7 @@ typedef struct MeterClass_ {
struct Meter_ {
Object super;
Meter_Draw draw;
-
+
char* caption;
int mode;
int param;
diff --git a/MetersPanel.c b/MetersPanel.c
index 3cf3e075..397a6c7d 100644
--- a/MetersPanel.c
+++ b/MetersPanel.c
@@ -93,7 +93,7 @@ static inline bool moveToNeighbor(MetersPanel* this, MetersPanel* neighbor, int
static HandlerResult MetersPanel_eventHandler(Panel* super, int ch) {
MetersPanel* this = (MetersPanel*) super;
-
+
int selected = Panel_getSelectedIndex(super);
HandlerResult result = IGNORED;
bool sideMove = false;
diff --git a/Object.c b/Object.c
index 66946352..5edcc603 100644
--- a/Object.c
+++ b/Object.c
@@ -29,7 +29,7 @@ typedef void(*Object_Delete)(Object*);
#define Class(class_) ((ObjectClass*)(&(class_ ## _class)))
#define AllocThis(class_) (class_*) xMalloc(sizeof(class_)); Object_setClass(this, Class(class_));
-
+
typedef struct ObjectClass_ {
const void* extends;
const Object_Display display;
diff --git a/Object.h b/Object.h
index 3505708c..9be948f8 100644
--- a/Object.h
+++ b/Object.h
@@ -30,7 +30,7 @@ typedef void(*Object_Delete)(Object*);
#define Class(class_) ((ObjectClass*)(&(class_ ## _class)))
#define AllocThis(class_) (class_*) xMalloc(sizeof(class_)); Object_setClass(this, Class(class_));
-
+
typedef struct ObjectClass_ {
const void* extends;
const Object_Display display;
diff --git a/Panel.c b/Panel.c
index 1e53b4a4..fc4fa3c2 100644
--- a/Panel.c
+++ b/Panel.c
@@ -372,7 +372,7 @@ void Panel_draw(Panel* this, bool focus) {
bool Panel_onKey(Panel* this, int key) {
assert (this != NULL);
-
+
int size = Vector_size(this->items);
switch (key) {
case KEY_DOWN:
@@ -455,7 +455,7 @@ bool Panel_onKey(Panel* this, int key) {
if (this->selected < 0 || size == 0) {
this->selected = 0;
this->needsRedraw = true;
- } else if (this->selected >= size) {
+ } else if (this->selected >= size) {
this->selected = size - 1;
this->needsRedraw = true;
}
diff --git a/Process.c b/Process.c
index eba169b0..7bcaf19a 100644
--- a/Process.c
+++ b/Process.c
@@ -220,7 +220,7 @@ void Process_setupColumnWidths() {
void Process_humanNumber(RichString* str, unsigned long number, bool coloring) {
char buffer[11];
int len;
-
+
int largeNumberColor = CRT_colors[LARGE_NUMBER];
int processMegabytesColor = CRT_colors[PROCESS_MEGABYTES];
int processColor = CRT_colors[PROCESS];
@@ -228,7 +228,7 @@ void Process_humanNumber(RichString* str, unsigned long number, bool coloring) {
largeNumberColor = CRT_colors[PROCESS];
processMegabytesColor = CRT_colors[PROCESS];
}
-
+
if(number >= (10 * ONE_DECIMAL_M)) {
#ifdef __LP64__
if(number >= (100 * ONE_DECIMAL_G)) {
@@ -394,9 +394,9 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
switch (field) {
case PERCENT_CPU: {
if (this->percent_cpu > 999.9) {
- xSnprintf(buffer, n, "%4u ", (unsigned int)this->percent_cpu);
+ xSnprintf(buffer, n, "%4u ", (unsigned int)this->percent_cpu);
} else if (this->percent_cpu > 99.9) {
- xSnprintf(buffer, n, "%3u. ", (unsigned int)this->percent_cpu);
+ xSnprintf(buffer, n, "%3u. ", (unsigned int)this->percent_cpu);
} else {
xSnprintf(buffer, n, "%4.1f ", this->percent_cpu);
}
@@ -404,7 +404,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
}
case PERCENT_MEM: {
if (this->percent_mem > 99.9) {
- xSnprintf(buffer, n, "100. ");
+ xSnprintf(buffer, n, "100. ");
} else {
xSnprintf(buffer, n, "%4.1f ", this->percent_mem);
}
diff --git a/ProcessList.c b/ProcessList.c
index 7482b037..edbc114c 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -84,10 +84,10 @@ ProcessList* ProcessList_init(ProcessList* this, ObjectClass* klass, UsersTable*
this->usersTable = usersTable;
this->pidWhiteList = pidWhiteList;
this->userId = userId;
-
+
// tree-view auxiliary buffer
this->processes2 = Vector_new(klass, true, DEFAULT_SIZE);
-
+
// set later by platform-specific code
this->cpuCount = 0;
@@ -138,10 +138,10 @@ void ProcessList_printHeader(ProcessList* this, RichString* header) {
void ProcessList_add(ProcessList* this, Process* p) {
assert(Vector_indexOf(this->processes, p, Process_pidCompare) == -1);
assert(Hashtable_get(this->processTable, p->pid) == NULL);
-
+
Vector_add(this->processes, p);
Hashtable_put(this->processTable, p->pid, p);
-
+
assert(Vector_indexOf(this->processes, p, Process_pidCompare) != -1);
assert(Hashtable_get(this->processTable, p->pid) != NULL);
assert(Hashtable_count(this->processTable) == Vector_count(this->processes));
@@ -353,7 +353,7 @@ void ProcessList_scan(ProcessList* this) {
this->runningTasks = 0;
ProcessList_goThroughEntries(this);
-
+
for (int i = Vector_size(this->processes) - 1; i >= 0; i--) {
Process* p = (Process*) Vector_get(this->processes, i);
if (p->updated == false)
diff --git a/RichString.c b/RichString.c
index 370566a8..d246f1e1 100644
--- a/RichString.c
+++ b/RichString.c
@@ -67,7 +67,7 @@ typedef struct RichString_ {
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
#endif
-#define charBytes(n) (sizeof(CharType) * (n))
+#define charBytes(n) (sizeof(CharType) * (n))
static void RichString_extendLen(RichString* this, int len) {
if (this->chlen <= RICHSTRING_MAXLEN) {
diff --git a/RichString.h b/RichString.h
index a294a550..d6fa6354 100644
--- a/RichString.h
+++ b/RichString.h
@@ -63,7 +63,7 @@ typedef struct RichString_ {
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
#endif
-#define charBytes(n) (sizeof(CharType) * (n))
+#define charBytes(n) (sizeof(CharType) * (n))
#define RichString_setLen(this, len) do{ if(len < RICHSTRING_MAXLEN && this->chlen < RICHSTRING_MAXLEN) { RichString_setChar(this,len,0); this->chlen=len; } else RichString_extendLen(this,len); }while(0)
diff --git a/ScreenManager.c b/ScreenManager.c
index 06e90193..54d4ea45 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -163,7 +163,7 @@ static Panel* setCurrentPanel(Panel* panel) {
void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
bool quit = false;
int focus = 0;
-
+
Panel* panelFocus = setCurrentPanel((Panel*) Vector_get(this->panels, focus));
double oldTime = 0.0;
@@ -181,7 +181,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
if (this->header) {
checkRecalculation(this, &oldTime, &sortTimeout, &redraw, &rescan, &timedOut);
}
-
+
if (redraw) {
ScreenManager_drawPanels(this, focus);
}
@@ -269,7 +269,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
quit = true;
continue;
}
-
+
switch (ch) {
case KEY_RESIZE:
{
diff --git a/Settings.c b/Settings.c
index db2fa066..fea6c3b7 100644
--- a/Settings.c
+++ b/Settings.c
@@ -31,7 +31,7 @@ typedef struct {
typedef struct Settings_ {
char* filename;
-
+
Me