]> code.delx.au - gnu-emacs/blobdiff - src/charset.c
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-54
[gnu-emacs] / src / charset.c
index 5924d2af6dcbc936a128fb8d7e64819891781491..2228a24f6984fe31bcabe7f6219477ce2e9644e2 100644 (file)
@@ -1,7 +1,9 @@
 /* Basic character set support.
-   Copyright (C) 1995, 97, 98, 2000, 2001 Electrotechnical Laboratory, JAPAN.
-     Licensed to the Free Software Foundation.
-   Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005,
+                2006 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001
+     National Institute of Advanced Industrial Science and Technology (AIST)
+     Registration Number H14PRO021
    Copyright (C) 2003, 2004
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H13PRO009
@@ -20,8 +22,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 #include <config.h>
 
@@ -505,7 +507,7 @@ load_charset_map_from_vector (charset, vec, control_flag)
       if (from < min_code || to > max_code || from > to || c > MAX_CHAR)
        continue;
 
-      if ((n_entries % 0x10000) == 0)
+      if (n_entries > 0 && (n_entries % 0x10000) == 0)
        {
          entries->next = ((struct charset_map_entries *)
                           alloca (sizeof (struct charset_map_entries)));
@@ -590,17 +592,6 @@ map_charset_chars (c_function, function, arg,
     {
       if (! CHAR_TABLE_P (CHARSET_ENCODER (charset)))
        return;
-      if (CHARSET_ASCII_COMPATIBLE_P (charset) && from <= 127)
-       {
-         range = Fcons (make_number (from), make_number (to));
-         if (to >= 128)
-           XSETCAR (range, make_number (127));
-
-         if (NILP (function))
-           (*c_function) (arg, range);
-         else
-           call2 (function, range, arg);
-       }
       map_char_table_for_charset (c_function, function,
                                  CHARSET_ENCODER (charset), arg,
                                  partial ? charset : NULL, from, to);
@@ -1051,6 +1042,8 @@ usage: (define-charset-internal ...)  */)
       emacs_mule_charset[charset.emacs_mule_id] = CHARSET_FROM_ID (id);
       if (charset.emacs_mule_id < 0xA0)
        emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 1;
+      else
+       emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 2;
       if (new_definition_p)
        Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list,
                                           Fcons (make_number (id), Qnil));