diff --git a/src/output.cpp b/src/output.cpp index f6bf3dc6d..4246fd084 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -63,7 +63,7 @@ unsigned char index_for_color(rgb_color_t c) { return c.to_term256_index(); } -static bool write_color_escape(char *todo, unsigned char idx, bool is_fg) { +static bool write_color_escape(const char *todo, unsigned char idx, bool is_fg) { if (term_supports_color_natively(idx)) { // Use tparm to emit color escape. writembs(tparm((char *)todo, idx)); @@ -550,7 +550,7 @@ rgb_color_t parse_color(const env_var_t &var, bool is_background) { } /// Write specified multibyte string. -void writembs_check(char *mbs, const char *mbs_name, bool critical, const char *file, long line) { +void writembs_check(const char *mbs, const char *mbs_name, bool critical, const char *file, long line) { if (mbs != NULL) { tputs(mbs, 1, &writeb); } else if (critical) { diff --git a/src/output.h b/src/output.h index 15c0fa4fb..8ce26b598 100644 --- a/src/output.h +++ b/src/output.h @@ -30,7 +30,7 @@ enum { void set_color(rgb_color_t c, rgb_color_t c2); -void writembs_check(char *mbs, const char *mbs_name, bool critical, const char *file, long line); +void writembs_check(const char *mbs, const char *mbs_name, bool critical, const char *file, long line); #define writembs(mbs) writembs_check((mbs), #mbs, true, __FILE__, __LINE__) #define writembs_nofail(mbs) writembs_check((mbs), #mbs, false, __FILE__, __LINE__) diff --git a/src/screen.cpp b/src/screen.cpp index 54b65bbb9..4b0df4c44 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -566,7 +566,7 @@ static void s_write_char(screen_t *s, data_buffer_t *b, wchar_t c) { } /// Send the specified string through tputs and append the output to the specified buffer. -static void s_write_mbs(data_buffer_t *b, char *s) { +static void s_write_mbs(data_buffer_t *b, const char *s) { scoped_buffer_t scoped_buffer(b); writembs(s); }