/* Basic character set support.
-Copyright (C) 2001-2013 Free Software Foundation, Inc.
+Copyright (C) 2001-2014 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
{
if (ascii_compatible_p)
{
- if (! ASCII_BYTE_P (from_c))
+ if (! ASCII_CHAR_P (from_c))
{
if (from_c < nonascii_min_char)
nonascii_min_char = from_c;
}
- else if (! ASCII_BYTE_P (to_c))
+ else if (! ASCII_CHAR_P (to_c))
{
nonascii_min_char = 0x80;
}
count = SPECPDL_INDEX ();
record_unwind_protect_nothing ();
specbind (Qfile_name_handler_alist, Qnil);
- fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil, 0);
+ fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil, false);
fp = fd < 0 ? 0 : fdopen (fd, "r");
if (!fp)
{
if (! charset.code_linear_p)
{
- charset.code_space_mask = xzalloc (256);
+ charset.code_space_mask = xzalloc_atomic (256);
for (i = 0; i < 4; i++)
for (j = charset.code_space[i * 4]; j <= charset.code_space[i * 4 + 1];
j++)
if (!NILP (table))
c = translate_char (table, c);
- if (ASCII_BYTE_P (c))
+ if (ASCII_CHAR_P (c))
ASET (charsets, charset_ascii, Qt);
else
ASET (charsets, charset_eight_bit, Qt);
obscure problem (eg bug#6401), so better abort. */
fprintf (stderr, "Error: charsets directory not found:\n\
%s\n\
-Emacs will not function correctly without the character map files.\n\
+Emacs will not function correctly without the character map files.\n%s\
Please check your installation!\n",
- SDATA (tempdir));
+ SDATA (tempdir),
+ egetenv("EMACSDATA") ? "The EMACSDATA environment \
+variable is set, maybe it has the wrong value?\n" : "");
exit (1);
}
}
charset_table = charset_table_init;
- charset_table_size = sizeof charset_table_init / sizeof *charset_table_init;
+ charset_table_size = ARRAYELTS (charset_table_init);
charset_table_used = 0;
defsubr (&Scharsetp);