changeset 17190:6637001cdb4b

Adjusted for the change of MAX_CHARSET.
author Kenichi Handa <handa@m17n.org>
date Tue, 18 Mar 1997 23:31:34 +0000
parents 7c008ec99e97
children 36caec9c2e52
files src/coding.c src/coding.h src/fontset.c src/fontset.h src/xselect.c
diffstat 5 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Tue Mar 18 23:31:34 1997 +0000
+++ b/src/coding.c	Tue Mar 18 23:31:34 1997 +0000
@@ -2146,7 +2146,7 @@
 		  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++)
 	  {
@@ -2207,7 +2207,7 @@
 	      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)
 	    {
--- a/src/coding.h	Tue Mar 18 23:31:34 1997 +0000
+++ b/src/coding.h	Tue Mar 18 23:31:34 1997 +0000
@@ -149,7 +149,7 @@
   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.  */
--- a/src/fontset.c	Tue Mar 18 23:31:34 1997 +0000
+++ b/src/fontset.c	Tue Mar 18 23:31:34 1997 +0000
@@ -96,7 +96,7 @@
       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]);
@@ -172,7 +172,7 @@
       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
@@ -182,7 +182,7 @@
 
       /* 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)
@@ -242,7 +242,7 @@
 
 	  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)
@@ -317,7 +317,7 @@
 
   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;
@@ -521,7 +521,7 @@
 		 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))
@@ -764,7 +764,7 @@
   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];
--- a/src/fontset.h	Tue Mar 18 23:31:34 1997 +0000
+++ b/src/fontset.h	Tue Mar 18 23:31:34 1997 +0000
@@ -71,7 +71,7 @@
      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'
@@ -114,7 +114,7 @@
 	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;
 
@@ -142,12 +142,12 @@
   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.  */
--- a/src/xselect.c	Tue Mar 18 23:31:34 1997 +0000
+++ b/src/xselect.c	Tue Mar 18 23:31:34 1997 +0000
@@ -1582,13 +1582,13 @@
     {
       /* 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));