/* Fundamental definitions for GNU Emacs Lisp interpreter.
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#endif /* not GC_CHECK_STRING_BYTES */
/* Mark STR as a unibyte string. */
-#define STRING_SET_UNIBYTE(STR) (XSTRING (STR)->size_byte = -1)
+#define STRING_SET_UNIBYTE(STR) \
+ do { if (EQ (STR, empty_multibyte_string)) \
+ (STR) = empty_unibyte_string; \
+ else XSTRING (STR)->size_byte = -1; } while (0)
/* Get text properties. */
#define STRING_INTERVALS(STR) (XSTRING (STR)->intervals + 0)
/* If a struct is made to look like a vector, this macro returns the length
of the shortest vector that would hold that struct. */
-#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \
- - sizeof (Lisp_Object)) \
- + sizeof(Lisp_Object) - 1) /* round up */ \
+#define VECSIZE(type) ((sizeof (type) \
+ - OFFSETOF (struct Lisp_Vector, contents[0]) \
+ + sizeof(Lisp_Object) - 1) /* round up */ \
/ sizeof (Lisp_Object))
/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
extern int chars_in_text P_ ((const unsigned char *, int));
extern int multibyte_chars_in_text P_ ((const unsigned char *, int));
extern int multibyte_char_to_unibyte P_ ((int, Lisp_Object));
+extern int multibyte_char_to_unibyte_safe P_ ((int));
extern Lisp_Object Qcharset;
extern void init_charset P_ ((void));
extern void init_charset_once P_ ((void));
extern void del_range_byte P_ ((int, int, int));
extern void del_range_both P_ ((int, int, int, int, int));
extern Lisp_Object del_range_2 P_ ((int, int, int, int, int));
-extern void modify_region P_ ((struct buffer *, int, int));
+extern void modify_region P_ ((struct buffer *, int, int, int));
extern void prepare_to_modify_buffer P_ ((int, int, int *));
extern void signal_before_change P_ ((int, int, int *));
extern void signal_after_change P_ ((int, int, int));
extern void init_xdisp P_ ((void));
extern Lisp_Object safe_eval P_ ((Lisp_Object));
extern int pos_visible_p P_ ((struct window *, int, int *,
- int *, int *, int *, int));
+ int *, int *, int *, int *, int *));
/* Defined in vm-limit.c. */
extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ()));
EXFUN (Fload, 5);
EXFUN (Fget_load_suffixes, 0);
EXFUN (Fget_file_char, 0);
-EXFUN (Fread_char, 2);
-EXFUN (Fread_event, 2);
-extern Lisp_Object read_filtered_event P_ ((int, int, int, int));
+EXFUN (Fread_char, 3);
+EXFUN (Fread_event, 3);
+extern Lisp_Object read_filtered_event P_ ((int, int, int, int, Lisp_Object));
EXFUN (Feval_region, 4);
+extern Lisp_Object check_obarray P_ ((Lisp_Object));
extern Lisp_Object intern P_ ((const char *));
extern Lisp_Object make_symbol P_ ((char *));
extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int));
extern int find_next_newline_no_quit P_ ((int, int));
extern int find_before_next_newline P_ ((int, int, int));
extern void syms_of_search P_ ((void));
+extern void clear_regexp_cache P_ ((void));
/* defined in minibuf.c */
/* defined in emacs.c */
extern Lisp_Object decode_env_path P_ ((char *, char *));
extern Lisp_Object Vinvocation_name, Vinvocation_directory;
-extern Lisp_Object Vinstallation_directory, empty_string;
+extern Lisp_Object Vinstallation_directory;
+extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
EXFUN (Fkill_emacs, 1);
#if HAVE_SETLOCALE
void fixup_locale P_ ((void));
int));
extern void add_keyboard_wait_descriptor P_ ((int));
extern void delete_keyboard_wait_descriptor P_ ((int));
+extern void add_gpm_wait_descriptor P_ ((int));
+extern void delete_gpm_wait_descriptor P_ ((int));
extern void close_process_descs P_ ((void));
extern void init_process P_ ((void));
extern void syms_of_process P_ ((void));