mirror of https://github.com/xzeldon/htop.git
Avoid discarding const qualifiers
This commit is contained in:
parent
7457bfe9f3
commit
11f558f934
|
@ -56,7 +56,7 @@ static const char* const InfoScreenKeys[] = {"F3", "F4", "F5", "Esc"};
|
|||
|
||||
static int InfoScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(5), 27};
|
||||
|
||||
InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, char* panelHeader) {
|
||||
InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, const char* panelHeader) {
|
||||
this->process = process;
|
||||
if (!bar) {
|
||||
bar = FunctionBar_new(InfoScreenFunctions, InfoScreenKeys, InfoScreenEvents);
|
||||
|
@ -75,7 +75,7 @@ InfoScreen* InfoScreen_done(InfoScreen* this) {
|
|||
return this;
|
||||
}
|
||||
|
||||
void InfoScreen_drawTitled(InfoScreen* this, char* fmt, ...) {
|
||||
void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
attrset(CRT_colors[METER_TEXT]);
|
||||
|
|
|
@ -38,11 +38,11 @@ struct InfoScreen_ {
|
|||
Vector* lines;
|
||||
};
|
||||
|
||||
extern InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, char* panelHeader);
|
||||
extern InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, const char* panelHeader);
|
||||
|
||||
extern InfoScreen* InfoScreen_done(InfoScreen* this);
|
||||
|
||||
extern void InfoScreen_drawTitled(InfoScreen* this, char* fmt, ...);
|
||||
extern void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...);
|
||||
|
||||
extern void InfoScreen_addLine(InfoScreen* this, const char* line);
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ typedef enum ProcessFields {
|
|||
|
||||
typedef struct ProcessPidColumn_ {
|
||||
int id;
|
||||
char* label;
|
||||
const char* label;
|
||||
} ProcessPidColumn;
|
||||
|
||||
typedef struct Process_ {
|
||||
|
|
Loading…
Reference in New Issue