aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1997-03-18 23:31:34 +0000
committerKenichi Handa1997-03-18 23:31:34 +0000
commit467e7675540bdf5f21379a0ee5d7f92627e3ead3 (patch)
treef3ac95a241bea13cfbcd2bb95e4a55deffc4deff /src
parent1df19f02032a543c303bb21982ebd2a1278677ff (diff)
downloademacs-467e7675540bdf5f21379a0ee5d7f92627e3ead3.tar.gz
emacs-467e7675540bdf5f21379a0ee5d7f92627e3ead3.zip
Adjusted for the change of MAX_CHARSET.
Diffstat (limited to 'src')
-rw-r--r--src/coding.c4
-rw-r--r--src/coding.h2
-rw-r--r--src/fontset.c14
-rw-r--r--src/fontset.h8
-rw-r--r--src/xselect.c4
5 files changed, 16 insertions, 16 deletions
diff --git a/src/coding.c b/src/coding.c
index 277a9b16678..6e20b47ee34 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2146,7 +2146,7 @@ setup_coding_system (coding_system, coding)
2146 elements (if integer) is designated to REG on request, 2146 elements (if integer) is designated to REG on request,
2147 if an element is t, REG can be used by any charset, 2147 if an element is t, REG can be used by any charset,
2148 nil: REG is never used. */ 2148 nil: REG is never used. */
2149 for (charset = 0; charset < MAX_CHARSET; charset++) 2149 for (charset = 0; charset <= MAX_CHARSET; charset++)
2150 CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) = -1; 2150 CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) = -1;
2151 for (i = 0; i < 4; i++) 2151 for (i = 0; i < 4; i++)
2152 { 2152 {
@@ -2207,7 +2207,7 @@ setup_coding_system (coding_system, coding)
2207 default_reg_bits &= 3; 2207 default_reg_bits &= 3;
2208 } 2208 }
2209 2209
2210 for (charset = 0; charset < MAX_CHARSET; charset++) 2210 for (charset = 0; charset <= MAX_CHARSET; charset++)
2211 if (CHARSET_VALID_P (charset) 2211 if (CHARSET_VALID_P (charset)
2212 && CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) < 0) 2212 && CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) < 0)
2213 { 2213 {
diff --git a/src/coding.h b/src/coding.h
index 6008557cbf2..3facc43547b 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -149,7 +149,7 @@ struct iso2022_spec
149 int initial_designation[4]; 149 int initial_designation[4];
150 150
151 /* A graphic register to which each charset should be designated. */ 151 /* A graphic register to which each charset should be designated. */
152 char requested_designation[MAX_CHARSET]; 152 char requested_designation[MAX_CHARSET + 1];
153 153
154 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked 154 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked
155 by single-shift while encoding. */ 155 by single-shift while encoding. */
diff --git a/src/fontset.c b/src/fontset.c
index 93fdbfeccd1..e136c09b763 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -96,7 +96,7 @@ free_fontset_data (fontset_data)
96 int j; 96 int j;
97 97
98 xfree (fontset_data->fontset_table[i]->name); 98 xfree (fontset_data->fontset_table[i]->name);
99 for (j = 0; j < MAX_CHARSET; j++) 99 for (j = 0; j <= MAX_CHARSET; j++)
100 if (fontset_data->fontset_table[i]->fontname[j]) 100 if (fontset_data->fontset_table[i]->fontname[j])
101 xfree (fontset_data->fontset_table[i]->fontname[j]); 101 xfree (fontset_data->fontset_table[i]->fontname[j]);
102 xfree (fontset_data->fontset_table[i]); 102 xfree (fontset_data->fontset_table[i]);
@@ -172,7 +172,7 @@ fs_load_font (f, font_table, charset, fontname, fontset)
172 int i; 172 int i;
173 173
174 fontp->encoding[0] = fontp->encoding[1]; 174 fontp->encoding[0] = fontp->encoding[1];
175 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i < MAX_CHARSET; i++) 175 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
176 fontp->encoding[i] = fontp->encoding[1]; 176 fontp->encoding[i] = fontp->encoding[1];
177 } 177 }
178 else 178 else
@@ -182,7 +182,7 @@ fs_load_font (f, font_table, charset, fontname, fontset)
182 182
183 /* At first, set 1 (means 0xA0..0xFF) as the default. */ 183 /* At first, set 1 (means 0xA0..0xFF) as the default. */
184 fontp->encoding[0] = 1; 184 fontp->encoding[0] = 1;
185 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i < MAX_CHARSET; i++) 185 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
186 fontp->encoding[i] = 1; 186 fontp->encoding[i] = 1;
187 /* Then override them by a specification in Vfont_encoding_alist. */ 187 /* Then override them by a specification in Vfont_encoding_alist. */
188 for (list = Vfont_encoding_alist; CONSP (list); list = XCONS (list)->cdr) 188 for (list = Vfont_encoding_alist; CONSP (list); list = XCONS (list)->cdr)
@@ -242,7 +242,7 @@ fs_load_font (f, font_table, charset, fontname, fontset)
242 242
243 fontsetp->size = fontp->size; 243 fontsetp->size = fontp->size;
244 fontsetp->height = fontp->height; 244 fontsetp->height = fontp->height;
245 for (i = CHARSET_ASCII + 1; i < MAX_CHARSET; i++) 245 for (i = CHARSET_ASCII + 1; i <= MAX_CHARSET; i++)
246 { 246 {
247 font_idx = fontsetp->font_indexes[i]; 247 font_idx = fontsetp->font_indexes[i];
248 if (font_idx >= 0) 248 if (font_idx >= 0)
@@ -317,7 +317,7 @@ fs_register_fontset (f, fontset_info)
317 317
318 fontsetp->size = fontsetp->height = 0; 318 fontsetp->size = fontsetp->height = 0;
319 319
320 for (i = 0; i < MAX_CHARSET; i++) 320 for (i = 0; i <= MAX_CHARSET; i++)
321 { 321 {
322 fontsetp->fontname[i] = (char *) 0; 322 fontsetp->fontname[i] = (char *) 0;
323 fontsetp->font_indexes[i] = FONT_NOT_OPENED; 323 fontsetp->font_indexes[i] = FONT_NOT_OPENED;
@@ -521,7 +521,7 @@ list_fontsets (f, pattern, size)
521 one with SIZE. */ 521 one with SIZE. */
522 int j; 522 int j;
523 523
524 for (j = 0; j < MAX_CHARSET; j++) 524 for (j = 0; j <= MAX_CHARSET; j++)
525 if (fontsetp->fontname[j]) 525 if (fontsetp->fontname[j])
526 { 526 {
527 if ((*load_font_func) (f, fontsetp->fontname[j], size)) 527 if ((*load_font_func) (f, fontsetp->fontname[j], size))
@@ -764,7 +764,7 @@ loading failed.")
764 XVECTOR (info)->contents[0] = make_number (fontsetp->size); 764 XVECTOR (info)->contents[0] = make_number (fontsetp->size);
765 XVECTOR (info)->contents[1] = make_number (fontsetp->height); 765 XVECTOR (info)->contents[1] = make_number (fontsetp->height);
766 val = Qnil; 766 val = Qnil;
767 for (i = 0; i < MAX_CHARSET; i++) 767 for (i = 0; i <= MAX_CHARSET; i++)
768 if (fontsetp->fontname[i]) 768 if (fontsetp->fontname[i])
769 { 769 {
770 int font_idx = fontsetp->font_indexes[i]; 770 int font_idx = fontsetp->font_indexes[i];
diff --git a/src/fontset.h b/src/fontset.h
index ecdc1a7f0a0..54b9999ffe4 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -71,7 +71,7 @@ struct font_info
71 whose default value is defined in lisp/fontset.el. Since there's 71 whose default value is defined in lisp/fontset.el. Since there's
72 no charset whose id is 1, we use encoding[1] to store the 72 no charset whose id is 1, we use encoding[1] to store the
73 encoding information decided by the font itself. */ 73 encoding information decided by the font itself. */
74 char encoding[MAX_CHARSET]; 74 char encoding[MAX_CHARSET + 1];
75 75
76 /* The baseline position of a font is normally `ascent' value of the 76 /* The baseline position of a font is normally `ascent' value of the
77 font. However, there exists many fonts which don't set `ascent' 77 font. However, there exists many fonts which don't set `ascent'
@@ -114,7 +114,7 @@ struct font_info
114 height). In this case, the character is drawn beneath the 114 height). In this case, the character is drawn beneath the
115 previous glyphs. 115 previous glyphs.
116 116
117 This value is take from a private font property 117 This value is taken from a private font property
118 `_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */ 118 `_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */
119 int relative_compose; 119 int relative_compose;
120 120
@@ -142,12 +142,12 @@ struct fontset_info
142 int height; 142 int height;
143 143
144 /* Table of font name for each character set. */ 144 /* Table of font name for each character set. */
145 char *fontname[MAX_CHARSET]; 145 char *fontname[MAX_CHARSET + 1];
146 146
147 /* Table of index numbers of fonts indexed by charset. If a font is 147 /* Table of index numbers of fonts indexed by charset. If a font is
148 not yet loaded, the value is -1 (FONT_NOT_OPENED). If font 148 not yet loaded, the value is -1 (FONT_NOT_OPENED). If font
149 loading is failed, the value is -2 (FONT_NOT_FOUND). */ 149 loading is failed, the value is -2 (FONT_NOT_FOUND). */
150 int font_indexes[MAX_CHARSET]; 150 int font_indexes[MAX_CHARSET + 1];
151}; 151};
152 152
153/* This data type is used for the fontset_data field of struct frame. */ 153/* This data type is used for the fontset_data field of struct frame. */
diff --git a/src/xselect.c b/src/xselect.c
index 3de9748b7b5..2ba3d869019 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1582,13 +1582,13 @@ lisp_data_to_selection_data (display, obj,
1582 { 1582 {
1583 /* Since we are now handling multilingual text, we must consider 1583 /* Since we are now handling multilingual text, we must consider
1584 sending back compound text. */ 1584 sending back compound text. */
1585 char charsets[MAX_CHARSET]; 1585 char charsets[MAX_CHARSET + 1];
1586 int num; 1586 int num;
1587 1587
1588 *format_ret = 8; 1588 *format_ret = 8;
1589 *size_ret = XSTRING (obj)->size; 1589 *size_ret = XSTRING (obj)->size;
1590 *data_ret = XSTRING (obj)->data; 1590 *data_ret = XSTRING (obj)->data;
1591 bzero (charsets, MAX_CHARSET); 1591 bzero (charsets, MAX_CHARSET + 1);
1592 num = ((*size_ret <= 1) /* Check the possibility of short cut. */ 1592 num = ((*size_ret <= 1) /* Check the possibility of short cut. */
1593 ? 0 1593 ? 0
1594 : find_charset_in_str (*data_ret, *size_ret, charsets)); 1594 : find_charset_in_str (*data_ret, *size_ret, charsets));