elements (if integer) is designated to REG on request,
if an element is t, REG can be used by any charset,
nil: REG is never used. */
- for (charset = 0; charset < MAX_CHARSET; charset++)
+ for (charset = 0; charset <= MAX_CHARSET; charset++)
CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) = -1;
for (i = 0; i < 4; i++)
{
default_reg_bits &= 3;
}
- for (charset = 0; charset < MAX_CHARSET; charset++)
+ for (charset = 0; charset <= MAX_CHARSET; charset++)
if (CHARSET_VALID_P (charset)
&& CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) < 0)
{
int initial_designation[4];
/* A graphic register to which each charset should be designated. */
- char requested_designation[MAX_CHARSET];
+ char requested_designation[MAX_CHARSET + 1];
/* Set to 1 temporarily only when graphic register 2 or 3 is invoked
by single-shift while encoding. */
int j;
xfree (fontset_data->fontset_table[i]->name);
- for (j = 0; j < MAX_CHARSET; j++)
+ for (j = 0; j <= MAX_CHARSET; j++)
if (fontset_data->fontset_table[i]->fontname[j])
xfree (fontset_data->fontset_table[i]->fontname[j]);
xfree (fontset_data->fontset_table[i]);
int i;
fontp->encoding[0] = fontp->encoding[1];
- for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i < MAX_CHARSET; i++)
+ for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
fontp->encoding[i] = fontp->encoding[1];
}
else
/* At first, set 1 (means 0xA0..0xFF) as the default. */
fontp->encoding[0] = 1;
- for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i < MAX_CHARSET; i++)
+ for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
fontp->encoding[i] = 1;
/* Then override them by a specification in Vfont_encoding_alist. */
for (list = Vfont_encoding_alist; CONSP (list); list = XCONS (list)->cdr)
fontsetp->size = fontp->size;
fontsetp->height = fontp->height;
- for (i = CHARSET_ASCII + 1; i < MAX_CHARSET; i++)
+ for (i = CHARSET_ASCII + 1; i <= MAX_CHARSET; i++)
{
font_idx = fontsetp->font_indexes[i];
if (font_idx >= 0)
fontsetp->size = fontsetp->height = 0;
- for (i = 0; i < MAX_CHARSET; i++)
+ for (i = 0; i <= MAX_CHARSET; i++)
{
fontsetp->fontname[i] = (char *) 0;
fontsetp->font_indexes[i] = FONT_NOT_OPENED;
one with SIZE. */
int j;
- for (j = 0; j < MAX_CHARSET; j++)
+ for (j = 0; j <= MAX_CHARSET; j++)
if (fontsetp->fontname[j])
{
if ((*load_font_func) (f, fontsetp->fontname[j], size))
XVECTOR (info)->contents[0] = make_number (fontsetp->size);
XVECTOR (info)->contents[1] = make_number (fontsetp->height);
val = Qnil;
- for (i = 0; i < MAX_CHARSET; i++)
+ for (i = 0; i <= MAX_CHARSET; i++)
if (fontsetp->fontname[i])
{
int font_idx = fontsetp->font_indexes[i];
whose default value is defined in lisp/fontset.el. Since there's
no charset whose id is 1, we use encoding[1] to store the
encoding information decided by the font itself. */
- char encoding[MAX_CHARSET];
+ char encoding[MAX_CHARSET + 1];
/* The baseline position of a font is normally `ascent' value of the
font. However, there exists many fonts which don't set `ascent'
height). In this case, the character is drawn beneath the
previous glyphs.
- This value is take from a private font property
+ This value is taken from a private font property
`_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */
int relative_compose;
int height;
/* Table of font name for each character set. */
- char *fontname[MAX_CHARSET];
+ char *fontname[MAX_CHARSET + 1];
/* Table of index numbers of fonts indexed by charset. If a font is
not yet loaded, the value is -1 (FONT_NOT_OPENED). If font
loading is failed, the value is -2 (FONT_NOT_FOUND). */
- int font_indexes[MAX_CHARSET];
+ int font_indexes[MAX_CHARSET + 1];
};
/* This data type is used for the fontset_data field of struct frame. */
{
/* Since we are now handling multilingual text, we must consider
sending back compound text. */
- char charsets[MAX_CHARSET];
+ char charsets[MAX_CHARSET + 1];
int num;
*format_ret = 8;
*size_ret = XSTRING (obj)->size;
*data_ret = XSTRING (obj)->data;
- bzero (charsets, MAX_CHARSET);
+ bzero (charsets, MAX_CHARSET + 1);
num = ((*size_ret <= 1) /* Check the possibility of short cut. */
? 0
: find_charset_in_str (*data_ret, *size_ret, charsets));