mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
conv_table.u.str points to const.
This commit is contained in:
parent
2434c180f2
commit
83f753f750
@ -813,8 +813,9 @@ free_utf_table(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Cast away const. */
|
||||
for (i = 128; i < 256; i++)
|
||||
mem_free(utf_table[i].u.str);
|
||||
mem_free((unsigned char *) utf_table[i].u.str);
|
||||
}
|
||||
|
||||
static struct conv_table *
|
||||
@ -1191,7 +1192,7 @@ convert_string(struct conv_table *convert_table,
|
||||
/* Iterate ;-) */
|
||||
|
||||
while (charspos < charslen) {
|
||||
unsigned char *translit;
|
||||
const unsigned char *translit;
|
||||
|
||||
#define PUTC do { \
|
||||
buffer[bufferpos++] = chars[charspos++]; \
|
||||
|
@ -44,7 +44,7 @@ struct conv_table {
|
||||
* However, if the translation table is to UTF-8,
|
||||
* then the strings in elements 0x80 to 0xFF are
|
||||
* allocated with mem_alloc. */
|
||||
unsigned char *str;
|
||||
const unsigned char *str;
|
||||
/* If @t==1: a pointer to a nested conversion table
|
||||
* (with 256 elements) that describes how to convert
|
||||
* each possible subsequent byte. The conversion
|
||||
|
Loading…
Reference in New Issue
Block a user