build: Don't include <config.h> in native programs when cross-compiling.
[bpt/guile.git] / libguile / srfi-14.c
index 76e776c..af7c1d9 100644 (file)
@@ -1,6 +1,6 @@
 /* srfi-14.c --- SRFI-14 procedures for Guile
  *
- * Copyright (C) 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2004, 2006, 2007, 2009, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -698,8 +698,8 @@ SCM_DEFINE (scm_char_set_eq, "char-set=", 0, 0, 1,
 
 SCM_DEFINE (scm_char_set_leq, "char-set<=", 0, 0, 1,
            (SCM char_sets),
-           "Return @code{#t} if every character set @var{cs}i is a subset\n"
-           "of character set @var{cs}i+1.")
+           "Return @code{#t} if every character set @var{char_set}i is a subset\n"
+           "of character set @var{char_set}i+1.")
 #define FUNC_NAME s_scm_char_set_leq
 {
   int argnum = 1;
@@ -732,7 +732,7 @@ SCM_DEFINE (scm_char_set_hash, "char-set-hash", 1, 1, 0,
            (SCM cs, SCM bound),
            "Compute a hash value for the character set @var{cs}.  If\n"
            "@var{bound} is given and non-zero, it restricts the\n"
-           "returned value to the range 0 @dots{} @var{bound - 1}.")
+           "returned value to the range 0 @dots{} @var{bound} - 1.")
 #define FUNC_NAME s_scm_char_set_hash
 {
   const unsigned long default_bnd = 871;
@@ -1325,7 +1325,7 @@ scm_i_ucs_range_to_char_set (const char *FUNC_NAME, SCM lower, SCM upper,
     cs = make_char_set (FUNC_NAME);
   else
     {
-      SCM_VALIDATE_SMOB (4, base_cs, charset);
+      SCM_VALIDATE_SMOB (3, base_cs, charset);
       if (reuse)
         cs = base_cs;
       else
@@ -1363,7 +1363,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set, "ucs-range->char-set", 2, 2, 0,
            "If @var{error} is a true value, an error is signalled if the\n"
            "specified range contains characters which are not valid\n"
            "Unicode code points.  If @var{error} is @code{#f},\n"
-           "these characters are silently left out of the resultung\n"
+           "these characters are silently left out of the resulting\n"
            "character set.\n"
            "\n"
            "The characters in @var{base_cs} are added to the result, if\n"
@@ -1385,7 +1385,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set_x, "ucs-range->char-set!", 4, 0, 0,
            "If @var{error} is a true value, an error is signalled if the\n"
            "specified range contains characters which are not contained in\n"
            "the implemented character range.  If @var{error} is @code{#f},\n"
-           "these characters are silently left out of the resultung\n"
+           "these characters are silently left out of the resulting\n"
            "character set.\n"
            "\n"
            "The characters are added to @var{base_cs} and @var{base_cs} is\n"
@@ -1515,9 +1515,9 @@ SCM_DEFINE (scm_char_set_to_string, "char-set->string", 1, 0, 0,
 
   count = scm_to_int (scm_char_set_size (cs));
   if (wide)
-    result = scm_i_make_wide_string (count, &wbuf);
+    result = scm_i_make_wide_string (count, &wbuf, 0);
   else
-    result = scm_i_make_string (count, &buf);
+    result = scm_i_make_string (count, &buf, 0);
 
   for (k = 0; k < cs_data->len; k++)
     for (n = cs_data->ranges[k].lo; n <= cs_data->ranges[k].hi; n++)
@@ -2010,7 +2010,7 @@ define_charset (const char *name, const scm_t_char_set *p)
 
   SCM_NEWSMOB (cs, scm_tc16_charset, p);
   scm_c_define (name, cs);
-  return scm_permanent_object (cs);
+  return cs;
 }
 
 SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset), 
@@ -2036,9 +2036,9 @@ SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset),
   SCM_VALIDATE_SMOB (1, charset, charset);
   cs = SCM_CHARSET_DATA (charset);
 
-  e1 = scm_cons (scm_from_locale_symbol ("char-set"),
+  e1 = scm_cons (scm_from_latin1_symbol ("char-set"),
                  charset);
-  e2 = scm_cons (scm_from_locale_symbol ("n"),
+  e2 = scm_cons (scm_from_latin1_symbol ("n"),
                  scm_from_size_t (cs->len));
 
   for (i = 0; i < cs->len; i++)
@@ -2059,7 +2059,7 @@ SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset),
       ranges = scm_append (scm_list_2 (ranges,
                                        scm_list_1 (elt)));
     }
-  e3 = scm_cons (scm_from_locale_symbol ("ranges"),
+  e3 = scm_cons (scm_from_latin1_symbol ("ranges"),
                  ranges);
 
   return scm_list_3 (e1, e2, e3);