mirror of https://github.com/xzeldon/htop.git
Fix misc styleguide issues and add missing header files
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
This commit is contained in:
parent
b672e60886
commit
ba3a1df806
|
@ -16,6 +16,7 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
#include "CRT.h"
|
#include "CRT.h"
|
||||||
#include "FunctionBar.h"
|
#include "FunctionBar.h"
|
||||||
|
#include "Macros.h"
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "ProcessList.h"
|
#include "ProcessList.h"
|
||||||
|
|
|
@ -6,16 +6,17 @@ in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScreensPanel.h"
|
#include "ScreensPanel.h"
|
||||||
#include "Platform.h"
|
|
||||||
|
|
||||||
#include "CRT.h"
|
|
||||||
#include "XUtils.h"
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "CRT.h"
|
||||||
|
#include "FunctionBar.h"
|
||||||
|
#include "Hashtable.h"
|
||||||
|
#include "ProvideCurses.h"
|
||||||
|
#include "XUtils.h"
|
||||||
|
|
||||||
|
|
||||||
ObjectClass ScreenListItem_class = {
|
ObjectClass ScreenListItem_class = {
|
||||||
.extends = Class(ListItem),
|
.extends = Class(ListItem),
|
||||||
|
|
|
@ -7,11 +7,14 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "ColumnsPanel.h"
|
||||||
|
#include "ListItem.h"
|
||||||
|
#include "Object.h"
|
||||||
#include "Panel.h"
|
#include "Panel.h"
|
||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
#include "ColumnsPanel.h"
|
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "ListItem.h"
|
|
||||||
|
|
||||||
#ifndef SCREEN_NAME_LEN
|
#ifndef SCREEN_NAME_LEN
|
||||||
#define SCREEN_NAME_LEN 20
|
#define SCREEN_NAME_LEN 20
|
||||||
|
|
|
@ -248,7 +248,7 @@ static void ScreenSettings_readFields(ScreenSettings* ss, Hashtable* columns, co
|
||||||
if (j >= UINT_MAX / sizeof(ProcessField))
|
if (j >= UINT_MAX / sizeof(ProcessField))
|
||||||
continue;
|
continue;
|
||||||
if (j >= LAST_PROCESSFIELD) {
|
if (j >= LAST_PROCESSFIELD) {
|
||||||
ss->fields = xRealloc(ss->fields, (j+1) * sizeof(ProcessField));
|
ss->fields = xRealloc(ss->fields, (j + 1) * sizeof(ProcessField));
|
||||||
memset(&ss->fields[j], 0, sizeof(ProcessField));
|
memset(&ss->fields[j], 0, sizeof(ProcessField));
|
||||||
}
|
}
|
||||||
int id = toFieldIndex(columns, ids[i]);
|
int id = toFieldIndex(columns, ids[i]);
|
||||||
|
@ -494,7 +494,7 @@ static void writeFields(FILE* fd, const ProcessField* fields, Hashtable* columns
|
||||||
if (fields[i] < LAST_PROCESSFIELD && byName) {
|
if (fields[i] < LAST_PROCESSFIELD && byName) {
|
||||||
const char* pName = toFieldName(columns, fields[i]);
|
const char* pName = toFieldName(columns, fields[i]);
|
||||||
fprintf(fd, "%s%s", sep, pName);
|
fprintf(fd, "%s%s", sep, pName);
|
||||||
} else if(fields[i] >= LAST_PROCESSFIELD && byName) {
|
} else if (fields[i] >= LAST_PROCESSFIELD && byName) {
|
||||||
const char* pName = toFieldName(columns, fields[i]);
|
const char* pName = toFieldName(columns, fields[i]);
|
||||||
fprintf(fd, " Dynamic(%s)", pName);
|
fprintf(fd, " Dynamic(%s)", pName);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue