parent
8c480f5c3a
commit
fd0de132ad
@ -1,11 +0,0 @@
|
||||
--- RichString.c.orig 2008-03-09 03:23:49.000000000 +0100
|
||||
+++ RichString.c 2008-11-18 12:30:21.000000000 +0100
|
||||
@@ -89,7 +89,7 @@
|
||||
inline void RichString_appendn(RichString* this, int attrs, char* data_c, int len) {
|
||||
int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len);
|
||||
for (int i = this->len, j = 0; i < last; i++, j++)
|
||||
- this->chstr[i] = data_c[j] | attrs;
|
||||
+ this->chstr[i] = ((data_c[j] > 31) ? data_c[j] : '?' ) | attrs;
|
||||
this->chstr[last] = 0;
|
||||
this->len = last;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
--- ProcessList.c.orig 2008-09-23 08:23:14.000000000 +0200
|
||||
+++ ProcessList.c 2009-02-05 19:11:29.000000000 +0100
|
||||
@@ -563,9 +563,9 @@
|
||||
process->pid = pid;
|
||||
}
|
||||
}
|
||||
- if (parent) {
|
||||
- process->tgid = parent->pid;
|
||||
- }
|
||||
+
|
||||
+ process->tgid = parent ? parent->pid : pid;
|
||||
+
|
||||
|
||||
if (showUserlandThreads && (!parent || pid != parent->pid)) {
|
||||
char subdirname[MAX_NAME+1];
|
@ -1,71 +0,0 @@
|
||||
Index: FunctionBar.c
|
||||
===================================================================
|
||||
--- FunctionBar.c (revision 162)
|
||||
+++ FunctionBar.c (working copy)
|
||||
@@ -52,12 +52,14 @@ FunctionBar* FunctionBar_new(char** func
|
||||
this->functions = malloc(sizeof(char*) * 15);
|
||||
this->keys = malloc(sizeof(char*) * 15);
|
||||
this->events = malloc(sizeof(int) * 15);
|
||||
- int i = 0;
|
||||
- while (i < 15 && functions[i]) {
|
||||
+ int i;
|
||||
+ for (i = 0; i < 15; i++) {
|
||||
+ if (functions[i] == NULL) /* We don't know the size of the array, */
|
||||
+ break; /* so let's assume it is NULL terminated */
|
||||
+ /* and break if we find that NULL */
|
||||
this->functions[i] = String_copy(functions[i]);
|
||||
this->keys[i] = String_copy(keys[i]);
|
||||
this->events[i] = events[i];
|
||||
- i++;
|
||||
}
|
||||
this->size = i;
|
||||
} else {
|
||||
Index: htop.c
|
||||
===================================================================
|
||||
--- htop.c (revision 162)
|
||||
+++ htop.c (working copy)
|
||||
@@ -151,7 +151,7 @@ static void showHelp(ProcessList* pl) {
|
||||
clear();
|
||||
}
|
||||
|
||||
-static char* CategoriesFunctions[10] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done "};
|
||||
+static char* CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
|
||||
|
||||
static void Setup_run(Settings* settings, int headerHeight) {
|
||||
ScreenManager* scr = ScreenManager_new(0, headerHeight, 0, -1, HORIZONTAL, true);
|
||||
@@ -190,7 +190,7 @@ static HandlerResult pickWithEnter(Panel
|
||||
}
|
||||
|
||||
static Object* pickFromVector(Panel* panel, Panel* list, int x, int y, char** keyLabels, FunctionBar* prevBar) {
|
||||
- char* fuKeys[2] = {"Enter", "Esc"};
|
||||
+ char* fuKeys[] = {"Enter", "Esc", NULL};
|
||||
int fuEvents[2] = {13, 27};
|
||||
if (!list->eventHandler)
|
||||
Panel_setEventHandler(list, pickWithEnter);
|
||||
@@ -326,7 +326,7 @@ int main(int argc, char** argv) {
|
||||
Panel_setRichHeader(panel, ProcessList_printHeader(pl));
|
||||
|
||||
char* searchFunctions[] = {"Next ", "Exit ", " Search: ", NULL};
|
||||
- char* searchKeys[] = {"F3", "Esc", " "};
|
||||
+ char* searchKeys[] = {"F3", "Esc", " ", NULL};
|
||||
int searchEvents[] = {KEY_F(3), 27, ERR};
|
||||
FunctionBar* searchBar = FunctionBar_new(searchFunctions, searchKeys, searchEvents);
|
||||
|
||||
@@ -656,7 +656,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
Panel* affinityPanel = AffinityPanel_new(pl->processorCount, curr);
|
||||
|
||||
- char* fuFunctions[2] = {"Set ", "Cancel "};
|
||||
+ char* fuFunctions[3] = {"Set ", "Cancel ", NULL};
|
||||
void* set = pickFromVector(panel, affinityPanel, 15, headerHeight, fuFunctions, defaultBar);
|
||||
if (set) {
|
||||
unsigned long new = AffinityPanel_getAffinity(affinityPanel);
|
||||
@@ -695,7 +695,7 @@ int main(int argc, char** argv) {
|
||||
{
|
||||
Panel* sortPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true, ListItem_compare);
|
||||
Panel_setHeader(sortPanel, "Sort by");
|
||||
- char* fuFunctions[2] = {"Sort ", "Cancel "};
|
||||
+ char* fuFunctions[] = {"Sort ", "Cancel ", NULL};
|
||||
ProcessField* fields = pl->fields;
|
||||
for (int i = 0; fields[i]; i++) {
|
||||
char* name = String_trim(Process_fieldTitles[fields[i]]);
|
Loading…
Reference in new issue