1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

conv_table.u.str points to const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-01-02 01:31:22 +02:00 committed by Kalle Olavi Niemitalo
parent 2434c180f2
commit 83f753f750
2 changed files with 4 additions and 3 deletions

View File

@ -813,8 +813,9 @@ free_utf_table(void)
{ {
int i; int i;
/* Cast away const. */
for (i = 128; i < 256; i++) 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 * static struct conv_table *
@ -1191,7 +1192,7 @@ convert_string(struct conv_table *convert_table,
/* Iterate ;-) */ /* Iterate ;-) */
while (charspos < charslen) { while (charspos < charslen) {
unsigned char *translit; const unsigned char *translit;
#define PUTC do { \ #define PUTC do { \
buffer[bufferpos++] = chars[charspos++]; \ buffer[bufferpos++] = chars[charspos++]; \

View File

@ -44,7 +44,7 @@ struct conv_table {
* However, if the translation table is to UTF-8, * However, if the translation table is to UTF-8,
* then the strings in elements 0x80 to 0xFF are * then the strings in elements 0x80 to 0xFF are
* allocated with mem_alloc. */ * allocated with mem_alloc. */
unsigned char *str; const unsigned char *str;
/* If @t==1: a pointer to a nested conversion table /* If @t==1: a pointer to a nested conversion table
* (with 256 elements) that describes how to convert * (with 256 elements) that describes how to convert
* each possible subsequent byte. The conversion * each possible subsequent byte. The conversion