summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-08-20 21:58:14 +0200
committerChristian Göttsche <cgzones@googlemail.com>2020-08-25 12:00:03 +0200
commit11f558f93421a42aa29e0de7e50e670facfb5bb2 (patch)
tree0a61edc95364eb3581a1894b14b458e1a339a6dd
parent7457bfe9f319d939f9840a79703991d4b7beaaab (diff)
Avoid discarding const qualifiers
-rw-r--r--InfoScreen.c4
-rw-r--r--InfoScreen.h4
-rw-r--r--Process.c2
-rw-r--r--Process.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/InfoScreen.c b/InfoScreen.c
index 0b919932..93120006 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -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]);
diff --git a/InfoScreen.h b/InfoScreen.h
index b9387cda..e5d6bb67 100644
--- a/InfoScreen.h
+++ b/InfoScreen.h
@@ -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);
diff --git a/Process.c b/Process.c
index 7bcaf19a..6a0d56b9 100644
--- a/Process.c
+++ b/Process.c
@@ -85,7 +85,7 @@ typedef enum ProcessFields {
typedef struct ProcessPidColumn_ {
int id;
- char* label;
+ const char* label;
} ProcessPidColumn;
typedef struct Process_ {
diff --git a/Process.h b/Process.h
index 56a4dba1..3085f164 100644
--- a/Process.h
+++ b/Process.h
@@ -61,7 +61,7 @@ typedef enum ProcessFields {
typedef struct ProcessPidColumn_ {
int id;
- char* label;
+ const char* label;
} ProcessPidColumn;
typedef struct Process_ {

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