changeset 88881:7702a9d9edff

(Fmap_charset_chars): Fix handling of default value for FROM_CODE and TO_CODE.
author Kenichi Handa <handa@m17n.org>
date Mon, 22 Jul 2002 12:28:14 +0000
parents 46d14196d891
children a72dd86dcff5
files src/charset.c
diffstat 1 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Mon Jul 22 12:27:56 2002 +0000
+++ b/src/charset.c	Mon Jul 22 12:28:14 2002 +0000
@@ -670,18 +670,23 @@
 
   CHECK_CHARSET_GET_CHARSET (charset, cs);
   if (NILP (from_code))
-    from_code = make_number (0);
-  CHECK_NATNUM (from_code);
-  from = XINT (from_code);
-  if (from < CHARSET_MIN_CODE (cs))
     from = CHARSET_MIN_CODE (cs);
+  else
+    {
+      CHECK_NATNUM (from_code);
+      from = XINT (from_code);
+      if (from < CHARSET_MIN_CODE (cs))
+	from = CHARSET_MIN_CODE (cs);
+    }
   if (NILP (to_code))
-    to_code = make_number (0xFFFFFFFF);
-  CHECK_NATNUM (from_code);
-  to = XINT (to_code);
-  if (to > CHARSET_MAX_CODE (cs))
-    to_code = make_number (CHARSET_MAX_CODE (cs));
-
+    to = CHARSET_MAX_CODE (cs);
+  else
+    {
+      CHECK_NATNUM (to_code);
+      to = XINT (to_code);
+      if (to > CHARSET_MAX_CODE (cs))
+	to = CHARSET_MAX_CODE (cs);
+    }
   map_charset_chars (NULL, function, arg, cs, from, to);
   return Qnil;
 }