Partial fix for <https://bugs.gnu.org/33044>.
Reported by Tom de Vries <tdevries@suse.de>.
Fix several instances of the mistake of using 'scm_from_locale_*' for C
strings that originally came from a C string literal. Change several
uses of 'scm_from_latin1_*' as well, to promote the practice of writing
code that works for arbitrary C string literals.
Also add missing years to the copyright notices of changed files, based
on the git history.
* libguile/debug-malloc.c, libguile/deprecation.c, libguile/error.c,
libguile/eval.c, libguile/expand.c, libguile/extensions.c,
libguile/filesys.c, libguile/init.c, libguile/load.c,
libguile/modules.c, libguile/pairs.c, libguile/posix.c,
libguile/print.c, libguile/random.c, libguile/read.c,
libguile/regex-posix.c, libguile/snarf.h, libguile/srfi-13.c,
libguile/stacks.c, libguile/stime.c, libguile/strports.c,
libguile/values.c: Use 'scm_from_utf8_*' where appropriate.
-/* Copyright (C) 2000, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002, 2004, 2006, 2008, 2009, 2018
+ * 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
int i;
for (i = 0; i < malloc_type_size + N_SEEK; ++i)
if (malloc_type[i].key)
- res = scm_acons (scm_from_locale_string ((char *) malloc_type[i].key),
+ res = scm_acons (scm_from_utf8_string ((char *) malloc_type[i].key),
scm_from_int ((int) malloc_type[i].data),
res);
return res;
-/* Copyright (C) 2001, 2006, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2005, 2006, 2009-2012, 2016, 2018
+ * 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
print_summary = 1;
else
{
- SCM nl = scm_from_locale_string ("\n");
+ SCM nl = scm_from_utf8_string ("\n");
SCM msgs_nl = SCM_EOL;
char *c_msgs;
while (scm_is_pair (msgs))
-/* Copyright (C) 1995-1998, 2000, 2001, 2004, 2006, 2010, 2012-2014
- * Free Software Foundation, Inc.
+/* Copyright (C) 1995-1998, 2000, 2001, 2004, 2006, 2010, 2012-2016,
+ * 2018 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
{
scm_error_scm
(key,
- (subr == NULL) ? SCM_BOOL_F : scm_from_locale_string (subr),
- (message == NULL) ? SCM_BOOL_F : scm_from_locale_string (message),
+ (subr == NULL) ? SCM_BOOL_F : scm_from_utf8_string (subr),
+ (message == NULL) ? SCM_BOOL_F : scm_from_utf8_string (message),
args, rest);
}
scm_error (scm_args_number_key,
NULL,
"Wrong number of arguments to ~A",
- scm_list_1 (scm_from_locale_string (subr)),
+ scm_list_1 (scm_from_utf8_string (subr)),
SCM_BOOL_F);
}
{
scm_error_scm (scm_arg_type_key,
scm_symbol_to_string (symbol),
- (pos == 0) ? scm_from_locale_string ("Wrong type: ~S")
- : scm_from_locale_string ("Wrong type argument in position ~A: ~S"),
+ (pos == 0) ? scm_from_utf8_string ("Wrong type: ~S")
+ : scm_from_utf8_string ("Wrong type argument in position ~A: ~S"),
(pos == 0) ? scm_list_1 (bad_value)
: scm_list_2 (scm_from_int (pos), bad_value),
scm_list_1 (bad_value));
void
scm_wrong_type_arg_msg (const char *subr, int pos, SCM bad_value, const char *szMessage)
{
- SCM msg = scm_from_locale_string (szMessage);
+ SCM msg = scm_from_utf8_string (szMessage);
if (pos == 0)
{
scm_error (scm_arg_type_key,
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,
- * 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
- * Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 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
static void error_missing_value (SCM proc, SCM kw)
{
- scm_error_scm (scm_from_latin1_symbol ("keyword-argument-error"), proc,
- scm_from_locale_string ("Keyword argument has no value"), SCM_EOL,
+ scm_error_scm (scm_from_utf8_symbol ("keyword-argument-error"), proc,
+ scm_from_utf8_string ("Keyword argument has no value"), SCM_EOL,
scm_list_1 (kw));
}
static void error_invalid_keyword (SCM proc, SCM obj)
{
- scm_error_scm (scm_from_latin1_symbol ("keyword-argument-error"), proc,
- scm_from_locale_string ("Invalid keyword"), SCM_EOL,
+ scm_error_scm (scm_from_utf8_symbol ("keyword-argument-error"), proc,
+ scm_from_utf8_string ("Invalid keyword"), SCM_EOL,
scm_list_1 (obj));
}
static void error_unrecognized_keyword (SCM proc, SCM kw)
{
- scm_error_scm (scm_from_latin1_symbol ("keyword-argument-error"), proc,
- scm_from_locale_string ("Unrecognized keyword"), SCM_EOL,
+ scm_error_scm (scm_from_utf8_symbol ("keyword-argument-error"), proc,
+ scm_from_utf8_string ("Unrecognized keyword"), SCM_EOL,
scm_list_1 (kw));
}
return scm_car (l);
else
{
- scm_ithrow (scm_from_latin1_symbol ("vm-run"),
- scm_list_3 (scm_from_latin1_symbol ("vm-run"),
- scm_from_locale_string
+ scm_ithrow (scm_from_utf8_symbol ("vm-run"),
+ scm_list_3 (scm_from_utf8_symbol ("vm-run"),
+ scm_from_utf8_string
("Too few values returned to continuation"),
SCM_EOL),
1);
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
- * Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014, 2016, 2018 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
static void
syntax_error (const char* const msg, const SCM form, const SCM expr)
{
- SCM msg_string = scm_from_locale_string (msg);
+ SCM msg_string = scm_from_utf8_string (msg);
SCM filename = SCM_BOOL_F;
SCM linenr = SCM_BOOL_F;
const char *format;
&& scm_is_eq (CADR (clause), scm_sym_arrow)
&& alp)
{
- SCM tmp = scm_gensym (scm_from_locale_string ("cond "));
+ SCM tmp = scm_gensym (scm_from_utf8_string ("cond "));
SCM new_env = scm_acons (tmp, tmp, env);
ASSERT_SYNTAX (length > 2, s_missing_recipient, clause);
ASSERT_SYNTAX (length == 3, s_extra_expression, clause);
layout = scm_string_to_symbol
(scm_string_append (scm_make_list (scm_from_size_t (exp_nfields[n]),
- scm_from_locale_string ("pw"))));
+ scm_from_utf8_string ("pw"))));
printer = SCM_BOOL_F;
name = scm_from_utf8_symbol (exp_names[n]);
code = scm_from_size_t (n);
DEFINE_NAMES (LETREC);
scm_exp_vtable_vtable =
- scm_make_vtable (scm_from_locale_string (SCM_VTABLE_BASE_LAYOUT "pwuwpw"),
+ scm_make_vtable (scm_from_utf8_string (SCM_VTABLE_BASE_LAYOUT "pwuwpw"),
SCM_BOOL_F);
for (n = 0; n < SCM_NUM_EXPANDED_TYPES; n++)
/* extensions.c - registering and loading extensions.
*
- * Copyright (C) 2001, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2004, 2006, 2009-2011, 2018
+ * 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
scm_dynwind_begin (0);
- clib = scm_to_locale_string (lib);
+ clib = scm_to_utf8_string (lib);
scm_dynwind_free (clib);
- cinit = scm_to_locale_string (init);
+ cinit = scm_to_utf8_string (init);
scm_dynwind_free (cinit);
for (ext = head; ext; ext = ext->next)
void
scm_c_load_extension (const char *lib, const char *init)
{
- load_extension (scm_from_locale_string (lib), scm_from_locale_string (init));
+ load_extension (scm_from_utf8_string (lib), scm_from_utf8_string (init));
}
SCM_DEFINE (scm_load_extension, "load-extension", 2, 0, 0,
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006,
- * 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002, 2004, 2006, 2009-2018
+ * 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
scm_c_define ("X_OK", scm_from_int (X_OK));
scm_c_define ("F_OK", scm_from_int (F_OK));
- scm_dot_string = scm_from_locale_string (".");
+ scm_dot_string = scm_from_utf8_string (".");
#include "libguile/filesys.x"
}
-/* Copyright (C) 1995-2004, 2006, 2009-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2006, 2009-2014, 2016-2018
+ * 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
SCM_SITE_DIR and SCM_LIBRARY_DIR when searching for the site init
file, so we do this before loading Ice-9. */
SCM init_path =
- scm_sys_search_load_path (scm_from_locale_string ("init.scm"));
+ scm_sys_search_load_path (scm_from_utf8_string ("init.scm"));
/* Load Ice-9. */
if (!scm_ice_9_already_loaded)
-/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2004, 2006, 2008,
- * 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998-2001, 2004, 2006, 2008-2018
+ * 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
"@samp{/usr/local/share/guile}.")
#define FUNC_NAME s_scm_sys_package_data_dir
{
- return scm_from_locale_string (SCM_PKGDATA_DIR);
+ return scm_from_utf8_string (SCM_PKGDATA_DIR);
}
#undef FUNC_NAME
#endif /* SCM_PKGDATA_DIR */
"E.g., may return \"/usr/share/guile/1.3.5\".")
#define FUNC_NAME s_scm_sys_library_dir
{
- return scm_from_locale_string (SCM_LIBRARY_DIR);
+ return scm_from_utf8_string (SCM_LIBRARY_DIR);
}
#undef FUNC_NAME
#endif /* SCM_LIBRARY_DIR */
"E.g., may return \"/usr/share/guile/site\".")
#define FUNC_NAME s_scm_sys_global_site_dir
{
- return scm_from_locale_string (SCM_GLOBAL_SITE_DIR);
+ return scm_from_utf8_string (SCM_GLOBAL_SITE_DIR);
}
#undef FUNC_NAME
#endif /* SCM_GLOBAL_SITE_DIR */
"E.g., may return \"/usr/lib/guile/" SCM_EFFECTIVE_VERSION "/site-ccache\".")
#define FUNC_NAME s_scm_sys_site_ccache_dir
{
- return scm_from_locale_string (SCM_SITE_CCACHE_DIR);
+ return scm_from_utf8_string (SCM_SITE_CCACHE_DIR);
}
#undef FUNC_NAME
#endif /* SCM_SITE_CCACHE_DIR */
while (*p)
{
+ /* FIXME: When the locale encoding is Shift_JIS, backslash '\'
+ has a multibyte representation, so this code will
+ misbehave. */
if (*p == '\\')
*p = '/';
p++;
else if (env)
path = scm_parse_path (scm_from_locale_string (env), path);
else
- path = scm_list_4 (scm_from_locale_string (SCM_LIBRARY_DIR),
- scm_from_locale_string (SCM_SITE_DIR),
- scm_from_locale_string (SCM_GLOBAL_SITE_DIR),
- scm_from_locale_string (SCM_PKGDATA_DIR));
+ path = scm_list_4 (scm_from_utf8_string (SCM_LIBRARY_DIR),
+ scm_from_utf8_string (SCM_SITE_DIR),
+ scm_from_utf8_string (SCM_GLOBAL_SITE_DIR),
+ scm_from_utf8_string (SCM_PKGDATA_DIR));
env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_COMPILED_PATH"));
if (env && strcmp (env, "") == 0)
cpath = scm_parse_path (scm_from_locale_string (env), cpath);
else
{
- cpath = scm_list_2 (scm_from_locale_string (SCM_CCACHE_DIR),
- scm_from_locale_string (SCM_SITE_CCACHE_DIR));
+ cpath = scm_list_2 (scm_from_utf8_string (SCM_CCACHE_DIR),
+ scm_from_utf8_string (SCM_SITE_CCACHE_DIR));
}
#endif /* SCM_LIBRARY_DIR */
{
require_exts = SCM_CADR (rest);
if (SCM_UNLIKELY (!scm_is_null (SCM_CDDR (rest))))
- scm_wrong_num_args (scm_from_locale_string (FUNC_NAME));
+ scm_wrong_num_args (scm_from_utf8_string (FUNC_NAME));
}
}
else
int found_stale_eval_go = 0;
eval_scm = search_path (*scm_loc_load_path,
- scm_from_locale_string ("ice-9/eval.scm"),
+ scm_from_utf8_string ("ice-9/eval.scm"),
SCM_EOL, SCM_BOOL_F, &stat_source);
eval_thunk =
- load_thunk_from_path (scm_from_locale_string ("ice-9/eval.go"),
+ load_thunk_from_path (scm_from_utf8_string ("ice-9/eval.go"),
eval_scm, &stat_source, &found_stale_eval_go);
if (scm_is_true (eval_thunk))
scm_loc_load_path = SCM_VARIABLE_LOC (scm_c_define ("%load-path", SCM_EOL));
scm_loc_load_extensions
= SCM_VARIABLE_LOC (scm_c_define ("%load-extensions",
- scm_list_2 (scm_from_locale_string (".scm"),
+ scm_list_2 (scm_from_utf8_string (".scm"),
scm_nullstr)));
scm_loc_load_compiled_path
= SCM_VARIABLE_LOC (scm_c_define ("%load-compiled-path", SCM_EOL));
scm_loc_load_compiled_extensions
= SCM_VARIABLE_LOC (scm_c_define ("%load-compiled-extensions",
- scm_list_1 (scm_from_locale_string (".go"))));
+ scm_list_1 (scm_from_utf8_string (".go"))));
scm_loc_load_hook = SCM_VARIABLE_LOC (scm_c_define ("%load-hook", SCM_BOOL_F));
scm_loc_compile_fallback_path
-/* Copyright (C) 1998,2000,2001,2002,2003,2004,2006,2007,2008,2009,2010,2011,2012,2018 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000-2004, 2006-2012, 2018
+ * 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
default_duplicate_binding_procedures_var =
scm_c_lookup ("default-duplicate-binding-procedures");
module_public_interface_var = scm_c_lookup ("module-public-interface");
- k_ensure = scm_from_locale_keyword ("ensure");
+ k_ensure = scm_from_utf8_keyword ("ensure");
scm_module_system_booted_p = 1;
}
-/* Copyright (C) 1995,1996,2000,2001, 2004, 2005, 2006, 2008, 2009,
- * 2011, 2012, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2000, 2001, 2004-2006, 2008-2013,
+ * 2017, 2018 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
void scm_error_pair_access (SCM non_pair)
{
static unsigned int running = 0;
- SCM message = scm_from_locale_string ("Non-pair accessed with SCM_C[AD]R: `~S'\n");
+ SCM message = scm_from_utf8_string ("Non-pair accessed with SCM_C[AD]R: `~S'\n");
if (!running)
{
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
- * 2014, 2016, 2017, 2018 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014, 2016-2018 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
SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_ulong (entry->pw_gid));
SCM_SIMPLE_VECTOR_SET(result, 4, scm_from_locale_string (entry->pw_gecos));
if (!entry->pw_dir)
- SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_locale_string (""));
+ SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_utf8_string (""));
else
SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_locale_string (entry->pw_dir));
if (!entry->pw_shell)
- SCM_SIMPLE_VECTOR_SET(result, 6, scm_from_locale_string (""));
+ SCM_SIMPLE_VECTOR_SET(result, 6, scm_from_utf8_string (""));
else
SCM_SIMPLE_VECTOR_SET(result, 6, scm_from_locale_string (entry->pw_shell));
return result;
-/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008,
- * 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2006, 2008-2018 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
{
SCM type;
- type = scm_make_vtable (scm_from_locale_string (SCM_PRINT_STATE_LAYOUT),
+ type = scm_make_vtable (scm_from_utf8_string (SCM_PRINT_STATE_LAYOUT),
SCM_BOOL_F);
- scm_set_struct_vtable_name_x (type, scm_from_latin1_symbol ("print-state"));
+ scm_set_struct_vtable_name_x (type, scm_from_utf8_symbol ("print-state"));
scm_print_state_vtable = type;
/* Don't want to bind a wrapper class in GOOPS, so pass 0 as arg1. */
scm_init_opts (scm_print_options, scm_print_opts);
scm_print_opts[SCM_PRINT_HIGHLIGHT_PREFIX_I].val =
- SCM_UNPACK (scm_from_locale_string ("{"));
+ SCM_UNPACK (scm_from_utf8_string ("{"));
scm_print_opts[SCM_PRINT_HIGHLIGHT_SUFFIX_I].val =
- SCM_UNPACK (scm_from_locale_string ("}"));
+ SCM_UNPACK (scm_from_utf8_string ("}"));
scm_print_opts[SCM_PRINT_KEYWORD_STYLE_I].val = SCM_UNPACK (sym_reader);
}
-/* Copyright (C) 1999, 2000, 2001, 2003, 2005, 2006, 2009, 2010,
- * 2012, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2001, 2003, 2005, 2006, 2009, 2010, 2012-2014,
+ * 2017, 2018 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
* Scheme level interface.
*/
-SCM_GLOBAL_VARIABLE_INIT (scm_var_random_state, "*random-state*", scm_seed_to_random_state (scm_from_locale_string ("URL:http://stat.fsu.edu/~geo/diehard.html")));
+SCM_GLOBAL_VARIABLE_INIT (scm_var_random_state, "*random-state*",
+ scm_seed_to_random_state
+ (scm_from_utf8_string
+ ("URL:http://stat.fsu.edu/~geo/diehard.html")));
SCM_DEFINE (scm_random, "random", 1, 1, 0,
(SCM n, SCM state),
-/* Copyright (C) 1995-1997, 1999-2001, 2003, 2004, 2006-2012, 2014, 2015
+/* Copyright (C) 1995-1997, 1999-2001, 2003, 2004, 2006-2012, 2014-2018
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
{
SCM fn = (scm_is_string (SCM_FILENAME(port))
? SCM_FILENAME(port)
- : scm_from_locale_string ("#<unknown port>"));
+ : scm_from_utf8_string ("#<unknown port>"));
SCM string_port = scm_open_output_string ();
SCM string = SCM_EOL;
scm_simple_format (string_port,
- scm_from_locale_string ("~A:~S:~S: ~A"),
+ scm_from_utf8_string ("~A:~S:~S: ~A"),
scm_list_4 (fn,
scm_sum (scm_port_line (port), SCM_INUM1),
scm_sum (scm_port_column (port), SCM_INUM1),
- scm_from_locale_string (message)));
+ scm_from_utf8_string (message)));
string = scm_get_output_string (string_port);
scm_close_output_port (string_port);
- scm_error_scm (scm_from_latin1_symbol ("read-error"),
- function? scm_from_locale_string (function) : SCM_BOOL_F,
+ scm_error_scm (scm_from_utf8_symbol ("read-error"),
+ function? scm_from_utf8_string (function) : SCM_BOOL_F,
string,
arg,
SCM_BOOL_F);
return SCM_BOOL_F;
else
{
- s_enc = scm_string_upcase (scm_from_locale_string (enc));
+ /* It's not obvious what encoding to use here, but latin1 has the
+ advantage of never causing a decoding error, and a valid
+ encoding name should be ASCII anyway. */
+ s_enc = scm_string_upcase (scm_from_latin1_string (enc));
return s_enc;
}
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2001, 2004, 2006, 2007, 2010-2012, 2018
+ * 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
SCM errmsg = scm_regexp_error_msg (status, rx);
scm_gc_free (rx, sizeof(regex_t), "regex");
scm_error_scm (scm_regexp_error_key,
- scm_from_locale_string (FUNC_NAME),
+ scm_from_utf8_string (FUNC_NAME),
errmsg,
SCM_BOOL_F,
scm_list_1 (pat));
if (status != 0 && status != REG_NOMATCH)
scm_error_scm (scm_regexp_error_key,
- scm_from_locale_string (FUNC_NAME),
+ scm_from_utf8_string (FUNC_NAME),
scm_regexp_error_msg (status, SCM_RGX (rx)),
SCM_BOOL_F, SCM_BOOL_F);
return mvec;
#ifndef SCM_SNARF_H
#define SCM_SNARF_H
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2006, 2009, 2010, 2011, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2006, 2009-2011, 2013, 2014, 2017, 2018
+ * 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
#define SCM_KEYWORD(c_name, scheme_name) \
SCM_SNARF_HERE(static SCM c_name) \
-SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
+SCM_SNARF_INIT(c_name = scm_from_utf8_keyword (scheme_name))
#define SCM_GLOBAL_KEYWORD(c_name, scheme_name) \
SCM_SNARF_HERE(SCM c_name) \
-SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
+SCM_SNARF_INIT(c_name = scm_from_utf8_keyword (scheme_name))
#define SCM_VARIABLE(c_name, scheme_name) \
SCM_SNARF_HERE(static SCM c_name) \
/* srfi-13.c --- SRFI-13 procedures for Guile
*
- * Copyright (C) 2001, 2004, 2005, 2006, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2004-2006, 2008-2013, 2017, 2018
+ * 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
/* Validate the delimiter and record its length. */
if (SCM_UNBNDP (delimiter))
{
- delimiter = scm_from_locale_string (" ");
+ delimiter = scm_from_utf8_string (" ");
delimiter_len = 1;
}
else
/* A stack holds a frame chain
- * Copyright (C) 1996,1997,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017 Free Software Foundation
+ *
+ * Copyright (C) 1996, 1997, 2000, 2001, 2006-2015, 2017, 2018
+ * Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
scm_sys_stacks = scm_make_thread_local_fluid (SCM_BOOL_F);
scm_c_define ("%stacks", scm_sys_stacks);
- scm_stack_type = scm_make_vtable (scm_from_locale_string (SCM_STACK_LAYOUT),
+ scm_stack_type = scm_make_vtable (scm_from_utf8_string (SCM_STACK_LAYOUT),
SCM_UNDEFINED);
scm_set_struct_vtable_name_x (scm_stack_type,
- scm_from_latin1_symbol ("stack"));
+ scm_from_utf8_symbol ("stack"));
#include "libguile/stacks.x"
}
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006,
- * 2007, 2008, 2009, 2011, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2001, 2003-2009, 2011, 2013, 2014, 2016-2018
+ * 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
some OSs, e.g., Solaris. */
SCM zone =
scm_string_append (scm_list_2 (zone_spec,
- scm_from_locale_string ("0")));
+ scm_from_utf8_string ("0")));
have_zone = 1;
scm_pthread_mutex_lock (&tz_lock);
-/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- * 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998-2003, 2005, 2006, 2009-2014,
+ * 2016-2018 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
init_eval_string_var_and_k_module (void)
{
eval_string_var = scm_c_public_variable ("ice-9 eval-string", "eval-string");
- k_module = scm_from_locale_keyword ("module");
+ k_module = scm_from_utf8_keyword ("module");
}
SCM_DEFINE (scm_eval_string_in_module, "eval-string", 1, 1, 0,
-/* Copyright (C) 2000, 2001, 2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2006, 2008, 2009, 2011-2013, 2016, 2018
+ * 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
{
SCM print = scm_c_define_gsubr ("%print-values", 2, 0, 0, print_values);
- scm_values_vtable = scm_make_vtable (scm_from_locale_string ("pr"), print);
+ scm_values_vtable = scm_make_vtable (scm_from_utf8_string ("pr"), print);
scm_add_feature ("values");