@@ -35,8 +35,8 @@
#define CS_OPTIONS "//TRANSLIT"
-char *dvb_default_charset = "iso-8859-1";
-char *dvb_output_charset = "utf-8";
+const char *dvb_default_charset = "iso-8859-1";
+const char *dvb_output_charset = "utf-8";
struct charset_conv {
unsigned len;
@@ -308,7 +308,7 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
size_t destlen,
const unsigned char *src,
size_t len,
- char *type, char *output_charset)
+ const char *type, const char *output_charset)
{
char out_cs[strlen(output_charset) + 1 + sizeof(CS_OPTIONS)];
char *p = dest;
@@ -331,7 +331,7 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
static void charset_conversion(struct dvb_v5_fe_parms *parms, char **dest, const unsigned char *s,
size_t len,
- char *type, char *output_charset)
+ const char *type, const char *output_charset)
{
size_t destlen = len * 3;
int need_conversion = 1;
@@ -371,10 +371,11 @@ static void charset_conversion(struct dvb_v5_fe_parms *parms, char **dest, const
void parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph,
const unsigned char *src, size_t len,
- char *default_charset, char *output_charset)
+ const char *default_charset, const char *output_charset)
{
size_t destlen, i, len2 = 0;
- char *p, *p2, *type = default_charset;
+ char *p, *p2;
+ const char *type = default_charset;
unsigned char *tmp1 = NULL, *tmp2 = NULL;
const unsigned char *s;
int emphasis = 0;
@@ -28,14 +28,14 @@ void iconv_to_charset(struct dvb_v5_fe_parms *parms,
size_t destlen,
const unsigned char *src,
size_t len,
- char *type, char *output_charset);
+ const char *type, const char *output_charset);
void parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph,
const unsigned char *src, size_t len,
- char *default_charset, char *output_charset);
+ const char *default_charset, const char *output_charset);
-extern char *dvb_default_charset;
-extern char *dvb_output_charset;
+extern const char *dvb_default_charset;
+extern const char *dvb_output_charset;
#if HAVE_VISIBILITY
#pragma GCC visibility pop
Signed-off-by: Gregor Jasny <gjasny@googlemail.com> --- lib/libdvbv5/parse_string.c | 13 +++++++------ lib/libdvbv5/parse_string.h | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-)