1991-06-26 21:34:53 +00:00
|
|
|
|
/* Fundamental definitions for GNU Emacs Lisp interpreter.
|
2005-03-24 19:53:53 +00:00
|
|
|
|
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
|
2011-01-06 19:10:39 -08:00
|
|
|
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
2008-01-08 04:37:27 +00:00
|
|
|
|
Free Software Foundation, Inc.
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-15 03:28:14 +00:00
|
|
|
|
GNU Emacs is free software: you can redistribute it and/or modify
|
1991-06-26 21:34:53 +00:00
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2008-05-15 03:28:14 +00:00
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2008-05-15 03:28:14 +00:00
|
|
|
|
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#ifndef EMACS_LISP_H
|
|
|
|
|
#define EMACS_LISP_H
|
|
|
|
|
|
2010-07-11 02:59:55 -04:00
|
|
|
|
#include <stdarg.h>
|
2010-07-11 20:34:43 +02:00
|
|
|
|
#include <stddef.h>
|
2010-07-11 02:59:55 -04:00
|
|
|
|
|
2009-08-26 19:57:44 +00:00
|
|
|
|
/* Use the configure flag --enable-checking[=LIST] to enable various
|
|
|
|
|
types of run time checks for Lisp objects. */
|
2001-01-09 20:11:40 +00:00
|
|
|
|
|
2005-03-06 16:01:37 +00:00
|
|
|
|
#ifdef GC_CHECK_CONS_LIST
|
|
|
|
|
#define CHECK_CONS_LIST() check_cons_list()
|
|
|
|
|
#else
|
2007-07-11 15:26:31 +00:00
|
|
|
|
#define CHECK_CONS_LIST() ((void)0)
|
2005-03-06 16:01:37 +00:00
|
|
|
|
#endif
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1994-09-17 00:51:52 +00:00
|
|
|
|
/* These are default choices for the types to use. */
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#ifdef _LP64
|
|
|
|
|
#ifndef EMACS_INT
|
|
|
|
|
#define EMACS_INT long
|
|
|
|
|
#define BITS_PER_EMACS_INT BITS_PER_LONG
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef EMACS_UINT
|
|
|
|
|
#define EMACS_UINT unsigned long
|
|
|
|
|
#endif
|
|
|
|
|
#else /* not _LP64 */
|
1994-09-17 00:51:52 +00:00
|
|
|
|
#ifndef EMACS_INT
|
|
|
|
|
#define EMACS_INT int
|
1996-09-04 18:54:36 +00:00
|
|
|
|
#define BITS_PER_EMACS_INT BITS_PER_INT
|
1994-09-17 00:51:52 +00:00
|
|
|
|
#endif
|
|
|
|
|
#ifndef EMACS_UINT
|
|
|
|
|
#define EMACS_UINT unsigned int
|
|
|
|
|
#endif
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#endif
|
1994-09-17 00:51:52 +00:00
|
|
|
|
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
/* Extra internal type checking? */
|
|
|
|
|
extern int suppress_checking;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void die (const char *, const char *, int) NO_RETURN;
|
2000-03-30 22:27:55 +00:00
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_CHECKING
|
|
|
|
|
|
2007-10-29 18:15:02 +00:00
|
|
|
|
/* The suppress_checking variable is initialized to 0 in alloc.c. Set
|
|
|
|
|
it to 1 using a debugger to temporarily disable aborting on
|
|
|
|
|
detected internal inconsistencies or error conditions.
|
|
|
|
|
|
|
|
|
|
Testing suppress_checking after the supplied condition ensures that
|
|
|
|
|
the side effects produced by CHECK will be consistent, independent
|
|
|
|
|
of whether ENABLE_CHECKING is defined, or whether the checks are
|
|
|
|
|
suppressed at run time.
|
|
|
|
|
|
|
|
|
|
In some cases, a good compiler may be able to optimize away the
|
|
|
|
|
CHECK macro altogether, e.g., if XSTRING (x) uses CHECK to test
|
|
|
|
|
STRINGP (x), but a particular use of XSTRING is invoked only after
|
|
|
|
|
testing that STRINGP (x) is true, making the test redundant. */
|
|
|
|
|
|
2003-05-01 00:36:21 +00:00
|
|
|
|
#define CHECK(check,msg) (((check) || suppress_checking \
|
2000-08-18 05:18:44 +00:00
|
|
|
|
? (void) 0 \
|
2003-05-01 00:36:21 +00:00
|
|
|
|
: die ((msg), __FILE__, __LINE__)), \
|
2000-03-30 22:27:55 +00:00
|
|
|
|
0)
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
#else
|
2000-03-30 22:27:55 +00:00
|
|
|
|
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
/* Produce same side effects and result, but don't complain. */
|
|
|
|
|
#define CHECK(check,msg) ((check),0)
|
2000-03-30 22:27:55 +00:00
|
|
|
|
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
#endif
|
2000-03-30 22:27:55 +00:00
|
|
|
|
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
/* Define an Emacs version of "assert", since some system ones are
|
|
|
|
|
flaky. */
|
2000-05-31 19:19:50 +00:00
|
|
|
|
#ifndef ENABLE_CHECKING
|
|
|
|
|
#define eassert(X) (void) 0
|
|
|
|
|
#else /* ENABLE_CHECKING */
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__)
|
|
|
|
|
#define eassert(cond) CHECK(cond,"assertion failed: " #cond)
|
|
|
|
|
#else
|
|
|
|
|
#define eassert(cond) CHECK(cond,"assertion failed")
|
|
|
|
|
#endif
|
2000-05-31 19:19:50 +00:00
|
|
|
|
#endif /* ENABLE_CHECKING */
|
2007-09-29 20:55:05 +00:00
|
|
|
|
|
2010-07-02 01:11:24 -07:00
|
|
|
|
/* Use the configure flag --enable-use-lisp-union-type to make
|
|
|
|
|
Lisp_Object use a union type instead of the default int. The flag
|
|
|
|
|
causes USE_LISP_UNION_TYPE to be defined. */
|
2008-08-02 17:03:34 +00:00
|
|
|
|
|
2007-09-29 20:55:05 +00:00
|
|
|
|
/***** Select the tagging scheme. *****/
|
|
|
|
|
/* There are basically two options that control the tagging scheme:
|
2008-08-02 17:03:34 +00:00
|
|
|
|
- USE_LISP_UNION_TYPE says that Lisp_Object should be a union instead
|
|
|
|
|
of an integer.
|
2007-09-29 20:55:05 +00:00
|
|
|
|
- USE_LSB_TAG means that we can assume the least 3 bits of pointers are
|
|
|
|
|
always 0, and we can thus use them to hold tag bits, without
|
|
|
|
|
restricting our addressing space.
|
|
|
|
|
|
|
|
|
|
If USE_LSB_TAG is not set, then we use the top 3 bits for tagging, thus
|
|
|
|
|
restricting our possible address range. Currently USE_LSB_TAG is not
|
|
|
|
|
allowed together with a union. This is not due to any fundamental
|
|
|
|
|
technical (or political ;-) problem: nobody wrote the code to do it yet.
|
|
|
|
|
|
|
|
|
|
USE_LSB_TAG not only requires the least 3 bits of pointers returned by
|
|
|
|
|
malloc to be 0 but also needs to be able to impose a mult-of-8 alignment
|
|
|
|
|
on the few static Lisp_Objects used: all the defsubr as well
|
|
|
|
|
as the two special buffers buffer_defaults and buffer_local_symbols. */
|
|
|
|
|
|
|
|
|
|
/* First, try and define DECL_ALIGN(type,var) which declares a static
|
|
|
|
|
variable VAR of type TYPE with the added requirement that it be
|
|
|
|
|
TYPEBITS-aligned. */
|
|
|
|
|
#ifndef NO_DECL_ALIGN
|
|
|
|
|
# ifndef DECL_ALIGN
|
2011-01-17 20:54:23 -08:00
|
|
|
|
# if HAVE_ATTRIBUTE_ALIGNED
|
2007-09-29 20:55:05 +00:00
|
|
|
|
# define DECL_ALIGN(type, var) \
|
|
|
|
|
type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
|
2011-01-17 20:54:23 -08:00
|
|
|
|
# else
|
|
|
|
|
/* What directives do other compilers use? */
|
2007-09-29 20:55:05 +00:00
|
|
|
|
# endif
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */
|
2011-01-17 20:54:23 -08:00
|
|
|
|
#if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
|
|
|
|
|
|| defined DARWIN_OS || defined __sun)
|
2007-09-29 20:55:05 +00:00
|
|
|
|
/* We also need to be able to specify mult-of-8 alignment on static vars. */
|
|
|
|
|
# if defined DECL_ALIGN
|
2009-11-03 15:30:39 +00:00
|
|
|
|
# define USE_LSB_TAG
|
2007-09-29 20:55:05 +00:00
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* If we cannot use 8-byte alignment, make DECL_ALIGN a no-op. */
|
|
|
|
|
#ifndef DECL_ALIGN
|
|
|
|
|
# ifdef USE_LSB_TAG
|
|
|
|
|
# error "USE_LSB_TAG used without defining DECL_ALIGN"
|
|
|
|
|
# endif
|
|
|
|
|
# define DECL_ALIGN(type, var) type var
|
|
|
|
|
#endif
|
|
|
|
|
|
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
2000-03-29 22:14:34 +00:00
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Define the fundamental Lisp data structures. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
/* If USE_2_TAGBITS_FOR_INTS is defined, then Lisp integers use
|
|
|
|
|
2 tags, to give them one extra bit, thus extending their range from
|
|
|
|
|
e.g -2^28..2^28-1 to -2^29..2^29-1. */
|
|
|
|
|
#define USE_2_TAGS_FOR_INTS
|
|
|
|
|
|
|
|
|
|
/* Making it work for the union case is too much trouble. */
|
|
|
|
|
#ifdef USE_LISP_UNION_TYPE
|
|
|
|
|
# undef USE_2_TAGS_FOR_INTS
|
|
|
|
|
#endif
|
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* This is the set of Lisp data types. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#if !defined USE_2_TAGS_FOR_INTS
|
|
|
|
|
# define LISP_INT_TAG Lisp_Int
|
|
|
|
|
# define case_Lisp_Int case Lisp_Int
|
|
|
|
|
# define LISP_STRING_TAG 4
|
|
|
|
|
# define LISP_INT_TAG_P(x) ((x) == Lisp_Int)
|
|
|
|
|
#else
|
|
|
|
|
# define LISP_INT_TAG Lisp_Int0
|
|
|
|
|
# define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
|
|
|
|
|
# ifdef USE_LSB_TAG
|
|
|
|
|
# define LISP_INT1_TAG 4
|
|
|
|
|
# define LISP_STRING_TAG 1
|
|
|
|
|
# define LISP_INT_TAG_P(x) (((x) & 3) == 0)
|
|
|
|
|
# else
|
|
|
|
|
# define LISP_INT1_TAG 1
|
|
|
|
|
# define LISP_STRING_TAG 4
|
|
|
|
|
# define LISP_INT_TAG_P(x) (((x) & 6) == 0)
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
enum Lisp_Type
|
|
|
|
|
{
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Integer. XINT (obj) is the integer value. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#ifdef USE_2_TAGS_FOR_INTS
|
|
|
|
|
Lisp_Int0 = 0,
|
|
|
|
|
Lisp_Int1 = LISP_INT1_TAG,
|
|
|
|
|
#else
|
|
|
|
|
Lisp_Int = 0,
|
|
|
|
|
#endif
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_Symbol = 2,
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1994-10-11 07:45:20 +00:00
|
|
|
|
/* Miscellaneous. XMISC (object) points to a union Lisp_Misc,
|
|
|
|
|
whose first member indicates the subtype. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_Misc = 3,
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* String. XSTRING (object) points to a struct Lisp_String.
|
1995-01-02 21:58:40 +00:00
|
|
|
|
The length of the string, and its contents, are stored therein. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_String = LISP_STRING_TAG,
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
/* Vector of Lisp objects, or something resembling it.
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
XVECTOR (object) points to a struct Lisp_Vector, which contains
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
the size and contents. The size field also contains the type
|
|
|
|
|
information, if it's not a real vector object. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_Vectorlike = 5,
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Cons. XCONS (object) points to a struct Lisp_Cons. */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_Cons = 6,
|
1994-12-25 17:47:27 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
Lisp_Float = 7,
|
1991-06-26 21:34:53 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
/* This is the set of data types that share a common structure.
|
1995-01-11 02:13:20 +00:00
|
|
|
|
The first member of the structure is a type code from this set.
|
|
|
|
|
The enum values are arbitrary, but we'll use large numbers to make it
|
|
|
|
|
more likely that we'll spot the error if a random word in memory is
|
|
|
|
|
mistakenly interpreted as a Lisp_Misc. */
|
1994-10-07 21:44:51 +00:00
|
|
|
|
enum Lisp_Misc_Type
|
|
|
|
|
{
|
1995-01-11 02:13:20 +00:00
|
|
|
|
Lisp_Misc_Free = 0x5eab,
|
1994-10-11 07:45:20 +00:00
|
|
|
|
Lisp_Misc_Marker,
|
1995-01-02 21:58:40 +00:00
|
|
|
|
Lisp_Misc_Overlay,
|
2003-01-06 00:47:38 +00:00
|
|
|
|
Lisp_Misc_Save_Value,
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Currently floats are not a misc type,
|
|
|
|
|
but let's define this in case we want to change that. */
|
|
|
|
|
Lisp_Misc_Float,
|
|
|
|
|
/* This is not a type code. It is for range checking. */
|
|
|
|
|
Lisp_Misc_Limit
|
1994-10-07 21:44:51 +00:00
|
|
|
|
};
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* These are the types of forwarding objects used in the value slot
|
|
|
|
|
of symbols for special built-in variables whose value is stored in
|
|
|
|
|
C variables. */
|
|
|
|
|
enum Lisp_Fwd_Type
|
|
|
|
|
{
|
|
|
|
|
Lisp_Fwd_Int, /* Fwd to a C `int' variable. */
|
|
|
|
|
Lisp_Fwd_Bool, /* Fwd to a C boolean var. */
|
|
|
|
|
Lisp_Fwd_Obj, /* Fwd to a C Lisp_Object variable. */
|
|
|
|
|
Lisp_Fwd_Buffer_Obj, /* Fwd to a Lisp_Object field of buffers. */
|
|
|
|
|
Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */
|
|
|
|
|
};
|
|
|
|
|
|
1995-01-03 01:35:49 +00:00
|
|
|
|
#ifndef GCTYPEBITS
|
|
|
|
|
#define GCTYPEBITS 3
|
|
|
|
|
#endif
|
|
|
|
|
|
2003-07-09 20:31:19 +00:00
|
|
|
|
/* These values are overridden by the m- file on some machines. */
|
|
|
|
|
#ifndef VALBITS
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
|
2003-07-09 20:31:19 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#ifdef USE_LISP_UNION_TYPE
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-08-09 21:25:41 +02:00
|
|
|
|
#ifndef WORDS_BIGENDIAN
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Definition of Lisp_Object for little-endian machines. */
|
|
|
|
|
|
|
|
|
|
typedef
|
|
|
|
|
union Lisp_Object
|
|
|
|
|
{
|
|
|
|
|
/* Used for comparing two Lisp_Objects;
|
1995-01-02 21:58:40 +00:00
|
|
|
|
also, positive integers can be accessed fast this way. */
|
2007-09-29 20:55:05 +00:00
|
|
|
|
EMACS_UINT i;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
struct
|
|
|
|
|
{
|
2010-12-03 17:08:05 -05:00
|
|
|
|
/* Use explict signed, the signedness of a bit-field of type
|
|
|
|
|
int is implementation defined. */
|
|
|
|
|
signed EMACS_INT val : VALBITS;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
enum Lisp_Type type : GCTYPEBITS;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
} s;
|
|
|
|
|
struct
|
|
|
|
|
{
|
2000-09-26 12:35:33 +00:00
|
|
|
|
EMACS_UINT val : VALBITS;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
enum Lisp_Type type : GCTYPEBITS;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
} u;
|
|
|
|
|
}
|
|
|
|
|
Lisp_Object;
|
|
|
|
|
|
2010-08-09 21:25:41 +02:00
|
|
|
|
#else /* If WORDS_BIGENDIAN */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
typedef
|
|
|
|
|
union Lisp_Object
|
|
|
|
|
{
|
|
|
|
|
/* Used for comparing two Lisp_Objects;
|
1995-01-02 21:58:40 +00:00
|
|
|
|
also, positive integers can be accessed fast this way. */
|
2007-09-29 20:55:05 +00:00
|
|
|
|
EMACS_UINT i;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
struct
|
|
|
|
|
{
|
2004-04-16 12:51:06 +00:00
|
|
|
|
enum Lisp_Type type : GCTYPEBITS;
|
2010-12-03 17:08:05 -05:00
|
|
|
|
/* Use explict signed, the signedness of a bit-field of type
|
|
|
|
|
int is implementation defined. */
|
|
|
|
|
signed EMACS_INT val : VALBITS;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
} s;
|
|
|
|
|
struct
|
|
|
|
|
{
|
2004-04-16 12:51:06 +00:00
|
|
|
|
enum Lisp_Type type : GCTYPEBITS;
|
2000-09-26 12:35:33 +00:00
|
|
|
|
EMACS_UINT val : VALBITS;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
} u;
|
|
|
|
|
}
|
|
|
|
|
Lisp_Object;
|
|
|
|
|
|
2010-08-09 21:25:41 +02:00
|
|
|
|
#endif /* WORDS_BIGENDIAN */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2001-10-16 09:09:51 +00:00
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
static __inline__ Lisp_Object
|
|
|
|
|
LISP_MAKE_RVALUE (Lisp_Object o)
|
|
|
|
|
{
|
|
|
|
|
return o;
|
|
|
|
|
}
|
|
|
|
|
#else
|
2010-05-15 17:19:05 -04:00
|
|
|
|
/* This is more portable to pre-C99 non-GCC compilers, but for
|
|
|
|
|
backwards compatibility GCC still accepts an old GNU extension
|
|
|
|
|
which caused this to only generate a warning. */
|
|
|
|
|
#define LISP_MAKE_RVALUE(o) (0 ? (o) : (o))
|
2001-10-16 09:09:51 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#else /* USE_LISP_UNION_TYPE */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-06-02 02:34:00 +00:00
|
|
|
|
/* If union type is not wanted, define Lisp_Object as just a number. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2005-11-20 02:15:26 +00:00
|
|
|
|
typedef EMACS_INT Lisp_Object;
|
2001-10-16 09:09:51 +00:00
|
|
|
|
#define LISP_MAKE_RVALUE(o) (0+(o))
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#endif /* USE_LISP_UNION_TYPE */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2011-01-16 23:16:08 -08:00
|
|
|
|
/* In the size word of a vector, this bit means the vector has been marked.
|
|
|
|
|
(Shift -1 left, not 1, to avoid provoking overflow diagnostics.) */
|
1994-03-05 23:26:52 +00:00
|
|
|
|
|
2011-01-16 23:16:08 -08:00
|
|
|
|
#define ARRAY_MARK_FLAG ((EMACS_INT) -1 << (BITS_PER_EMACS_INT - 1))
|
1994-03-05 23:26:52 +00:00
|
|
|
|
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
/* In the size word of a struct Lisp_Vector, this bit means it's really
|
|
|
|
|
some other vector-like object. */
|
2011-01-16 23:16:08 -08:00
|
|
|
|
#define PSEUDOVECTOR_FLAG ((EMACS_INT) 1 << (BITS_PER_EMACS_INT - 2))
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
|
1995-01-03 01:45:36 +00:00
|
|
|
|
/* In a pseudovector, the size field actually contains a word with one
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
|
2007-09-20 21:24:14 +00:00
|
|
|
|
indicate the actual type.
|
2007-10-02 20:57:49 +00:00
|
|
|
|
We use a bitset, even tho only one of the bits can be set at any
|
|
|
|
|
particular time just so as to be able to use micro-optimizations such as
|
|
|
|
|
testing membership of a particular subset of pseudovectors in Fequal.
|
|
|
|
|
It is not crucial, but there are plenty of bits here, so why not do it? */
|
1995-01-02 21:58:40 +00:00
|
|
|
|
enum pvec_type
|
|
|
|
|
{
|
|
|
|
|
PVEC_NORMAL_VECTOR = 0,
|
|
|
|
|
PVEC_PROCESS = 0x200,
|
|
|
|
|
PVEC_FRAME = 0x400,
|
|
|
|
|
PVEC_COMPILED = 0x800,
|
|
|
|
|
PVEC_WINDOW = 0x1000,
|
|
|
|
|
PVEC_WINDOW_CONFIGURATION = 0x2000,
|
|
|
|
|
PVEC_SUBR = 0x4000,
|
1995-10-07 22:07:01 +00:00
|
|
|
|
PVEC_CHAR_TABLE = 0x8000,
|
|
|
|
|
PVEC_BOOL_VECTOR = 0x10000,
|
|
|
|
|
PVEC_BUFFER = 0x20000,
|
1999-07-21 21:43:52 +00:00
|
|
|
|
PVEC_HASH_TABLE = 0x40000,
|
2007-09-20 21:24:14 +00:00
|
|
|
|
PVEC_TERMINAL = 0x80000,
|
2007-10-11 16:24:58 +00:00
|
|
|
|
PVEC_SUB_CHAR_TABLE = 0x100000,
|
2008-05-14 01:39:27 +00:00
|
|
|
|
PVEC_FONT = 0x200000,
|
|
|
|
|
PVEC_OTHER = 0x400000,
|
|
|
|
|
PVEC_TYPE_MASK = 0x7ffe00
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
1999-11-24 14:01:54 +00:00
|
|
|
|
#if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to
|
|
|
|
|
GDB. It doesn't work on OS Alpha. Moved to a variable in
|
|
|
|
|
emacs.c. */
|
1995-06-15 20:49:02 +00:00
|
|
|
|
PVEC_FLAG = PSEUDOVECTOR_FLAG
|
1999-11-24 14:01:54 +00:00
|
|
|
|
#endif
|
1995-01-02 21:58:40 +00:00
|
|
|
|
};
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
|
2006-04-08 14:34:31 +00:00
|
|
|
|
/* For convenience, we also store the number of elements in these bits.
|
|
|
|
|
Note that this size is not necessarily the memory-footprint size, but
|
|
|
|
|
only the number of Lisp_Object fields (that need to be traced by the GC).
|
|
|
|
|
The distinction is used e.g. by Lisp_Process which places extra
|
|
|
|
|
non-Lisp_Object fields at the end of the structure. */
|
1995-10-07 22:07:01 +00:00
|
|
|
|
#define PSEUDOVECTOR_SIZE_MASK 0x1ff
|
2004-04-26 21:26:17 +00:00
|
|
|
|
|
|
|
|
|
/* Number of bits to put in each character in the internal representation
|
|
|
|
|
of bool vectors. This should not vary across implementations. */
|
|
|
|
|
#define BOOL_VECTOR_BITS_PER_CHAR 8
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* These macros extract various sorts of values from a Lisp_Object.
|
|
|
|
|
For example, if tem is a Lisp_Object whose type is Lisp_Cons,
|
1995-01-02 21:58:40 +00:00
|
|
|
|
XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#ifndef USE_LISP_UNION_TYPE
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2007-09-29 20:55:05 +00:00
|
|
|
|
/* Return a perfect hash of the Lisp_Object representation. */
|
|
|
|
|
#define XHASH(a) (a)
|
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#ifdef USE_LSB_TAG
|
|
|
|
|
|
|
|
|
|
#define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1)
|
|
|
|
|
#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) & TYPEMASK))
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#ifdef USE_2_TAGS_FOR_INTS
|
|
|
|
|
# define XINT(a) (((EMACS_INT) (a)) >> (GCTYPEBITS - 1))
|
|
|
|
|
# define XUINT(a) (((EMACS_UINT) (a)) >> (GCTYPEBITS - 1))
|
|
|
|
|
# define make_number(N) (((EMACS_INT) (N)) << (GCTYPEBITS - 1))
|
|
|
|
|
#else
|
|
|
|
|
# define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
|
|
|
|
|
# define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS)
|
|
|
|
|
# define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS)
|
|
|
|
|
#endif
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#define XSET(var, type, ptr) \
|
|
|
|
|
(eassert (XTYPE (ptr) == 0), /* Check alignment. */ \
|
|
|
|
|
(var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))
|
|
|
|
|
|
|
|
|
|
#define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK))
|
|
|
|
|
|
|
|
|
|
#else /* not USE_LSB_TAG */
|
|
|
|
|
|
|
|
|
|
#define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1)
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* One need to override this if there must be high bits set in data space
|
|
|
|
|
(doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work
|
2001-10-05 09:48:47 +00:00
|
|
|
|
on all machines, but would penalize machines which don't need it)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
*/
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) >> VALBITS))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1994-10-04 15:24:13 +00:00
|
|
|
|
/* For integers known to be positive, XFASTINT provides fast retrieval
|
|
|
|
|
and XSETFASTINT provides fast storage. This takes advantage of the
|
2004-04-16 12:51:06 +00:00
|
|
|
|
fact that Lisp_Int is 0. */
|
1994-10-04 17:04:39 +00:00
|
|
|
|
#define XFASTINT(a) ((a) + 0)
|
1994-10-04 15:24:13 +00:00
|
|
|
|
#define XSETFASTINT(a, b) ((a) = (b))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
/* Extract the value of a Lisp_Object as a (un)signed integer. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#ifdef USE_2_TAGS_FOR_INTS
|
|
|
|
|
# define XINT(a) ((((EMACS_INT) (a)) << (GCTYPEBITS - 1)) >> (GCTYPEBITS - 1))
|
|
|
|
|
# define XUINT(a) ((EMACS_UINT) ((a) & (1 + (VALMASK << 1))))
|
|
|
|
|
# define make_number(N) ((((EMACS_INT) (N)) & (1 + (VALMASK << 1))))
|
|
|
|
|
#else
|
|
|
|
|
# define XINT(a) ((((EMACS_INT) (a)) << (BITS_PER_EMACS_INT - VALBITS)) \
|
2004-04-16 12:51:06 +00:00
|
|
|
|
>> (BITS_PER_EMACS_INT - VALBITS))
|
2009-11-06 18:47:48 +00:00
|
|
|
|
# define XUINT(a) ((EMACS_UINT) ((a) & VALMASK))
|
|
|
|
|
# define make_number(N) \
|
|
|
|
|
((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2011-01-16 23:16:08 -08:00
|
|
|
|
#define XSET(var, type, ptr) \
|
|
|
|
|
((var) = ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \
|
|
|
|
|
+ ((EMACS_INT) (ptr) & VALMASK)))
|
1996-01-24 23:44:22 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
|
1996-01-24 23:44:22 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#endif /* not USE_LSB_TAG */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#else /* USE_LISP_UNION_TYPE */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#ifdef USE_2_TAGS_FOR_INTS
|
|
|
|
|
# error "USE_2_TAGS_FOR_INTS is not supported with USE_LISP_UNION_TYPE"
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-09-29 20:55:05 +00:00
|
|
|
|
#define XHASH(a) ((a).i)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
#define XTYPE(a) ((enum Lisp_Type) (a).u.type)
|
|
|
|
|
#define XINT(a) ((a).s.val)
|
|
|
|
|
#define XUINT(a) ((a).u.val)
|
|
|
|
|
|
2009-11-03 15:30:39 +00:00
|
|
|
|
#ifdef USE_LSB_TAG
|
|
|
|
|
|
|
|
|
|
# define XSET(var, vartype, ptr) \
|
|
|
|
|
(eassert ((((EMACS_UINT) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \
|
|
|
|
|
(var).u.val = ((EMACS_UINT) (ptr)) >> GCTYPEBITS, \
|
|
|
|
|
(var).u.type = ((char) (vartype)))
|
|
|
|
|
|
2009-11-03 21:12:15 +00:00
|
|
|
|
/* Some versions of gcc seem to consider the bitfield width when issuing
|
|
|
|
|
the "cast to pointer from integer of different size" warning, so the
|
|
|
|
|
cast is here to widen the value back to its natural size. */
|
|
|
|
|
# define XPNTR(v) ((EMACS_INT)((v).s.val) << GCTYPEBITS)
|
2009-11-03 15:30:39 +00:00
|
|
|
|
|
|
|
|
|
#else /* !USE_LSB_TAG */
|
|
|
|
|
|
|
|
|
|
/* For integers known to be positive, XFASTINT provides fast retrieval
|
|
|
|
|
and XSETFASTINT provides fast storage. This takes advantage of the
|
|
|
|
|
fact that Lisp_Int is 0. */
|
|
|
|
|
# define XFASTINT(a) ((a).i + 0)
|
|
|
|
|
# define XSETFASTINT(a, b) ((a).i = (b))
|
|
|
|
|
|
|
|
|
|
# define XSET(var, vartype, ptr) \
|
2000-09-26 12:35:33 +00:00
|
|
|
|
(((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-11-03 15:30:39 +00:00
|
|
|
|
#endif /* !USE_LSB_TAG */
|
|
|
|
|
|
2000-04-05 18:47:29 +00:00
|
|
|
|
#if __GNUC__ >= 2 && defined (__OPTIMIZE__)
|
|
|
|
|
#define make_number(N) \
|
|
|
|
|
(__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
|
|
|
|
|
#else
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object make_number (EMACS_INT);
|
2000-04-05 18:47:29 +00:00
|
|
|
|
#endif
|
1997-04-11 21:58:13 +00:00
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#endif /* USE_LISP_UNION_TYPE */
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
2009-11-03 15:30:39 +00:00
|
|
|
|
/* For integers known to be positive, XFASTINT sometimes provides
|
|
|
|
|
faster retrieval and XSETFASTINT provides faster storage.
|
|
|
|
|
If not, fallback on the non-accelerated path. */
|
|
|
|
|
#ifndef XFASTINT
|
|
|
|
|
# define XFASTINT(a) (XINT (a))
|
|
|
|
|
# define XSETFASTINT(a, b) (XSETINT (a, b))
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-09-29 20:55:05 +00:00
|
|
|
|
#define EQ(x, y) (XHASH (x) == XHASH (y))
|
|
|
|
|
|
2002-07-24 02:07:11 +00:00
|
|
|
|
#ifndef XPNTR
|
|
|
|
|
#ifdef DATA_SEG_BITS
|
|
|
|
|
/* This case is used for the rt-pc.
|
|
|
|
|
In the diffs I was given, it checked for ptr = 0
|
|
|
|
|
and did not adjust it in that case.
|
|
|
|
|
But I don't think that zero should ever be found
|
|
|
|
|
in a Lisp object whose data type says it points to something. */
|
|
|
|
|
#define XPNTR(a) (XUINT (a) | DATA_SEG_BITS)
|
|
|
|
|
#else
|
2006-02-05 12:21:40 +00:00
|
|
|
|
/* Some versions of gcc seem to consider the bitfield width when
|
|
|
|
|
issuing the "cast to pointer from integer of different size"
|
|
|
|
|
warning, so the cast is here to widen the value back to its natural
|
|
|
|
|
size. */
|
|
|
|
|
#define XPNTR(a) ((EMACS_INT) XUINT (a))
|
2002-07-24 02:07:11 +00:00
|
|
|
|
#endif
|
|
|
|
|
#endif /* no XPNTR */
|
|
|
|
|
|
2001-10-07 00:14:18 +00:00
|
|
|
|
/* Largest and smallest representable fixnum values. These are the C
|
|
|
|
|
values. */
|
2001-10-06 23:25:06 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#ifdef USE_2_TAGS_FOR_INTS
|
|
|
|
|
# define MOST_NEGATIVE_FIXNUM - ((EMACS_INT) 1 << VALBITS)
|
|
|
|
|
# define MOST_POSITIVE_FIXNUM (((EMACS_INT) 1 << VALBITS) - 1)
|
2004-04-16 12:51:06 +00:00
|
|
|
|
/* Mask indicating the significant bits of a Lisp_Int.
|
|
|
|
|
I.e. (x & INTMASK) == XUINT (make_number (x)). */
|
2009-11-06 18:47:48 +00:00
|
|
|
|
# define INTMASK ((((EMACS_INT) 1) << (VALBITS + 1)) - 1)
|
|
|
|
|
#else
|
|
|
|
|
# define MOST_NEGATIVE_FIXNUM - ((EMACS_INT) 1 << (VALBITS - 1))
|
|
|
|
|
# define MOST_POSITIVE_FIXNUM (((EMACS_INT) 1 << (VALBITS - 1)) - 1)
|
|
|
|
|
/* Mask indicating the significant bits of a Lisp_Int.
|
|
|
|
|
I.e. (x & INTMASK) == XUINT (make_number (x)). */
|
|
|
|
|
# define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1)
|
|
|
|
|
#endif
|
2001-10-06 23:25:06 +00:00
|
|
|
|
|
2009-10-24 16:32:06 +00:00
|
|
|
|
/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
|
|
|
|
|
written this way so that it also works if I is of unsigned
|
|
|
|
|
type. */
|
2001-10-06 23:25:06 +00:00
|
|
|
|
|
|
|
|
|
#define FIXNUM_OVERFLOW_P(i) \
|
2009-10-23 20:56:30 +00:00
|
|
|
|
((i) > MOST_POSITIVE_FIXNUM \
|
2009-10-24 16:32:06 +00:00
|
|
|
|
|| ((i) < 0 && (i) < MOST_NEGATIVE_FIXNUM))
|
2001-10-06 23:25:06 +00:00
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Extract a value or address from a Lisp_Object. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
(GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
(GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
(GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
(GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
(GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
(GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
(GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
(GC_EQ): Remove since they've been identical to their non-GC_
alter-egos ever since the markbit was eradicated.
2007-06-29 03:38:07 +00:00
|
|
|
|
#define XCONS(a) (eassert (CONSP(a)),(struct Lisp_Cons *) XPNTR(a))
|
|
|
|
|
#define XVECTOR(a) (eassert (VECTORLIKEP(a)),(struct Lisp_Vector *) XPNTR(a))
|
|
|
|
|
#define XSTRING(a) (eassert (STRINGP(a)),(struct Lisp_String *) XPNTR(a))
|
|
|
|
|
#define XSYMBOL(a) (eassert (SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a))
|
|
|
|
|
#define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a))
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
|
|
|
|
/* Misc types. */
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define XMISC(a) ((union Lisp_Misc *) XPNTR(a))
|
2007-10-17 02:13:01 +00:00
|
|
|
|
#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC(a)->u_any))
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
#define XMISCTYPE(a) (XMISCANY (a)->type)
|
2007-10-17 02:13:01 +00:00
|
|
|
|
#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC(a)->u_marker))
|
|
|
|
|
#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay))
|
|
|
|
|
#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value))
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
|
|
|
|
|
/* Forwarding object types. */
|
|
|
|
|
|
|
|
|
|
#define XFWDTYPE(a) (a->u_intfwd.type)
|
|
|
|
|
#define XINTFWD(a) (eassert (INTFWDP (a)), &((a)->u_intfwd))
|
|
|
|
|
#define XBOOLFWD(a) (eassert (BOOLFWDP (a)), &((a)->u_boolfwd))
|
|
|
|
|
#define XOBJFWD(a) (eassert (OBJFWDP (a)), &((a)->u_objfwd))
|
2007-10-17 02:13:01 +00:00
|
|
|
|
#define XBUFFER_OBJFWD(a) \
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
(eassert (BUFFER_OBJFWDP (a)), &((a)->u_buffer_objfwd))
|
2007-10-17 02:13:01 +00:00
|
|
|
|
#define XKBOARD_OBJFWD(a) \
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
(eassert (KBOARD_OBJFWDP (a)), &((a)->u_kboard_objfwd))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
/* Pseudovector types. */
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
(XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
(GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
(GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
(GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
(GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
(GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
(GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
(GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
(GC_EQ): Remove since they've been identical to their non-GC_
alter-egos ever since the markbit was eradicated.
2007-06-29 03:38:07 +00:00
|
|
|
|
#define XPROCESS(a) (eassert (PROCESSP(a)),(struct Lisp_Process *) XPNTR(a))
|
|
|
|
|
#define XWINDOW(a) (eassert (WINDOWP(a)),(struct window *) XPNTR(a))
|
2007-10-11 16:24:58 +00:00
|
|
|
|
#define XTERMINAL(a) (eassert (TERMINALP(a)),(struct terminal *) XPNTR(a))
|
(XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
(GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
(GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
(GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
(GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
(GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
(GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
(GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
(GC_EQ): Remove since they've been identical to their non-GC_
alter-egos ever since the markbit was eradicated.
2007-06-29 03:38:07 +00:00
|
|
|
|
#define XSUBR(a) (eassert (SUBRP(a)),(struct Lisp_Subr *) XPNTR(a))
|
|
|
|
|
#define XBUFFER(a) (eassert (BUFFERP(a)),(struct buffer *) XPNTR(a))
|
2007-10-11 16:24:58 +00:00
|
|
|
|
#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR(a))
|
|
|
|
|
#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR(a))
|
|
|
|
|
#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR(a))
|
1995-01-02 21:58:40 +00:00
|
|
|
|
|
|
|
|
|
/* Construct a Lisp_Object from a value or address. */
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
2003-06-25 23:16:30 +00:00
|
|
|
|
#define XSETINT(a, b) (a) = make_number (b)
|
(XSETINT, XSETCONS, XSETBUFFER, XSETVECTOR, XSETSUBR, XSETSTRING, XSETSYMBOL,
XSETMARKER, XSETOBJFWD, XSETWINDOW, XSETPROCESS, XSETFLOAT): Set object type
as well as value.
(XSETBOOLFWD, XSETBUFFER_OBJFWD, XSETWINDOW_CONFIGURATION,
XSETINTERNAL_STREAM, XSETINTFWD, XSETINTERNAL): New macros.
(XSETUINT, XSETPNTR, XFUNCTION, XSETFUNCTION, XSETINTPTR): Deleted.
1994-10-04 13:12:44 +00:00
|
|
|
|
#define XSETCONS(a, b) XSET (a, Lisp_Cons, b)
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
#define XSETVECTOR(a, b) XSET (a, Lisp_Vectorlike, b)
|
(XSETINT, XSETCONS, XSETBUFFER, XSETVECTOR, XSETSUBR, XSETSTRING, XSETSYMBOL,
XSETMARKER, XSETOBJFWD, XSETWINDOW, XSETPROCESS, XSETFLOAT): Set object type
as well as value.
(XSETBOOLFWD, XSETBUFFER_OBJFWD, XSETWINDOW_CONFIGURATION,
XSETINTERNAL_STREAM, XSETINTFWD, XSETINTERNAL): New macros.
(XSETUINT, XSETPNTR, XFUNCTION, XSETFUNCTION, XSETINTPTR): Deleted.
1994-10-04 13:12:44 +00:00
|
|
|
|
#define XSETSTRING(a, b) XSET (a, Lisp_String, b)
|
|
|
|
|
#define XSETSYMBOL(a, b) XSET (a, Lisp_Symbol, b)
|
|
|
|
|
#define XSETFLOAT(a, b) XSET (a, Lisp_Float, b)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
|
|
|
|
/* Misc types. */
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define XSETMISC(a, b) XSET (a, Lisp_Misc, b)
|
1995-04-10 00:31:47 +00:00
|
|
|
|
#define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
|
|
|
|
/* Pseudovector types. */
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
2007-10-02 20:57:49 +00:00
|
|
|
|
#define XSETPVECTYPE(v,code) ((v)->size |= PSEUDOVECTOR_FLAG | (code))
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define XSETPSEUDOVECTOR(a, b, code) \
|
2007-10-09 04:28:00 +00:00
|
|
|
|
(XSETVECTOR (a, b), \
|
|
|
|
|
eassert ((XVECTOR (a)->size & (PSEUDOVECTOR_FLAG | PVEC_TYPE_MASK)) \
|
|
|
|
|
== (PSEUDOVECTOR_FLAG | (code))))
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define XSETWINDOW_CONFIGURATION(a, b) \
|
|
|
|
|
(XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION))
|
|
|
|
|
#define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS))
|
|
|
|
|
#define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW))
|
2007-09-20 21:24:14 +00:00
|
|
|
|
#define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL))
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR))
|
|
|
|
|
#define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED))
|
1995-01-02 21:58:40 +00:00
|
|
|
|
#define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER))
|
1995-10-07 22:07:01 +00:00
|
|
|
|
#define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE))
|
|
|
|
|
#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE))
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
|
|
|
|
/* Convenience macros for dealing with Lisp arrays. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
|
2000-07-13 14:06:39 +00:00
|
|
|
|
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->size
|
2008-02-13 22:39:30 +00:00
|
|
|
|
/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
|
2008-02-10 03:20:40 +00:00
|
|
|
|
#define ASET(ARRAY, IDX, VAL) \
|
|
|
|
|
(eassert ((IDX) == (IDX)), \
|
|
|
|
|
eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
|
2008-02-13 22:39:30 +00:00
|
|
|
|
AREF ((ARRAY), (IDX)) = (VAL))
|
2000-07-13 14:06:39 +00:00
|
|
|
|
|
2002-03-08 10:26:32 +00:00
|
|
|
|
/* Convenience macros for dealing with Lisp strings. */
|
|
|
|
|
|
2002-07-16 15:09:36 +00:00
|
|
|
|
#define SDATA(string) (XSTRING (string)->data + 0)
|
2007-09-29 20:55:05 +00:00
|
|
|
|
#define SREF(string, index) (SDATA (string)[index] + 0)
|
|
|
|
|
#define SSET(string, index, new) (SDATA (string)[index] = (new))
|
2002-07-15 02:13:38 +00:00
|
|
|
|
#define SCHARS(string) (XSTRING (string)->size + 0)
|
|
|
|
|
#define SBYTES(string) (STRING_BYTES (XSTRING (string)) + 0)
|
|
|
|
|
|
|
|
|
|
#define STRING_SET_CHARS(string, newsize) \
|
|
|
|
|
(XSTRING (string)->size = (newsize))
|
2002-03-08 10:26:32 +00:00
|
|
|
|
|
2002-07-19 14:27:13 +00:00
|
|
|
|
#define STRING_COPYIN(string, index, new, count) \
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
memcpy (SDATA (string) + index, new, count)
|
2002-07-19 14:27:13 +00:00
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
/* Type checking. */
|
|
|
|
|
|
|
|
|
|
#define CHECK_TYPE(ok, Qxxxp, x) \
|
|
|
|
|
do { if (!(ok)) wrong_type_argument (Qxxxp, (x)); } while (0)
|
|
|
|
|
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2003-07-09 20:31:19 +00:00
|
|
|
|
/* See the macros in intervals.h. */
|
1992-10-01 01:00:41 +00:00
|
|
|
|
|
|
|
|
|
typedef struct interval *INTERVAL;
|
|
|
|
|
|
|
|
|
|
/* Complain if object is not string or buffer type */
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_STRING_OR_BUFFER(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (STRINGP (x) || BUFFERP (x), Qbuffer_or_string_p, x)
|
|
|
|
|
|
1992-10-01 01:00:41 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* In a cons, the markbit of the car is the gc mark bit */
|
|
|
|
|
|
|
|
|
|
struct Lisp_Cons
|
|
|
|
|
{
|
1999-08-28 22:15:12 +00:00
|
|
|
|
/* Please do not use the names of these elements in code other
|
|
|
|
|
than the core lisp implementation. Use XCAR and XCDR below. */
|
|
|
|
|
#ifdef HIDE_LISP_IMPLEMENTATION
|
2005-11-15 13:53:09 +00:00
|
|
|
|
Lisp_Object car_;
|
|
|
|
|
union
|
|
|
|
|
{
|
|
|
|
|
Lisp_Object cdr_;
|
|
|
|
|
struct Lisp_Cons *chain;
|
|
|
|
|
} u;
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#else
|
2005-11-15 13:53:09 +00:00
|
|
|
|
Lisp_Object car;
|
|
|
|
|
union
|
|
|
|
|
{
|
|
|
|
|
Lisp_Object cdr;
|
|
|
|
|
struct Lisp_Cons *chain;
|
|
|
|
|
} u;
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#endif
|
1991-06-26 21:34:53 +00:00
|
|
|
|
};
|
|
|
|
|
|
1996-01-24 23:44:22 +00:00
|
|
|
|
/* Take the car or cdr of something known to be a cons cell. */
|
2001-10-16 09:09:51 +00:00
|
|
|
|
/* The _AS_LVALUE macros shouldn't be used outside of the minimal set
|
|
|
|
|
of code that has to know what a cons cell looks like. Other code not
|
|
|
|
|
part of the basic lisp implementation should assume that the car and cdr
|
|
|
|
|
fields are not accessible as lvalues. (What if we want to switch to
|
|
|
|
|
a copying collector someday? Cached cons cell field addresses may be
|
|
|
|
|
invalidated at arbitrary points.) */
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#ifdef HIDE_LISP_IMPLEMENTATION
|
2001-10-16 09:09:51 +00:00
|
|
|
|
#define XCAR_AS_LVALUE(c) (XCONS ((c))->car_)
|
2005-11-15 13:53:09 +00:00
|
|
|
|
#define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr_)
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#else
|
2001-10-16 09:09:51 +00:00
|
|
|
|
#define XCAR_AS_LVALUE(c) (XCONS ((c))->car)
|
2005-11-15 13:53:09 +00:00
|
|
|
|
#define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr)
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#endif
|
1996-01-24 23:44:22 +00:00
|
|
|
|
|
2001-10-16 09:09:51 +00:00
|
|
|
|
/* Use these from normal code. */
|
|
|
|
|
#define XCAR(c) LISP_MAKE_RVALUE(XCAR_AS_LVALUE(c))
|
|
|
|
|
#define XCDR(c) LISP_MAKE_RVALUE(XCDR_AS_LVALUE(c))
|
|
|
|
|
|
|
|
|
|
/* Use these to set the fields of a cons cell.
|
|
|
|
|
|
|
|
|
|
Note that both arguments may refer to the same object, so 'n'
|
|
|
|
|
should not be read after 'c' is first modified. Also, neither
|
|
|
|
|
argument should be evaluated more than once; side effects are
|
|
|
|
|
especially common in the second argument. */
|
|
|
|
|
#define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n))
|
|
|
|
|
#define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n))
|
|
|
|
|
|
1996-01-24 23:44:22 +00:00
|
|
|
|
/* Take the car or cdr of something whose type is not known. */
|
|
|
|
|
#define CAR(c) \
|
|
|
|
|
(CONSP ((c)) ? XCAR ((c)) \
|
|
|
|
|
: NILP ((c)) ? Qnil \
|
2008-02-13 22:39:30 +00:00
|
|
|
|
: wrong_type_argument (Qlistp, (c)))
|
1996-01-24 23:44:22 +00:00
|
|
|
|
|
|
|
|
|
#define CDR(c) \
|
|
|
|
|
(CONSP ((c)) ? XCDR ((c)) \
|
|
|
|
|
: NILP ((c)) ? Qnil \
|
2008-02-13 22:39:30 +00:00
|
|
|
|
: wrong_type_argument (Qlistp, (c)))
|
1996-01-24 23:44:22 +00:00
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
/* Take the car or cdr of something whose type is not known. */
|
|
|
|
|
#define CAR_SAFE(c) \
|
|
|
|
|
(CONSP ((c)) ? XCAR ((c)) : Qnil)
|
|
|
|
|
|
|
|
|
|
#define CDR_SAFE(c) \
|
|
|
|
|
(CONSP ((c)) ? XCDR ((c)) : Qnil)
|
|
|
|
|
|
1998-03-24 12:16:10 +00:00
|
|
|
|
/* Nonzero if STR is a multibyte string. */
|
|
|
|
|
#define STRING_MULTIBYTE(STR) \
|
|
|
|
|
(XSTRING (STR)->size_byte >= 0)
|
|
|
|
|
|
|
|
|
|
/* Return the length in bytes of STR. */
|
2001-01-09 20:11:40 +00:00
|
|
|
|
|
|
|
|
|
#ifdef GC_CHECK_STRING_BYTES
|
|
|
|
|
|
|
|
|
|
struct Lisp_String;
|
Fix some more uses of int instead of EMACS_INT.
font.c (font_intern_prop): Use EMACS_INT for string length
variables.
character.c (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(string_count_byte8, string_escape_byte8): Use EMACS_INT for
string length arguments, variables, and return values.
character.h (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte): Adjust
prototypes.
fns.c (Fstring_as_multibyte): Use EMACS_INT for string length
variables.
alloc.c <total_string_size>: Declare as EMACS_INT, not int.
(Fmake_string): Protect against too large strings.
(live_string_p, live_cons_p, live_symbol_p, live_float_p)
(live_misc_p): Use ptrdiff_t instead of int for pointer
differences.
(string_bytes, check_sblock, check_string_free_list)
(allocate_string_data, compact_small_strings, Fmake_string)
(Fmake_bool_vector, make_string, make_unibyte_string)
(make_multibyte_string, make_string_from_bytes)
(make_specified_string_string, Fmake_list, Fmake_vector): Use
EMACS_INT for string length variables and arguments.
(find_string_data_in_pure, make_pure_string, make_pure_c_string)
(Fpurecopy): Use EMACS_INT for string size.
(mark_vectorlike, mark_char_table, mark_object): Use EMACS_UINT
for vector size.
lisp.h (make_string, make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string_string)
(make_pure_string, string_bytes): Adjust prototypes.
2010-09-23 08:09:12 -04:00
|
|
|
|
extern EMACS_INT string_bytes (struct Lisp_String *);
|
2001-01-09 20:11:40 +00:00
|
|
|
|
#define STRING_BYTES(S) string_bytes ((S))
|
|
|
|
|
|
|
|
|
|
#else /* not GC_CHECK_STRING_BYTES */
|
|
|
|
|
|
1998-03-24 12:16:10 +00:00
|
|
|
|
#define STRING_BYTES(STR) \
|
|
|
|
|
((STR)->size_byte < 0 ? (STR)->size : (STR)->size_byte)
|
|
|
|
|
|
2001-01-09 20:11:40 +00:00
|
|
|
|
#endif /* not GC_CHECK_STRING_BYTES */
|
|
|
|
|
|
2002-07-14 23:54:05 +00:00
|
|
|
|
/* Mark STR as a unibyte string. */
|
2007-06-08 19:56:24 +00:00
|
|
|
|
#define STRING_SET_UNIBYTE(STR) \
|
|
|
|
|
do { if (EQ (STR, empty_multibyte_string)) \
|
|
|
|
|
(STR) = empty_unibyte_string; \
|
|
|
|
|
else XSTRING (STR)->size_byte = -1; } while (0)
|
2002-07-14 23:54:05 +00:00
|
|
|
|
|
2008-04-17 01:09:57 +00:00
|
|
|
|
/* Mark STR as a multibyte string. Assure that STR contains only
|
|
|
|
|
ASCII characters in advance. */
|
|
|
|
|
#define STRING_SET_MULTIBYTE(STR) \
|
|
|
|
|
do { if (EQ (STR, empty_unibyte_string)) \
|
|
|
|
|
(STR) = empty_multibyte_string; \
|
|
|
|
|
else XSTRING (STR)->size_byte = XSTRING (STR)->size; } while (0)
|
|
|
|
|
|
2002-07-14 23:54:05 +00:00
|
|
|
|
/* Get text properties. */
|
2002-07-15 06:54:23 +00:00
|
|
|
|
#define STRING_INTERVALS(STR) (XSTRING (STR)->intervals + 0)
|
|
|
|
|
|
|
|
|
|
/* Set text properties. */
|
|
|
|
|
#define STRING_SET_INTERVALS(STR, INT) (XSTRING (STR)->intervals = (INT))
|
1998-03-24 12:16:10 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* In a string or vector, the sign bit of the `size' is the gc mark bit */
|
|
|
|
|
|
|
|
|
|
struct Lisp_String
|
|
|
|
|
{
|
(Lisp_Object): Use EMACS_INT.
(MARKBIT): Don't define if already defined.
(VALMASK, GCTYPEMASK, XSETTYPE, XSET)
(XSETCONS, XSETBUFFER, XSETVECTOR, XSETSUBR, XSETSTRING)
(XSETSYMBOL, XSETFUNCTION, XSETMARKER, XSETOBJFWD)
(XSETINTPTR, XSETWINDOW, XSETPROCESS, XSETFLOAT)
(struct Lisp_String, struct Lisp_Vector): Use EMACS_INT.
1994-09-17 00:35:09 +00:00
|
|
|
|
EMACS_INT size;
|
1998-01-09 23:17:00 +00:00
|
|
|
|
EMACS_INT size_byte;
|
2000-08-18 03:07:07 +00:00
|
|
|
|
INTERVAL intervals; /* text properties in this string */
|
2000-01-04 12:21:48 +00:00
|
|
|
|
unsigned char *data;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Lisp_Vector
|
|
|
|
|
{
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT size;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct Lisp_Vector *next;
|
|
|
|
|
Lisp_Object contents[1];
|
|
|
|
|
};
|
|
|
|
|
|
1994-11-16 05:17:32 +00:00
|
|
|
|
/* If a struct is made to look like a vector, this macro returns the length
|
1996-02-03 02:33:12 +00:00
|
|
|
|
of the shortest vector that would hold that struct. */
|
2007-04-29 16:08:14 +00:00
|
|
|
|
#define VECSIZE(type) ((sizeof (type) \
|
2010-07-11 20:34:43 +02:00
|
|
|
|
- offsetof (struct Lisp_Vector, contents[0]) \
|
2007-04-29 16:08:14 +00:00
|
|
|
|
+ sizeof(Lisp_Object) - 1) /* round up */ \
|
1994-11-16 05:17:32 +00:00
|
|
|
|
/ sizeof (Lisp_Object))
|
|
|
|
|
|
2006-04-08 14:15:04 +00:00
|
|
|
|
/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
|
|
|
|
|
at the end and we need to compute the number of Lisp_Object fields (the
|
|
|
|
|
ones that the GC needs to trace). */
|
|
|
|
|
#define PSEUDOVECSIZE(type, nonlispfield) \
|
2010-07-11 20:34:43 +02:00
|
|
|
|
((offsetof(type, nonlispfield) - offsetof(struct Lisp_Vector, contents[0])) \
|
2006-04-08 14:15:04 +00:00
|
|
|
|
/ sizeof (Lisp_Object))
|
|
|
|
|
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
/* A char-table is a kind of vectorlike, with contents are like a
|
1997-04-07 07:12:13 +00:00
|
|
|
|
vector but with a few other slots. For some purposes, it makes
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
sense to handle a char-table with type struct Lisp_Vector. An
|
1997-04-07 07:12:13 +00:00
|
|
|
|
element of a char table can be any Lisp objects, but if it is a sub
|
|
|
|
|
char-table, we treat it a table that contains information of a
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
specific range of characters. A sub char-table has the same
|
|
|
|
|
structure as a vector. A sub char table appears only in an element
|
|
|
|
|
of a char-table, and there's no way to access it directly from
|
|
|
|
|
Emacs Lisp program. */
|
1995-10-07 22:07:01 +00:00
|
|
|
|
|
1997-04-07 07:12:13 +00:00
|
|
|
|
/* This is the number of slots that every char table must have. This
|
|
|
|
|
counts the ordinary slots and the top, defalt, parent, and purpose
|
|
|
|
|
slots. */
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
#define CHAR_TABLE_STANDARD_SLOTS (VECSIZE (struct Lisp_Char_Table) - 1)
|
1995-10-07 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
/* Return the number of "extra" slots in the char table CT. */
|
|
|
|
|
|
|
|
|
|
#define CHAR_TABLE_EXTRA_SLOTS(CT) \
|
|
|
|
|
(((CT)->size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS)
|
|
|
|
|
|
2009-08-25 00:48:59 +00:00
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
|
|
|
|
|
#define CHAR_TABLE_REF_ASCII(CT, IDX) \
|
|
|
|
|
({struct Lisp_Char_Table *_tbl = NULL; \
|
|
|
|
|
Lisp_Object _val; \
|
|
|
|
|
do { \
|
|
|
|
|
_tbl = _tbl ? XCHAR_TABLE (_tbl->parent) : XCHAR_TABLE (CT); \
|
|
|
|
|
_val = (! SUB_CHAR_TABLE_P (_tbl->ascii) ? _tbl->ascii \
|
|
|
|
|
: XSUB_CHAR_TABLE (_tbl->ascii)->contents[IDX]); \
|
|
|
|
|
if (NILP (_val)) \
|
|
|
|
|
_val = _tbl->defalt; \
|
|
|
|
|
} while (NILP (_val) && ! NILP (_tbl->parent)); \
|
|
|
|
|
_val; })
|
2009-10-02 05:57:49 +00:00
|
|
|
|
|
2009-08-25 00:48:59 +00:00
|
|
|
|
#else /* not __GNUC__ */
|
|
|
|
|
|
|
|
|
|
#define CHAR_TABLE_REF_ASCII(CT, IDX) \
|
|
|
|
|
(! NILP (XCHAR_TABLE (CT)->ascii) \
|
|
|
|
|
? (! SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \
|
|
|
|
|
? XCHAR_TABLE (CT)->ascii \
|
|
|
|
|
: ! NILP (XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX]) \
|
|
|
|
|
? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] \
|
|
|
|
|
: char_table_ref ((CT), (IDX))) \
|
|
|
|
|
: char_table_ref ((CT), (IDX)))
|
|
|
|
|
|
|
|
|
|
#endif /* not __GNUC__ */
|
|
|
|
|
|
1997-03-18 23:31:34 +00:00
|
|
|
|
/* Almost equivalent to Faref (CT, IDX) with optimization for ASCII
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
characters. Do not check validity of CT. */
|
2009-08-25 00:48:59 +00:00
|
|
|
|
#define CHAR_TABLE_REF(CT, IDX) \
|
|
|
|
|
(ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
: char_table_ref ((CT), (IDX)))
|
1997-03-18 23:31:34 +00:00
|
|
|
|
|
2003-10-06 11:24:18 +00:00
|
|
|
|
/* Almost equivalent to Faref (CT, IDX). However, if the result is
|
|
|
|
|
not a character, return IDX.
|
1998-05-25 20:28:28 +00:00
|
|
|
|
|
|
|
|
|
For these characters, do not check validity of CT
|
|
|
|
|
and do not follow parent. */
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
#define CHAR_TABLE_TRANSLATE(CT, IDX) \
|
|
|
|
|
char_table_translate (CT, IDX)
|
1998-05-25 20:28:28 +00:00
|
|
|
|
|
1997-03-18 23:31:34 +00:00
|
|
|
|
/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
|
2002-07-30 11:35:53 +00:00
|
|
|
|
8-bit European characters. Do not check validity of CT. */
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
#define CHAR_TABLE_SET(CT, IDX, VAL) \
|
|
|
|
|
(((IDX) >= 0 && ASCII_CHAR_P (IDX) \
|
|
|
|
|
&& SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii)) \
|
|
|
|
|
? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] = VAL \
|
|
|
|
|
: char_table_set (CT, IDX, VAL))
|
|
|
|
|
|
|
|
|
|
#define CHARTAB_SIZE_BITS_0 6
|
|
|
|
|
#define CHARTAB_SIZE_BITS_1 4
|
|
|
|
|
#define CHARTAB_SIZE_BITS_2 5
|
|
|
|
|
#define CHARTAB_SIZE_BITS_3 7
|
|
|
|
|
|
|
|
|
|
extern const int chartab_size[4];
|
|
|
|
|
|
|
|
|
|
struct Lisp_Sub_Char_Table;
|
1997-03-18 23:31:34 +00:00
|
|
|
|
|
1995-10-07 22:07:01 +00:00
|
|
|
|
struct Lisp_Char_Table
|
|
|
|
|
{
|
|
|
|
|
/* This is the vector's size field, which also holds the
|
|
|
|
|
pseudovector type information. It holds the size, too.
|
2007-10-11 16:24:58 +00:00
|
|
|
|
The size counts the defalt, parent, purpose, ascii,
|
|
|
|
|
contents, and extras slots. */
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT size;
|
1995-10-07 22:07:01 +00:00
|
|
|
|
struct Lisp_Vector *next;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
1995-10-07 22:07:01 +00:00
|
|
|
|
/* This holds a default value,
|
|
|
|
|
which is used whenever the value for a specific character is nil. */
|
|
|
|
|
Lisp_Object defalt;
|
1997-04-07 07:12:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* This points to another char table, which we inherit from when the
|
|
|
|
|
value for a specific character is nil. The `defalt' slot takes
|
|
|
|
|
precedence over this. */
|
1995-10-07 22:07:01 +00:00
|
|
|
|
Lisp_Object parent;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* This is a symbol which says what kind of use this char-table is
|
|
|
|
|
meant for. */
|
1995-10-12 21:19:49 +00:00
|
|
|
|
Lisp_Object purpose;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* The bottom sub char-table for characters of the range 0..127. It
|
|
|
|
|
is nil if none of ASCII character has a specific value. */
|
|
|
|
|
Lisp_Object ascii;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
Lisp_Object contents[(1 << CHARTAB_SIZE_BITS_0)];
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* These hold additional data. It is a vector. */
|
1995-10-07 22:07:01 +00:00
|
|
|
|
Lisp_Object extras[1];
|
|
|
|
|
};
|
|
|
|
|
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
struct Lisp_Sub_Char_Table
|
2003-09-08 12:53:41 +00:00
|
|
|
|
{
|
|
|
|
|
/* This is the vector's size field, which also holds the
|
|
|
|
|
pseudovector type information. It holds the size, too. */
|
|
|
|
|
EMACS_INT size;
|
|
|
|
|
struct Lisp_Vector *next;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* Depth of this sub char-table. It should be 1, 2, or 3. A sub
|
2010-06-03 17:34:35 +02:00
|
|
|
|
char-table of depth 1 contains 16 elements, and each element
|
2003-09-08 12:53:41 +00:00
|
|
|
|
covers 4096 (128*32) characters. A sub char-table of depth 2
|
|
|
|
|
contains 32 elements, and each element covers 128 characters. A
|
|
|
|
|
sub char-table of depth 3 contains 128 elements, and each element
|
|
|
|
|
is for one character. */
|
|
|
|
|
Lisp_Object depth;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* Minimum character covered by the sub char-table. */
|
|
|
|
|
Lisp_Object min_char;
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
Lisp_Object contents[1];
|
|
|
|
|
};
|
1995-10-07 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
/* A boolvector is a kind of vectorlike, with contents are like a string. */
|
|
|
|
|
struct Lisp_Bool_Vector
|
|
|
|
|
{
|
|
|
|
|
/* This is the vector's size field. It doesn't have the real size,
|
|
|
|
|
just the subtype information. */
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT vector_size;
|
1995-10-07 22:07:01 +00:00
|
|
|
|
struct Lisp_Vector *next;
|
|
|
|
|
/* This is the size in bits. */
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT size;
|
1995-10-07 22:07:01 +00:00
|
|
|
|
/* This contains the actual bits, packed into bytes. */
|
|
|
|
|
unsigned char data[1];
|
|
|
|
|
};
|
|
|
|
|
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
/* This structure describes a built-in function.
|
|
|
|
|
It is generated by the DEFUN macro only.
|
|
|
|
|
defsubr makes it into a Lisp object.
|
|
|
|
|
|
|
|
|
|
This type is treated in most respects as a pseudovector,
|
|
|
|
|
but since we never dynamically allocate or free them,
|
|
|
|
|
we don't need a next-vector field. */
|
1997-04-11 21:58:13 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct Lisp_Subr
|
|
|
|
|
{
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT size;
|
2010-07-06 19:49:37 -07:00
|
|
|
|
union {
|
|
|
|
|
Lisp_Object (*a0) (void);
|
|
|
|
|
Lisp_Object (*a1) (Lisp_Object);
|
|
|
|
|
Lisp_Object (*a2) (Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a3) (Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a4) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a5) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
2010-07-20 17:26:53 +02:00
|
|
|
|
Lisp_Object (*aUNEVALLED) (Lisp_Object args);
|
|
|
|
|
Lisp_Object (*aMANY) (int, Lisp_Object *);
|
2010-07-06 19:49:37 -07:00
|
|
|
|
} function;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
short min_args, max_args;
|
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
|
|
|
|
const char *symbol_name;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
const char *intspec;
|
|
|
|
|
const char *doc;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
};
|
1999-07-21 21:43:52 +00:00
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
Symbols
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
/* Interned state of a symbol. */
|
|
|
|
|
|
|
|
|
|
enum symbol_interned
|
|
|
|
|
{
|
|
|
|
|
SYMBOL_UNINTERNED = 0,
|
|
|
|
|
SYMBOL_INTERNED = 1,
|
|
|
|
|
SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
|
|
|
|
|
};
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum symbol_redirect
|
|
|
|
|
{
|
|
|
|
|
SYMBOL_PLAINVAL = 4,
|
|
|
|
|
SYMBOL_VARALIAS = 1,
|
|
|
|
|
SYMBOL_LOCALIZED = 2,
|
|
|
|
|
SYMBOL_FORWARDED = 3
|
|
|
|
|
};
|
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
/* In a symbol, the markbit of the plist is used as the gc mark bit */
|
|
|
|
|
|
|
|
|
|
struct Lisp_Symbol
|
|
|
|
|
{
|
2003-06-25 23:16:30 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* Indicates where the value can be found:
|
|
|
|
|
0 : it's a plain var, the value is in the `value' field.
|
|
|
|
|
1 : it's a varalias, the value is really in the `alias' symbol.
|
|
|
|
|
2 : it's a localized var, the value is in the `blv' object.
|
|
|
|
|
3 : it's a forwarding variable, the value is in `forward'.
|
|
|
|
|
*/
|
|
|
|
|
enum symbol_redirect redirect : 3;
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
/* Non-zero means symbol is constant, i.e. changing its value
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
should signal an error. If the value is 3, then the var
|
|
|
|
|
can be changed, but only by `defconst'. */
|
|
|
|
|
unsigned constant : 2;
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
/* Interned state of the symbol. This is an enumerator from
|
|
|
|
|
enum symbol_interned. */
|
|
|
|
|
unsigned interned : 2;
|
|
|
|
|
|
2002-05-20 08:06:06 +00:00
|
|
|
|
/* The symbol's name, as a Lisp string.
|
|
|
|
|
|
|
|
|
|
The name "xname" is used to intentionally break code referring to
|
|
|
|
|
the old field "name" of type pointer to struct Lisp_String. */
|
|
|
|
|
Lisp_Object xname;
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
/* Value of the symbol or Qunbound if unbound. If this symbol is a
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
defvaralias, `alias' contains the symbol for which it is an
|
2001-10-05 09:48:47 +00:00
|
|
|
|
alias. Use the SYMBOL_VALUE and SET_SYMBOL_VALUE macros to get
|
|
|
|
|
and set a symbol's value, to take defvaralias into account. */
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
union {
|
|
|
|
|
Lisp_Object value;
|
|
|
|
|
struct Lisp_Symbol *alias;
|
|
|
|
|
struct Lisp_Buffer_Local_Value *blv;
|
|
|
|
|
union Lisp_Fwd *fwd;
|
|
|
|
|
} val;
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
2001-11-27 19:28:52 +00:00
|
|
|
|
/* Function value of the symbol or Qunbound if not fboundp. */
|
2001-10-05 09:48:47 +00:00
|
|
|
|
Lisp_Object function;
|
|
|
|
|
|
|
|
|
|
/* The symbol's property list. */
|
|
|
|
|
Lisp_Object plist;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
/* Next symbol in obarray bucket, if the symbol is interned. */
|
|
|
|
|
struct Lisp_Symbol *next;
|
|
|
|
|
};
|
|
|
|
|
|
2002-05-20 08:06:06 +00:00
|
|
|
|
/* Value is name of symbol. */
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
#define SYMBOL_VAL(sym) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_PLAINVAL), (sym)->val.value)
|
|
|
|
|
#define SYMBOL_ALIAS(sym) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_VARALIAS), (sym)->val.alias)
|
|
|
|
|
#define SYMBOL_BLV(sym) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_LOCALIZED), (sym)->val.blv)
|
|
|
|
|
#define SYMBOL_FWD(sym) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_FORWARDED), (sym)->val.fwd)
|
|
|
|
|
#define SET_SYMBOL_VAL(sym, v) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_PLAINVAL), (sym)->val.value = (v))
|
|
|
|
|
#define SET_SYMBOL_ALIAS(sym, v) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_VARALIAS), (sym)->val.alias = (v))
|
|
|
|
|
#define SET_SYMBOL_BLV(sym, v) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_LOCALIZED), (sym)->val.blv = (v))
|
|
|
|
|
#define SET_SYMBOL_FWD(sym, v) \
|
|
|
|
|
(eassert ((sym)->redirect == SYMBOL_FORWARDED), (sym)->val.fwd = (v))
|
|
|
|
|
|
2002-05-20 08:06:06 +00:00
|
|
|
|
#define SYMBOL_NAME(sym) \
|
|
|
|
|
LISP_MAKE_RVALUE (XSYMBOL (sym)->xname)
|
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
/* Value is non-zero if SYM is an interned symbol. */
|
|
|
|
|
|
|
|
|
|
#define SYMBOL_INTERNED_P(sym) \
|
|
|
|
|
(XSYMBOL (sym)->interned != SYMBOL_UNINTERNED)
|
|
|
|
|
|
|
|
|
|
/* Value is non-zero if SYM is interned in initial_obarray. */
|
|
|
|
|
|
|
|
|
|
#define SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P(sym) \
|
|
|
|
|
(XSYMBOL (sym)->interned == SYMBOL_INTERNED_IN_INITIAL_OBARRAY)
|
|
|
|
|
|
|
|
|
|
/* Value is non-zero if symbol is considered a constant, i.e. its
|
|
|
|
|
value cannot be changed (there is an exception for keyword symbols,
|
|
|
|
|
whose value can be set to the keyword symbol itself). */
|
|
|
|
|
|
|
|
|
|
#define SYMBOL_CONSTANT_P(sym) XSYMBOL (sym)->constant
|
|
|
|
|
|
1999-07-21 21:43:52 +00:00
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
Hash Tables
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
/* The structure of a Lisp hash table. */
|
|
|
|
|
|
|
|
|
|
struct Lisp_Hash_Table
|
|
|
|
|
{
|
|
|
|
|
/* Vector fields. The hash table code doesn't refer to these. */
|
2007-10-02 21:55:27 +00:00
|
|
|
|
EMACS_UINT size;
|
1999-07-21 21:43:52 +00:00
|
|
|
|
struct Lisp_Vector *vec_next;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
1999-07-21 21:43:52 +00:00
|
|
|
|
/* Function used to compare keys. */
|
|
|
|
|
Lisp_Object test;
|
|
|
|
|
|
|
|
|
|
/* Nil if table is non-weak. Otherwise a symbol describing the
|
|
|
|
|
weakness of the table. */
|
|
|
|
|
Lisp_Object weak;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
1999-07-21 21:43:52 +00:00
|
|
|
|
/* When the table is resized, and this is an integer, compute the
|
|
|
|
|
new size by adding this to the old size. If a float, compute the
|
|
|
|
|
new size by multiplying the old size with this factor. */
|
|
|
|
|
Lisp_Object rehash_size;
|
|
|
|
|
|
|
|
|
|
/* Resize hash table when number of entries/ table size is >= this
|
|
|
|
|
ratio, a float. */
|
|
|
|
|
Lisp_Object rehash_threshold;
|
|
|
|
|
|
|
|
|
|
/* Vector of hash codes.. If hash[I] is nil, this means that that
|
|
|
|
|
entry I is unused. */
|
|
|
|
|
Lisp_Object hash;
|
|
|
|
|
|
|
|
|
|
/* Vector used to chain entries. If entry I is free, next[I] is the
|
|
|
|
|
entry number of the next free item. If entry I is non-free,
|
|
|
|
|
next[I] is the index of the next entry in the collision chain. */
|
|
|
|
|
Lisp_Object next;
|
|
|
|
|
|
|
|
|
|
/* Index of first free entry in free list. */
|
|
|
|
|
Lisp_Object next_free;
|
|
|
|
|
|
|
|
|
|
/* Bucket vector. A non-nil entry is the index of the first item in
|
|
|
|
|
a collision chain. This vector's size can be larger than the
|
|
|
|
|
hash table size to reduce collisions. */
|
|
|
|
|
Lisp_Object index;
|
|
|
|
|
|
|
|
|
|
/* User-supplied hash function, or nil. */
|
|
|
|
|
Lisp_Object user_hash_function;
|
|
|
|
|
|
|
|
|
|
/* User-supplied key comparison function, or nil. */
|
|
|
|
|
Lisp_Object user_cmp_function;
|
|
|
|
|
|
2007-10-02 21:24:47 +00:00
|
|
|
|
/* Only the fields above are traced normally by the GC. The ones below
|
2010-06-03 17:34:35 +02:00
|
|
|
|
`count' are special and are either ignored by the GC or traced in
|
2007-10-02 21:24:47 +00:00
|
|
|
|
a special way (e.g. because of weakness). */
|
|
|
|
|
|
|
|
|
|
/* Number of key/value entries in the table. */
|
|
|
|
|
unsigned int count;
|
|
|
|
|
|
|
|
|
|
/* Vector of keys and values. The key of item I is found at index
|
|
|
|
|
2 * I, the value is found at index 2 * I + 1.
|
|
|
|
|
This is gc_marked specially if the table is weak. */
|
|
|
|
|
Lisp_Object key_and_value;
|
|
|
|
|
|
2007-06-29 03:48:22 +00:00
|
|
|
|
/* Next weak hash table if this is a weak hash table. The head
|
|
|
|
|
of the list is in weak_hash_tables. */
|
|
|
|
|
struct Lisp_Hash_Table *next_weak;
|
|
|
|
|
|
1999-07-21 21:43:52 +00:00
|
|
|
|
/* C function to compare two keys. */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
int (* cmpfn) (struct Lisp_Hash_Table *, Lisp_Object,
|
|
|
|
|
unsigned, Lisp_Object, unsigned);
|
1999-07-21 21:43:52 +00:00
|
|
|
|
|
|
|
|
|
/* C function to compute hash code. */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
unsigned (* hashfn) (struct Lisp_Hash_Table *, Lisp_Object);
|
1999-07-21 21:43:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define XHASH_TABLE(OBJ) \
|
|
|
|
|
((struct Lisp_Hash_Table *) XPNTR (OBJ))
|
|
|
|
|
|
|
|
|
|
#define XSET_HASH_TABLE(VAR, PTR) \
|
|
|
|
|
(XSETPSEUDOVECTOR (VAR, PTR, PVEC_HASH_TABLE))
|
|
|
|
|
|
|
|
|
|
#define HASH_TABLE_P(OBJ) PSEUDOVECTORP (OBJ, PVEC_HASH_TABLE)
|
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
#define CHECK_HASH_TABLE(x) \
|
|
|
|
|
CHECK_TYPE (HASH_TABLE_P (x), Qhash_table_p, x)
|
1999-07-21 21:43:52 +00:00
|
|
|
|
|
2002-07-07 20:52:08 +00:00
|
|
|
|
/* Value is the key part of entry IDX in hash table H. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define HASH_KEY(H, IDX) AREF ((H)->key_and_value, 2 * (IDX))
|
2002-07-07 20:52:08 +00:00
|
|
|
|
|
|
|
|
|
/* Value is the value part of entry IDX in hash table H. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define HASH_VALUE(H, IDX) AREF ((H)->key_and_value, 2 * (IDX) + 1)
|
2002-07-07 20:52:08 +00:00
|
|
|
|
|
|
|
|
|
/* Value is the index of the next entry following the one at IDX
|
|
|
|
|
in hash table H. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define HASH_NEXT(H, IDX) AREF ((H)->next, (IDX))
|
2002-07-07 20:52:08 +00:00
|
|
|
|
|
|
|
|
|
/* Value is the hash code computed for entry IDX in hash table H. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define HASH_HASH(H, IDX) AREF ((H)->hash, (IDX))
|
2002-07-07 20:52:08 +00:00
|
|
|
|
|
|
|
|
|
/* Value is the index of the element in hash table H that is the
|
|
|
|
|
start of the collision list at index IDX in the index vector of H. */
|
|
|
|
|
|
2008-02-13 22:39:30 +00:00
|
|
|
|
#define HASH_INDEX(H, IDX) AREF ((H)->index, (IDX))
|
2002-07-07 20:52:08 +00:00
|
|
|
|
|
|
|
|
|
/* Value is the size of hash table H. */
|
|
|
|
|
|
|
|
|
|
#define HASH_TABLE_SIZE(H) XVECTOR ((H)->next)->size
|
|
|
|
|
|
1999-07-21 21:43:52 +00:00
|
|
|
|
/* Default size for hash tables if not specified. */
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_HASH_SIZE 65
|
|
|
|
|
|
|
|
|
|
/* Default threshold specifying when to resize a hash table. The
|
|
|
|
|
value gives the ratio of current entries in the hash table and the
|
|
|
|
|
size of the hash table. */
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_REHASH_THRESHOLD 0.8
|
|
|
|
|
|
|
|
|
|
/* Default factor by which to increase the size of a hash table. */
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_REHASH_SIZE 1.5
|
|
|
|
|
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
/* These structures are used for various misc types. */
|
|
|
|
|
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
struct Lisp_Misc_Any /* Supertype of all Misc types. */
|
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_??? */
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
|
|
|
|
int spacer : 15;
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* Make it as long as "Lisp_Free without padding". */
|
|
|
|
|
void *fill;
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
};
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct Lisp_Marker
|
1995-08-19 05:38:46 +00:00
|
|
|
|
{
|
2008-02-10 20:09:38 +00:00
|
|
|
|
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_Marker */
|
2003-06-25 23:16:30 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
2008-01-18 07:07:37 +00:00
|
|
|
|
int spacer : 13;
|
|
|
|
|
/* This flag is temporarily used in the functions
|
|
|
|
|
decode/encode_coding_object to record that the marker position
|
|
|
|
|
must be adjusted after the conversion. */
|
|
|
|
|
unsigned int need_adjustment : 1;
|
1995-08-19 05:38:46 +00:00
|
|
|
|
/* 1 means normal insertion at the marker's position
|
|
|
|
|
leaves the marker after the inserted text. */
|
|
|
|
|
unsigned int insertion_type : 1;
|
2007-09-29 20:55:05 +00:00
|
|
|
|
/* This is the buffer that the marker points into, or 0 if it points nowhere.
|
|
|
|
|
Note: a chain of markers can contain markers pointing into different
|
|
|
|
|
buffers (the chain is per buffer_text rather than per buffer, so it's
|
|
|
|
|
shared between indirect buffers). */
|
|
|
|
|
/* This is used for (other than NULL-checking):
|
|
|
|
|
- Fmarker_buffer
|
|
|
|
|
- Fset_marker: check eq(oldbuf, newbuf) to avoid unchain+rechain.
|
|
|
|
|
- unchain_marker: to find the list from which to unchain.
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
- Fkill_buffer: to only unchain the markers of current indirect buffer.
|
2007-09-29 20:55:05 +00:00
|
|
|
|
*/
|
1995-08-19 05:38:46 +00:00
|
|
|
|
struct buffer *buffer;
|
1998-01-01 07:14:33 +00:00
|
|
|
|
|
|
|
|
|
/* The remaining fields are meaningless in a marker that
|
|
|
|
|
does not point anywhere. */
|
|
|
|
|
|
|
|
|
|
/* For markers that point somewhere,
|
|
|
|
|
this is used to chain of all the markers in a given buffer. */
|
2007-10-02 20:51:02 +00:00
|
|
|
|
/* We could remove it and use an array in buffer_text instead.
|
|
|
|
|
That would also allow to preserve it ordered. */
|
2003-06-26 23:15:08 +00:00
|
|
|
|
struct Lisp_Marker *next;
|
1998-01-01 07:14:33 +00:00
|
|
|
|
/* This is the char position where the marker points. */
|
2003-07-09 20:31:19 +00:00
|
|
|
|
EMACS_INT charpos;
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* This is the byte position.
|
|
|
|
|
It's mostly used as a charpos<->bytepos cache (i.e. it's not directly
|
|
|
|
|
used to implement the functionality of markers, but rather to (ab)use
|
|
|
|
|
markers as a cache for char<->byte mappings). */
|
2003-07-09 20:31:19 +00:00
|
|
|
|
EMACS_INT bytepos;
|
1995-08-19 05:38:46 +00:00
|
|
|
|
};
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
/* Forwarding pointer to an int variable.
|
|
|
|
|
This is allowed only in the value cell of a symbol,
|
|
|
|
|
and it means that the symbol's value really lives in the
|
|
|
|
|
specified int variable. */
|
|
|
|
|
struct Lisp_Intfwd
|
1994-10-11 07:45:20 +00:00
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Fwd_Type type; /* = Lisp_Fwd_Int */
|
2002-03-04 23:41:00 +00:00
|
|
|
|
EMACS_INT *intvar;
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Boolean forwarding pointer to an int variable.
|
|
|
|
|
This is like Lisp_Intfwd except that the ostensible
|
|
|
|
|
"value" of the symbol is t if the int variable is nonzero,
|
|
|
|
|
nil if it is zero. */
|
|
|
|
|
struct Lisp_Boolfwd
|
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Fwd_Type type; /* = Lisp_Fwd_Bool */
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
int *boolvar;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Forwarding pointer to a Lisp_Object variable.
|
|
|
|
|
This is allowed only in the value cell of a symbol,
|
|
|
|
|
and it means that the symbol's value really lives in the
|
|
|
|
|
specified variable. */
|
|
|
|
|
struct Lisp_Objfwd
|
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Fwd_Type type; /* = Lisp_Fwd_Obj */
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
Lisp_Object *objvar;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Like Lisp_Objfwd except that value lives in a slot in the
|
|
|
|
|
current buffer. Value is byte index of slot within buffer. */
|
|
|
|
|
struct Lisp_Buffer_Objfwd
|
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Fwd_Type type; /* = Lisp_Fwd_Buffer_Obj */
|
(enum Lisp_Misc_Type): Add new enumerations Lisp_Misc_Intfwd,
Lisp_Misc_Boolfwd, Lisp_Misc_Objfwd, Lisp_Misc_Buffer_Objfwd.
(enum Lisp_Type): Delete the corresponding enumerations from here.
(struct Lisp_Buffer_Objfwd): New structure.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd): Ditto.
(XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD): Access the new structure.
(INTFWDP, BOOLFWDP, OBJFWDP, BUFFER_OBJFWDP): Ditto.
(XSETINTFWD, XSETBOOLFWD, XSETOBJFWD, XSETBUFFER_OBJFWD): Deleted.
(union Lisp_Misc): Add new members.
(allocate_misc): Declare this function.
(XINTPTR): Deleted.
1994-10-12 05:13:45 +00:00
|
|
|
|
int offset;
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
Lisp_Object slottype; /* Qnil, Lisp_Int, Lisp_Symbol, or Lisp_String. */
|
1994-10-11 07:45:20 +00:00
|
|
|
|
};
|
|
|
|
|
|
2000-02-20 14:30:15 +00:00
|
|
|
|
/* struct Lisp_Buffer_Local_Value is used in a symbol value cell when
|
|
|
|
|
the symbol has buffer-local or frame-local bindings. (Exception:
|
|
|
|
|
some buffer-local variables are built-in, with their values stored
|
|
|
|
|
in the buffer structure itself. They are handled differently,
|
|
|
|
|
using struct Lisp_Buffer_Objfwd.)
|
|
|
|
|
|
|
|
|
|
The `realvalue' slot holds the variable's current value, or a
|
|
|
|
|
forwarding pointer to where that value is kept. This value is the
|
|
|
|
|
one that corresponds to the loaded binding. To read or set the
|
|
|
|
|
variable, you must first make sure the right binding is loaded;
|
|
|
|
|
then you can access the value in (or through) `realvalue'.
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2000-02-20 14:30:15 +00:00
|
|
|
|
`buffer' and `frame' are the buffer and frame for which the loaded
|
|
|
|
|
binding was found. If those have changed, to make sure the right
|
|
|
|
|
binding is loaded it is necessary to find which binding goes with
|
|
|
|
|
the current buffer and selected frame, then load it. To load it,
|
|
|
|
|
first unload the previous binding, then copy the value of the new
|
|
|
|
|
binding into `realvalue' (or through it). Also update
|
|
|
|
|
LOADED-BINDING to point to the newly loaded binding.
|
1994-11-11 07:32:54 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
`local_if_set' indicates that merely setting the variable creates a
|
|
|
|
|
local binding for the current buffer. Otherwise the latter, setting
|
|
|
|
|
the variable does not do that; only make-local-variable does that. */
|
2000-02-20 14:30:15 +00:00
|
|
|
|
|
1994-11-11 07:32:54 +00:00
|
|
|
|
struct Lisp_Buffer_Local_Value
|
|
|
|
|
{
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
/* 1 means that merely setting the variable creates a local
|
|
|
|
|
binding for the current buffer */
|
|
|
|
|
unsigned int local_if_set : 1;
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* 1 means this variable can have frame-local bindings, otherwise, it is
|
|
|
|
|
can have buffer-local bindings. The two cannot be combined. */
|
|
|
|
|
unsigned int frame_local : 1;
|
|
|
|
|
/* 1 means that the binding now loaded was found.
|
|
|
|
|
Presumably equivalent to (defcell!=valcell) */
|
|
|
|
|
unsigned int found : 1;
|
|
|
|
|
/* If non-NULL, a forwarding to the C var where it should also be set. */
|
|
|
|
|
union Lisp_Fwd *fwd; /* Should never be (Buffer|Kboard)_Objfwd. */
|
|
|
|
|
/* The buffer or frame for which the loaded binding was found. */
|
|
|
|
|
Lisp_Object where;
|
|
|
|
|
/* A cons cell that holds the default value. It has the form
|
|
|
|
|
(SYMBOL . DEFAULT-VALUE). */
|
|
|
|
|
Lisp_Object defcell;
|
|
|
|
|
/* The cons cell from `where's parameter alist.
|
|
|
|
|
It always has the form (SYMBOL . VALUE)
|
|
|
|
|
Note that if `forward' is non-nil, VALUE may be out of date.
|
|
|
|
|
Also if the currently loaded binding is the default binding, then
|
|
|
|
|
this is `eq'ual to defcell. */
|
|
|
|
|
Lisp_Object valcell;
|
1994-11-11 07:32:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
#define BLV_FOUND(blv) \
|
|
|
|
|
(eassert ((blv)->found == !EQ ((blv)->defcell, (blv)->valcell)), (blv)->found)
|
|
|
|
|
#define SET_BLV_FOUND(blv, v) \
|
|
|
|
|
(eassert ((v) == !EQ ((blv)->defcell, (blv)->valcell)), (blv)->found = (v))
|
|
|
|
|
|
|
|
|
|
#define BLV_VALUE(blv) (XCDR ((blv)->valcell))
|
|
|
|
|
#define SET_BLV_VALUE(blv, v) (XSETCDR ((blv)->valcell, v))
|
|
|
|
|
|
2003-07-09 20:31:19 +00:00
|
|
|
|
/* START and END are markers in the overlay's buffer, and
|
1994-11-15 02:04:03 +00:00
|
|
|
|
PLIST is the overlay's property list. */
|
|
|
|
|
struct Lisp_Overlay
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
/* An overlay's real data content is:
|
|
|
|
|
- plist
|
|
|
|
|
- buffer
|
|
|
|
|
- insertion type of both ends
|
|
|
|
|
- start & start_byte
|
|
|
|
|
- end & end_byte
|
|
|
|
|
- next (singly linked list of overlays).
|
|
|
|
|
- start_next and end_next (singly linked list of markers).
|
|
|
|
|
I.e. 9words plus 2 bits, 3words of which are for external linked lists.
|
|
|
|
|
*/
|
1994-11-15 02:04:03 +00:00
|
|
|
|
{
|
2008-02-10 20:09:38 +00:00
|
|
|
|
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_Overlay */
|
2003-06-25 23:16:30 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
|
|
|
|
int spacer : 15;
|
2003-07-09 14:46:06 +00:00
|
|
|
|
struct Lisp_Overlay *next;
|
1994-11-15 02:04:03 +00:00
|
|
|
|
Lisp_Object start, end, plist;
|
|
|
|
|
};
|
1995-01-11 01:17:49 +00:00
|
|
|
|
|
1995-01-28 03:39:17 +00:00
|
|
|
|
/* Like Lisp_Objfwd except that value lives in a slot in the
|
(struct KBOARD, MULTI_KBOARD, current_kboard, all_kboards,
Lisp_Misc_Kboard_Objfwd, Lisp_Kboard_Objfwd, XKBOARD_OBJFWD, KBOARD_OBJFWDP,
GC_KBOARD_OBJFWDP, kboard_locked, the_only_kboard, DEFVAR_KBOARD): Renamed
from PERDISPLAY, MULTI_PERDISPLAY, current_perdisplay, all_perdisplays,
Lisp_Misc_Display_Objfwd, Lisp_Display_Objfwd, XDISPLAY_OBJFWD,
DISPLAY_OBJFWDP, GC_DISPLAY_OBJFWDP, display_locked, the_only_perdisplay,
DEFVAR_DISPLAY. All uses changed.
(struct KBOARD): New member reference_count.
(initial_kboard): Declare this var.
1995-03-15 01:51:46 +00:00
|
|
|
|
current kboard. */
|
|
|
|
|
struct Lisp_Kboard_Objfwd
|
1995-01-28 03:39:17 +00:00
|
|
|
|
{
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
enum Lisp_Fwd_Type type; /* = Lisp_Fwd_Kboard_Obj */
|
1995-01-28 03:39:17 +00:00
|
|
|
|
int offset;
|
|
|
|
|
};
|
|
|
|
|
|
2003-01-06 00:47:38 +00:00
|
|
|
|
/* Hold a C pointer for later use.
|
|
|
|
|
This type of object is used in the arg to record_unwind_protect. */
|
|
|
|
|
struct Lisp_Save_Value
|
|
|
|
|
{
|
2008-02-10 20:09:38 +00:00
|
|
|
|
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_Save_Value */
|
2003-06-25 23:16:30 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
2004-06-22 13:57:18 +00:00
|
|
|
|
int spacer : 14;
|
|
|
|
|
/* If DOGC is set, POINTER is the address of a memory
|
|
|
|
|
area containing INTEGER potential Lisp_Objects. */
|
|
|
|
|
unsigned int dogc : 1;
|
2003-01-06 00:47:38 +00:00
|
|
|
|
void *pointer;
|
|
|
|
|
int integer;
|
|
|
|
|
};
|
|
|
|
|
|
1995-01-11 01:17:49 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
/* A miscellaneous object, when it's on the free list. */
|
|
|
|
|
struct Lisp_Free
|
|
|
|
|
{
|
2008-02-10 20:09:38 +00:00
|
|
|
|
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_Free */
|
2004-04-16 12:51:06 +00:00
|
|
|
|
unsigned gcmarkbit : 1;
|
|
|
|
|
int spacer : 15;
|
|
|
|
|
union Lisp_Misc *chain;
|
|
|
|
|
#ifdef USE_LSB_TAG
|
|
|
|
|
/* Try to make sure that sizeof(Lisp_Misc) preserves TYPEBITS-alignment.
|
|
|
|
|
This assumes that Lisp_Marker is the largest of the alternatives and
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
that Lisp_Misc_Any has the same size as "Lisp_Free w/o padding". */
|
2004-04-16 12:51:06 +00:00
|
|
|
|
char padding[((((sizeof (struct Lisp_Marker) - 1) >> GCTYPEBITS) + 1)
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
<< GCTYPEBITS) - sizeof (struct Lisp_Misc_Any)];
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
|
1995-04-10 00:31:47 +00:00
|
|
|
|
/* To get the type field of a union Lisp_Misc, use XMISCTYPE.
|
|
|
|
|
It uses one of these struct subtypes to get the type field. */
|
|
|
|
|
|
1994-10-11 07:45:20 +00:00
|
|
|
|
union Lisp_Misc
|
|
|
|
|
{
|
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
(XMISCANY): New macro.
(XMISCTYPE): Use it.
(struct Lisp_Misc_Any): New type.
(union Lisp_Misc): Use it.
(struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
* data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
(find_symbol_value, set_internal, default_value, Fset_default)
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
* alloc.c (allocate_buffer): Set the size and tag.
(allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
Use XMISCANY.
(die): Follow the GNU convention for error messages.
* print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
tag any more.
(set_buffer_internal_1):
* frame.c (store_frame_param):
* eval.c (specbind):
* xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
2007-10-16 15:42:58 +00:00
|
|
|
|
struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */
|
|
|
|
|
struct Lisp_Free u_free; /* Includes padding to force alignment. */
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
struct Lisp_Marker u_marker; /* 5 */
|
|
|
|
|
struct Lisp_Overlay u_overlay; /* 5 */
|
|
|
|
|
struct Lisp_Save_Value u_save_value; /* 3 */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
union Lisp_Fwd
|
|
|
|
|
{
|
|
|
|
|
struct Lisp_Intfwd u_intfwd; /* 2 */
|
|
|
|
|
struct Lisp_Boolfwd u_boolfwd; /* 2 */
|
|
|
|
|
struct Lisp_Objfwd u_objfwd; /* 2 */
|
|
|
|
|
struct Lisp_Buffer_Objfwd u_buffer_objfwd; /* 2 */
|
|
|
|
|
struct Lisp_Kboard_Objfwd u_kboard_objfwd; /* 2 */
|
1994-10-11 07:45:20 +00:00
|
|
|
|
};
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
2000-02-17 09:45:46 +00:00
|
|
|
|
/* Lisp floating point type */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct Lisp_Float
|
|
|
|
|
{
|
2005-11-15 13:53:09 +00:00
|
|
|
|
union
|
|
|
|
|
{
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#ifdef HIDE_LISP_IMPLEMENTATION
|
2005-11-15 13:53:09 +00:00
|
|
|
|
double data_;
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#else
|
2005-11-15 13:53:09 +00:00
|
|
|
|
double data;
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#endif
|
2005-11-15 13:53:09 +00:00
|
|
|
|
struct Lisp_Float *chain;
|
|
|
|
|
} u;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
};
|
1999-08-28 22:15:12 +00:00
|
|
|
|
|
|
|
|
|
#ifdef HIDE_LISP_IMPLEMENTATION
|
2010-05-15 17:19:05 -04:00
|
|
|
|
#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data_ : XFLOAT (f)->u.data_)
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#else
|
2010-05-15 17:19:05 -04:00
|
|
|
|
#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data : XFLOAT (f)->u.data)
|
2009-08-17 01:25:54 +00:00
|
|
|
|
/* This should be used only in alloc.c, which always disables
|
|
|
|
|
HIDE_LISP_IMPLEMENTATION. */
|
|
|
|
|
#define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n))
|
1999-08-28 22:15:12 +00:00
|
|
|
|
#endif
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* A character, declared with the following typedef, is a member
|
1995-01-02 21:58:40 +00:00
|
|
|
|
of some character set associated with the current buffer. */
|
1993-05-30 21:42:28 +00:00
|
|
|
|
#ifndef _UCHAR_T /* Protect against something in ctab.h on AIX. */
|
|
|
|
|
#define _UCHAR_T
|
1991-06-26 21:34:53 +00:00
|
|
|
|
typedef unsigned char UCHAR;
|
1993-05-30 21:42:28 +00:00
|
|
|
|
#endif
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Meanings of slots in a Lisp_Compiled: */
|
|
|
|
|
|
|
|
|
|
#define COMPILED_ARGLIST 0
|
|
|
|
|
#define COMPILED_BYTECODE 1
|
|
|
|
|
#define COMPILED_CONSTANTS 2
|
|
|
|
|
#define COMPILED_STACK_DEPTH 3
|
|
|
|
|
#define COMPILED_DOC_STRING 4
|
|
|
|
|
#define COMPILED_INTERACTIVE 5
|
1993-03-05 23:55:20 +00:00
|
|
|
|
|
1993-05-04 13:02:26 +00:00
|
|
|
|
/* Flag bits in a character. These also get used in termhooks.h.
|
|
|
|
|
Richard Stallman <rms@gnu.ai.mit.edu> thinks that MULE
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
(MUlti-Lingual Emacs) might need 22 bits for the character value
|
|
|
|
|
itself, so we probably shouldn't use any bits lower than 0x0400000. */
|
|
|
|
|
#define CHAR_ALT (0x0400000)
|
|
|
|
|
#define CHAR_SUPER (0x0800000)
|
|
|
|
|
#define CHAR_HYPER (0x1000000)
|
|
|
|
|
#define CHAR_SHIFT (0x2000000)
|
|
|
|
|
#define CHAR_CTL (0x4000000)
|
|
|
|
|
#define CHAR_META (0x8000000)
|
1993-05-10 00:17:55 +00:00
|
|
|
|
|
1999-08-13 12:55:11 +00:00
|
|
|
|
#define CHAR_MODIFIER_MASK \
|
|
|
|
|
(CHAR_ALT | CHAR_SUPER | CHAR_HYPER | CHAR_SHIFT | CHAR_CTL | CHAR_META)
|
|
|
|
|
|
|
|
|
|
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
/* Actually, the current Emacs uses 22 bits for the character value
|
(CHARACTERBITS, GLYPH_MASK_REV_DIR): New macros.
(GLYPH_MASK_PADDING, GLYPH_MASK_FACE, GLYPH_MASK_CHAR): New macros.
[HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
Use CHARACTERBITS.
[!HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
New macros.
[!HAVE_FACES] (GLYPH_CHAR, GLYPH_FACE): Mask appropriate bits.
(Fcoding_system_p, Fcheck_coding_system): Declare external.
(Fread_coding_system, Fread_non_nil_coding_system): Likewise.
1997-02-20 06:51:43 +00:00
|
|
|
|
itself. */
|
2003-12-29 07:53:29 +00:00
|
|
|
|
#define CHARACTERBITS 22
|
(CHARACTERBITS, GLYPH_MASK_REV_DIR): New macros.
(GLYPH_MASK_PADDING, GLYPH_MASK_FACE, GLYPH_MASK_CHAR): New macros.
[HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
Use CHARACTERBITS.
[!HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
New macros.
[!HAVE_FACES] (GLYPH_CHAR, GLYPH_FACE): Mask appropriate bits.
(Fcoding_system_p, Fcheck_coding_system): Declare external.
(Fread_coding_system, Fread_non_nil_coding_system): Likewise.
1997-02-20 06:51:43 +00:00
|
|
|
|
|
1999-11-18 05:08:25 +00:00
|
|
|
|
/* The maximum byte size consumed by push_key_description.
|
|
|
|
|
All callers should assure that at least this size of memory is
|
|
|
|
|
allocated at the place pointed by the second argument.
|
|
|
|
|
|
2008-01-13 22:10:51 +00:00
|
|
|
|
There are 6 modifiers, each consumes 2 chars.
|
1999-11-18 05:08:25 +00:00
|
|
|
|
The octal form of a character code consumes
|
|
|
|
|
(1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
|
|
|
|
|
We need one more byte for string terminator `\0'. */
|
|
|
|
|
#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
|
|
|
|
|
|
1993-05-10 00:17:55 +00:00
|
|
|
|
|
(GLYPH): Change type from int to struct with separate char
and face_id members.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
(GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
(FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
(GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
(FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
(SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
(GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
(GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
handle new Lisp glyph code encoding, either an integer or a cons.
2008-02-27 22:49:15 +00:00
|
|
|
|
/* The glyph datatype, used to represent characters on the display.
|
|
|
|
|
It consists of a char code and a face id. */
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int ch;
|
|
|
|
|
int face_id;
|
|
|
|
|
} GLYPH;
|
1993-05-10 00:17:55 +00:00
|
|
|
|
|
|
|
|
|
/* Return a glyph's character code. */
|
(GLYPH): Change type from int to struct with separate char
and face_id members.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
(GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
(FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
(GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
(FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
(SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
(GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
(GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
handle new Lisp glyph code encoding, either an integer or a cons.
2008-02-27 22:49:15 +00:00
|
|
|
|
#define GLYPH_CHAR(glyph) ((glyph).ch)
|
1993-05-10 00:17:55 +00:00
|
|
|
|
|
|
|
|
|
/* Return a glyph's face ID. */
|
(GLYPH): Change type from int to struct with separate char
and face_id members.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
(GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
(FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
(GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
(FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
(SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
(GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
(GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
handle new Lisp glyph code encoding, either an integer or a cons.
2008-02-27 22:49:15 +00:00
|
|
|
|
#define GLYPH_FACE(glyph) ((glyph).face_id)
|
1994-03-19 02:54:00 +00:00
|
|
|
|
|
(GLYPH): Change type from int to struct with separate char
and face_id members.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
(GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
(FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
(GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
(FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
(SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
(GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
(GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
handle new Lisp glyph code encoding, either an integer or a cons.
2008-02-27 22:49:15 +00:00
|
|
|
|
#define SET_GLYPH_CHAR(glyph, char) ((glyph).ch = (char))
|
|
|
|
|
#define SET_GLYPH_FACE(glyph, face) ((glyph).face_id = (face))
|
|
|
|
|
#define SET_GLYPH(glyph, char, face) ((glyph).ch = (char), (glyph).face_id = (face))
|
1993-05-10 00:17:55 +00:00
|
|
|
|
|
2007-08-08 07:49:21 +00:00
|
|
|
|
/* Return 1 if GLYPH contains valid character code. */
|
(GLYPH): Change type from int to struct with separate char
and face_id members.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
(GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
(FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
(GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
(FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
(SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
(GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
(GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
handle new Lisp glyph code encoding, either an integer or a cons.
2008-02-27 22:49:15 +00:00
|
|
|
|
#define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (GLYPH_CHAR (glyph), 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Glyph Code from a display vector may either be an integer which
|
|
|
|
|
encodes a char code in the lower CHARACTERBITS bits and a (very small)
|
|
|
|
|
face-id in the upper bits, or it may be a cons (CHAR . FACE-ID). */
|
|
|
|
|
|
|
|
|
|
#define GLYPH_CODE_CHAR(gc) \
|
|
|
|
|
(CONSP (gc) ? XINT (XCAR (gc)) : INTEGERP (gc) ? (XINT (gc) & ((1 << CHARACTERBITS)-1)) : 0)
|
|
|
|
|
|
|
|
|
|
#define GLYPH_CODE_FACE(gc) \
|
|
|
|
|
(CONSP (gc) ? XINT (XCDR (gc)) : INTEGERP (gc) ? (XINT (gc) >> CHARACTERBITS) : DEFAULT_FACE_ID)
|
|
|
|
|
|
|
|
|
|
/* Return 1 if glyph code from display vector contains valid character code. */
|
|
|
|
|
#define GLYPH_CODE_CHAR_VALID_P(gc) CHAR_VALID_P (GLYPH_CODE_CHAR (gc), 1)
|
|
|
|
|
|
|
|
|
|
#define GLYPH_CODE_P(gc) ((CONSP (gc) && INTEGERP (XCAR (gc)) && INTEGERP (XCDR (gc))) || INTEGERP (gc))
|
|
|
|
|
|
|
|
|
|
/* Only called when GLYPH_CODE_P (gc) is true. */
|
|
|
|
|
#define SET_GLYPH_FROM_GLYPH_CODE(glyph, gc) \
|
|
|
|
|
do \
|
|
|
|
|
{ \
|
|
|
|
|
if (CONSP (gc)) \
|
|
|
|
|
SET_GLYPH (glyph, XINT (XCAR (gc)), XINT (XCDR (gc))); \
|
|
|
|
|
else \
|
|
|
|
|
SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \
|
|
|
|
|
(XINT (gc) >> CHARACTERBITS)); \
|
|
|
|
|
} \
|
|
|
|
|
while (0)
|
1997-03-18 23:31:34 +00:00
|
|
|
|
|
1994-03-10 00:20:34 +00:00
|
|
|
|
/* The ID of the mode line highlighting face. */
|
|
|
|
|
#define GLYPH_MODE_LINE_FACE 1
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-10-31 20:50:02 +02:00
|
|
|
|
/* Structure to hold mouse highlight data. This is here because other
|
|
|
|
|
header files need it for defining struct x_output etc. */
|
|
|
|
|
typedef struct {
|
|
|
|
|
/* These variables describe the range of text currently shown in its
|
|
|
|
|
mouse-face, together with the window they apply to. As long as
|
|
|
|
|
the mouse stays within this range, we need not redraw anything on
|
|
|
|
|
its account. Rows and columns are glyph matrix positions in
|
|
|
|
|
MOUSE_FACE_WINDOW. */
|
|
|
|
|
int mouse_face_beg_row, mouse_face_beg_col;
|
|
|
|
|
int mouse_face_beg_x, mouse_face_beg_y;
|
|
|
|
|
int mouse_face_end_row, mouse_face_end_col;
|
|
|
|
|
int mouse_face_end_x, mouse_face_end_y;
|
|
|
|
|
int mouse_face_past_end;
|
|
|
|
|
Lisp_Object mouse_face_window;
|
|
|
|
|
int mouse_face_face_id;
|
|
|
|
|
Lisp_Object mouse_face_overlay;
|
|
|
|
|
|
|
|
|
|
/* 1 if a mouse motion event came and we didn't handle it right away because
|
|
|
|
|
gc was in progress. */
|
|
|
|
|
int mouse_face_deferred_gc;
|
|
|
|
|
|
|
|
|
|
/* FRAME and X, Y position of mouse when last checked for
|
|
|
|
|
highlighting. X and Y can be negative or out of range for the frame. */
|
|
|
|
|
struct frame *mouse_face_mouse_frame;
|
|
|
|
|
int mouse_face_mouse_x, mouse_face_mouse_y;
|
|
|
|
|
|
|
|
|
|
/* Nonzero means defer mouse-motion highlighting. */
|
|
|
|
|
int mouse_face_defer;
|
|
|
|
|
|
|
|
|
|
/* Nonzero means that the mouse highlight should not be shown. */
|
|
|
|
|
int mouse_face_hidden;
|
|
|
|
|
|
|
|
|
|
int mouse_face_image_state;
|
|
|
|
|
} Mouse_HLInfo;
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Data type checking */
|
|
|
|
|
|
2004-11-16 15:32:33 +00:00
|
|
|
|
#define NILP(x) EQ (x, Qnil)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(BOOLFWDP, INTERNALP, INTFWDP, OBJFWDP, INTERNAL_STREAMP, BUFFER_LOCAL_VALUEP,
SOME_BUFFER_LOCAL_VALUEP, BUFFER_OBJFWDP, VOIDP): New type test macros.
(CHECK_STRING_OR_BUFFER, NUMBERP, CHECK_LIST, CHECK_STRING, CHECK_CONS,
CHECK_SYMBOL, CHECK_VECTOR, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY): Use type test macros.
1994-09-27 04:20:23 +00:00
|
|
|
|
#define NUMBERP(x) (INTEGERP (x) || FLOATP (x))
|
1994-11-15 22:45:31 +00:00
|
|
|
|
#define NATNUMP(x) (INTEGERP (x) && XINT (x) >= 0)
|
1992-04-24 08:11:54 +00:00
|
|
|
|
|
2009-11-06 18:47:48 +00:00
|
|
|
|
#define INTEGERP(x) (LISP_INT_TAG_P (XTYPE ((x))))
|
(INTEGERP, SYMBOLP, MARKERP, STRINGP, VECTORP): New macros.
(COMPILEDP, BUFFERP, SUBRP, PROCESSP, FRAMEP, WINDOWP): New macros.
(WINDOW_CONFIGURATIONP, FLOATP): New macros.
1993-03-15 05:44:21 +00:00
|
|
|
|
#define SYMBOLP(x) (XTYPE ((x)) == Lisp_Symbol)
|
1994-10-11 07:45:20 +00:00
|
|
|
|
#define MISCP(x) (XTYPE ((x)) == Lisp_Misc)
|
(enum Lisp_Misc_Type): Rename Lisp_Vector to Lisp_Vectorlike. Mark
Lisp_Window_Configuration as obsolete.
(PSEUDOVECTOR_FLAG, PSEUDOVECTOR_SIZE_MASK, PVEC_BUFFER, PVEC_PROCESS,
PVEC_FRAME, PVEC_COMPILED, PVEC_WINDOW, PVEC_WINDOW_CONFIGURATION): New
constants.
(XSETPSEUDOVECTOR, PSEUDOVECTORP, VECTORLIKEP): New macros.
(XSETVECTOR, XSETWINDOW_CONFIGURATION, VECTORP, WINDOW_CONFIGURATIONP): Use
the new convention.
(XSETCOMPILED): New macro.
1994-11-18 06:50:02 +00:00
|
|
|
|
#define VECTORLIKEP(x) (XTYPE ((x)) == Lisp_Vectorlike)
|
(INTEGERP, SYMBOLP, MARKERP, STRINGP, VECTORP): New macros.
(COMPILEDP, BUFFERP, SUBRP, PROCESSP, FRAMEP, WINDOWP): New macros.
(WINDOW_CONFIGURATIONP, FLOATP): New macros.
1993-03-15 05:44:21 +00:00
|
|
|
|
#define STRINGP(x) (XTYPE ((x)) == Lisp_String)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
#define CONSP(x) (XTYPE ((x)) == Lisp_Cons)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
(INTEGERP, SYMBOLP, MARKERP, STRINGP, VECTORP): New macros.
(COMPILEDP, BUFFERP, SUBRP, PROCESSP, FRAMEP, WINDOWP): New macros.
(WINDOW_CONFIGURATIONP, FLOATP): New macros.
1993-03-15 05:44:21 +00:00
|
|
|
|
#define FLOATP(x) (XTYPE ((x)) == Lisp_Float)
|
(XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
(GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
(GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
(GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
(GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
(GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
(GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
(GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
(GC_EQ): Remove since they've been identical to their non-GC_
alter-egos ever since the markbit was eradicated.
2007-06-29 03:38:07 +00:00
|
|
|
|
#define VECTORP(x) (VECTORLIKEP (x) && !(XVECTOR (x)->size & PSEUDOVECTOR_FLAG))
|
1995-04-10 00:31:47 +00:00
|
|
|
|
#define OVERLAYP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay)
|
|
|
|
|
#define MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
|
2007-10-17 02:13:01 +00:00
|
|
|
|
#define SAVE_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value)
|
(INTEGERP, SYMBOLP, MARKERP, STRINGP, VECTORP): New macros.
(COMPILEDP, BUFFERP, SUBRP, PROCESSP, FRAMEP, WINDOWP): New macros.
(WINDOW_CONFIGURATIONP, FLOATP): New macros.
1993-03-15 05:44:21 +00:00
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
#define INTFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Int)
|
|
|
|
|
#define BOOLFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Bool)
|
|
|
|
|
#define OBJFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Obj)
|
|
|
|
|
#define BUFFER_OBJFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Buffer_Obj)
|
|
|
|
|
#define KBOARD_OBJFWDP(x) (XFWDTYPE (x) == Lisp_Fwd_Kboard_Obj)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
1995-01-03 01:45:36 +00:00
|
|
|
|
/* True if object X is a pseudovector whose code is CODE. */
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define PSEUDOVECTORP(x, code) \
|
|
|
|
|
(VECTORLIKEP (x) \
|
|
|
|
|
&& (((XVECTOR (x)->size & (PSEUDOVECTOR_FLAG | (code)))) \
|
|
|
|
|
== (PSEUDOVECTOR_FLAG | (code))))
|
|
|
|
|
|
|
|
|
|
/* Test for specific pseudovector types. */
|
|
|
|
|
#define WINDOW_CONFIGURATIONP(x) PSEUDOVECTORP (x, PVEC_WINDOW_CONFIGURATION)
|
|
|
|
|
#define PROCESSP(x) PSEUDOVECTORP (x, PVEC_PROCESS)
|
|
|
|
|
#define WINDOWP(x) PSEUDOVECTORP (x, PVEC_WINDOW)
|
2007-09-20 21:24:14 +00:00
|
|
|
|
#define TERMINALP(x) PSEUDOVECTORP (x, PVEC_TERMINAL)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define SUBRP(x) PSEUDOVECTORP (x, PVEC_SUBR)
|
|
|
|
|
#define COMPILEDP(x) PSEUDOVECTORP (x, PVEC_COMPILED)
|
1995-01-02 21:58:40 +00:00
|
|
|
|
#define BUFFERP(x) PSEUDOVECTORP (x, PVEC_BUFFER)
|
1995-10-07 22:07:01 +00:00
|
|
|
|
#define CHAR_TABLE_P(x) PSEUDOVECTORP (x, PVEC_CHAR_TABLE)
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
#define SUB_CHAR_TABLE_P(x) PSEUDOVECTORP (x, PVEC_SUB_CHAR_TABLE)
|
1995-10-07 22:07:01 +00:00
|
|
|
|
#define BOOL_VECTOR_P(x) PSEUDOVECTORP (x, PVEC_BOOL_VECTOR)
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
#define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME)
|
1997-04-07 07:12:13 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
/* Test for image (image . spec) */
|
|
|
|
|
#define IMAGEP(x) (CONSP (x) && EQ (XCAR (x), Qimage))
|
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
/* Array types. */
|
|
|
|
|
|
|
|
|
|
#define ARRAYP(x) \
|
|
|
|
|
(VECTORP (x) || STRINGP (x) || CHAR_TABLE_P (x) || BOOL_VECTOR_P (x))
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_LIST(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (CONSP (x) || NILP (x), Qlistp, x)
|
|
|
|
|
|
|
|
|
|
#define CHECK_LIST_CONS(x, y) \
|
|
|
|
|
CHECK_TYPE (CONSP (x), Qlistp, y)
|
|
|
|
|
|
|
|
|
|
#define CHECK_LIST_END(x, y) \
|
|
|
|
|
CHECK_TYPE (NILP (x), Qlistp, y)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_STRING(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (STRINGP (x), Qstringp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2001-11-03 21:29:35 +00:00
|
|
|
|
#define CHECK_STRING_CAR(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (STRINGP (XCAR (x)), Qstringp, XCAR (x))
|
2001-11-03 21:29:35 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_CONS(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (CONSP (x), Qconsp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_SYMBOL(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (SYMBOLP (x), Qsymbolp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_CHAR_TABLE(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (CHAR_TABLE_P (x), Qchar_table_p, x)
|
1995-10-07 22:07:01 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_VECTOR(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (VECTORP (x), Qvectorp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
#define CHECK_VECTOR_OR_STRING(x) \
|
|
|
|
|
CHECK_TYPE (VECTORP (x) || STRINGP (x), Qarrayp, x)
|
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
#define CHECK_ARRAY(x, Qxxxp) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (ARRAYP (x), Qxxxp, x)
|
|
|
|
|
|
|
|
|
|
#define CHECK_VECTOR_OR_CHAR_TABLE(x) \
|
|
|
|
|
CHECK_TYPE (VECTORP (x) || CHAR_TABLE_P (x), Qvector_or_char_table_p, x)
|
1995-10-12 21:19:49 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_BUFFER(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (BUFFERP (x), Qbufferp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_WINDOW(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (WINDOWP (x), Qwindowp, x)
|
|
|
|
|
|
|
|
|
|
#define CHECK_WINDOW_CONFIGURATION(x) \
|
|
|
|
|
CHECK_TYPE (WINDOW_CONFIGURATIONP (x), Qwindow_configuration_p, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1992-10-19 18:41:37 +00:00
|
|
|
|
/* This macro rejects windows on the interior of the window tree as
|
1997-04-11 21:58:13 +00:00
|
|
|
|
"dead", which is what we want; this is an argument-checking macro, and
|
1992-10-19 18:41:37 +00:00
|
|
|
|
the user should never get access to interior windows.
|
|
|
|
|
|
2007-08-08 07:49:21 +00:00
|
|
|
|
A window of any sort, leaf or interior, is dead if the buffer,
|
1992-10-19 18:41:37 +00:00
|
|
|
|
vchild, and hchild members are all nil. */
|
|
|
|
|
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
#define CHECK_LIVE_WINDOW(x) \
|
|
|
|
|
CHECK_TYPE (WINDOWP (x) && !NILP (XWINDOW (x)->buffer), Qwindow_live_p, x)
|
1992-10-19 18:41:37 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_PROCESS(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (PROCESSP (x), Qprocessp, x)
|
|
|
|
|
|
|
|
|
|
#define CHECK_SUBR(x) \
|
|
|
|
|
CHECK_TYPE (SUBRP (x), Qsubrp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NUMBER(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (INTEGERP (x), Qintegerp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NATNUM(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (NATNUMP (x), Qwholenump, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_MARKER(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (MARKERP (x), Qmarkerp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NUMBER_COERCE_MARKER(x) \
|
1994-10-04 15:24:13 +00:00
|
|
|
|
do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
else CHECK_TYPE (INTEGERP (x), Qinteger_or_marker_p, x); } while (0)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
#define XFLOATINT(n) extract_float((n))
|
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
#define CHECK_FLOAT(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (FLOATP (x), Qfloatp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
#define CHECK_NUMBER_OR_FLOAT(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (FLOATP (x) || INTEGERP (x), Qnumberp, x)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x) \
|
2010-06-03 17:34:35 +02:00
|
|
|
|
do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x)); \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
else CHECK_TYPE (INTEGERP (x) || FLOATP (x), Qnumber_or_marker_p, x); } while (0)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_OVERLAY(x) \
|
(CHECK_TYPE): New macro for generic type checking.
(CAR_SAFE, CDR_SAFE): New macros.
(ARRAYP, CHECK_ARRAY): New macros.
(CHECK_VECTOR_OR_STRING, CHECK_SUBR): New macros.
(CHECK_WINDOW_CONFIGURATION): New macro.
(CHECK_LIST_CONS, CHECK_LIST_END): New checks for list traversal.
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST)
(CHECK_STRING, CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL)
(CHECK_CHAR_TABLE, CHECK_VECTOR, CHECK_VECTOR_OR_CHAR_TABLE)
(CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW, CHECK_PROCESS)
(CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, CHECK_OVERLAY)
(CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT)
(CHECK_NUMBER_OR_FLOAT_COERCE_MARKER): Use CHECK_TYPE.
2006-07-12 13:13:44 +00:00
|
|
|
|
CHECK_TYPE (OVERLAYP (x), Qoverlayp, x)
|
1993-05-14 14:41:36 +00:00
|
|
|
|
|
2001-10-16 09:09:51 +00:00
|
|
|
|
/* Since we can't assign directly to the CAR or CDR fields of a cons
|
|
|
|
|
cell, use these when checking that those fields contain numbers. */
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NUMBER_CAR(x) \
|
2001-10-16 09:09:51 +00:00
|
|
|
|
do { \
|
|
|
|
|
Lisp_Object tmp = XCAR (x); \
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
CHECK_NUMBER (tmp); \
|
2001-10-16 09:09:51 +00:00
|
|
|
|
XSETCAR ((x), tmp); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
#define CHECK_NUMBER_CDR(x) \
|
2001-10-16 09:09:51 +00:00
|
|
|
|
do { \
|
|
|
|
|
Lisp_Object tmp = XCDR (x); \
|
(CHECK_STRING_OR_BUFFER, CHECK_HASH_TABLE, CHECK_LIST, CHECK_STRING,
CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE, CHECK_VECTOR,
CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW, CHECK_LIVE_WINDOW,
CHECK_PROCESS, CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER,
CHECK_NUMBER_COERCE_MARKER, CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT,
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER, CHECK_OVERLAY, CHECK_NUMBER_CAR,
CHECK_NUMBER_CDR): Remove unused argument `i' in macros.
2001-11-02 20:12:06 +00:00
|
|
|
|
CHECK_NUMBER (tmp); \
|
2001-10-16 09:09:51 +00:00
|
|
|
|
XSETCDR ((x), tmp); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2003-09-08 12:53:41 +00:00
|
|
|
|
#define CHECK_NATNUM_CAR(x) \
|
|
|
|
|
do { \
|
|
|
|
|
Lisp_Object tmp = XCAR (x); \
|
|
|
|
|
CHECK_NATNUM (tmp); \
|
|
|
|
|
XSETCAR ((x), tmp); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
#define CHECK_NATNUM_CDR(x) \
|
|
|
|
|
do { \
|
|
|
|
|
Lisp_Object tmp = XCDR (x); \
|
|
|
|
|
CHECK_NATNUM (tmp); \
|
|
|
|
|
XSETCDR ((x), tmp); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Cast pointers to this type to compare them. Some machines want int. */
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#define PNTR_COMPARISON_TYPE EMACS_UINT
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Define a built-in function for calling from Lisp.
|
|
|
|
|
`lname' should be the name to give the function in Lisp,
|
|
|
|
|
as a null-terminated C string.
|
|
|
|
|
`fnname' should be the name of the function in C.
|
|
|
|
|
By convention, it starts with F.
|
|
|
|
|
`sname' should be the name for the C constant structure
|
|
|
|
|
that records information on this function for internal use.
|
|
|
|
|
By convention, it should be the same as `fnname' but with S instead of F.
|
|
|
|
|
It's too bad that C macros can't compute this from `fnname'.
|
|
|
|
|
`minargs' should be a number, the minimum number of arguments allowed.
|
|
|
|
|
`maxargs' should be a number, the maximum number of arguments allowed,
|
|
|
|
|
or else MANY or UNEVALLED.
|
|
|
|
|
MANY means pass a vector of evaluated arguments,
|
|
|
|
|
in the form of an integer number-of-arguments
|
|
|
|
|
followed by the address of a vector of Lisp_Objects
|
|
|
|
|
which contains the argument values.
|
|
|
|
|
UNEVALLED means pass the list of unevaluated arguments
|
2007-09-10 09:40:37 +00:00
|
|
|
|
`intspec' says how interactive arguments are to be fetched.
|
|
|
|
|
If the string starts with a `(', `intspec' is evaluated and the resulting
|
|
|
|
|
list is the list of arguments.
|
|
|
|
|
If it's a string that doesn't start with `(', the value should follow
|
|
|
|
|
the one of the doc string for `interactive'.
|
1991-06-26 21:34:53 +00:00
|
|
|
|
A null string means call interactively with no arguments.
|
1994-11-13 20:54:28 +00:00
|
|
|
|
`doc' is documentation for the user. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1993-12-23 01:26:50 +00:00
|
|
|
|
/* This version of DEFUN declares a function prototype with the right
|
1995-01-02 21:58:40 +00:00
|
|
|
|
arguments, so we can catch errors with maxargs at compile-time. */
|
2007-09-10 09:40:37 +00:00
|
|
|
|
#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \
|
2004-04-16 12:51:06 +00:00
|
|
|
|
DECL_ALIGN (struct Lisp_Subr, sname) = \
|
(VALBITS): Default now 28.
(GCTYPEBITS): Default now 3.
(enum Lisp_Type): Lisp_Process, Lisp_Window, Lisp_Frame, Lisp_Subr deleted.
(PSEUDOVECTORP, GC_PSEUDOVECTORP): Add paren for proper nesting.
(PROCESSP, GC_PROCESSP, XSETPROCESS): Rewrite to use pseudovectors.
(WINDOWP, GC_WINDOWP, XSETWINDOW): Likewise.
(FRAMEP, GC_FRAMEP): Likewise.
(SUBRP, GC_SUBRP, XSETSUBR): Likewise.
(PVEC_SUBR): New macro.
(struct Lisp_Subr): Add a size field.
(DEFUN (both definitions)): Store that size field.
1994-12-30 01:54:16 +00:00
|
|
|
|
{ PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \
|
2010-07-20 17:26:53 +02:00
|
|
|
|
{ .a ## maxargs = fnname }, \
|
|
|
|
|
minargs, maxargs, lname, intspec, 0}; \
|
1993-12-23 01:26:50 +00:00
|
|
|
|
Lisp_Object fnname
|
|
|
|
|
|
|
|
|
|
/* Note that the weird token-substitution semantics of ANSI C makes
|
1995-01-02 21:58:40 +00:00
|
|
|
|
this work for MANY and UNEVALLED. */
|
1993-12-23 01:26:50 +00:00
|
|
|
|
#define DEFUN_ARGS_MANY (int, Lisp_Object *)
|
|
|
|
|
#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_0 (void)
|
|
|
|
|
#define DEFUN_ARGS_1 (Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
|
|
|
|
|
Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
|
|
|
|
|
Lisp_Object, Lisp_Object)
|
|
|
|
|
#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
|
|
|
|
|
Lisp_Object, Lisp_Object, Lisp_Object)
|
1997-08-26 11:42:33 +00:00
|
|
|
|
#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
|
|
|
|
|
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
|
2000-07-14 13:57:22 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Non-zero if OBJ is a Lisp function. */
|
2000-07-14 13:57:22 +00:00
|
|
|
|
#define FUNCTIONP(OBJ) \
|
|
|
|
|
((CONSP (OBJ) && EQ (XCAR (OBJ), Qlambda)) \
|
|
|
|
|
|| (SYMBOLP (OBJ) && !NILP (Ffboundp (OBJ))) \
|
|
|
|
|
|| COMPILEDP (OBJ) \
|
|
|
|
|
|| SUBRP (OBJ))
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* defsubr (Sname);
|
2001-11-15 15:20:10 +00:00
|
|
|
|
is how we define the symbol for function `name' at start-up time. */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void defsubr (struct Lisp_Subr *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
#define MANY -2
|
|
|
|
|
#define UNEVALLED -1
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
extern void defvar_lisp (struct Lisp_Objfwd *, const char *, Lisp_Object *);
|
|
|
|
|
extern void defvar_lisp_nopro (struct Lisp_Objfwd *, const char *, Lisp_Object *);
|
|
|
|
|
extern void defvar_bool (struct Lisp_Boolfwd *, const char *, int *);
|
|
|
|
|
extern void defvar_int (struct Lisp_Intfwd *, const char *, EMACS_INT *);
|
|
|
|
|
extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Macros we use to define forwarded Lisp variables.
|
|
|
|
|
These are used in the syms_of_FILENAME functions. */
|
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
#define DEFVAR_LISP(lname, vname, doc) \
|
|
|
|
|
do { \
|
|
|
|
|
static struct Lisp_Objfwd o_fwd; \
|
|
|
|
|
defvar_lisp (&o_fwd, lname, vname); \
|
|
|
|
|
} while (0)
|
|
|
|
|
#define DEFVAR_LISP_NOPRO(lname, vname, doc) \
|
|
|
|
|
do { \
|
|
|
|
|
static struct Lisp_Objfwd o_fwd; \
|
|
|
|
|
defvar_lisp_nopro (&o_fwd, lname, vname); \
|
|
|
|
|
} while (0)
|
|
|
|
|
#define DEFVAR_BOOL(lname, vname, doc) \
|
|
|
|
|
do { \
|
|
|
|
|
static struct Lisp_Boolfwd b_fwd; \
|
|
|
|
|
defvar_bool (&b_fwd, lname, vname); \
|
|
|
|
|
} while (0)
|
|
|
|
|
#define DEFVAR_INT(lname, vname, doc) \
|
|
|
|
|
do { \
|
|
|
|
|
static struct Lisp_Intfwd i_fwd; \
|
|
|
|
|
defvar_int (&i_fwd, lname, vname); \
|
|
|
|
|
} while (0)
|
2004-12-27 16:05:57 +00:00
|
|
|
|
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
#define DEFVAR_KBOARD(lname, vname, doc) \
|
|
|
|
|
do { \
|
|
|
|
|
static struct Lisp_Kboard_Objfwd ko_fwd; \
|
|
|
|
|
defvar_kboard (&ko_fwd, \
|
|
|
|
|
lname, \
|
|
|
|
|
(int)((char *)(¤t_kboard->vname) \
|
|
|
|
|
- (char *)current_kboard)); \
|
|
|
|
|
} while (0)
|
2001-10-13 20:43:52 +00:00
|
|
|
|
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1992-09-22 05:18:34 +00:00
|
|
|
|
/* Structure for recording Lisp call stack for backtrace purposes. */
|
|
|
|
|
|
|
|
|
|
/* The special binding stack holds the outer values of variables while
|
|
|
|
|
they are bound by a function application or a let form, stores the
|
|
|
|
|
code to be executed for Lisp unwind-protect forms, and stores the C
|
|
|
|
|
functions to be called for record_unwind_protect.
|
|
|
|
|
|
|
|
|
|
If func is non-zero, undoing this binding applies func to old_value;
|
|
|
|
|
This implements record_unwind_protect.
|
2000-01-11 22:16:55 +00:00
|
|
|
|
|
|
|
|
|
Otherwise, the element is a variable binding.
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2000-01-11 22:16:55 +00:00
|
|
|
|
If the symbol field is a symbol, it is an ordinary variable binding.
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER),
|
|
|
|
|
which means having bound a local value while CURRENT-BUFFER was active.
|
|
|
|
|
If WHERE is nil this means we saw the default value when binding SYMBOL.
|
|
|
|
|
WHERE being a buffer or frame means we saw a buffer-local or frame-local
|
|
|
|
|
value. Other values of WHERE mean an internal error. */
|
2000-01-11 22:16:55 +00:00
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
typedef Lisp_Object (*specbinding_func) (Lisp_Object);
|
2003-05-17 12:49:12 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct specbinding
|
|
|
|
|
{
|
2006-02-26 16:14:20 +00:00
|
|
|
|
Lisp_Object symbol, old_value;
|
|
|
|
|
specbinding_func func;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
Lisp_Object unused; /* Dividing by 16 is faster than by 12 */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern struct specbinding *specpdl;
|
2006-02-26 16:14:20 +00:00
|
|
|
|
extern struct specbinding *specpdl_ptr;
|
2010-09-24 15:30:13 -04:00
|
|
|
|
extern EMACS_INT specpdl_size;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2002-03-04 23:41:00 +00:00
|
|
|
|
extern EMACS_INT max_specpdl_size;
|
2001-12-30 00:13:56 +00:00
|
|
|
|
|
2010-09-23 22:57:48 +02:00
|
|
|
|
#define SPECPDL_INDEX() ((int) (specpdl_ptr - specpdl))
|
2000-11-15 19:24:35 +00:00
|
|
|
|
|
1992-09-22 05:18:34 +00:00
|
|
|
|
/* Everything needed to describe an active condition case. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct handler
|
|
|
|
|
{
|
1992-09-22 05:18:34 +00:00
|
|
|
|
/* The handler clauses and variable from the condition-case form. */
|
2002-08-12 17:28:36 +00:00
|
|
|
|
/* For a handler set up in Lisp code, this is always a list.
|
|
|
|
|
For an internal handler set up by internal_condition_case*,
|
|
|
|
|
this can instead be the symbol t or `error'.
|
|
|
|
|
t: handle all conditions.
|
|
|
|
|
error: handle all conditions, and errors can run the debugger
|
|
|
|
|
or display a backtrace. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
Lisp_Object handler;
|
|
|
|
|
Lisp_Object var;
|
1994-03-02 03:44:58 +00:00
|
|
|
|
/* Fsignal stores here the condition-case clause that applies,
|
|
|
|
|
and Fcondition_case thus knows which clause to run. */
|
|
|
|
|
Lisp_Object chosen_clause;
|
1992-09-22 05:18:34 +00:00
|
|
|
|
|
|
|
|
|
/* Used to effect the longjump out to the handler. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct catchtag *tag;
|
1992-09-22 05:18:34 +00:00
|
|
|
|
|
|
|
|
|
/* The next enclosing handler. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
struct handler *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern struct handler *handlerlist;
|
|
|
|
|
|
2009-10-19 04:27:09 +00:00
|
|
|
|
/* This structure helps implement the `catch' and `throw' control
|
|
|
|
|
structure. A struct catchtag contains all the information needed
|
|
|
|
|
to restore the state of the interpreter after a non-local jump.
|
|
|
|
|
|
|
|
|
|
Handlers for error conditions (represented by `struct handler'
|
|
|
|
|
structures) just point to a catch tag to do the cleanup required
|
|
|
|
|
for their jumps.
|
|
|
|
|
|
|
|
|
|
catchtag structures are chained together in the C calling stack;
|
|
|
|
|
the `next' member points to the next outer catchtag.
|
|
|
|
|
|
|
|
|
|
A call like (throw TAG VAL) searches for a catchtag whose `tag'
|
|
|
|
|
member is TAG, and then unbinds to it. The `val' member is used to
|
|
|
|
|
hold VAL while the stack is unwound; `val' is returned as the value
|
|
|
|
|
of the catch form.
|
|
|
|
|
|
|
|
|
|
All the other members are concerned with restoring the interpreter
|
|
|
|
|
state. */
|
|
|
|
|
|
|
|
|
|
struct catchtag
|
|
|
|
|
{
|
|
|
|
|
Lisp_Object tag;
|
|
|
|
|
Lisp_Object val;
|
|
|
|
|
struct catchtag *next;
|
|
|
|
|
struct gcpro *gcpro;
|
|
|
|
|
jmp_buf jmp;
|
|
|
|
|
struct backtrace *backlist;
|
|
|
|
|
struct handler *handlerlist;
|
|
|
|
|
int lisp_eval_depth;
|
|
|
|
|
int pdlcount;
|
|
|
|
|
int poll_suppress_count;
|
|
|
|
|
int interrupt_input_blocked;
|
|
|
|
|
struct byte_stack *byte_stack;
|
|
|
|
|
};
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern struct catchtag *catchlist;
|
|
|
|
|
extern struct backtrace *backtrace_list;
|
|
|
|
|
|
1994-03-02 03:44:58 +00:00
|
|
|
|
extern Lisp_Object memory_signal_data;
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* An address near the bottom of the stack.
|
|
|
|
|
Tells GC how to save a copy of the stack. */
|
|
|
|
|
extern char *stack_bottom;
|
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
/* Check quit-flag and quit if it is non-nil.
|
|
|
|
|
Typing C-g does not directly cause a quit; it only sets Vquit_flag.
|
|
|
|
|
So the program needs to do QUIT at times when it is safe to quit.
|
|
|
|
|
Every loop that might run for a long time or might not exit
|
|
|
|
|
ought to do QUIT at least once, at a safe place.
|
|
|
|
|
Unless that is impossible, of course.
|
|
|
|
|
But it is very desirable to avoid creating loops where QUIT is impossible.
|
|
|
|
|
|
|
|
|
|
Exception: if you set immediate_quit to nonzero,
|
|
|
|
|
then the handler that responds to the C-g does the quit itself.
|
|
|
|
|
This is a good thing to do around a loop that has no side effects
|
|
|
|
|
and (in particular) cannot call arbitrary Lisp code. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#ifdef SYNC_INPUT
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void process_pending_signals (void);
|
2009-01-29 14:35:25 +00:00
|
|
|
|
extern int pending_signals;
|
2010-03-05 18:08:18 -05:00
|
|
|
|
#define ELSE_PENDING_SIGNALS \
|
|
|
|
|
else if (pending_signals) \
|
|
|
|
|
process_pending_signals ();
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#else /* not SYNC_INPUT */
|
2010-03-05 18:08:18 -05:00
|
|
|
|
#define ELSE_PENDING_SIGNALS
|
|
|
|
|
#endif /* not SYNC_INPUT */
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
1999-11-02 13:25:16 +00:00
|
|
|
|
#define QUIT \
|
|
|
|
|
do { \
|
|
|
|
|
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
|
|
|
|
|
{ \
|
2004-12-13 18:56:52 +00:00
|
|
|
|
Lisp_Object flag = Vquit_flag; \
|
1999-11-02 13:25:16 +00:00
|
|
|
|
Vquit_flag = Qnil; \
|
2004-12-13 18:56:52 +00:00
|
|
|
|
if (EQ (Vthrow_on_input, flag)) \
|
2005-08-15 12:22:43 +00:00
|
|
|
|
Fthrow (Vthrow_on_input, Qt); \
|
1999-11-02 13:25:16 +00:00
|
|
|
|
Fsignal (Qquit, Qnil); \
|
|
|
|
|
} \
|
2010-03-05 18:08:18 -05:00
|
|
|
|
ELSE_PENDING_SIGNALS \
|
1999-11-02 13:25:16 +00:00
|
|
|
|
} while (0)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Nonzero if ought to quit now. */
|
|
|
|
|
|
1992-01-14 08:05:08 +00:00
|
|
|
|
#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
/* Variables used locally in the following case handling macros. */
|
1997-07-04 20:44:52 +00:00
|
|
|
|
extern int case_temp1;
|
|
|
|
|
extern Lisp_Object case_temp2;
|
1997-05-28 04:36:36 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* Current buffer's map from characters to lower-case characters. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
#define DOWNCASE_TABLE current_buffer->downcase_table
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* Current buffer's map from characters to upper-case characters. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
#define UPCASE_TABLE current_buffer->upcase_table
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* Downcase a character, or make no change if that cannot be done. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
#define DOWNCASE(CH) \
|
|
|
|
|
((case_temp1 = (CH), \
|
|
|
|
|
case_temp2 = CHAR_TABLE_REF (DOWNCASE_TABLE, case_temp1), \
|
|
|
|
|
NATNUMP (case_temp2)) \
|
|
|
|
|
? XFASTINT (case_temp2) : case_temp1)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* 1 if CH is upper case. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-06-02 00:56:23 +00:00
|
|
|
|
#define UPPERCASEP(CH) (DOWNCASE (CH) != (CH))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* 1 if CH is neither upper nor lower case. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
#define NOCASEP(CH) (UPCASE1 (CH) == (CH))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* 1 if CH is lower case. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH))
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
/* Upcase a character, or make no change if that cannot be done. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-04-11 21:58:13 +00:00
|
|
|
|
#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH))
|
|
|
|
|
|
|
|
|
|
/* Upcase a character known to be not upper case. */
|
|
|
|
|
|
1997-05-28 04:36:36 +00:00
|
|
|
|
#define UPCASE1(CH) \
|
|
|
|
|
((case_temp1 = (CH), \
|
|
|
|
|
case_temp2 = CHAR_TABLE_REF (UPCASE_TABLE, case_temp1), \
|
|
|
|
|
NATNUMP (case_temp2)) \
|
|
|
|
|
? XFASTINT (case_temp2) : case_temp1)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2005-04-01 01:05:05 +00:00
|
|
|
|
extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table;
|
|
|
|
|
extern Lisp_Object Vascii_canon_table, Vascii_eqv_table;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Number of bytes of structure consed since last GC. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
extern int consing_since_gc;
|
|
|
|
|
|
2005-07-23 19:08:32 +00:00
|
|
|
|
/* Thresholds for doing another gc. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2005-07-23 19:08:32 +00:00
|
|
|
|
extern EMACS_INT gc_cons_threshold;
|
|
|
|
|
|
|
|
|
|
extern EMACS_INT gc_relative_threshold;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2005-10-29 19:40:49 +00:00
|
|
|
|
extern EMACS_INT memory_full_cons_threshold;
|
|
|
|
|
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Structure for recording stack slots that need marking. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* This is a chain of structures, each of which points at a Lisp_Object
|
|
|
|
|
variable whose value should be marked in garbage collection.
|
|
|
|
|
Normally every link of the chain is an automatic variable of a function,
|
|
|
|
|
and its `val' points to some argument or local variable of the function.
|
|
|
|
|
On exit to the function, the chain is set back to the value it had on entry.
|
|
|
|
|
This way, no link remains in the chain when the stack frame containing the
|
|
|
|
|
link disappears.
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
Every function that can call Feval must protect in this fashion all
|
|
|
|
|
Lisp_Object variables whose contents will be used again. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
extern struct gcpro *gcprolist;
|
|
|
|
|
|
|
|
|
|
struct gcpro
|
2000-10-02 11:11:12 +00:00
|
|
|
|
{
|
|
|
|
|
struct gcpro *next;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2000-10-02 11:11:12 +00:00
|
|
|
|
/* Address of first protected variable. */
|
|
|
|
|
volatile Lisp_Object *var;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2000-10-02 11:11:12 +00:00
|
|
|
|
/* Number of consecutive protected variables. */
|
|
|
|
|
int nvars;
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#ifdef DEBUG_GCPRO
|
2000-10-02 11:11:12 +00:00
|
|
|
|
int level;
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#endif
|
2000-10-02 11:11:12 +00:00
|
|
|
|
};
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2000-02-17 15:23:58 +00:00
|
|
|
|
/* Values of GC_MARK_STACK during compilation:
|
|
|
|
|
|
|
|
|
|
0 Use GCPRO as before
|
|
|
|
|
1 Do the real thing, make GCPROs and UNGCPRO no-ops.
|
|
|
|
|
2 Mark the stack, and check that everything GCPRO'd is
|
|
|
|
|
marked.
|
|
|
|
|
3 Mark using GCPRO's, mark stack last, and count how many
|
|
|
|
|
dead objects are kept alive. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define GC_USE_GCPROS_AS_BEFORE 0
|
|
|
|
|
#define GC_MAKE_GCPROS_NOOPS 1
|
|
|
|
|
#define GC_MARK_STACK_CHECK_GCPROS 2
|
|
|
|
|
#define GC_USE_GCPROS_CHECK_ZOMBIES 3
|
|
|
|
|
|
|
|
|
|
#ifndef GC_MARK_STACK
|
|
|
|
|
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
|
|
|
|
|
|
2001-11-29 02:31:59 +00:00
|
|
|
|
/* Do something silly with gcproN vars just so gcc shuts up. */
|
2002-11-25 19:06:07 +00:00
|
|
|
|
/* You get warnings from MIPSPro... */
|
2001-11-29 02:31:59 +00:00
|
|
|
|
|
|
|
|
|
#define GCPRO1(varname) ((void) gcpro1)
|
2002-06-03 01:58:20 +00:00
|
|
|
|
#define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1))
|
2001-11-29 02:31:59 +00:00
|
|
|
|
#define GCPRO3(varname1, varname2, varname3) \
|
|
|
|
|
(((void) gcpro3, (void) gcpro2, (void) gcpro1))
|
|
|
|
|
#define GCPRO4(varname1, varname2, varname3, varname4) \
|
|
|
|
|
(((void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
|
|
|
|
|
#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
|
|
|
|
|
(((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
|
2002-03-01 20:59:55 +00:00
|
|
|
|
#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
|
|
|
|
|
(((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
|
2000-02-17 15:23:58 +00:00
|
|
|
|
#define UNGCPRO ((void) 0)
|
|
|
|
|
|
|
|
|
|
#else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
|
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#ifndef DEBUG_GCPRO
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
#define GCPRO1(varname) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro1; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO2(varname1, varname2) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro2; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO3(varname1, varname2, varname3) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro3; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO4(varname1, varname2, varname3, varname4) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro4; }
|
|
|
|
|
|
1994-06-22 20:11:29 +00:00
|
|
|
|
#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro5; }
|
|
|
|
|
|
2002-03-01 20:59:55 +00:00
|
|
|
|
#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
|
|
|
|
|
gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
|
|
|
|
|
gcprolist = &gcpro6; }
|
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#define UNGCPRO (gcprolist = gcpro1.next)
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#else
|
1997-04-11 21:58:13 +00:00
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
extern int gcpro_level;
|
|
|
|
|
|
|
|
|
|
#define GCPRO1(varname) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro1; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO2(varname1, varname2) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro2.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro2; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO3(varname1, varname2, varname3) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro3.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro3; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO4(varname1, varname2, varname3, varname4) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcpro4.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro4; }
|
|
|
|
|
|
|
|
|
|
#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
|
|
|
|
|
gcpro5.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro5; }
|
|
|
|
|
|
2002-03-01 20:59:55 +00:00
|
|
|
|
#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
|
|
|
|
|
{gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
|
|
|
|
|
gcpro1.level = gcpro_level; \
|
|
|
|
|
gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
|
|
|
|
|
gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
|
|
|
|
|
gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
|
|
|
|
|
gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
|
|
|
|
|
gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
|
|
|
|
|
gcpro6.level = gcpro_level++; \
|
|
|
|
|
gcprolist = &gcpro6; }
|
|
|
|
|
|
1999-11-01 23:16:22 +00:00
|
|
|
|
#define UNGCPRO \
|
|
|
|
|
((--gcpro_level != gcpro1.level) \
|
|
|
|
|
? (abort (), 0) \
|
|
|
|
|
: ((gcprolist = gcpro1.next), 0))
|
|
|
|
|
|
|
|
|
|
#endif /* DEBUG_GCPRO */
|
2000-02-17 15:23:58 +00:00
|
|
|
|
#endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1994-08-17 22:50:36 +00:00
|
|
|
|
/* Evaluate expr, UNGCPRO, and then return the value of expr. */
|
1994-06-22 20:11:29 +00:00
|
|
|
|
#define RETURN_UNGCPRO(expr) \
|
1999-09-20 00:34:41 +00:00
|
|
|
|
do \
|
1994-06-22 20:11:29 +00:00
|
|
|
|
{ \
|
|
|
|
|
Lisp_Object ret_ungc_val; \
|
|
|
|
|
ret_ungc_val = (expr); \
|
|
|
|
|
UNGCPRO; \
|
|
|
|
|
return ret_ungc_val; \
|
|
|
|
|
} \
|
1999-09-20 00:34:41 +00:00
|
|
|
|
while (0)
|
1999-11-01 23:16:22 +00:00
|
|
|
|
|
|
|
|
|
/* Call staticpro (&var) to protect static variable `var'. */
|
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
void staticpro (Lisp_Object *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-07-12 06:34:16 +00:00
|
|
|
|
/* Declare a Lisp-callable function. The MAXARGS parameter has the same
|
|
|
|
|
meaning as in the DEFUN macro, and is used to construct a prototype. */
|
|
|
|
|
/* We can use the same trick as in the DEFUN macro to generate the
|
|
|
|
|
appropriate prototype. */
|
|
|
|
|
#define EXFUN(fnname, maxargs) \
|
|
|
|
|
extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
|
|
|
|
|
|
1997-11-21 12:49:52 +00:00
|
|
|
|
/* Forward declarations for prototypes. */
|
|
|
|
|
struct window;
|
|
|
|
|
struct frame;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Defined in data.c */
|
|
|
|
|
extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound;
|
|
|
|
|
extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
|
|
|
|
|
extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range;
|
|
|
|
|
extern Lisp_Object Qvoid_variable, Qvoid_function;
|
|
|
|
|
extern Lisp_Object Qsetting_constant, Qinvalid_read_syntax;
|
|
|
|
|
extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qtext_read_only;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qinteractive_form;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qcircular_list;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
|
1992-10-02 22:32:00 +00:00
|
|
|
|
extern Lisp_Object Qbuffer_or_string_p;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qboundp, Qfboundp;
|
|
|
|
|
extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
|
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qcdr;
|
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error;
|
|
|
|
|
extern Lisp_Object Qoverflow_error, Qunderflow_error;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
extern Lisp_Object Qfloatp;
|
|
|
|
|
extern Lisp_Object Qnumberp, Qnumber_or_marker_p;
|
|
|
|
|
|
|
|
|
|
extern Lisp_Object Qinteger;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2009-02-21 13:39:46 +00:00
|
|
|
|
extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
|
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void circular_list_error (Lisp_Object) NO_RETURN;
|
2004-04-16 12:51:06 +00:00
|
|
|
|
EXFUN (Finteractive_form, 1);
|
2009-11-17 19:11:53 +00:00
|
|
|
|
EXFUN (Fbyteorder, 0);
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in frame.c */
|
|
|
|
|
extern Lisp_Object Qframep;
|
2001-10-11 08:46:50 +00:00
|
|
|
|
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
/* Defined in data.c */
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fcar, 1);
|
|
|
|
|
EXFUN (Fcar_safe, 1);
|
|
|
|
|
EXFUN (Fcdr, 1);
|
|
|
|
|
EXFUN (Fcdr_safe, 1);
|
|
|
|
|
EXFUN (Fsetcar, 2);
|
|
|
|
|
EXFUN (Fsetcdr, 2);
|
|
|
|
|
EXFUN (Fboundp, 1);
|
|
|
|
|
EXFUN (Ffboundp, 1);
|
|
|
|
|
EXFUN (Fsymbol_function, 1);
|
|
|
|
|
EXFUN (Fsymbol_name, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object indirect_function (Lisp_Object);
|
2006-02-10 00:00:31 +00:00
|
|
|
|
EXFUN (Findirect_function, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffset, 2);
|
|
|
|
|
EXFUN (Fsymbol_value, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object find_symbol_value (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fset, 2);
|
|
|
|
|
EXFUN (Fdefault_value, 1);
|
|
|
|
|
EXFUN (Fset_default, 2);
|
|
|
|
|
EXFUN (Fdefault_boundp, 1);
|
|
|
|
|
EXFUN (Fmake_local_variable, 1);
|
1997-08-08 20:07:59 +00:00
|
|
|
|
EXFUN (Flocal_variable_p, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
|
|
|
|
|
EXFUN (Faref, 2);
|
|
|
|
|
EXFUN (Faset, 3);
|
|
|
|
|
|
|
|
|
|
EXFUN (Fstring_to_number, 2);
|
|
|
|
|
EXFUN (Fnumber_to_string, 1);
|
|
|
|
|
EXFUN (Fgtr, 2);
|
|
|
|
|
EXFUN (Flss, 2);
|
|
|
|
|
EXFUN (Fgeq, 2);
|
|
|
|
|
EXFUN (Fleq, 2);
|
|
|
|
|
EXFUN (Fzerop, 1);
|
|
|
|
|
EXFUN (Fplus, MANY);
|
|
|
|
|
EXFUN (Fminus, MANY);
|
|
|
|
|
EXFUN (Ftimes, MANY);
|
|
|
|
|
EXFUN (Fquo, MANY);
|
|
|
|
|
EXFUN (Frem, 2);
|
|
|
|
|
EXFUN (Fmax, MANY);
|
|
|
|
|
EXFUN (Fmin, MANY);
|
|
|
|
|
|
|
|
|
|
EXFUN (Fadd1, 1);
|
|
|
|
|
EXFUN (Fsub1, 1);
|
2000-12-04 00:29:36 +00:00
|
|
|
|
EXFUN (Fmake_variable_buffer_local, 1);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
|
2008-05-19 18:38:55 +00:00
|
|
|
|
extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object long_to_cons (unsigned long);
|
|
|
|
|
extern unsigned long cons_to_long (Lisp_Object);
|
|
|
|
|
extern void args_out_of_range (Lisp_Object, Lisp_Object) NO_RETURN;
|
|
|
|
|
extern void args_out_of_range_3 (Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object) NO_RETURN;
|
|
|
|
|
extern Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object) NO_RETURN;
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *);
|
2010-05-07 16:33:00 -04:00
|
|
|
|
extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_data (void);
|
|
|
|
|
extern void init_data (void);
|
|
|
|
|
extern void swap_in_global_binding (struct Lisp_Symbol *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(Foverlay_start, Foverlay_end): Declare these functions.
(Fprevious_single_property_change, Fend_of_line, Felt): Ditto.
(Fforward_line, Fforward_word, Fdelete_region, Fforward_char): Ditto.
(Fnarrow_to_region, Fwiden, Fmatch_beginning, Fmatch_end): Ditto.
(Fskip_chars_forward, Fskip_chars_backward): Ditto.
(Ffile_name_absolute_p, read_doc_string): Ditto.
(get_frame_param, store_frame_param, store_in_alist): Ditto.
(describe_map_tree): Declaration moved here from keymap.c.
1995-05-26 04:29:09 +00:00
|
|
|
|
/* Defined in cmds.c */
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fend_of_line, 1);
|
|
|
|
|
EXFUN (Fforward_char, 1);
|
|
|
|
|
EXFUN (Fforward_line, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_cmds (void);
|
|
|
|
|
extern void keys_of_cmds (void);
|
(Foverlay_start, Foverlay_end): Declare these functions.
(Fprevious_single_property_change, Fend_of_line, Felt): Ditto.
(Fforward_line, Fforward_word, Fdelete_region, Fforward_char): Ditto.
(Fnarrow_to_region, Fwiden, Fmatch_beginning, Fmatch_end): Ditto.
(Fskip_chars_forward, Fskip_chars_backward): Ditto.
(Ffile_name_absolute_p, read_doc_string): Ditto.
(get_frame_param, store_frame_param, store_in_alist): Ditto.
(describe_map_tree): Declaration moved here from keymap.c.
1995-05-26 04:29:09 +00:00
|
|
|
|
|
(CHARACTERBITS, GLYPH_MASK_REV_DIR): New macros.
(GLYPH_MASK_PADDING, GLYPH_MASK_FACE, GLYPH_MASK_CHAR): New macros.
[HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
Use CHARACTERBITS.
[!HAVE_FACES] (FAST_MAKE_GLYPH, FAST_GLYPH_CHAR, FAST_GLYPH_FACE):
New macros.
[!HAVE_FACES] (GLYPH_CHAR, GLYPH_FACE): Mask appropriate bits.
(Fcoding_system_p, Fcheck_coding_system): Declare external.
(Fread_coding_system, Fread_non_nil_coding_system): Likewise.
1997-02-20 06:51:43 +00:00
|
|
|
|
/* Defined in coding.c */
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
extern Lisp_Object Qcharset;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fcoding_system_p, 1);
|
2005-04-28 04:55:48 +00:00
|
|
|
|
EXFUN (Fcoding_system_base, 1);
|
|
|
|
|
EXFUN (Fcoding_system_eol_type, 1);
|
|
|
|
|
EXFUN (Fcheck_coding_system, 1);
|
1997-09-05 05:37:59 +00:00
|
|
|
|
EXFUN (Fread_coding_system, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fread_non_nil_coding_system, 1);
|
1997-08-08 20:07:59 +00:00
|
|
|
|
EXFUN (Ffind_operation_coding_system, MANY);
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
EXFUN (Fdecode_coding_string, 4);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object detect_coding_system (const unsigned char *, EMACS_INT,
|
|
|
|
|
EMACS_INT, int, int, Lisp_Object);
|
|
|
|
|
extern void init_coding (void);
|
|
|
|
|
extern void init_coding_once (void);
|
|
|
|
|
extern void syms_of_coding (void);
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in character.c */
|
2003-09-17 19:23:19 +00:00
|
|
|
|
EXFUN (Funibyte_char_to_multibyte, 1);
|
1998-04-14 12:33:47 +00:00
|
|
|
|
EXFUN (Fchar_width, 1);
|
2000-02-27 20:41:17 +00:00
|
|
|
|
EXFUN (Fstring, MANY);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT);
|
|
|
|
|
extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT);
|
|
|
|
|
extern int multibyte_char_to_unibyte (int, Lisp_Object);
|
|
|
|
|
extern int multibyte_char_to_unibyte_safe (int);
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
extern void init_character_once (void);
|
|
|
|
|
extern void syms_of_character (void);
|
|
|
|
|
|
|
|
|
|
/* Defined in charset.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_charset (void);
|
|
|
|
|
extern void init_charset_once (void);
|
|
|
|
|
extern void syms_of_charset (void);
|
2003-09-08 12:53:41 +00:00
|
|
|
|
/* Structure forward declarations. */
|
|
|
|
|
struct charset;
|
1997-08-27 17:22:22 +00:00
|
|
|
|
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
/* Defined in composite.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_composite (void);
|
1997-08-27 17:22:22 +00:00
|
|
|
|
|
(Foverlay_start, Foverlay_end): Declare these functions.
(Fprevious_single_property_change, Fend_of_line, Felt): Ditto.
(Fforward_line, Fforward_word, Fdelete_region, Fforward_char): Ditto.
(Fnarrow_to_region, Fwiden, Fmatch_beginning, Fmatch_end): Ditto.
(Fskip_chars_forward, Fskip_chars_backward): Ditto.
(Ffile_name_absolute_p, read_doc_string): Ditto.
(get_frame_param, store_frame_param, store_in_alist): Ditto.
(describe_map_tree): Declaration moved here from keymap.c.
1995-05-26 04:29:09 +00:00
|
|
|
|
/* Defined in syntax.c */
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fforward_word, 1);
|
|
|
|
|
EXFUN (Fskip_chars_forward, 2);
|
|
|
|
|
EXFUN (Fskip_chars_backward, 2);
|
1997-11-21 12:49:52 +00:00
|
|
|
|
EXFUN (Fsyntax_table_p, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_syntax_once (void);
|
|
|
|
|
extern void syms_of_syntax (void);
|
(Foverlay_start, Foverlay_end): Declare these functions.
(Fprevious_single_property_change, Fend_of_line, Felt): Ditto.
(Fforward_line, Fforward_word, Fdelete_region, Fforward_char): Ditto.
(Fnarrow_to_region, Fwiden, Fmatch_beginning, Fmatch_end): Ditto.
(Fskip_chars_forward, Fskip_chars_backward): Ditto.
(Ffile_name_absolute_p, read_doc_string): Ditto.
(get_frame_param, store_frame_param, store_in_alist): Ditto.
(describe_map_tree): Declaration moved here from keymap.c.
1995-05-26 04:29:09 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Defined in fns.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object QCrehash_size, QCrehash_threshold;
|
2000-08-21 19:47:02 +00:00
|
|
|
|
extern int use_dialog_box;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern int use_file_dialog;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int next_almost_prime (int);
|
|
|
|
|
extern Lisp_Object larger_vector (Lisp_Object, int, Lisp_Object);
|
|
|
|
|
extern void sweep_weak_hash_tables (void);
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qcursor_in_echo_area;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qstring_lessp;
|
|
|
|
|
extern Lisp_Object Vfeatures;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq, Qeql;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
unsigned sxhash (Lisp_Object, int);
|
|
|
|
|
Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object, Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object);
|
|
|
|
|
int hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, unsigned *);
|
|
|
|
|
int hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
|
|
|
|
|
unsigned);
|
|
|
|
|
void init_weak_hash_tables (void);
|
|
|
|
|
extern void init_fns (void);
|
1999-07-21 21:43:52 +00:00
|
|
|
|
EXFUN (Fmake_hash_table, MANY);
|
|
|
|
|
EXFUN (Fgethash, 3);
|
|
|
|
|
EXFUN (Fputhash, 3);
|
|
|
|
|
EXFUN (Fremhash, 2);
|
|
|
|
|
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fidentity, 1);
|
|
|
|
|
EXFUN (Flength, 1);
|
|
|
|
|
EXFUN (Fappend, MANY);
|
|
|
|
|
EXFUN (Fconcat, MANY);
|
|
|
|
|
EXFUN (Fvconcat, MANY);
|
|
|
|
|
EXFUN (Fcopy_sequence, 1);
|
1998-03-03 01:31:11 +00:00
|
|
|
|
EXFUN (Fstring_make_multibyte, 1);
|
|
|
|
|
EXFUN (Fstring_make_unibyte, 1);
|
|
|
|
|
EXFUN (Fstring_as_multibyte, 1);
|
|
|
|
|
EXFUN (Fstring_as_unibyte, 1);
|
2003-02-19 13:07:17 +00:00
|
|
|
|
EXFUN (Fstring_to_multibyte, 1);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fsubstring, 3);
|
Fix int/EMACS_INT usage in fns.c.
fns.c (Fcompare_strings, Fstring_lessp, concat)
(string_make_unibyte, Fstring_as_unibyte, Fsubstring)
(Fsubstring_no_properties, substring_both, Ffillarray)
(Fclear_string, mapcar1, Fmapconcat, Fmapcar, Fmapc)
(Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
(Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
(Fmd5): Use EMACS_INT for buffer and string positions and length
variables and arguments.
<struct textprop_rec>: Use EMACS_INT for positions.
lisp.h (substring_both): Adjust prototype.
2010-09-24 07:55:44 -04:00
|
|
|
|
extern Lisp_Object substring_both (Lisp_Object, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fnth, 2);
|
|
|
|
|
EXFUN (Fnthcdr, 2);
|
|
|
|
|
EXFUN (Fmemq, 2);
|
|
|
|
|
EXFUN (Fassq, 2);
|
|
|
|
|
EXFUN (Fassoc, 2);
|
|
|
|
|
EXFUN (Felt, 2);
|
|
|
|
|
EXFUN (Fmember, 2);
|
|
|
|
|
EXFUN (Frassq, 2);
|
|
|
|
|
EXFUN (Fdelq, 2);
|
2004-11-09 13:24:07 +00:00
|
|
|
|
EXFUN (Fdelete, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fsort, 2);
|
|
|
|
|
EXFUN (Freverse, 1);
|
|
|
|
|
EXFUN (Fnreverse, 1);
|
|
|
|
|
EXFUN (Fget, 2);
|
|
|
|
|
EXFUN (Fput, 3);
|
|
|
|
|
EXFUN (Fequal, 2);
|
|
|
|
|
EXFUN (Fnconc, MANY);
|
|
|
|
|
EXFUN (Fmapcar, 2);
|
|
|
|
|
EXFUN (Fmapconcat, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object do_yes_or_no_p (Lisp_Object);
|
2001-10-12 22:21:59 +00:00
|
|
|
|
EXFUN (Fprovide, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object concat2 (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object assq_no_quit (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object assoc_no_quit (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern void clear_string_char_byte_cache (void);
|
|
|
|
|
extern EMACS_INT string_char_to_byte (Lisp_Object, EMACS_INT);
|
|
|
|
|
extern EMACS_INT string_byte_to_char (Lisp_Object, EMACS_INT);
|
|
|
|
|
extern Lisp_Object string_to_multibyte (Lisp_Object);
|
|
|
|
|
extern Lisp_Object string_make_unibyte (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fcopy_alist, 1);
|
|
|
|
|
EXFUN (Fplist_get, 2);
|
1999-07-21 21:43:52 +00:00
|
|
|
|
EXFUN (Fplist_put, 3);
|
2002-03-18 18:16:25 +00:00
|
|
|
|
EXFUN (Fplist_member, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Frassoc, 2);
|
|
|
|
|
EXFUN (Fstring_equal, 2);
|
1998-04-29 09:41:10 +00:00
|
|
|
|
EXFUN (Fcompare_strings, 7);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fstring_lessp, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_fns (void);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in floatfns.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern double extract_float (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffloat, 1);
|
|
|
|
|
EXFUN (Ftruncate, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_floatfns (void);
|
|
|
|
|
extern void syms_of_floatfns (void);
|
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
* configure.in: Check for util.h.
* src/bidi.c (bidi_dump_cached_states): Fix fprintf warning.
* src/emacs.c: Include src/nsterm.h if HAVE_NS.
* src/image.c (xpm_scan, xpm_make_color_table_v)
(xpm_put_color_table_v, xpm_get_color_table_v)
(xpm_make_color_table_h, xpm_put_color_table_h)
(xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image)
(xpm_load): Convert to ANSI C prototypes.
* src/lisp.h (fmod_float): Declare.
* src/menu.h (x_set_menu_bar_line): Declare.
(free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions.
* src/window.c: Include menu.h.
* src/nsfns.m (have_menus_p, ns_display_info_for_name)
(x_set_cursor_type, ns_appkit_version_str)
(ns_appkit_version_int, ns_do_applescript)
(x_set_scroll_bar_default_width, x_sync, compute_tip_xy)
(syms_of_nsfns): Convert to ANSI C prototypes.
* src/nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C
prototypes.
* src/nsimage.m (ns_load_image): Move NSTRACE after declarations.
* src/nsmenu.m (popup_activated, name_is_separator)
(syms_of_nsmenu): Convert to ANSI C prototypes.
(runMenuAt): Prototypes and move declarations before code.
* src/nsterm.h : Include sysselect.h.
(x_sync, x_get_focus_frame, x_set_mouse_position)
(x_set_mouse_pixel_position, x_make_frame_visible)
(x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height)
(x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines)
(x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select)
(syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect):
Declare
* src/process.c: Check HAVE_UTIL_H. Include src/nsterm.h if HAVE_NS.
* src/nsterm.m (ns_init_paths, ns_alloc_autorelease_pool)
(ns_ring_bell, ns_defined_color, hide_hourglass)
(x_display_pixel_height, x_display_pixel_width, syms_of_nsterm):
Convert to ANSI C prototypes.
(x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations
before code.
* src/sysdep.c: Check HAVE_TERM_H
* src/term.c: Check HAVE_SYS_IOCTL_H.
* src/unexmacosx.c (print_region_list, print_regions)
(build_region_list, find_emacs_zone_regions)
(unexec_regions_merge, read_load_commands, dump_it)
(unexec_init_emacs_zone): Convert to ANSI C prototypes.
* src/xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes.
2010-08-06 12:12:41 +02:00
|
|
|
|
extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
/* Defined in fringe.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_fringe (void);
|
|
|
|
|
extern void init_fringe (void);
|
|
|
|
|
extern void init_fringe_once (void);
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in image.c */
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data;
|
|
|
|
|
extern Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
|
|
|
|
|
extern Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
|
2004-06-30 13:09:05 +00:00
|
|
|
|
EXFUN (Finit_image_library, 2);
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
extern int x_bitmap_mask (struct frame *, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_image (void);
|
|
|
|
|
extern void init_image (void);
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
1995-01-11 02:13:20 +00:00
|
|
|
|
/* Defined in insdel.c */
|
2001-09-11 12:32:17 +00:00
|
|
|
|
extern Lisp_Object Qinhibit_modification_hooks;
|
* insdel.c (move_gap, move_gap_both, gap_left, gap_right)
(adjust_markers_gap_motion, adjust_markers_for_delete)
(adjust_markers_for_insert, adjust_point)
(adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
(make_gap, copy_text, count_size_as_multibyte, insert)
(insert_and_inherit, insert_before_markers)
(insert_before_markers_and_inherit, insert_1)
(count_combining_before, count_combining_after, insert_1_both)
(insert_from_string, insert_from_string_before_markers)
(insert_from_string_1, insert_from_gap, insert_from_buffer)
(insert_from_buffer_1, adjust_after_replace)
(adjust_after_replace_noundo, adjust_after_insert, replace_range)
(replace_range_2, del_range, del_range_1, del_range_byte)
(del_range_both, del_range_2, modify_region)
(prepare_to_modify_buffer, signal_before_change)
(signal_after_change, Fcombine_after_change_execute): Use EMACS_INT
for buffer positions and sizes.
* lisp.h: Adjust prototypes accordingly.
* fileio.c (adjust_markers_for_delete): Move declaration to lisp.h.
(non_regular_inserted, non_regular_nbytes, read_non_regular)
(Finsert_file_contents): Use EMACS_INT for buffer positions.
2009-03-28 02:24:22 +00:00
|
|
|
|
extern void move_gap (EMACS_INT);
|
|
|
|
|
extern void move_gap_both (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void make_gap (EMACS_INT);
|
2009-03-28 04:53:04 +00:00
|
|
|
|
extern EMACS_INT copy_text (const unsigned char *, unsigned char *,
|
|
|
|
|
EMACS_INT, int, int);
|
|
|
|
|
extern EMACS_INT count_size_as_multibyte (const unsigned char *, EMACS_INT);
|
* insdel.c (move_gap, move_gap_both, gap_left, gap_right)
(adjust_markers_gap_motion, adjust_markers_for_delete)
(adjust_markers_for_insert, adjust_point)
(adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
(make_gap, copy_text, count_size_as_multibyte, insert)
(insert_and_inherit, insert_before_markers)
(insert_before_markers_and_inherit, insert_1)
(count_combining_before, count_combining_after, insert_1_both)
(insert_from_string, insert_from_string_before_markers)
(insert_from_string_1, insert_from_gap, insert_from_buffer)
(insert_from_buffer_1, adjust_after_replace)
(adjust_after_replace_noundo, adjust_after_insert, replace_range)
(replace_range_2, del_range, del_range_1, del_range_byte)
(del_range_both, del_range_2, modify_region)
(prepare_to_modify_buffer, signal_before_change)
(signal_after_change, Fcombine_after_change_execute): Use EMACS_INT
for buffer positions and sizes.
* lisp.h: Adjust prototypes accordingly.
* fileio.c (adjust_markers_for_delete): Move declaration to lisp.h.
(non_regular_inserted, non_regular_nbytes, read_non_regular)
(Finsert_file_contents): Use EMACS_INT for buffer positions.
2009-03-28 02:24:22 +00:00
|
|
|
|
extern int count_combining_before (const unsigned char *,
|
|
|
|
|
EMACS_INT, EMACS_INT, EMACS_INT);
|
|
|
|
|
extern int count_combining_after (const unsigned char *,
|
|
|
|
|
EMACS_INT, EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void insert (const unsigned char *, EMACS_INT);
|
|
|
|
|
extern void insert_and_inherit (const unsigned char *, EMACS_INT);
|
|
|
|
|
extern void insert_1 (const unsigned char *, EMACS_INT, int, int, int);
|
|
|
|
|
extern void insert_1_both (const unsigned char *, EMACS_INT, EMACS_INT,
|
|
|
|
|
int, int, int);
|
|
|
|
|
extern void insert_from_gap (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void insert_from_string (Lisp_Object, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern void insert_from_buffer (struct buffer *, EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern void insert_char (int);
|
|
|
|
|
extern void insert_string (const char *);
|
|
|
|
|
extern void insert_before_markers (const unsigned char *, EMACS_INT);
|
|
|
|
|
extern void insert_before_markers_and_inherit (const unsigned char *,
|
|
|
|
|
EMACS_INT);
|
|
|
|
|
extern void insert_from_string_before_markers (Lisp_Object, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, int);
|
|
|
|
|
extern void del_range (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern Lisp_Object del_range_1 (EMACS_INT, EMACS_INT, int, int);
|
|
|
|
|
extern void del_range_byte (EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern void del_range_both (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern Lisp_Object del_range_2 (EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern void modify_region (struct buffer *, EMACS_INT, EMACS_INT, int);
|
2009-03-28 04:53:04 +00:00
|
|
|
|
extern void prepare_to_modify_buffer (EMACS_INT, EMACS_INT, EMACS_INT *);
|
|
|
|
|
extern void signal_before_change (EMACS_INT, EMACS_INT, EMACS_INT *);
|
* insdel.c (move_gap, move_gap_both, gap_left, gap_right)
(adjust_markers_gap_motion, adjust_markers_for_delete)
(adjust_markers_for_insert, adjust_point)
(adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
(make_gap, copy_text, count_size_as_multibyte, insert)
(insert_and_inherit, insert_before_markers)
(insert_before_markers_and_inherit, insert_1)
(count_combining_before, count_combining_after, insert_1_both)
(insert_from_string, insert_from_string_before_markers)
(insert_from_string_1, insert_from_gap, insert_from_buffer)
(insert_from_buffer_1, adjust_after_replace)
(adjust_after_replace_noundo, adjust_after_insert, replace_range)
(replace_range_2, del_range, del_range_1, del_range_byte)
(del_range_both, del_range_2, modify_region)
(prepare_to_modify_buffer, signal_before_change)
(signal_after_change, Fcombine_after_change_execute): Use EMACS_INT
for buffer positions and sizes.
* lisp.h: Adjust prototypes accordingly.
* fileio.c (adjust_markers_for_delete): Move declaration to lisp.h.
(non_regular_inserted, non_regular_nbytes, read_non_regular)
(Finsert_file_contents): Use EMACS_INT for buffer positions.
2009-03-28 02:24:22 +00:00
|
|
|
|
extern void signal_after_change (EMACS_INT, EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void adjust_after_replace (EMACS_INT, EMACS_INT, Lisp_Object,
|
|
|
|
|
EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void adjust_after_replace_noundo (EMACS_INT, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void adjust_after_insert (EMACS_INT, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void adjust_markers_for_delete (EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void replace_range (EMACS_INT, EMACS_INT, Lisp_Object, int, int, int);
|
|
|
|
|
extern void replace_range_2 (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
const char *, EMACS_INT, EMACS_INT, int);
|
* insdel.c (move_gap, move_gap_both, gap_left, gap_right)
(adjust_markers_gap_motion, adjust_markers_for_delete)
(adjust_markers_for_insert, adjust_point)
(adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
(make_gap, copy_text, count_size_as_multibyte, insert)
(insert_and_inherit, insert_before_markers)
(insert_before_markers_and_inherit, insert_1)
(count_combining_before, count_combining_after, insert_1_both)
(insert_from_string, insert_from_string_before_markers)
(insert_from_string_1, insert_from_gap, insert_from_buffer)
(insert_from_buffer_1, adjust_after_replace)
(adjust_after_replace_noundo, adjust_after_insert, replace_range)
(replace_range_2, del_range, del_range_1, del_range_byte)
(del_range_both, del_range_2, modify_region)
(prepare_to_modify_buffer, signal_before_change)
(signal_after_change, Fcombine_after_change_execute): Use EMACS_INT
for buffer positions and sizes.
* lisp.h: Adjust prototypes accordingly.
* fileio.c (adjust_markers_for_delete): Move declaration to lisp.h.
(non_regular_inserted, non_regular_nbytes, read_non_regular)
(Finsert_file_contents): Use EMACS_INT for buffer positions.
2009-03-28 02:24:22 +00:00
|
|
|
|
extern void syms_of_insdel (void);
|
1995-01-11 02:13:20 +00:00
|
|
|
|
|
1996-09-04 18:54:36 +00:00
|
|
|
|
/* Defined in dispnew.c */
|
1999-09-13 11:13:45 +00:00
|
|
|
|
extern Lisp_Object selected_frame;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vwindow_system_version;
|
2002-03-04 23:41:00 +00:00
|
|
|
|
extern EMACS_INT baud_rate;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fding, 1);
|
1999-08-30 16:06:22 +00:00
|
|
|
|
EXFUN (Fredraw_frame, 1);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fsleep_for, 2);
|
2006-07-11 20:09:59 +00:00
|
|
|
|
EXFUN (Fredisplay, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object sit_for (Lisp_Object, int, int);
|
|
|
|
|
extern void init_display (void);
|
|
|
|
|
extern void syms_of_display (void);
|
1996-09-04 18:54:36 +00:00
|
|
|
|
|
1995-01-11 02:13:20 +00:00
|
|
|
|
/* Defined in xdisp.c */
|
2000-12-21 16:57:00 +00:00
|
|
|
|
extern Lisp_Object Qinhibit_point_motion_hooks;
|
2000-09-07 11:36:52 +00:00
|
|
|
|
extern Lisp_Object Qinhibit_redisplay, Qdisplay;
|
2001-03-28 15:32:52 +00:00
|
|
|
|
extern Lisp_Object Qinhibit_eval_during_redisplay;
|
2000-06-13 23:51:16 +00:00
|
|
|
|
extern Lisp_Object Qmessage_truncate_lines;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qmenu_bar_update_hook;
|
|
|
|
|
extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
|
|
|
|
|
extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
|
2010-07-28 19:34:51 +02:00
|
|
|
|
extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object Qspace, Qcenter, QCalign_to;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
|
|
|
|
|
extern Lisp_Object Qleft_margin, Qright_margin;
|
2010-11-23 10:56:28 -08:00
|
|
|
|
extern Lisp_Object Qglyphless_char;
|
1995-04-03 21:48:34 +00:00
|
|
|
|
extern Lisp_Object Vmessage_log_max;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object QCdata, QCfile;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object QCmap;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qrisky_local_variable;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vinhibit_redisplay;
|
2010-11-23 10:56:28 -08:00
|
|
|
|
extern struct frame *last_glyphless_glyph_frame;
|
|
|
|
|
extern unsigned last_glyphless_glyph_face_id;
|
|
|
|
|
extern int last_glyphless_glyph_merged_face_id;
|
1998-01-09 23:17:00 +00:00
|
|
|
|
extern int message_enable_multibyte;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern int noninteractive_need_newline;
|
|
|
|
|
extern EMACS_INT scroll_margin;
|
1999-08-21 19:30:11 +00:00
|
|
|
|
extern Lisp_Object echo_area_buffer[2];
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void check_message_stack (void);
|
|
|
|
|
extern void setup_echo_area_for_printing (int);
|
|
|
|
|
extern int push_message (void);
|
|
|
|
|
extern Lisp_Object pop_message_unwind (Lisp_Object);
|
|
|
|
|
extern Lisp_Object restore_message_unwind (Lisp_Object);
|
|
|
|
|
extern void pop_message (void);
|
|
|
|
|
extern void restore_message (void);
|
|
|
|
|
extern Lisp_Object current_message (void);
|
Fix int/EMACS_INT use in xdisp.c and print.c.
print.c (print_object): Fix format string and argument types for
printing a Lisp_Misc_Marker.
xdisp.c (pos_visible_p, c_string_pos, number_of_chars)
(load_overlay_strings, get_overlay_strings_1)
(get_overlay_strings, forward_to_next_line_start)
(back_to_previous_visible_line_start, reseat, reseat_to_string)
(get_next_display_element, next_element_from_string)
(next_element_from_c_string, next_element_from_buffer)
(move_it_vertically_backward, move_it_by_lines, add_to_log)
(message_dolog, message_log_check_duplicate, message2_nolog)
(message3, message3_nolog, vmessage, set_message, set_message_1)
(hscroll_window_tree, text_outside_line_unchanged_p)
(set_cursor_from_row, set_vertical_scroll_bar, redisplay_window)
(find_last_unchanged_at_beg_row)
(find_first_unchanged_at_end_row, row_containing_pos)
(trailing_whitespace_p, display_mode_element, decode_mode_spec)
(display_count_lines, x_produce_glyphs, note_mouse_highlight): Use
EMACS_INT for buffer and string positions.
dispextern.h (struct it) <string_nchars>: Declare EMACS_INT.
(row_containing_pos): Adjust prototype.
lisp.h (pos_visible_p, message2, message2_nolog, message3)
(message2_nolog, set_message): Adjust prototypes.
2010-09-29 05:06:53 -04:00
|
|
|
|
extern void set_message (const char *s, Lisp_Object, EMACS_INT, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void clear_message (int, int);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void message (const char *, ...);
|
|
|
|
|
extern void message_nolog (const char *, ...);
|
|
|
|
|
extern void message1 (const char *);
|
|
|
|
|
extern void message1_nolog (const char *);
|
Fix int/EMACS_INT use in xdisp.c and print.c.
print.c (print_object): Fix format string and argument types for
printing a Lisp_Misc_Marker.
xdisp.c (pos_visible_p, c_string_pos, number_of_chars)
(load_overlay_strings, get_overlay_strings_1)
(get_overlay_strings, forward_to_next_line_start)
(back_to_previous_visible_line_start, reseat, reseat_to_string)
(get_next_display_element, next_element_from_string)
(next_element_from_c_string, next_element_from_buffer)
(move_it_vertically_backward, move_it_by_lines, add_to_log)
(message_dolog, message_log_check_duplicate, message2_nolog)
(message3, message3_nolog, vmessage, set_message, set_message_1)
(hscroll_window_tree, text_outside_line_unchanged_p)
(set_cursor_from_row, set_vertical_scroll_bar, redisplay_window)
(find_last_unchanged_at_beg_row)
(find_first_unchanged_at_end_row, row_containing_pos)
(trailing_whitespace_p, display_mode_element, decode_mode_spec)
(display_count_lines, x_produce_glyphs, note_mouse_highlight): Use
EMACS_INT for buffer and string positions.
dispextern.h (struct it) <string_nchars>: Declare EMACS_INT.
(row_containing_pos): Adjust prototype.
lisp.h (pos_visible_p, message2, message2_nolog, message3)
(message2_nolog, set_message): Adjust prototypes.
2010-09-29 05:06:53 -04:00
|
|
|
|
extern void message2 (const char *, EMACS_INT, int);
|
|
|
|
|
extern void message2_nolog (const char *, EMACS_INT, int);
|
|
|
|
|
extern void message3 (Lisp_Object, EMACS_INT, int);
|
|
|
|
|
extern void message3_nolog (Lisp_Object, EMACS_INT, int);
|
2010-09-24 17:01:03 +02:00
|
|
|
|
extern void message_dolog (const char *, EMACS_INT, int, int);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void message_with_string (const char *, Lisp_Object, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void message_log_maybe_newline (void);
|
|
|
|
|
extern void update_echo_area (void);
|
2010-09-25 05:36:36 -04:00
|
|
|
|
extern void truncate_echo_area (EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void redisplay (void);
|
1999-12-15 00:16:30 +00:00
|
|
|
|
extern int check_point_in_composition
|
Fix more uses of int instead of EMACS_INT.
xdisp.c (check_point_in_composition, reconsider_clip_changes):
Use EMACS_INT for buffer position variables and arguments.
composite.c (get_composition_id, find_composition)
(run_composition_function, compose_text)
(composition_gstring_width, autocmp_chars)
(composition_update_it, Ffind_composition_internal): Use EMACS_INT
for buffer positions and string length variables and arguments.
composite.h (get_composition_id, find_composition, compose_text)
(composition_gstring_width): Adjust prototypes.
editfns.c (Fformat): Use EMACS_INT for string size variables.
xdisp.c (store_mode_line_noprop, display_mode_element): Use
EMACS_INT for string positions.
intervals.c (get_property_and_range): Use EMACS_INT for buffer
position arguments.
intervals.h (get_property_and_range): Adjust prototype.
character.c (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(string_count_byte8, string_escape_byte8, c_string_width)
(strwidth, lisp_string_width, multibyte_chars_in_text): Use
EMACS_INT for string length variables and arguments.
(string_escape_byte8): Protect against too long strings.
character.h (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(c_string_width, strwidth, lisp_string_width): Adjust
prototypes.
lisp.h (check_point_in_composition): Adjust prototype.
2010-09-23 10:32:38 -04:00
|
|
|
|
(struct buffer *, EMACS_INT, struct buffer *, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void redisplay_preserve_echo_area (int);
|
|
|
|
|
extern void prepare_menu_bars (void);
|
2002-11-14 14:15:55 +00:00
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
void set_frame_cursor_types (struct frame *, Lisp_Object);
|
|
|
|
|
extern void syms_of_xdisp (void);
|
|
|
|
|
extern void init_xdisp (void);
|
|
|
|
|
extern Lisp_Object safe_eval (Lisp_Object);
|
Fix int/EMACS_INT use in xdisp.c and print.c.
print.c (print_object): Fix format string and argument types for
printing a Lisp_Misc_Marker.
xdisp.c (pos_visible_p, c_string_pos, number_of_chars)
(load_overlay_strings, get_overlay_strings_1)
(get_overlay_strings, forward_to_next_line_start)
(back_to_previous_visible_line_start, reseat, reseat_to_string)
(get_next_display_element, next_element_from_string)
(next_element_from_c_string, next_element_from_buffer)
(move_it_vertically_backward, move_it_by_lines, add_to_log)
(message_dolog, message_log_check_duplicate, message2_nolog)
(message3, message3_nolog, vmessage, set_message, set_message_1)
(hscroll_window_tree, text_outside_line_unchanged_p)
(set_cursor_from_row, set_vertical_scroll_bar, redisplay_window)
(find_last_unchanged_at_beg_row)
(find_first_unchanged_at_end_row, row_containing_pos)
(trailing_whitespace_p, display_mode_element, decode_mode_spec)
(display_count_lines, x_produce_glyphs, note_mouse_highlight): Use
EMACS_INT for buffer and string positions.
dispextern.h (struct it) <string_nchars>: Declare EMACS_INT.
(row_containing_pos): Adjust prototype.
lisp.h (pos_visible_p, message2, message2_nolog, message3)
(message2_nolog, set_message): Adjust prototypes.
2010-09-29 05:06:53 -04:00
|
|
|
|
extern int pos_visible_p (struct window *, EMACS_INT, int *,
|
2010-07-02 11:26:33 +02:00
|
|
|
|
int *, int *, int *, int *, int *);
|
1995-01-11 02:13:20 +00:00
|
|
|
|
|
2009-11-17 08:21:23 +00:00
|
|
|
|
/* Defined in xsettings.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xsettings (void);
|
2009-11-17 08:21:23 +00:00
|
|
|
|
|
1999-09-16 20:20:01 +00:00
|
|
|
|
/* Defined in vm-limit.c. */
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (const char *));
|
2000-03-08 18:46:21 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Defined in alloc.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void check_pure_size (void);
|
Fix some uses of int instead of EMACS_INT.
minibuf.c (Fminibuffer_contents)
(Fminibuffer_contents_no_properties)
(Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
positions.
keyboard.c (command_loop_1): Use EMACS_INT to compare point with
mark.
alloc.c (make_uninit_string, make_uninit_multibyte_string)
(allocate_string_data): Accept EMACS_INT for string length.
editfns.c (Ffield_string, Ffield_string_no_properties)
(make_buffer_string, make_buffer_string_both, Fbuffer_substring)
(Fbuffer_substring_no_properties, find_field, Fdelete_field)
(Ffield_string, Ffield_string_no_properties, Ffield_beginning)
(Ffield_end): Use EMACS_INT for buffer positions.
insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
point with mark.
lisp.h (allocate_string_data, make_uninit_string)
(make_uninit_multibyte_string, make_buffer_string)
(make_buffer_string_both): Adjust prototypes.
2010-09-22 12:03:34 -04:00
|
|
|
|
extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void reset_malloc_hooks (void);
|
|
|
|
|
extern void uninterrupt_malloc (void);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void malloc_warning (const char *);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void memory_full (void) NO_RETURN;
|
|
|
|
|
extern void buffer_memory_full (void) NO_RETURN;
|
|
|
|
|
extern int survives_gc_p (Lisp_Object);
|
|
|
|
|
extern void mark_object (Lisp_Object);
|
2010-11-18 13:45:03 -08:00
|
|
|
|
extern void refill_memory_reserve (void);
|
2010-11-18 08:57:00 -08:00
|
|
|
|
extern const char *pending_malloc_warning;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vpurify_flag;
|
2002-07-11 17:40:48 +00:00
|
|
|
|
extern Lisp_Object Vmemory_full;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object *stack_base;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fcons, 2);
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
extern Lisp_Object list1 (Lisp_Object);
|
|
|
|
|
extern Lisp_Object list2 (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object list3 (Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Flist, MANY);
|
|
|
|
|
EXFUN (Fmake_list, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object allocate_misc (void);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fmake_vector, 2);
|
|
|
|
|
EXFUN (Fvector, MANY);
|
|
|
|
|
EXFUN (Fmake_symbol, 1);
|
|
|
|
|
EXFUN (Fmake_marker, 0);
|
|
|
|
|
EXFUN (Fmake_string, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object build_string (const char *);
|
Fix some more uses of int instead of EMACS_INT.
font.c (font_intern_prop): Use EMACS_INT for string length
variables.
character.c (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(string_count_byte8, string_escape_byte8): Use EMACS_INT for
string length arguments, variables, and return values.
character.h (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte): Adjust
prototypes.
fns.c (Fstring_as_multibyte): Use EMACS_INT for string length
variables.
alloc.c <total_string_size>: Declare as EMACS_INT, not int.
(Fmake_string): Protect against too large strings.
(live_string_p, live_cons_p, live_symbol_p, live_float_p)
(live_misc_p): Use ptrdiff_t instead of int for pointer
differences.
(string_bytes, check_sblock, check_string_free_list)
(allocate_string_data, compact_small_strings, Fmake_string)
(Fmake_bool_vector, make_string, make_unibyte_string)
(make_multibyte_string, make_string_from_bytes)
(make_specified_string_string, Fmake_list, Fmake_vector): Use
EMACS_INT for string length variables and arguments.
(find_string_data_in_pure, make_pure_string, make_pure_c_string)
(Fpurecopy): Use EMACS_INT for string size.
(mark_vectorlike, mark_char_table, mark_object): Use EMACS_UINT
for vector size.
lisp.h (make_string, make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string_string)
(make_pure_string, string_bytes): Adjust prototypes.
2010-09-23 08:09:12 -04:00
|
|
|
|
extern Lisp_Object make_string (const char *, EMACS_INT);
|
|
|
|
|
extern Lisp_Object make_unibyte_string (const char *, EMACS_INT);
|
|
|
|
|
extern Lisp_Object make_multibyte_string (const char *, EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object make_event_array (int, Lisp_Object *);
|
Fix some uses of int instead of EMACS_INT.
minibuf.c (Fminibuffer_contents)
(Fminibuffer_contents_no_properties)
(Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
positions.
keyboard.c (command_loop_1): Use EMACS_INT to compare point with
mark.
alloc.c (make_uninit_string, make_uninit_multibyte_string)
(allocate_string_data): Accept EMACS_INT for string length.
editfns.c (Ffield_string, Ffield_string_no_properties)
(make_buffer_string, make_buffer_string_both, Fbuffer_substring)
(Fbuffer_substring_no_properties, find_field, Fdelete_field)
(Ffield_string, Ffield_string_no_properties, Ffield_beginning)
(Ffield_end): Use EMACS_INT for buffer positions.
insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
point with mark.
lisp.h (allocate_string_data, make_uninit_string)
(make_uninit_multibyte_string, make_buffer_string)
(make_buffer_string_both): Adjust prototypes.
2010-09-22 12:03:34 -04:00
|
|
|
|
extern Lisp_Object make_uninit_string (EMACS_INT);
|
|
|
|
|
extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
|
Fix some more uses of int instead of EMACS_INT.
font.c (font_intern_prop): Use EMACS_INT for string length
variables.
character.c (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(string_count_byte8, string_escape_byte8): Use EMACS_INT for
string length arguments, variables, and return values.
character.h (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte): Adjust
prototypes.
fns.c (Fstring_as_multibyte): Use EMACS_INT for string length
variables.
alloc.c <total_string_size>: Declare as EMACS_INT, not int.
(Fmake_string): Protect against too large strings.
(live_string_p, live_cons_p, live_symbol_p, live_float_p)
(live_misc_p): Use ptrdiff_t instead of int for pointer
differences.
(string_bytes, check_sblock, check_string_free_list)
(allocate_string_data, compact_small_strings, Fmake_string)
(Fmake_bool_vector, make_string, make_unibyte_string)
(make_multibyte_string, make_string_from_bytes)
(make_specified_string_string, Fmake_list, Fmake_vector): Use
EMACS_INT for string length variables and arguments.
(find_string_data_in_pure, make_pure_string, make_pure_c_string)
(Fpurecopy): Use EMACS_INT for string size.
(mark_vectorlike, mark_char_table, mark_object): Use EMACS_UINT
for vector size.
lisp.h (make_string, make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string_string)
(make_pure_string, string_bytes): Adjust prototypes.
2010-09-23 08:09:12 -04:00
|
|
|
|
extern Lisp_Object make_string_from_bytes (const char *, EMACS_INT, EMACS_INT);
|
|
|
|
|
extern Lisp_Object make_specified_string (const char *,
|
|
|
|
|
EMACS_INT, EMACS_INT, int);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fpurecopy, 1);
|
Fix some more uses of int instead of EMACS_INT.
font.c (font_intern_prop): Use EMACS_INT for string length
variables.
character.c (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
(string_count_byte8, string_escape_byte8): Use EMACS_INT for
string length arguments, variables, and return values.
character.h (parse_str_as_multibyte, str_as_multibyte)
(parse_str_to_multibyte, str_to_multibyte, str_as_unibyte): Adjust
prototypes.
fns.c (Fstring_as_multibyte): Use EMACS_INT for string length
variables.
alloc.c <total_string_size>: Declare as EMACS_INT, not int.
(Fmake_string): Protect against too large strings.
(live_string_p, live_cons_p, live_symbol_p, live_float_p)
(live_misc_p): Use ptrdiff_t instead of int for pointer
differences.
(string_bytes, check_sblock, check_string_free_list)
(allocate_string_data, compact_small_strings, Fmake_string)
(Fmake_bool_vector, make_string, make_unibyte_string)
(make_multibyte_string, make_string_from_bytes)
(make_specified_string_string, Fmake_list, Fmake_vector): Use
EMACS_INT for string length variables and arguments.
(find_string_data_in_pure, make_pure_string, make_pure_c_string)
(Fpurecopy): Use EMACS_INT for string size.
(mark_vectorlike, mark_char_table, mark_object): Use EMACS_UINT
for vector size.
lisp.h (make_string, make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string_string)
(make_pure_string, string_bytes): Adjust prototypes.
2010-09-23 08:09:12 -04:00
|
|
|
|
extern Lisp_Object make_pure_string (const char *, EMACS_INT, EMACS_INT, int);
|
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
|
|
|
|
extern Lisp_Object make_pure_c_string (const char *data);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object make_pure_vector (EMACS_INT);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fgarbage_collect, 0);
|
|
|
|
|
EXFUN (Fmake_byte_code, MANY);
|
|
|
|
|
EXFUN (Fmake_bool_vector, 2);
|
1995-10-12 21:19:49 +00:00
|
|
|
|
extern Lisp_Object Qchar_table_extra_slots;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern struct Lisp_Vector *allocate_vector (EMACS_INT);
|
|
|
|
|
extern struct Lisp_Vector *allocate_pseudovector (int memlen, int lisplen, EMACS_INT tag);
|
2007-11-16 20:36:34 +00:00
|
|
|
|
#define ALLOCATE_PSEUDOVECTOR(typ,field,tag) \
|
|
|
|
|
((typ*) \
|
|
|
|
|
allocate_pseudovector \
|
|
|
|
|
(VECSIZE (typ), PSEUDOVECSIZE (typ, field), tag))
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern struct Lisp_Hash_Table *allocate_hash_table (void);
|
|
|
|
|
extern struct window *allocate_window (void);
|
|
|
|
|
extern struct frame *allocate_frame (void);
|
|
|
|
|
extern struct Lisp_Process *allocate_process (void);
|
|
|
|
|
extern struct terminal *allocate_terminal (void);
|
1994-04-03 21:31:47 +00:00
|
|
|
|
extern int gc_in_progress;
|
2003-04-30 12:06:39 +00:00
|
|
|
|
extern int abort_on_gc;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object make_float (double);
|
|
|
|
|
extern void display_malloc_warning (void);
|
|
|
|
|
extern int inhibit_garbage_collection (void);
|
|
|
|
|
extern Lisp_Object make_save_value (void *, int);
|
|
|
|
|
extern void free_misc (Lisp_Object);
|
|
|
|
|
extern void free_marker (Lisp_Object);
|
|
|
|
|
extern void free_cons (struct Lisp_Cons *);
|
|
|
|
|
extern void init_alloc_once (void);
|
|
|
|
|
extern void init_alloc (void);
|
|
|
|
|
extern void syms_of_alloc (void);
|
|
|
|
|
extern struct buffer * allocate_buffer (void);
|
|
|
|
|
extern int valid_lisp_object_p (Lisp_Object);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
/* Defined in chartab.c */
|
|
|
|
|
EXFUN (Fmake_char_table, 2);
|
|
|
|
|
EXFUN (Fset_char_table_parent, 2);
|
|
|
|
|
EXFUN (Fchar_table_extra_slot, 2);
|
|
|
|
|
EXFUN (Fset_char_table_extra_slot, 3);
|
|
|
|
|
EXFUN (Fset_char_table_range, 3);
|
2008-05-30 21:07:50 +00:00
|
|
|
|
EXFUN (Foptimize_char_table, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object copy_char_table (Lisp_Object);
|
|
|
|
|
extern Lisp_Object char_table_ref (Lisp_Object, int);
|
|
|
|
|
extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
|
|
|
|
|
int *, int *);
|
|
|
|
|
extern Lisp_Object char_table_set (Lisp_Object, int, Lisp_Object);
|
|
|
|
|
extern Lisp_Object char_table_set_range (Lisp_Object, int, int,
|
|
|
|
|
Lisp_Object);
|
|
|
|
|
extern int char_table_translate (Lisp_Object, int);
|
|
|
|
|
extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object),
|
|
|
|
|
Lisp_Object, Lisp_Object, Lisp_Object);
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern void map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
|
|
|
|
|
Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object, struct charset *,
|
|
|
|
|
unsigned, unsigned);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_chartab (void);
|
(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2002-03-01 01:44:13 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Defined in print.c */
|
|
|
|
|
extern Lisp_Object Vprin1_to_string_buffer;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vprint_level, Vprint_length;
|
2010-11-23 10:47:23 -08:00
|
|
|
|
extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
|
|
|
|
|
extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fprin1, 2);
|
|
|
|
|
EXFUN (Fprin1_to_string, 2);
|
|
|
|
|
EXFUN (Fprinc, 2);
|
|
|
|
|
EXFUN (Fterpri, 1);
|
|
|
|
|
EXFUN (Fprint, 2);
|
|
|
|
|
EXFUN (Ferror_message_string, 1);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vstandard_output, Qstandard_output;
|
1991-12-04 05:48:56 +00:00
|
|
|
|
extern Lisp_Object Qexternal_debugging_output;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void temp_output_buffer_setup (const char *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern int print_level, print_escape_newlines;
|
|
|
|
|
extern Lisp_Object Qprint_escape_newlines;
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void write_string (const char *, int);
|
|
|
|
|
extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
|
|
|
|
|
Lisp_Object);
|
1997-11-21 12:49:52 +00:00
|
|
|
|
extern Lisp_Object internal_with_output_to_temp_buffer
|
2010-07-02 11:26:33 +02:00
|
|
|
|
(const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
|
2011-01-09 00:21:21 -08:00
|
|
|
|
#define FLOAT_TO_STRING_BUFSIZE 350
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void float_to_string (unsigned char *, double);
|
|
|
|
|
extern void syms_of_print (void);
|
1997-11-21 12:49:52 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in doprnt.c */
|
2010-09-23 21:53:46 +02:00
|
|
|
|
extern EMACS_INT doprnt (char *, int, const char *, const char *, va_list);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in lread.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vafter_load_alist;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qvariable_documentation, Qstandard_input;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
|
1998-04-26 19:14:58 +00:00
|
|
|
|
extern Lisp_Object Vobarray, initial_obarray, Vstandard_input;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern int load_in_progress;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fread, 1);
|
|
|
|
|
EXFUN (Fread_from_string, 3);
|
|
|
|
|
EXFUN (Fintern, 2);
|
|
|
|
|
EXFUN (Fintern_soft, 2);
|
1997-08-04 03:02:19 +00:00
|
|
|
|
EXFUN (Fload, 5);
|
2006-02-27 02:06:01 +00:00
|
|
|
|
EXFUN (Fget_load_suffixes, 0);
|
2006-07-26 18:14:05 +00:00
|
|
|
|
EXFUN (Fread_char, 3);
|
|
|
|
|
EXFUN (Fread_event, 3);
|
1998-06-10 03:58:47 +00:00
|
|
|
|
EXFUN (Feval_region, 4);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object check_obarray (Lisp_Object);
|
|
|
|
|
extern Lisp_Object intern (const char *);
|
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
|
|
|
|
extern Lisp_Object intern_c_string (const char *);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern Lisp_Object make_symbol (const char *);
|
2010-09-23 22:16:55 +02:00
|
|
|
|
extern Lisp_Object oblookup (Lisp_Object, const char *, EMACS_INT, EMACS_INT);
|
1993-04-29 02:22:48 +00:00
|
|
|
|
#define LOADHIST_ATTACH(x) \
|
2010-04-29 08:42:01 -04:00
|
|
|
|
do { \
|
|
|
|
|
if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \
|
|
|
|
|
} while (0)
|
1993-04-29 02:22:48 +00:00
|
|
|
|
extern Lisp_Object Vcurrent_load_list;
|
2006-02-27 02:06:01 +00:00
|
|
|
|
extern Lisp_Object Vload_history, Vload_suffixes, Vload_file_rep_suffixes;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int openp (Lisp_Object, Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object *, Lisp_Object);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern int isfloat_string (const char *, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object),
|
|
|
|
|
Lisp_Object);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void dir_warning (const char *, Lisp_Object);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void close_load_descs (void);
|
|
|
|
|
extern void init_obarray (void);
|
|
|
|
|
extern void init_lread (void);
|
|
|
|
|
extern void syms_of_lread (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in eval.c */
|
|
|
|
|
extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
|
1991-08-11 04:35:38 +00:00
|
|
|
|
extern Lisp_Object Vinhibit_quit, Qinhibit_quit, Vquit_flag;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vautoload_queue;
|
1994-09-22 06:37:06 +00:00
|
|
|
|
extern Lisp_Object Vdebug_on_error;
|
2000-07-05 17:23:15 +00:00
|
|
|
|
extern Lisp_Object Vsignaling_function;
|
2000-07-05 19:57:41 +00:00
|
|
|
|
extern int handling_signal;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern int debug_on_next_call;
|
2000-07-05 17:23:15 +00:00
|
|
|
|
|
1995-07-31 12:02:51 +00:00
|
|
|
|
/* To run a normal hook, use the appropriate function from the list below.
|
|
|
|
|
The calling convention:
|
|
|
|
|
|
1994-03-05 23:26:52 +00:00
|
|
|
|
if (!NILP (Vrun_hooks))
|
1995-07-31 12:02:51 +00:00
|
|
|
|
call1 (Vrun_hooks, Qmy_funny_hook);
|
|
|
|
|
|
|
|
|
|
should no longer be used. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vrun_hooks;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Frun_hooks, MANY);
|
|
|
|
|
EXFUN (Frun_hook_with_args, MANY);
|
|
|
|
|
EXFUN (Frun_hook_with_args_until_failure, MANY);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fprogn, UNEVALLED);
|
|
|
|
|
EXFUN (Finteractive_p, 0);
|
2000-09-21 21:50:10 +00:00
|
|
|
|
EXFUN (Fthrow, 2) NO_RETURN;
|
2000-10-02 11:11:12 +00:00
|
|
|
|
EXFUN (Fsignal, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void xsignal (Lisp_Object, Lisp_Object) NO_RETURN;
|
|
|
|
|
extern void xsignal0 (Lisp_Object) NO_RETURN;
|
|
|
|
|
extern void xsignal1 (Lisp_Object, Lisp_Object) NO_RETURN;
|
|
|
|
|
extern void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN;
|
|
|
|
|
extern void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN;
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void signal_error (const char *, Lisp_Object) NO_RETURN;
|
2002-04-28 22:06:17 +00:00
|
|
|
|
EXFUN (Fcommandp, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Feval, 1);
|
|
|
|
|
EXFUN (Fapply, MANY);
|
|
|
|
|
EXFUN (Ffuncall, MANY);
|
|
|
|
|
EXFUN (Fbacktrace, 0);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object apply1 (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call0 (Lisp_Object);
|
|
|
|
|
extern Lisp_Object call1 (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call2 (Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object call7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fdo_auto_save, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), Lisp_Object);
|
|
|
|
|
extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object));
|
|
|
|
|
extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
|
|
|
|
|
extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
|
|
|
|
|
extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (int, Lisp_Object *), int, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object));
|
|
|
|
|
extern void specbind (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
|
|
|
|
|
extern Lisp_Object unbind_to (int, Lisp_Object);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void error (const char *, ...) NO_RETURN;
|
2010-07-12 21:47:45 -07:00
|
|
|
|
extern void verror (const char *, va_list) NO_RETURN;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void do_autoload (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object un_autoload (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffetch_bytecode, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_eval_once (void);
|
|
|
|
|
extern Lisp_Object safe_call (int, Lisp_Object *);
|
|
|
|
|
extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
|
2008-03-29 01:46:10 +00:00
|
|
|
|
extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_eval (void);
|
|
|
|
|
extern void syms_of_eval (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in editfns.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object last_nonmenu_event;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qfield;
|
|
|
|
|
extern Lisp_Object Vinhibit_field_text_motion;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vsystem_name;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Vuser_login_name;
|
1999-08-21 19:30:11 +00:00
|
|
|
|
EXFUN (Fcurrent_message, 0);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fgoto_char, 1);
|
|
|
|
|
EXFUN (Fpoint_max_marker, 0);
|
|
|
|
|
EXFUN (Fpoint, 0);
|
|
|
|
|
EXFUN (Fpoint_marker, 0);
|
|
|
|
|
EXFUN (Fline_beginning_position, 1);
|
|
|
|
|
EXFUN (Fline_end_position, 1);
|
|
|
|
|
EXFUN (Ffollowing_char, 0);
|
|
|
|
|
EXFUN (Fprevious_char, 0);
|
|
|
|
|
EXFUN (Fchar_after, 1);
|
|
|
|
|
EXFUN (Finsert, MANY);
|
|
|
|
|
EXFUN (Finsert_char, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void insert1 (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Feolp, 0);
|
|
|
|
|
EXFUN (Feobp, 0);
|
|
|
|
|
EXFUN (Fbolp, 0);
|
|
|
|
|
EXFUN (Fbobp, 0);
|
|
|
|
|
EXFUN (Fformat, MANY);
|
1999-07-21 21:43:52 +00:00
|
|
|
|
EXFUN (Fmessage, MANY);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fbuffer_substring, 2);
|
|
|
|
|
EXFUN (Fbuffer_string, 0);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object save_excursion_save (void);
|
|
|
|
|
extern Lisp_Object save_restriction_save (void);
|
|
|
|
|
extern Lisp_Object save_excursion_restore (Lisp_Object);
|
|
|
|
|
extern Lisp_Object save_restriction_restore (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fchar_to_string, 1);
|
|
|
|
|
EXFUN (Fdelete_region, 2);
|
|
|
|
|
EXFUN (Fnarrow_to_region, 2);
|
|
|
|
|
EXFUN (Fwiden, 0);
|
|
|
|
|
EXFUN (Fuser_login_name, 1);
|
|
|
|
|
EXFUN (Fsystem_name, 0);
|
1999-08-30 16:06:22 +00:00
|
|
|
|
EXFUN (Fcurrent_time, 0);
|
2010-09-23 15:18:30 -04:00
|
|
|
|
extern EMACS_INT clip_to_bounds (EMACS_INT, EMACS_INT, EMACS_INT);
|
Fix some uses of int instead of EMACS_INT.
minibuf.c (Fminibuffer_contents)
(Fminibuffer_contents_no_properties)
(Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
positions.
keyboard.c (command_loop_1): Use EMACS_INT to compare point with
mark.
alloc.c (make_uninit_string, make_uninit_multibyte_string)
(allocate_string_data): Accept EMACS_INT for string length.
editfns.c (Ffield_string, Ffield_string_no_properties)
(make_buffer_string, make_buffer_string_both, Fbuffer_substring)
(Fbuffer_substring_no_properties, find_field, Fdelete_field)
(Ffield_string, Ffield_string_no_properties, Ffield_beginning)
(Ffield_end): Use EMACS_INT for buffer positions.
insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
point with mark.
lisp.h (allocate_string_data, make_uninit_string)
(make_uninit_multibyte_string, make_buffer_string)
(make_buffer_string_both): Adjust prototypes.
2010-09-22 12:03:34 -04:00
|
|
|
|
extern Lisp_Object make_buffer_string (EMACS_INT, EMACS_INT, int);
|
|
|
|
|
extern Lisp_Object make_buffer_string_both (EMACS_INT, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, int);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_editfns (void);
|
|
|
|
|
extern void syms_of_editfns (void);
|
2000-07-24 23:47:09 +00:00
|
|
|
|
EXFUN (Fconstrain_to_field, 5);
|
2001-11-15 08:07:50 +00:00
|
|
|
|
EXFUN (Ffield_end, 3);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void set_time_zone_rule (const char *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in buffer.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int mouse_face_overlay_overlaps (Lisp_Object);
|
|
|
|
|
extern void nsberror (Lisp_Object) NO_RETURN;
|
1999-08-21 19:30:11 +00:00
|
|
|
|
EXFUN (Fset_buffer_multibyte, 1);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Foverlay_start, 1);
|
|
|
|
|
EXFUN (Foverlay_end, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void adjust_overlays_for_insert (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void adjust_overlays_for_delete (EMACS_INT, EMACS_INT);
|
Fix int/EMACS_INT use in buffer.c.
buffer.c (struct sortvec): Use EMACS_INT for buffer positions.
(struct sortstrlist, overlay_str_len): Use EMACS_INT for string
length.
(advance_to_char_boundary, Fset_buffer_multibyte)
(overlays_at, overlays_in, mouse_face_overlay_overlaps)
(overlay_touches_p, record_overlay_string, overlay_strings)
(recenter_overlay_lists, fix_start_end_in_overlays)
(modify_overlay, Fmove_overlay, report_overlay_modification)
(evaporate_overlays): Use EMACS_INT for buffer positions.
lisp.h (fix_start_end_in_overlays, overlay_touches_p): Adjust
prototypes.
2010-09-24 08:45:09 -04:00
|
|
|
|
extern void fix_start_end_in_overlays (EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void report_overlay_modification (Lisp_Object, Lisp_Object, int,
|
|
|
|
|
Lisp_Object, Lisp_Object, Lisp_Object);
|
Fix int/EMACS_INT use in buffer.c.
buffer.c (struct sortvec): Use EMACS_INT for buffer positions.
(struct sortstrlist, overlay_str_len): Use EMACS_INT for string
length.
(advance_to_char_boundary, Fset_buffer_multibyte)
(overlays_at, overlays_in, mouse_face_overlay_overlaps)
(overlay_touches_p, record_overlay_string, overlay_strings)
(recenter_overlay_lists, fix_start_end_in_overlays)
(modify_overlay, Fmove_overlay, report_overlay_modification)
(evaporate_overlays): Use EMACS_INT for buffer positions.
lisp.h (fix_start_end_in_overlays, overlay_touches_p): Adjust
prototypes.
2010-09-24 08:45:09 -04:00
|
|
|
|
extern int overlay_touches_p (EMACS_INT);
|
1993-06-07 05:32:28 +00:00
|
|
|
|
extern Lisp_Object Vbuffer_alist, Vinhibit_read_only;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fget_buffer, 1);
|
|
|
|
|
EXFUN (Fget_buffer_create, 1);
|
2003-05-28 11:35:32 +00:00
|
|
|
|
EXFUN (Fgenerate_new_buffer_name, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fset_buffer, 1);
|
Remove unused declarations
* src/buffer.c: Remove unused declarations.
* src/buffer.h: Likewise.
* src/charset.h: Likewise.
* src/composite.h: Likewise.
* src/dispextern.h: Likewise.
* src/dispnew.c: Likewise.
* src/font.h: Likewise.
* src/fontset.c: Likewise.
* src/fontset.h: Likewise.
* src/intervals.h: Likewise.
* src/keymap.h: Likewise.
* src/lisp.h: Likewise.
* src/syntax.c: Likewise.
* src/syntax.h: Likewise.
* src/termhooks.h: Likewise.
* src/window.h: Likewise.
* src/xsettings.h: Likewise.
* src/xterm.c: Likewise.
* src/xterm.h: Likewise.
* src/chartab.c (sub_char_table_ref): Make static.
* src/dispnew.c (line_hash_code, required_matrix_height)
(required_matrix_width): Likewise.
* src/eval.c (interactive_p, apply_lambda): Likewise.
* src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
Likewise.
* src/font.c (QCadstyle, QCregistry, font_make_spec)
(font_parse_fcname, font_encode_char, font_at): Likewise.
* src/frame.c (x_frame_get_arg): Likewise.
* src/keymap.c (get_keyelt): Likewise.
* src/lread.c (read_filtered_event): Likewise.
* src/print.c (write_string_1): Likewise.
* src/window.c (delete_window, window_height, window_width)
(foreach_window): Likewise.
* src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
* src/xterm.c (x_scroll_bar_clear, xembed_set_info)
(xembed_send_message): Likewise.
* src/eval.c (run_hook_list_with_args): Delete.
* src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
* src/terminal.c (get_terminal_param): Likewise.
* src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
2010-12-27 18:29:38 +01:00
|
|
|
|
extern Lisp_Object set_buffer_if_live (Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fbarf_if_buffer_read_only, 0);
|
|
|
|
|
EXFUN (Fcurrent_buffer, 0);
|
|
|
|
|
EXFUN (Fswitch_to_buffer, 2);
|
1998-05-22 20:06:49 +00:00
|
|
|
|
EXFUN (Fother_buffer, 3);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Foverlay_get, 2);
|
|
|
|
|
EXFUN (Fbuffer_modified_p, 1);
|
|
|
|
|
EXFUN (Fset_buffer_modified_p, 1);
|
|
|
|
|
EXFUN (Fkill_buffer, 1);
|
|
|
|
|
EXFUN (Fkill_all_local_variables, 0);
|
|
|
|
|
EXFUN (Fbuffer_enable_undo, 1);
|
|
|
|
|
EXFUN (Ferase_buffer, 0);
|
1993-05-14 14:41:36 +00:00
|
|
|
|
extern Lisp_Object Qoverlayp;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object get_truename_buffer (Lisp_Object);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern struct buffer *all_buffers;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fprevious_overlay_change, 1);
|
2000-12-04 00:29:36 +00:00
|
|
|
|
EXFUN (Fbuffer_file_name, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_buffer_once (void);
|
|
|
|
|
extern void init_buffer (void);
|
|
|
|
|
extern void syms_of_buffer (void);
|
|
|
|
|
extern void keys_of_buffer (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in marker.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fmarker_position, 1);
|
|
|
|
|
EXFUN (Fmarker_buffer, 1);
|
|
|
|
|
EXFUN (Fcopy_marker, 2);
|
|
|
|
|
EXFUN (Fset_marker, 3);
|
2010-09-23 21:12:18 +02:00
|
|
|
|
extern EMACS_INT marker_position (Lisp_Object);
|
|
|
|
|
extern EMACS_INT marker_byte_position (Lisp_Object);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void clear_charpos_cache (struct buffer *);
|
2010-09-23 21:12:18 +02:00
|
|
|
|
extern EMACS_INT charpos_to_bytepos (EMACS_INT);
|
|
|
|
|
extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT);
|
|
|
|
|
extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void unchain_marker (struct Lisp_Marker *marker);
|
|
|
|
|
extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
|
2010-09-23 21:12:18 +02:00
|
|
|
|
extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,
|
2010-09-23 21:12:18 +02:00
|
|
|
|
EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_marker (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in fileio.c */
|
|
|
|
|
|
|
|
|
|
extern Lisp_Object Qfile_error;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qfile_exists_p;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qfile_directory_p;
|
|
|
|
|
extern Lisp_Object Qinsert_file_contents;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vauto_save_list_file_name;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffind_file_name_handler, 2);
|
|
|
|
|
EXFUN (Ffile_name_as_directory, 1);
|
|
|
|
|
EXFUN (Fexpand_file_name, 2);
|
|
|
|
|
EXFUN (Ffile_name_nondirectory, 1);
|
|
|
|
|
EXFUN (Fsubstitute_in_file_name, 1);
|
|
|
|
|
EXFUN (Ffile_symlink_p, 1);
|
|
|
|
|
EXFUN (Fverify_visited_file_modtime, 1);
|
|
|
|
|
EXFUN (Ffile_exists_p, 1);
|
|
|
|
|
EXFUN (Ffile_name_absolute_p, 1);
|
|
|
|
|
EXFUN (Fdirectory_file_name, 1);
|
|
|
|
|
EXFUN (Ffile_name_directory, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffile_accessible_directory_p, 1);
|
|
|
|
|
EXFUN (Funhandled_file_name_directory, 1);
|
|
|
|
|
EXFUN (Ffile_directory_p, 1);
|
1998-03-03 01:31:11 +00:00
|
|
|
|
EXFUN (Fwrite_region, 7);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Ffile_readable_p, 1);
|
|
|
|
|
EXFUN (Ffile_executable_p, 1);
|
2002-05-27 22:05:51 +00:00
|
|
|
|
EXFUN (Fread_file_name, 6);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object close_file_unwind (Lisp_Object);
|
|
|
|
|
extern Lisp_Object restore_point_unwind (Lisp_Object);
|
|
|
|
|
extern void report_file_error (const char *, Lisp_Object) NO_RETURN;
|
|
|
|
|
extern int internal_delete_file (Lisp_Object);
|
|
|
|
|
extern void syms_of_fileio (void);
|
|
|
|
|
extern Lisp_Object make_temp_name (Lisp_Object, int);
|
2004-05-10 11:54:54 +00:00
|
|
|
|
EXFUN (Fmake_symbolic_link, 3);
|
2008-08-02 17:03:34 +00:00
|
|
|
|
extern Lisp_Object Qdelete_file;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in abbrev.c */
|
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_abbrev (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in search.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void shrink_regexp_cache (void);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fstring_match, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void restore_search_regs (void);
|
2005-06-08 22:32:33 +00:00
|
|
|
|
EXFUN (Fmatch_data, 3);
|
|
|
|
|
EXFUN (Fset_match_data, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fmatch_beginning, 1);
|
|
|
|
|
EXFUN (Fmatch_end, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void record_unwind_save_match_data (void);
|
|
|
|
|
extern int fast_string_match (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern int fast_c_string_match_ignore_case (Lisp_Object, const char *);
|
|
|
|
|
extern int fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, EMACS_INT, Lisp_Object);
|
Fix use of int instead of EMACS_INT in search.c and region-cache.c.
indent.c (compute_motion): Use EMACS_INT for arguments to
region_cache_forward.
region-cache.c (struct boundary, struct region_cache): Use
EMACS_INT for positions.
(find_cache_boundary, move_cache_gap, insert_cache_boundary)
(delete_cache_boundaries, set_cache_region)
(invalidate_region_cache, know_region_cache)
(region_cache_forward, region_cache_backward, pp_cache): Use
EMACS_INT for buffer positions.
region-cache.h (know_region_cache, invalidate_region_cache)
(region_cache_forward, region_cache_backward): Adjust prototypes.
search.c (string_match_1, fast_c_string_match_ignore_case)
(looking_at_1, scan_buffer, scan_newline)
(find_next_newline_no_quit, find_before_next_newline)
(search_command, trivial_regexp_p, search_buffer, simple_search)
(boyer_moore, wordify, Freplace_match): Use EMACS_INT for buffer
and string positions and length.
lisp.h (scan_buffer, scan_newline, find_next_newline_no_quit)
(find_before_next_newline): Adjust prototypes.
2010-09-23 14:35:11 -04:00
|
|
|
|
extern EMACS_INT scan_buffer (int, EMACS_INT, EMACS_INT, EMACS_INT,
|
|
|
|
|
int *, int);
|
|
|
|
|
extern EMACS_INT scan_newline (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
|
|
|
|
|
EMACS_INT, int);
|
|
|
|
|
extern EMACS_INT find_next_newline (EMACS_INT, int);
|
|
|
|
|
extern EMACS_INT find_next_newline_no_quit (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern EMACS_INT find_before_next_newline (EMACS_INT, EMACS_INT, EMACS_INT);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_search (void);
|
|
|
|
|
extern void clear_regexp_cache (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in minibuf.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qcompletion_ignore_case;
|
|
|
|
|
extern Lisp_Object Vcompletion_regexp_list;
|
|
|
|
|
extern Lisp_Object Vhistory_length;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vminibuffer_list;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object last_minibuf_string;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern int completion_ignore_case;
|
|
|
|
|
extern int history_delete_duplicates;
|
|
|
|
|
extern int minibuffer_auto_raise;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void choose_minibuf_frame (void);
|
1997-08-26 11:42:33 +00:00
|
|
|
|
EXFUN (Fcompleting_read, 8);
|
2006-05-25 21:12:52 +00:00
|
|
|
|
EXFUN (Fread_from_minibuffer, 7);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fread_variable, 2);
|
|
|
|
|
EXFUN (Fread_buffer, 3);
|
|
|
|
|
EXFUN (Fread_minibuffer, 2);
|
|
|
|
|
EXFUN (Feval_minibuffer, 2);
|
1997-08-26 11:42:33 +00:00
|
|
|
|
EXFUN (Fread_string, 5);
|
2008-05-14 01:39:27 +00:00
|
|
|
|
EXFUN (Fassoc_string, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object get_minibuffer (int);
|
|
|
|
|
extern void init_minibuf_once (void);
|
|
|
|
|
extern void syms_of_minibuf (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in callint.c */
|
|
|
|
|
|
1995-06-07 21:39:33 +00:00
|
|
|
|
extern Lisp_Object Qminus, Qplus, Vcurrent_prefix_arg;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qwhen;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vcommand_history;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object Vmark_even_if_inactive;
|
1996-07-16 00:04:15 +00:00
|
|
|
|
extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fprefix_numeric_value, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_callint (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in casefiddle.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qidentity;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fdowncase, 1);
|
|
|
|
|
EXFUN (Fupcase, 1);
|
|
|
|
|
EXFUN (Fupcase_region, 2);
|
|
|
|
|
EXFUN (Fupcase_initials, 1);
|
|
|
|
|
EXFUN (Fupcase_initials_region, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_casefiddle (void);
|
|
|
|
|
extern void keys_of_casefiddle (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in casetab.c */
|
1996-09-04 18:54:36 +00:00
|
|
|
|
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fset_case_table, 1);
|
|
|
|
|
EXFUN (Fset_standard_case_table, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_casetab_once (void);
|
|
|
|
|
extern void syms_of_casetab (void);
|
1996-09-04 18:54:36 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in keyboard.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2001-04-04 14:04:01 +00:00
|
|
|
|
extern int echoing;
|
|
|
|
|
extern Lisp_Object echo_message_buffer;
|
2001-09-26 12:00:56 +00:00
|
|
|
|
extern struct kboard *echo_kboard;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void cancel_echoing (void);
|
2000-06-26 15:03:42 +00:00
|
|
|
|
extern Lisp_Object Qdisabled, QCfilter;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qabove_handle, Qhandle, Qbelow_handle;
|
|
|
|
|
extern Lisp_Object Qup, Qdown, Qbottom, Qend_scroll;
|
|
|
|
|
extern Lisp_Object Qtop, Qratio;
|
2010-11-18 08:57:00 -08:00
|
|
|
|
extern Lisp_Object Vsaved_region_selection;
|
|
|
|
|
extern Lisp_Object Vselect_active_regions;
|
1997-05-19 02:36:18 +00:00
|
|
|
|
extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level;
|
2004-12-13 18:56:52 +00:00
|
|
|
|
extern Lisp_Object Vthrow_on_input;
|
2000-08-09 18:44:35 +00:00
|
|
|
|
extern int input_pending;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fdiscard_input, 0);
|
|
|
|
|
EXFUN (Frecursive_edit, 0);
|
2010-07-25 23:37:26 -07:00
|
|
|
|
EXFUN (Ftop_level, 0) NO_RETURN;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fcommand_execute, 4);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object menu_bar_items (Lisp_Object);
|
|
|
|
|
extern Lisp_Object tool_bar_items (Lisp_Object, int *);
|
Use the term `scroll bar', instead of `scrollbar'.
* alloc.c, frame.c, frame.h, indent.c, keyboard.c, keyboard.h,
lisp.h, term.c, termhooks.h, window.c, window.h, xdisp.c, xfns.c,
xterm.c, xterm.h: Terminology changed.
* xterm.c (x_window_to_scrollbar, x_scrollbar_expose,
x_scrollbar_handle_click, x_scrollbar_note_movement): Remember
that these can be called during GC; we have to ignore mark bits.
* lisp.h (GC_NILP, GC_EQ): New macros to help with that.
* lisp.h (RETURN_UNGCPRO): Remove "do ... while (0)" wrapper
around macro.
1993-03-02 08:16:00 +00:00
|
|
|
|
extern Lisp_Object Qvertical_scroll_bar;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void discard_mouse_events (void);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fevent_convert_list, 1);
|
1998-08-07 04:36:17 +00:00
|
|
|
|
EXFUN (Fread_key_sequence, 5);
|
2005-12-23 03:00:55 +00:00
|
|
|
|
EXFUN (Fset_input_interrupt_mode, 1);
|
1997-11-21 12:49:52 +00:00
|
|
|
|
EXFUN (Fset_input_mode, 4);
|
2008-03-29 01:46:10 +00:00
|
|
|
|
extern Lisp_Object pending_funcalls;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int detect_input_pending (void);
|
|
|
|
|
extern int detect_input_pending_ignore_squeezables (void);
|
|
|
|
|
extern int detect_input_pending_run_timers (int);
|
|
|
|
|
extern void safe_run_hooks (Lisp_Object);
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern void cmd_error_internal (Lisp_Object, const char *);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object command_loop_1 (void);
|
|
|
|
|
extern Lisp_Object recursive_edit_1 (void);
|
|
|
|
|
extern void record_auto_save (void);
|
|
|
|
|
extern void init_keyboard (void);
|
|
|
|
|
extern void syms_of_keyboard (void);
|
|
|
|
|
extern void keys_of_keyboard (void);
|
|
|
|
|
extern char *push_key_description (unsigned int, char *, int);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in indent.c */
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fvertical_motion, 2);
|
|
|
|
|
EXFUN (Findent_to, 2);
|
|
|
|
|
EXFUN (Fmove_to_column, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern double current_column (void);
|
|
|
|
|
extern void invalidate_current_column (void);
|
2010-09-24 15:30:13 -04:00
|
|
|
|
extern int indented_beyond_p (EMACS_INT, EMACS_INT, double);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_indent (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in frame.c */
|
2004-05-14 03:07:12 +00:00
|
|
|
|
#ifdef HAVE_WINDOW_SYSTEM
|
|
|
|
|
extern Lisp_Object Vx_resource_name;
|
|
|
|
|
extern Lisp_Object Vx_resource_class;
|
|
|
|
|
#endif /* HAVE_WINDOW_SYSTEM */
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qonly;
|
1994-03-08 05:37:15 +00:00
|
|
|
|
extern Lisp_Object Qvisible;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
|
|
|
|
|
extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
|
|
|
|
|
extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
|
|
|
|
|
extern Lisp_Object frame_buffer_predicate (Lisp_Object);
|
2008-11-02 10:39:39 +00:00
|
|
|
|
EXFUN (Fselect_frame, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fselected_frame, 0);
|
|
|
|
|
EXFUN (Fwindow_frame, 1);
|
|
|
|
|
EXFUN (Fframe_root_window, 1);
|
|
|
|
|
EXFUN (Fframe_first_window, 1);
|
|
|
|
|
EXFUN (Fmake_frame_visible, 1);
|
|
|
|
|
EXFUN (Ficonify_frame, 1);
|
2001-02-28 17:43:49 +00:00
|
|
|
|
EXFUN (Fframe_parameter, 2);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fmodify_frame_parameters, 2);
|
|
|
|
|
EXFUN (Fraise_frame, 1);
|
|
|
|
|
EXFUN (Fredirect_frame_focus, 2);
|
2008-11-02 10:39:39 +00:00
|
|
|
|
EXFUN (Fset_frame_selected_window, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object frame_buffer_list (Lisp_Object);
|
|
|
|
|
extern void frames_discard_buffer (Lisp_Object);
|
|
|
|
|
extern void set_frame_buffer_list (Lisp_Object, Lisp_Object);
|
|
|
|
|
extern void syms_of_frame (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in emacs.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern char **initial_argv;
|
|
|
|
|
extern int initial_argc;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
|
|
|
|
|
extern int display_arg;
|
|
|
|
|
#endif
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern Lisp_Object decode_env_path (const char *, const char *);
|
1993-08-10 04:36:30 +00:00
|
|
|
|
extern Lisp_Object Vinvocation_name, Vinvocation_directory;
|
2008-10-06 16:17:24 +00:00
|
|
|
|
extern Lisp_Object Vbefore_init_time, Vafter_init_time;
|
2007-06-08 19:56:24 +00:00
|
|
|
|
extern Lisp_Object Vinstallation_directory;
|
|
|
|
|
extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qfile_name_handler_alist;
|
2010-10-13 16:50:06 +02:00
|
|
|
|
extern Lisp_Object Vdynamic_library_alist;
|
2010-08-06 11:56:41 -07:00
|
|
|
|
extern void (*fatal_error_signal_hook) (void);
|
2010-07-26 19:45:53 -07:00
|
|
|
|
EXFUN (Fkill_emacs, 1) NO_RETURN;
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#if HAVE_SETLOCALE
|
2010-07-02 11:26:33 +02:00
|
|
|
|
void fixup_locale (void);
|
|
|
|
|
void synchronize_system_messages_locale (void);
|
|
|
|
|
void synchronize_system_time_locale (void);
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#else
|
|
|
|
|
#define setlocale(category, locale)
|
|
|
|
|
#define fixup_locale()
|
* callproc.c (strerror): Remove decl.
* fileio.c (strerror): Likewise.
* process.c (strerror): Likewise.
* emacs.c (strerror): Likewise.
(Vsystem_messages_locale): Renamed from Vmessages_locale.
All uses changed.
(Vprevious_system_messages_locale): Likewise, from
Vprevious_messages_locale.
(Vsystem_time_locale): Likewise, from Vtime_locale.
(Vprevious_system_time_locale): Likewise, from Vprevious_time_locale.
(ABORT_RETURN_TYPE): New macro.
(abort): Return type is now ABORT_RETURN_TYPE.
(main): Always invoke init_signals, even if POSIX_SIGNALS is not
defined.
(syms_of_emacs): messages-locale -> system-messages-locale,
previous-messages-locale -> previous-system-messages-locale,
time-locale -> system-time-locale,
previous-time-locale -> previous-system-time-locale.
* gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined.
(const): Do not define; that's config.h's job.
(<limits.h>): Include if HAVE_LIMITS_H is defined.
(CHAR_BIT): Move test for definedness outside of limits.h condition.
(<stddef.h>): Include if STDC_HEADERS is defined.
(FREE_RETURN_TYPE): New macro.
(free): Return type is now FREE_RETURN_TYPE.
* lisp.h (synchronize_system_time_locale): Renamed from
synchronize_time_locale. All uses changed.
(synchronize_system_messages_locale): Likewise, from
synchronize_messages_locale.
* process.c (sys_siglist): Remove.
* syntax.c (scan_sexps_forward): Use abort, not assert.
* sysdep.c (my_sys_siglist): New var.
(sys_siglist): New macro. Remove old initialized vars of same name.
(init_signals): Initialize sys_siglist.
* xfns.c (abort): Remove decl; stdlib.h now does this.
1999-11-22 08:19:51 +00:00
|
|
|
|
#define synchronize_system_messages_locale()
|
|
|
|
|
#define synchronize_system_time_locale()
|
Add support for large files, 64-bit Solaris, system locale codings.
* Makefile.in (emacs): Set the LC_ALL environment variable to "C"
when dumping, so that the dumped Emacs doesn't have stray locale info.
(dired.o): Depend on systime.h.
(editfns.o): Depend on coding.h.
* alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Include <config.h> before any system include files.
* alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
xmenu.c, xterm.c:
Do not include <stdlib.h>, as <config.h> does this now.
* callproc.c (Fcall_process):
Synchronize messages locale before invoking strerror.
Decode resulting string with locale-coding-system.
* coding.c (Vlocale_coding_system): New var.
(syms_of_coding): Adjust to above change.
(emacs_strerror): New function.
* coding.h (emacs_strerror, Vlocale_coding_system): New decls.
* config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
HAVE_STRSIGNAL): New macros.
(BITS_PER_LONG): Default to 64 if _LP64 is defined.
<stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
* dired.c: Include "systime.h".
(Ffile_attributes): Do not cast s.st_size to int; this loses
information if int is 32 bits but st_size and EMACS_INT are larger.
Treat large device numbers like large inode numbers.
* dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
* editfns.c: Include coding.h.
(emacs_strftime): Remove decl.
(emacs_strftimeu): New decl.
(emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
Use emacs_strftimeu instead of emacs_strftime.
(Fformat_time_string): Convert format string using
Vlocale_coding_system, and convert result back. Synchronize time
locale before invoking lower level function. Invoke
emacs_memftimeu, passing ut, instead of emacs_memftime.
* emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
(Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
Vprevious_time_locale): New variables.
(main): Invoke setlocale early, so that initial error messages are
localized properly. But skip locale-setting if LC_ALL is "C".
Fix up locale when it's safe to do so.
(fixup_locale): Moved here from xterm.c.
(synchronize_locale, synchronize_time_locale,
synchronize_messages_locale): New functions.
(syms_of_emacs): Accommodate above changes.
* fileio.c (report_file_error): Convert strerror output according
to Vlocale_coding_system.
(Finsert_file_contents): Check for arithmetic overflow in
computations that depend on file size. Report IO errors
with emacs_strerror, not strerror.
* fns.c (Fgethash): Declare dflt parameter.
* gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
is defined; that's config.h's job.
* lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
default these values to long, BITS_PER_LONG, and unsigned long.
(VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
(PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
(code_convert_string_norecord, fixup_locale,
synchronize_messages_locale, synchronize_time_locale,
emacs_open, emacs_close, emacs_read, emacs_write): New decls.
All Emacs callers of open, close, read, write changed to use
emacs_open, emacs_close, emacs_read, emacs_write.
* lread.c (file_offset, file_tell): New macros. All uses of ftell
changed to file_tell.
(saved_doc_string_position, prev_saved_doc_string_position): Now
of type file_offset.
(init_lread): Do not fix locale here; fixup_locale now does this.
* m/amdahl.h, s/usg5-4.h:
(NSIG): Remove.
(NSIG_MINIMUM): New macro.
* m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
s/umips.h, s/usg5-4.h:
(SIGIO): Do not undef.
(BROKEN_SIGIO): New macro.
* m/ustation.h:
(SIGTSTP): Do not undef.
(BROKEN_SIGTSTP): New macro.
* s/gnu-linux.h:
(SIGPOLL, SIGURG): Do not undef.
(BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
* s/ptx4.h:
(SIGINFO): Do not undef.
(BROKEN_SIGINFO): New macros.
* m/delta.h, s/ptx.h, s/template.h: Doc fix.
* mktime.c, strftime.c: Update to glibc 2.1.2 version, with
some Emacs-related changes merged.
* print.c (float_to_string): Prepend "-" to representation of a
NaN if the NaN is negative.
* process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
(wait_reading_process_input): Use emacs_strerror, not strerror.
* process.c (status_message, sigchld_handler): Synchronize locale,
then use strsignal istead of sys_siglist.
* w32proc.c (sys_wait): Likewise.
* s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
s/usg5-2.h, s/usg5-3.h, s/xenix.h:
(open, close, read, write, INTERRUPTIBLE_OPEN,
INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
* s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
* sysdep.c (sys_read, sys_write, read, write, sys_close, close,
sys_open, open): Remove.
(emacs_open, emacs_close, emacs_read, emacs_write): Always define;
the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
macros are no longer used.
(emacs_open): Renamed from sys_open. Merge BSD4_1 version.
(emacs_close): Renamed from sys_close.
(emacs_read): Renamed from sys_read.
(emacs_write): Renamed from sys_write.
(sys_siglist): Do not declare if HAVE_STRSIGNAL.
(dup2): Do not print error on failure; the real dup2 doesn't.
(strsignal): New function, defined if !HAVE_STRSIGNAL.
* syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
is defined.
(SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
(NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
(strsignal): Declare if !HAVE_STRSIGNAL.
* unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
(ElfW): Define in terms of ElfExpandBitsW.
* w32proc.c (sys_siglist): Remove decl.
* xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
with ANSI C.
(display_string): Declare face_string_pos arg.
* xfns.c (Fx_show_tip): Declare timeout param.
* xterm.c: No need to include locale.h.
(x_alloc_lighter_color, x_setup_relief_color):
Pass arg as double, not float, for compatibility with ANSI C.
(fixup_locale): Move to emacs.c.
(x_term_init): Do not setlocale or fixup locale; the main program
does this now.
1999-10-19 07:25:11 +00:00
|
|
|
|
#endif
|
2010-07-02 11:26:33 +02:00
|
|
|
|
void shut_down_emacs (int, int, Lisp_Object);
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Nonzero means don't do interactive redisplay and don't change tty modes. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern int noninteractive;
|
2008-10-28 04:25:11 +00:00
|
|
|
|
|
2009-09-17 23:04:41 +00:00
|
|
|
|
/* Nonzero means don't load X resources or Windows Registry settings. */
|
|
|
|
|
extern int inhibit_x_resources;
|
|
|
|
|
|
2011-01-06 19:10:39 -08:00
|
|
|
|
/* Nonzero means remove site-lisp directories from load-path. */
|
|
|
|
|
extern int no_site_lisp;
|
|
|
|
|
|
2008-10-28 04:25:11 +00:00
|
|
|
|
/* Pipe used to send exit notification to the daemon parent at
|
|
|
|
|
startup. */
|
|
|
|
|
extern int daemon_pipe[2];
|
|
|
|
|
#define IS_DAEMON (daemon_pipe[1] != 0)
|
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Nonzero means don't do use window-system-specific display code. */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern int inhibit_window_system;
|
1995-01-02 21:58:40 +00:00
|
|
|
|
/* Nonzero means that a filter or a sentinel is running. */
|
1994-11-21 12:50:27 +00:00
|
|
|
|
extern int running_asynch_code;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in process.c */
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object QCtype, Qlocal;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fget_process, 1);
|
|
|
|
|
EXFUN (Fget_buffer_process, 1);
|
|
|
|
|
EXFUN (Fprocess_status, 1);
|
|
|
|
|
EXFUN (Fkill_process, 2);
|
|
|
|
|
EXFUN (Fwaiting_for_user_input_p, 0);
|
1995-02-13 06:53:07 +00:00
|
|
|
|
extern Lisp_Object Qprocessp;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void kill_buffer_processes (Lisp_Object);
|
|
|
|
|
extern int wait_reading_process_output (int, int, int, int,
|
|
|
|
|
Lisp_Object,
|
|
|
|
|
struct Lisp_Process *,
|
|
|
|
|
int);
|
|
|
|
|
extern void add_keyboard_wait_descriptor (int);
|
|
|
|
|
extern void delete_keyboard_wait_descriptor (int);
|
|
|
|
|
extern void add_gpm_wait_descriptor (int);
|
|
|
|
|
extern void delete_gpm_wait_descriptor (int);
|
|
|
|
|
extern void close_process_descs (void);
|
|
|
|
|
extern void init_process (void);
|
|
|
|
|
extern void syms_of_process (void);
|
|
|
|
|
extern void setup_process_coding_systems (Lisp_Object);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in callproc.c */
|
2001-10-12 03:22:15 +00:00
|
|
|
|
extern Lisp_Object Vexec_path, Vexec_suffixes,
|
|
|
|
|
Vexec_directory, Vdata_directory;
|
1994-02-22 23:46:42 +00:00
|
|
|
|
extern Lisp_Object Vdoc_directory;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vshell_file_name;
|
1999-08-30 16:06:22 +00:00
|
|
|
|
EXFUN (Fcall_process, MANY);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int child_setup (int, int, int, char **, int, Lisp_Object);
|
|
|
|
|
extern void init_callproc_1 (void);
|
|
|
|
|
extern void init_callproc (void);
|
|
|
|
|
extern void set_initial_environment (void);
|
|
|
|
|
extern void syms_of_callproc (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in doc.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qfunction_documentation;
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Vdoc_file_name;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fsubstitute_command_keys, 1);
|
|
|
|
|
EXFUN (Fdocumentation_property, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern Lisp_Object read_doc_string (Lisp_Object);
|
|
|
|
|
extern Lisp_Object get_doc_string (Lisp_Object, int, int);
|
|
|
|
|
extern void syms_of_doc (void);
|
|
|
|
|
extern int read_bytecode_char (int);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in bytecode.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qbytecode;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fbyte_code, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_bytecode (void);
|
1999-11-05 21:30:57 +00:00
|
|
|
|
extern struct byte_stack *byte_stack_list;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void mark_byte_stack (void);
|
|
|
|
|
extern void unmark_byte_stack (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in macros.c */
|
1991-06-26 21:34:53 +00:00
|
|
|
|
extern Lisp_Object Qexecute_kbd_macro;
|
2002-08-14 10:35:03 +00:00
|
|
|
|
EXFUN (Fexecute_kbd_macro, 3);
|
2003-02-19 13:07:17 +00:00
|
|
|
|
EXFUN (Fcancel_kbd_macro_events, 0);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_macros (void);
|
|
|
|
|
extern void syms_of_macros (void);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in undo.c */
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object Qapply;
|
1996-02-25 19:13:40 +00:00
|
|
|
|
extern Lisp_Object Qinhibit_read_only;
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fundo_boundary, 0);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void truncate_undo_list (struct buffer *);
|
2010-09-22 15:22:06 -04:00
|
|
|
|
extern void record_marker_adjustment (Lisp_Object, EMACS_INT);
|
|
|
|
|
extern void record_insert (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void record_delete (EMACS_INT, Lisp_Object);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void record_first_change (void);
|
2010-09-22 15:22:06 -04:00
|
|
|
|
extern void record_change (EMACS_INT, EMACS_INT);
|
|
|
|
|
extern void record_property_change (EMACS_INT, EMACS_INT,
|
|
|
|
|
Lisp_Object, Lisp_Object,
|
2010-07-02 11:26:33 +02:00
|
|
|
|
Lisp_Object);
|
|
|
|
|
extern void syms_of_undo (void);
|
2004-12-23 00:15:49 +00:00
|
|
|
|
extern Lisp_Object Vundo_outer_limit;
|
* lisp.h (Fdefault_boundp, make_float, Ffloat, Fnth, Fcopy_alist,
Fmake_byte_code, Fverify_visited_file_modtime, Ffile_exists_p,
Fdirectory_file_name, Ffile_name_directory,
expand_and_dir_to_file, Ffile_accessible_directory_p, Fbyte_code,
Fundo_boundary, truncate_undo_list): Add extern declarations for
these.
* lisp.h (DEFVARLISP, DEFVARBOOL, DEFVARINT, DEFVARPERBUFFER):
Removed these definitions; we should be using the versions whose
names use underscores.
1992-10-31 05:25:29 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in textprop.c */
|
2003-07-09 20:31:19 +00:00
|
|
|
|
extern Lisp_Object Qfont, Qmouse_face;
|
1993-07-13 21:07:02 +00:00
|
|
|
|
extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
|
|
|
|
|
extern Lisp_Object Qminibuffer_prompt;
|
|
|
|
|
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fnext_single_property_change, 4);
|
2000-07-19 15:47:31 +00:00
|
|
|
|
EXFUN (Fnext_single_char_property_change, 4);
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fprevious_single_property_change, 4);
|
|
|
|
|
EXFUN (Fget_text_property, 3);
|
|
|
|
|
EXFUN (Fput_text_property, 5);
|
|
|
|
|
EXFUN (Fprevious_char_property_change, 2);
|
|
|
|
|
EXFUN (Fnext_char_property_change, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void report_interval_modification (Lisp_Object, Lisp_Object);
|
1993-07-13 02:20:40 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in menu.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_menu (void);
|
2008-06-08 04:37:34 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in xmenu.c */
|
1997-07-12 06:34:16 +00:00
|
|
|
|
EXFUN (Fx_popup_menu, 2);
|
2005-05-24 03:44:09 +00:00
|
|
|
|
EXFUN (Fx_popup_dialog, 3);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xmenu (void);
|
1997-11-21 12:49:52 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in termchar.h */
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
|
struct tty_display_info;
|
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in termhooks.h */
|
Rename `struct device' to `struct terminal'. Rename some terminal-related functions similarly.
* src/termhooks.h (struct device): Rename to `terminal'. Rename member
`next_device' to `next_terminal'.
(device_list): Rename to `terminal_list'.
(FRAME_DEVICE): Rename to `FRAME_TERMINAL'.
(DEVICE_TERMINAL_CODING): Rename to `TERMINAL_TERMINAL_CODING'.
(TERMINAL_KEYBOARD_CODING): Rename to `TERMINAL_KEYBOARD_CODING'.
(DEVICE_ACTIVE_P): Rename to `TERMINAL_ACTIVE_P'.
Update declarations and macro definitions.
* src/termchar.h (tty_display_info): Rename member `device' to `terminal'.
(FRAME_TTY): Update for renames.
* src/xterm.h (x_display_info): Rename member `device' to `terminal'.
* src/frame.h (frame): Rename `device' member to `terminal'.
(FRAME_KBOARD, FRAME_LIVE_P, Qdevice, Qdisplay_live_p):
Update for renames.
* src/lisp.h (set_process_environment): Rename to `set_global_environment'.
(device): Rename to `terminal'.
* src/dispextern.h: Update declarations and macro definitions.
* src/terminal.c (device_list): Rename to `terminal_list'.
(next_device_id): Rename to `next_terminal_id'.
(initial_device): Rename to `initial_terminal'.
(get_device): Rename to `get_terminal'.
(create_device): Rename to `create_terminal'.
(mark_devices): Rename to `mark_terminals'.
(delete_device): Rename to `delete_terminal'.
(Fdelete_display): Rename to `Fdelete_terminal'.
(Fframe_terminal): Move here from frame.c.
(Fdisplay_live_p): Rename to `Fterminal_live_p'.
(Fdisplay_list): Rename to `Fterminal_list'.
(Fdisplay_name): Rename to `Fterminal_name'.
(init_initial_device): Rename to `init_initial_terminal'.
(delete_initial_device): Rename to `delete_initial_terminal'.
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(syms_of_terminal): Update for renames.
* src/term.c (get_tty_device): Rename to `get_tty_terminal'. Update.
(Fdisplay_tty_type): Rename to `Ftty_type'.
(Fdisplay_controlling_tty_p): Rename to `Fcontrolling_tty_p'.
(delete_tty, tty_set_terminal_modes, tty_reset_terminal_modes)
(Ftty_display_color_p, Ftty_display_color_cells, get_named_tty)
(Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
(init_tty, maybe_fatal, delete_tty, syms_of_term): Update for rename.
* src/frame.c (Qdevice): Rename to `Qterminal'.
(Qdisplay_live_p): Rename to `Qterminal_live_p'.
(terminal_frame_count): Rename to `tty_frame_count'.
(Fframe_display): Move to terminal.c, rename to `Fframe_terminal'.
(make_frame_without_minibuffer, make_initial_frame)
(make_terminal_frame, Fmodify_frame_parameters)
(do_switch_frame, Fdelete_frame, Fmouse_position)
(Fmouse_pixel_position, Fraise_frame, Flower_frame)
(Fredirect_frame_focus, set_term_frame_name, syms_of_frame):
Update for renames.
* src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window, check_x_display_info)
(x_set_scroll_bar_foreground, x_set_scroll_bar_background)
(Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_planes, Fx_display_color_cells)
(Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
(Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
Update for renames.
* xterm.c (handle_one_xevent): Initialize `f' to NULL.
(x_delete_device): Rename to `x_delete_terminal'.
(x_create_device): Rename to `x_create_terminal'.
(XTset_terminal_modes, XTreset_terminal_modes)
(XTread_socket, x_connection_closed, x_term_init)
(x_term_init, x_delete_display): Update for renames.
* src/dispnew.c (Fredraw_frame, Fsend_string_to_terminal)
(Fsend_string_to_terminal, init_display): Update for renames.
* src/keyboard.c (push_frame_kboard, pop_kboard, pop_kboard)
(kbd_buffer_get_event, read_avail_input, tty_read_avail_input)
(interrupt_signal, Fset_output_flow_control)
(Fset_input_meta_mode, Fset_quit_char, delete_kboard)
(syms_of_keyboard): Update for renames.
* src/alloc.c (mark_devices): Update declaration.
(Fgarbage_collect): Update for renames.
* src/coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system4)
(Fset_keyboard_coding_system_internal)
(Fkeyboard_coding_system): Update for renames.
* src/data.c (Fterminal_local_value, Fset_terminal_local_value):
Update for renames.
* src/minibuf.c (read_minibuf): Update for renames.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
* xselect.c (x_handle_selection_clear): Update for renames.
* lisp/files.el (save-buffers-kill-display): Rename to `save-buffers-kill-terminal'.
(save-buffers-kill-terminal, ctl-x-map): Update for renames.
* frame.el (make-frame): Rename 'device frame parameter to 'terminal. Update.
(frames-on-display-list, framep-on-display, suspend-frame): Update for renames.
(selected-display): Rename to `selected-terminal'.
* server.el (server-save-buffers-kill-display): Rename to
`server-save-buffers-kill-terminal'.
(server-delete-client, server-handle-delete-frame)
(server-handle-suspend-tty, server-process-filter)
(server-switch-buffer): Update for renames.
* startup.el (normal-splash-screen, normal-splash-screen): Update for renames.
* talk.el (talk): Update for renames.
* termdev.el (terminal-id): Update for renames.
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal)
(xterm-mouse-handle-delete-frame): Update for renames.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-471
2005-12-29 18:20:26 +00:00
|
|
|
|
struct terminal;
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in sysdep.c */
|
2005-09-10 14:12:35 +00:00
|
|
|
|
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern char *get_current_dir_name (void);
|
2005-09-10 14:03:01 +00:00
|
|
|
|
#endif
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void stuff_char (char c);
|
|
|
|
|
extern void init_sigio (int);
|
|
|
|
|
extern void sys_subshell (void);
|
|
|
|
|
extern void sys_suspend (void);
|
|
|
|
|
extern void discard_tty_input (void);
|
|
|
|
|
extern void init_sys_modes (struct tty_display_info *);
|
|
|
|
|
extern void reset_sys_modes (struct tty_display_info *);
|
|
|
|
|
extern void init_all_sys_modes (void);
|
|
|
|
|
extern void reset_all_sys_modes (void);
|
|
|
|
|
extern void wait_for_termination (int);
|
|
|
|
|
extern void flush_pending_output (int);
|
|
|
|
|
extern void child_setup_tty (int);
|
|
|
|
|
extern void setup_pty (int);
|
|
|
|
|
extern int set_window_size (int, int, int);
|
|
|
|
|
extern void create_process (Lisp_Object, char **, Lisp_Object);
|
|
|
|
|
extern int emacs_open (const char *, int, int);
|
|
|
|
|
extern int emacs_close (int);
|
|
|
|
|
extern int emacs_read (int, char *, unsigned int);
|
|
|
|
|
extern int emacs_write (int, const char *, unsigned int);
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
#ifndef HAVE_MEMSET
|
2010-07-24 20:15:40 +02:00
|
|
|
|
extern void *memset (void *, int, size_t);
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAVE_MEMCPY
|
2010-07-24 20:15:40 +02:00
|
|
|
|
extern void *memcpy (void *, void *, size_t);
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAVE_MEMMOVE
|
2010-07-24 20:15:40 +02:00
|
|
|
|
extern void *memmove (void *, void *, size_t);
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAVE_MEMCMP
|
2010-07-24 20:15:40 +02:00
|
|
|
|
extern int memcmp (void *, void *, size_t);
|
Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free, xstrdup, allocate_string)
(allocate_string_data, compact_small_strings, Fmake_string)
(make_unibyte_string, make_multibyte_string)
(make_string_from_bytes, make_specified_string, make_float)
(Fcons, allocate_terminal, allocate_frame, make_pure_string)
(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
memcpy, memmove, memset, memcmp.
* atimer.c (start_atimer, set_alarm): Likewise.
* buffer.c (clone_per_buffer_values, report_overlay_modification)
(mmap_realloc, init_buffer_once): Likewise.
* callint.c (Fcall_interactively): Likewise.
* callproc.c (Fcall_process, Fcall_process_region, child_setup)
(getenv_internal_1): Likewise.
* casefiddle.c (casify_object): Likewise.
* ccl.c (ccl_driver): Likewise.
* character.c (str_as_multibyte, str_to_multibyte): Likewise.
* charset.c (load_charset_map_from_file)
(load_charset_map_from_file, load_charset_map_from_vector)
(Fdefine_charset_internal): Likewise.
* cm.c (Wcm_clear): Likewise.
* coding.c (decode_eol, decode_coding_object)
(Fset_coding_system_priority, make_subsidiaries): Likewise.
* data.c (Faset): Likewise.
* dired.c (directory_files_internal, file_name_completion_stat):
Likewise.
* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
(clear_glyph_row, copy_row_except_pointers)
(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix)
(build_frame_matrix_from_leaf_window, mirrored_line_dance)
(mirror_line_dance, scrolling_window): Likewise.
* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (Fuser_full_name, make_buffer_string_both)
(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
* emacs.c (sort_args): Likewise.
* eval.c (Fapply, Ffuncall): Likewise.
* fileio.c (Ffile_name_directory, make_temp_name)
(Fexpand_file_name, search_embedded_absfilename)
(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
(auto_save_error): Likewise.
* fns.c (Fstring_equal, Fcopy_sequence, concat)
(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
(internal_equal, Fclear_string, larger_vector, copy_hash_table)
(Fmake_hash_table): Likewise.
* fringe.c (Fdefine_fringe_bitmap): Likewise.
* ftfont.c (ftfont_text_extents): Likewise.
* getloadavg.c (getloadavg): Likewise.
* image.c (define_image_type, make_image, make_image_cache)
(x_create_x_image_and_pixmap, xbm_image_p)
(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
(tiff_image_p, tiff_read_from_memory, gif_image_p)
(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
Likewise.
* indent.c (scan_for_column, compute_motion): Likewise.
* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
(insert_1_both, insert_from_gap, replace_range_2): Likewise.
* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
(kbd_buffer_store_event_hold, apply_modifiers_uncached)
(store_user_signal_events, menu_bar_items, tool_bar_items)
(process_tool_bar_item, append_tool_bar_item)
(read_char_minibuf_menu_prompt, read_key_sequence)
(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
Likewise.
* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
Likewise.
* lisp.h (STRING_COPYIN): Likewise.
* lread.c (Fload, read1, oblookup): Likewise.
* msdos.c (Frecent_doskeys): Likewise.
* nsfns.m (Fx_create_frame): Likewise.
* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
Likewise.
* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
Likewise.
* nsmenu.m (ns_update_menubar): Likewise.
* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
* print.c (print_unwind, printchar, strout, print_string)
(print_error_message): Likewise.
* process.c (conv_lisp_to_sockaddr, set_socket_option)
(Fmake_network_process, Fnetwork_interface_list)
(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
(init_process): Likewise.
* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
Likewise.
* scroll.c (do_scrolling, do_direct_scrolling)
(scrolling_max_lines_saved): Likewise.
* search.c (search_buffer, wordify, Freplace_match): Likewise.
* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
* syntax.c (skip_chars, skip_syntaxes): Likewise.
* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
(emacs_set_tty): Likewise.
* term.c (encode_terminal_code, calculate_costs)
(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
Likewise.
* termcap.c (tgetst1, gobble_line): Likewise.
* termhooks.h (EVENT_INIT): Likewise.
* tparam.c (tparam1): Likewise.
* unexalpha.c (unexec): Likewise.
* unexec.c (write_segment): Likewise.
* unexmacosx.c (unexec_write_zero): Likewise.
* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
* w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(w32font_open_internal, compute_metrics, Fx_select_font):
Likewise.
* w32menu.c (set_frame_menubar, add_menu_item)
(w32_menu_display_help, w32_free_submenu_strings): Likewise.
* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
* w32uniscribe.c (uniscribe_list_family): Likewise.
* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
* window.c (make_window, replace_window, set_window_buffer)
(Fsplit_window): Likewise.
* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
(add_to_log, message3, x_consider_frame_title)
(append_space_for_newline, extend_face_to_end_of_line)
(decode_mode_spec_coding, init_glyph_string): Likewise.
* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
(face_attr_equal_p, make_realized_face, make_face_cache)
(free_realized_faces, lookup_named_face, smaller_face)
(face_with_height, lookup_derived_face)
(x_supports_face_attributes_p, Finternal_set_font_selection_order)
(Finternal_set_font_selection_order, realize_default_face)
(compute_char_face, face_at_buffer_position)
(face_for_overlay_string, face_at_string_position, merge_faces):
Likewise.
* xfns.c (xic_create_fontsetname, Fx_create_frame)
(Fx_window_property, x_create_tip_frame)
(Fx_backspace_delete_keys_p): Likewise.
* xfont.c (xfont_list, xfont_match, xfont_list_family)
(xfont_text_extents): Likewise.
* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
* xrdb.c (magic_file_p, x_get_resource): Likewise.
* xselect.c (x_queue_event, x_get_window_property)
(receive_incremental_selection): Likewise.
* xsmfns.c (x_session_check_input): Likewise.
* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
Likewise.
* character.h (BCOPY_SHORT): Removed.
* config.in: Regenerate.
* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
* emacs.c (main) [PROFILING]: Don't declare
dump_opcode_frequencies.
* lisp.h (safe_bcopy): Remove declaration.
(memset) [!HAVE_MEMSET]: Declare.
(memcpy) [!HAVE_MEMCPY]: Likewise.
(memmove) [!HAVE_MEMMOVE]: Likewise.
(memcmp) [!HAVE_MEMCMP]: Likewise.
* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
Don't define.
(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
(BCOPY_DOWNWARD_SAFE): Don't define.
* sysdep.c (memset) [!HAVE_MEMSET]: Define.
(memcpy) [!HAVE_MEMCPY]: Define.
(memmove) [!HAVE_MEMMOVE]: Define.
(memcmp) [!HAVE_MEMCMP]: Define.
* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
(HAVE_BZERO): Don't edit.
* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
(malloc_widget_value, free_widget_info, allocate_widget_instance)
(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
memset, memcpy, memcmp.
* lwlib-utils.c (XtApplyToWidgets): Likewise.
* xlwmenu.c (XlwMenuInitialize): Likewise.
* lwlib.h (lwlib_bcopy): Remove declaration.
* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
memcpy, memmove, memset.
* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
Remove.
* configure.in: Don't check for bcopy, bcmp, bzero. Don't include
<strings.h> and don't define bcopy, bzero, BCMP in config.h.
2010-07-08 00:18:28 +02:00
|
|
|
|
#endif
|
1997-11-21 12:49:52 +00:00
|
|
|
|
|
2010-06-03 17:34:35 +02:00
|
|
|
|
/* Defined in filelock.c */
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Vtemporary_file_directory;
|
1997-11-21 12:49:52 +00:00
|
|
|
|
EXFUN (Funlock_buffer, 0);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void unlock_all_files (void);
|
|
|
|
|
extern void lock_file (Lisp_Object);
|
|
|
|
|
extern void unlock_file (Lisp_Object);
|
|
|
|
|
extern void unlock_buffer (struct buffer *);
|
|
|
|
|
extern void syms_of_filelock (void);
|
|
|
|
|
extern void init_filelock (void);
|
1999-09-16 20:20:01 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in sound.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_sound (void);
|
|
|
|
|
extern void init_sound (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in category.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_category_once (void);
|
|
|
|
|
extern Lisp_Object char_category_set (int);
|
|
|
|
|
extern void syms_of_category (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in ccl.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_ccl (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in dired.c */
|
2004-04-16 12:51:06 +00:00
|
|
|
|
EXFUN (Ffile_attributes, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_dired (void);
|
|
|
|
|
extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object,
|
|
|
|
|
Lisp_Object, Lisp_Object,
|
|
|
|
|
int, Lisp_Object);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in term.c */
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern int *char_ins_del_vector;
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_term (void);
|
|
|
|
|
extern void fatal (const char *msgid, ...) NO_RETURN;
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
Reimplement terminal parameters in C; clean up term.c, create terminal.c.
* lisp/termdev.el (terminal-parameter-alist, terminal-parameters, terminal-parameter-p)
(terminal-parameter, set-terminal-parameter, terminal-handle-delete-frame): Remove.
* src/term.c (Vring_bell_function, device_list, initial_device)
(next_device_id, ring_bell, update_begin, update_end)
(set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line)
(write_glyphs, insert_glyphs, delete_glyphs, ins_del_lines)
(get_device, Fdisplay_name, create_device, delete_device)
(Fdelete_display, Fdisplay_live_p, Fdisplay_list)
Move to terminal.c.
(syms_of_term): Move their initialization to terminal.c.
* src/terminal.c: New file.
(device_list, next_device_id, initial_device, Vring_bell_function)
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_device, create_device, delete_device)
(Fdelete_display, Fdisplay_live_p, Fdisplay_list, Fdisplay_name): Move here.
(mark_devices, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(init_initial_device, delete_initial_device)
(syms_of_terminal): New functions.
* lisp/simple.el (normal-erase-is-backspace-setup-frame)
(normal-erase-is-backspace-mode): Rephrase things
without terminal-parameter-p.
* lisp/termdev.el (terminal-getenv, terminal-setenv)
(with-terminal-environment): Ditto.
* mac/makefile.MPW (EmacsObjects): Add terminal.c.x.
({Src}terminal.c.x): Add dependencies.
* src/Makefile.in (obj): Add terminal.o.
(terminal.o): Add dependencies.
[HAVE_CARBON]: Make terminal.o depend on macgui.h.
* src/alloc.c (mark_devices): Declare.
(Fgarbage_collect): Call `mark_devices'.
* src/dispextern.h (set_scroll_region, turn_off_insert)
(turn_off_highlight, background_highlight, clear_end_of_line_raw)
(tty_clear_end_of_line, tty_setup_colors, delete_tty): Remove.
(raw_cursor_to, clear_to_end, tty_turn_off_insert)
(tty_turn_off_highlight): Add declaration.
* src/emacs.c (main): Call `syms_of_terminal'.
* src/frame.c (get_future_frame_param): New function.
(Fmake_terminal_frame): Use it.
* src/keyboard.c (pop_kboard): Remove unused variable.
(Fset_output_flow_control): Return nil.
* src/keymap.h (Fset_keymap_parent): Add EXFUN.
* src/lisp.h (syms_of_terminal): Declare it.
* src/sysdep.c (reset_sys_modes): Update for renames.
* src/term.c (set_scroll_region): Rename to `tty_set_scroll_region'.
(turn_on_insert): Rename to `tty_turn_on_insert'.
(turn_off_insert): Rename to `tty_turn_off_insert'.
(turn_off_highlight): Rename to `tty_turn_off_highlight'.
(turn_on_highlight): Rename to `tty_turn_on_highlight'.
(toggle_highligh): Rename to `tty_toggle_highlight'.
(background_highlight): Rename to `tty_background_highlight'.
(highlight_if_desired): Rename to `tty_highlight_if_desired'.
(tty_ring_bell, tty_update_end, tty_set_terminal_window)
(tty_set_scroll_region, tty_background_highlight)
(tty_cursor_to, tty_raw_cursor_to, tty_clear_to_end)
(tty_clear_frame, tty_clear_end_of_line, tty_write_glyphs)
(tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines)
(term_get_fkeys, tty_setup_colors, dissociate_if_controlling_tty)
(delete_tty): Add static modifier.
(tty_reset_terminal_modes, tty_set_terminal_window)
(tty_set_scroll_region, tty_background_highlight)
(tty_highlight_if_desired, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame)
(tty_clear_end_of_line, tty_write_glyphs, tty_insert_glyphs)
(tty_delete_glyphs, tty_ins_del_lines, turn_on_face):
Update for renames.
* src/termhooks.h (param_alist): New member to struct device.
* src/xterm.h (x_delete_device): Declare.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-460
2005-12-25 20:06:58 +00:00
|
|
|
|
/* Defined in terminal.c */
|
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
|
|
|
|
EXFUN (Fframe_terminal, 1);
|
2008-02-22 17:27:17 +00:00
|
|
|
|
EXFUN (Fdelete_terminal, 2);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_terminal (void);
|
Reimplement terminal parameters in C; clean up term.c, create terminal.c.
* lisp/termdev.el (terminal-parameter-alist, terminal-parameters, terminal-parameter-p)
(terminal-parameter, set-terminal-parameter, terminal-handle-delete-frame): Remove.
* src/term.c (Vring_bell_function, device_list, initial_device)
(next_device_id, ring_bell, update_begin, update_end)
(set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line)
(write_glyphs, insert_glyphs, delete_glyphs, ins_del_lines)
(get_device, Fdisplay_name, create_device, delete_device)
(Fdelete_display, Fdisplay_live_p, Fdisplay_list)
Move to terminal.c.
(syms_of_term): Move their initialization to terminal.c.
* src/terminal.c: New file.
(device_list, next_device_id, initial_device, Vring_bell_function)
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_device, create_device, delete_device)
(Fdelete_display, Fdisplay_live_p, Fdisplay_list, Fdisplay_name): Move here.
(mark_devices, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(init_initial_device, delete_initial_device)
(syms_of_terminal): New functions.
* lisp/simple.el (normal-erase-is-backspace-setup-frame)
(normal-erase-is-backspace-mode): Rephrase things
without terminal-parameter-p.
* lisp/termdev.el (terminal-getenv, terminal-setenv)
(with-terminal-environment): Ditto.
* mac/makefile.MPW (EmacsObjects): Add terminal.c.x.
({Src}terminal.c.x): Add dependencies.
* src/Makefile.in (obj): Add terminal.o.
(terminal.o): Add dependencies.
[HAVE_CARBON]: Make terminal.o depend on macgui.h.
* src/alloc.c (mark_devices): Declare.
(Fgarbage_collect): Call `mark_devices'.
* src/dispextern.h (set_scroll_region, turn_off_insert)
(turn_off_highlight, background_highlight, clear_end_of_line_raw)
(tty_clear_end_of_line, tty_setup_colors, delete_tty): Remove.
(raw_cursor_to, clear_to_end, tty_turn_off_insert)
(tty_turn_off_highlight): Add declaration.
* src/emacs.c (main): Call `syms_of_terminal'.
* src/frame.c (get_future_frame_param): New function.
(Fmake_terminal_frame): Use it.
* src/keyboard.c (pop_kboard): Remove unused variable.
(Fset_output_flow_control): Return nil.
* src/keymap.h (Fset_keymap_parent): Add EXFUN.
* src/lisp.h (syms_of_terminal): Declare it.
* src/sysdep.c (reset_sys_modes): Update for renames.
* src/term.c (set_scroll_region): Rename to `tty_set_scroll_region'.
(turn_on_insert): Rename to `tty_turn_on_insert'.
(turn_off_insert): Rename to `tty_turn_off_insert'.
(turn_off_highlight): Rename to `tty_turn_off_highlight'.
(turn_on_highlight): Rename to `tty_turn_on_highlight'.
(toggle_highligh): Rename to `tty_toggle_highlight'.
(background_highlight): Rename to `tty_background_highlight'.
(highlight_if_desired): Rename to `tty_highlight_if_desired'.
(tty_ring_bell, tty_update_end, tty_set_terminal_window)
(tty_set_scroll_region, tty_background_highlight)
(tty_cursor_to, tty_raw_cursor_to, tty_clear_to_end)
(tty_clear_frame, tty_clear_end_of_line, tty_write_glyphs)
(tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines)
(term_get_fkeys, tty_setup_colors, dissociate_if_controlling_tty)
(delete_tty): Add static modifier.
(tty_reset_terminal_modes, tty_set_terminal_window)
(tty_set_scroll_region, tty_background_highlight)
(tty_highlight_if_desired, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame)
(tty_clear_end_of_line, tty_write_glyphs, tty_insert_glyphs)
(tty_delete_glyphs, tty_ins_del_lines, turn_on_face):
Update for renames.
* src/termhooks.h (param_alist): New member to struct device.
* src/xterm.h (x_delete_device): Declare.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-460
2005-12-25 20:06:58 +00:00
|
|
|
|
|
2008-08-02 17:03:34 +00:00
|
|
|
|
/* Defined in font.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_font (void);
|
|
|
|
|
extern void init_font (void);
|
2008-08-02 17:03:34 +00:00
|
|
|
|
|
2006-04-12 08:06:25 +00:00
|
|
|
|
#ifdef HAVE_WINDOW_SYSTEM
|
1998-05-04 09:22:29 +00:00
|
|
|
|
/* Defined in fontset.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_fontset (void);
|
2006-04-12 08:06:25 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in xfns.c, w32fns.c, or macfns.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qfont_param;
|
|
|
|
|
extern Lisp_Object Vx_no_window_manager;
|
2006-04-12 08:06:25 +00:00
|
|
|
|
EXFUN (Fxw_display_color_p, 1);
|
2009-03-26 22:15:13 +00:00
|
|
|
|
EXFUN (Fx_focus_frame, 1);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Defined in xfaces.c */
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
|
|
|
|
|
extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
|
|
|
|
|
extern Lisp_Object Qmode_line_inactive, Qvertical_border;
|
Remove extern declarations from .c files, and them to .h files.
* src/xsmfns.c (Vuser_login_name):
* src/xrdb.c (Vdouble_click_time):
* src/xfaces.c (xic_create_fontsetname):
* src/w32select.c (waiting_for_input):
* src/print.c (minibuffer_auto_raise):
* src/msdos.c (Qhelp_echo):
* src/macros.c (real_this_command):
* src/keymap.c (Voverriding_local_map):
* src/xterm.c (poll_for_input_1, gray_bitmap_width)
(gray_bitmap_height, gray_bitmap_bits;
* src/xmenu.c ( Voverriding_local_map)
(Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
(use_file_dialog, Xt_app_con):
* src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
(Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
(Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
(Qtool_bar_lines, ignore_mouse_drag_p):
* src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
(Qrear_nonsticky, nconc2):
* src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
(Vhistory_length, Vtranslation_table_for_input, Qcomposition)
(Qdisplay, Qafter_string, Qbefore_string, Qundefined):
* src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
(minibuf_level, minibuffer_auto_raise, lisp_time_argument):
* src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
(gc_in_progress):
* src/doc.c (Voverriding_local_map, Qremap):
* src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list):
* src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
(Qcompletion_ignore_case):
* src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
(Vhistory_length, Vthis_original_command, real_this_command)
(Qface, Qminibuffer_prompt, history_delete_duplicates):
* src/image.c (Qrisky_local_variable):
* src/fontset.c (QCname):
* src/fns.c (minibuffer_auto_raise, QCname):
* src/dispnew.c (char_ins_del_cost):
* src/composite.c (font_fill_lglyph_metrics):
* src/cmds.c (Qface, Vtranslation_table_for_input):
* src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
* src/ccl.c (charset_unicode):
* src/callproc.c (Vtemporary_file_directory):
* src/buffer.c (emacs_strerror): Remove extern declarations.
Remove extern declarations from .c files, and them to .h files.
* src/keyboard.h (Qhelp_echo, waiting_for_input)
(input_available_clear_time, ignore_mouse_drag_p)
(Vdouble_click_time, real_this_command, Vthis_original_command):
* src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
(Voverriding_local_map_menu_flag):
* src/lisp.h (Qinteractive_form, use_file_dialog)
(Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
(Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
(QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
(Qfunction, debug_on_next_call, Qfield)
(Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
(Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
(Qfile_directory_p, Qinsert_file_contents)
(Qcompletion_ignore_case, Qcompletion_ignore_case)
(Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
(history_delete_duplicates, minibuffer_auto_raise, Qonly)
(Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
(Qminibuffer_prompt)
(Vtemporary_file_directory,char_ins_del_vector, Qface):
* src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits, xic_create_fontsetname):
* src/coding.h (Vtranslation_table_for_input): Add extern declarations.
* src/data.c (Qwindow): Make non-static, used from other files too.
* src/frame.c (validate_x_resource_name): Remove shadow definition for i.
2010-07-28 22:48:06 -07:00
|
|
|
|
extern Lisp_Object Qface;
|
2010-07-26 19:45:53 -07:00
|
|
|
|
extern Lisp_Object Qnormal;
|
Remove duplicate declarations.
* lib-src/ebrowse.c (usage, version, mark_virtual)
* src/alloc.c (lisp_malloc)
* src/buffer.c (set_buffer_internal, set_buffer_internal_1)
* src/charset.h (emacs_mule_charset)
* src/dispextern.h (inhibit_free_realized_faces, redraw_frame)
(redraw_garbaged_frames, scroll_cost, update_frame, scrolling)
(bitch_at_user)
* src/lisp.h (Fcheck_coding_system, Fget_text_property)
(Qfunction, Qcompletion_ignore_case, QCwidth, QCsize)
2010-08-07 03:10:12 +02:00
|
|
|
|
extern Lisp_Object QCfamily, QCweight, QCslant;
|
|
|
|
|
extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground;
|
Add declarations to header files.
* src/keyboard.h (xmalloc_widget_value, digest_single_submenu): Remove
declarations, menu.h has them.
(QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
(Vinput_method_function, Qinput_method_function)
(Qevent_symbol_element_mask, last_event_timestamp):
* src/dispextern.h (Voverflow_newline_into_fringe):
* src/font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
(syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
(syms_of_w32font, syms_of_nsfont):
* src/fontset.h (find_font_encoding, Qlatin):
* src/frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
(Vtool_bar_mode, set_frame_menubar):
* src/ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
* src/xterm.h (Qx_gtk_map_stock):
* src/keymap.h (meta_prefix_char): Add declarations.
* src/lisp.h: Remove HAVE_SHM code, unused.
(QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
(QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
(Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
(Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
(Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
(Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
(Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
(Qmode_line_inactive, Qmouse, Qoverriding_local_map)
(Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
(Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
(Qwindow_scroll_functions, Vafter_load_alist)
(Vauto_save_list_file_name, Vface_alternative_font_family_alist)
(Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
(Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
(Vprint_length, Vprint_level, Vscalable_fonts_allowed)
(Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
(Vwindow_system_version, Vx_no_window_manager, initial_argc)
(initial_argv, last_nonmenu_event, load_in_progress)
(noninteractive_need_newline, scroll_margin): Add declarations.
2010-08-05 16:15:24 -07:00
|
|
|
|
extern Lisp_Object Vface_alternative_font_family_alist;
|
|
|
|
|
extern Lisp_Object Vface_font_rescale_alist;
|
|
|
|
|
extern Lisp_Object Vface_ignored_fonts;
|
|
|
|
|
extern Lisp_Object Vface_alternative_font_registry_alist;
|
|
|
|
|
extern Lisp_Object Vscalable_fonts_allowed;
|
2007-07-10 15:40:06 +00:00
|
|
|
|
EXFUN (Fclear_face_cache, 1);
|
2009-04-13 18:45:12 +00:00
|
|
|
|
EXFUN (Fx_load_color_file, 1);
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xfaces (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
2006-03-11 12:33:03 +00:00
|
|
|
|
#ifndef HAVE_GETLOADAVG
|
1999-09-14 13:09:31 +00:00
|
|
|
|
/* Defined in getloadavg.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int getloadavg (double *, int);
|
2006-03-11 12:33:03 +00:00
|
|
|
|
#endif
|
1999-09-14 13:09:31 +00:00
|
|
|
|
|
1998-05-04 09:22:29 +00:00
|
|
|
|
#ifdef HAVE_X_WINDOWS
|
|
|
|
|
/* Defined in xfns.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xfns (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
2002-03-10 16:17:38 +00:00
|
|
|
|
/* Defined in xsmfns.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xsmfns (void);
|
2002-03-10 16:17:38 +00:00
|
|
|
|
|
1998-05-04 09:22:29 +00:00
|
|
|
|
/* Defined in xselect.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xselect (void);
|
1998-05-04 09:22:29 +00:00
|
|
|
|
|
|
|
|
|
/* Defined in xterm.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void syms_of_xterm (void);
|
2006-04-12 08:06:25 +00:00
|
|
|
|
#endif /* HAVE_X_WINDOWS */
|
1999-09-19 15:21:45 +00:00
|
|
|
|
|
2010-07-06 15:33:34 +02:00
|
|
|
|
#ifdef HAVE_WINDOW_SYSTEM
|
|
|
|
|
/* Defined in xterm.c, nsterm.m, w32term.c */
|
|
|
|
|
extern char *x_get_keysym_name (int);
|
|
|
|
|
#endif /* HAVE_WINDOW_SYSTEM */
|
|
|
|
|
|
2004-11-07 11:06:32 +00:00
|
|
|
|
#ifdef MSDOS
|
|
|
|
|
/* Defined in msdos.c */
|
|
|
|
|
EXFUN (Fmsdos_downcase_filename, 1);
|
|
|
|
|
#endif
|
2006-04-12 08:06:25 +00:00
|
|
|
|
|
2010-09-10 18:44:35 +02:00
|
|
|
|
#ifdef HAVE_LIBXML2
|
|
|
|
|
/* Defined in xml.c */
|
|
|
|
|
extern void syms_of_xml (void);
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-10-23 21:17:06 +00:00
|
|
|
|
#ifdef HAVE_MENUS
|
2008-08-04 16:57:44 +00:00
|
|
|
|
/* Defined in (x|w32)fns.c, nsfns.m... */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern int have_menus_p (void);
|
2007-10-23 21:17:06 +00:00
|
|
|
|
#endif
|
2008-08-02 17:03:34 +00:00
|
|
|
|
|
|
|
|
|
#ifdef HAVE_DBUS
|
|
|
|
|
/* Defined in dbusbind.c */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
void syms_of_dbusbind (void);
|
2008-08-02 17:03:34 +00:00
|
|
|
|
#endif
|
2010-08-06 11:56:41 -07:00
|
|
|
|
|
|
|
|
|
#ifdef DOS_NT
|
|
|
|
|
/* Defined in msdos.c, w32.c */
|
|
|
|
|
extern char *emacs_root_dir (void);
|
|
|
|
|
#endif /* DOS_NT */
|
2000-06-20 13:08:48 +00:00
|
|
|
|
|
1991-06-26 21:34:53 +00:00
|
|
|
|
/* Nonzero means Emacs has already been initialized.
|
|
|
|
|
Used during startup to detect startup of dumped Emacs. */
|
|
|
|
|
extern int initialized;
|
|
|
|
|
|
|
|
|
|
extern int immediate_quit; /* Nonzero means ^G can quit instantly */
|
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern POINTER_TYPE *xmalloc (size_t);
|
|
|
|
|
extern POINTER_TYPE *xrealloc (POINTER_TYPE *, size_t);
|
|
|
|
|
extern void xfree (POINTER_TYPE *);
|
2000-06-20 13:30:26 +00:00
|
|
|
|
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern char *xstrdup (const char *);
|
1991-06-26 21:34:53 +00:00
|
|
|
|
|
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
2010-07-11 11:27:13 +02:00
|
|
|
|
extern char *egetenv (const char *);
|
1997-04-11 21:58:13 +00:00
|
|
|
|
|
1994-06-15 05:27:38 +00:00
|
|
|
|
/* Set up the name of the machine we're running on. */
|
2010-07-02 11:26:33 +02:00
|
|
|
|
extern void init_system_name (void);
|
1994-11-01 08:47:47 +00:00
|
|
|
|
|
|
|
|
|
/* Some systems (e.g., NT) use a different path separator than Unix,
|
2010-06-04 16:13:35 +02:00
|
|
|
|
in addition to a device separator. Set the path separator
|
1994-11-01 08:47:47 +00:00
|
|
|
|
to '/', and don't test for a device separator in IS_ANY_SEP. */
|
|
|
|
|
|
|
|
|
|
#define DIRECTORY_SEP '/'
|
|
|
|
|
#ifndef IS_DIRECTORY_SEP
|
|
|
|
|
#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef IS_DEVICE_SEP
|
|
|
|
|
#ifndef DEVICE_SEP
|
|
|
|
|
#define IS_DEVICE_SEP(_c_) 0
|
|
|
|
|
#else
|
|
|
|
|
#define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP)
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef IS_ANY_SEP
|
|
|
|
|
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
|
|
|
|
|
#endif
|
1995-01-18 20:13:17 +00:00
|
|
|
|
|
|
|
|
|
#define SWITCH_ENUM_CAST(x) (x)
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
/* Loop over Lisp list LIST. Signal an error if LIST is not a proper
|
|
|
|
|
list, or if it contains circles.
|
2002-06-03 01:58:20 +00:00
|
|
|
|
|
2001-10-05 09:48:47 +00:00
|
|
|
|
HARE and TORTOISE should be the names of Lisp_Object variables, and
|
|
|
|
|
N should be the name of an EMACS_INT variable declared in the
|
|
|
|
|
function where the macro is used. Each nested loop should use
|
|
|
|
|
its own variables.
|
|
|
|
|
|
|
|
|
|
In the loop body, HARE is set to each cons of LIST, and N is the
|
|
|
|
|
length of the list processed so far. */
|
|
|
|
|
|
|
|
|
|
#define LIST_END_P(list, obj) \
|
|
|
|
|
(NILP (obj) \
|
|
|
|
|
? 1 \
|
|
|
|
|
: (CONSP (obj) \
|
|
|
|
|
? 0 \
|
2001-11-27 19:28:52 +00:00
|
|
|
|
: (wrong_type_argument (Qlistp, (list))), 1))
|
2001-10-05 09:48:47 +00:00
|
|
|
|
|
|
|
|
|
#define FOREACH(hare, list, tortoise, n) \
|
|
|
|
|
for (tortoise = hare = (list), n = 0; \
|
|
|
|
|
!LIST_END_P (list, hare); \
|
|
|
|
|
(hare = XCDR (hare), ++n, \
|
|
|
|
|
((n & 1) != 0 \
|
|
|
|
|
? (tortoise = XCDR (tortoise), \
|
|
|
|
|
(EQ (hare, tortoise) \
|
|
|
|
|
&& (circular_list_error ((list)), 1))) \
|
|
|
|
|
: 0)))
|
2001-10-08 07:59:17 +00:00
|
|
|
|
|
|
|
|
|
/* The ubiquitous min and max macros. */
|
|
|
|
|
|
2001-10-08 22:39:06 +00:00
|
|
|
|
#ifdef max
|
|
|
|
|
#undef max
|
|
|
|
|
#undef min
|
|
|
|
|
#endif
|
2001-10-08 07:59:17 +00:00
|
|
|
|
#define min(a, b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
2001-10-11 15:37:13 +00:00
|
|
|
|
|
2007-10-13 12:40:15 +00:00
|
|
|
|
/* We used to use `abs', but that clashes with system headers on some
|
|
|
|
|
platforms, and using a name reserved by Standard C is a bad idea
|
|
|
|
|
anyway. */
|
|
|
|
|
#if !defined(eabs)
|
|
|
|
|
#define eabs(x) ((x) < 0 ? -(x) : (x))
|
2007-09-23 02:04:23 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2001-10-11 15:37:13 +00:00
|
|
|
|
/* Return a fixnum or float, depending on whether VAL fits in a Lisp
|
|
|
|
|
fixnum. */
|
|
|
|
|
|
|
|
|
|
#define make_fixnum_or_float(val) \
|
2001-11-27 19:28:52 +00:00
|
|
|
|
(FIXNUM_OVERFLOW_P (val) \
|
|
|
|
|
? make_float (val) \
|
|
|
|
|
: make_number ((EMACS_INT)(val)))
|
2004-04-16 12:51:06 +00:00
|
|
|
|
|
2004-04-26 00:21:41 +00:00
|
|
|
|
|
|
|
|
|
/* Checks the `cycle check' variable CHECK to see if it indicates that
|
|
|
|
|
EL is part of a cycle; CHECK must be either Qnil or a value returned
|
|
|
|
|
by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
|
|
|
|
|
elements after which a cycle might be suspected; after that many
|
|
|
|
|
elements, this macro begins consing in order to keep more precise
|
|
|
|
|
track of elements.
|
|
|
|
|
|
|
|
|
|
Returns nil if a cycle was detected, otherwise a new value for CHECK
|
|
|
|
|
that includes EL.
|
|
|
|
|
|
|
|
|
|
CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
|
|
|
|
|
the caller should make sure that's ok. */
|
|
|
|
|
|
|
|
|
|
#define CYCLE_CHECK(check, el, suspicious) \
|
|
|
|
|
(NILP (check) \
|
|
|
|
|
? make_number (0) \
|
|
|
|
|
: (INTEGERP (check) \
|
|
|
|
|
? (XFASTINT (check) < (suspicious) \
|
|
|
|
|
? make_number (XFASTINT (check) + 1) \
|
|
|
|
|
: Fcons (el, Qnil)) \
|
|
|
|
|
: (!NILP (Fmemq ((el), (check))) \
|
|
|
|
|
? Qnil \
|
|
|
|
|
: Fcons ((el), (check)))))
|
|
|
|
|
|
|
|
|
|
|
2004-06-21 21:51:18 +00:00
|
|
|
|
/* SAFE_ALLOCA normally allocates memory on the stack, but if size is
|
|
|
|
|
larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */
|
|
|
|
|
|
|
|
|
|
#define MAX_ALLOCA 16*1024
|
|
|
|
|
|
|
|
|
|
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
|
|
|
|
|
|
|
|
|
|
#define USE_SAFE_ALLOCA \
|
2010-09-23 22:16:55 +02:00
|
|
|
|
int sa_count = (int) SPECPDL_INDEX (), sa_must_free = 0
|
2004-06-21 21:51:18 +00:00
|
|
|
|
|
2004-06-21 22:35:29 +00:00
|
|
|
|
/* SAFE_ALLOCA allocates a simple buffer. */
|
|
|
|
|
|
2004-06-21 21:51:18 +00:00
|
|
|
|
#define SAFE_ALLOCA(buf, type, size) \
|
|
|
|
|
do { \
|
|
|
|
|
if ((size) < MAX_ALLOCA) \
|
|
|
|
|
buf = (type) alloca (size); \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
|
|
|
|
buf = (type) xmalloc (size); \
|
2004-10-26 22:37:02 +00:00
|
|
|
|
sa_must_free++; \
|
2004-06-21 21:51:18 +00:00
|
|
|
|
record_unwind_protect (safe_alloca_unwind, \
|
|
|
|
|
make_save_value (buf, 0)); \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2004-06-21 22:35:29 +00:00
|
|
|
|
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
|
|
|
|
|
|
2004-10-26 22:37:02 +00:00
|
|
|
|
#define SAFE_FREE() \
|
2004-06-21 21:51:18 +00:00
|
|
|
|
do { \
|
2004-10-26 22:37:02 +00:00
|
|
|
|
if (sa_must_free) { \
|
|
|
|
|
sa_must_free = 0; \
|
2004-06-21 21:51:18 +00:00
|
|
|
|
unbind_to (sa_count, Qnil); \
|
2004-10-26 22:37:02 +00:00
|
|
|
|
} \
|
2004-06-21 21:51:18 +00:00
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
2004-06-22 13:57:18 +00:00
|
|
|
|
/* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects. */
|
|
|
|
|
|
|
|
|
|
#define SAFE_ALLOCA_LISP(buf, nelt) \
|
|
|
|
|
do { \
|
|
|
|
|
int size_ = (nelt) * sizeof (Lisp_Object); \
|
|
|
|
|
if (size_ < MAX_ALLOCA) \
|
|
|
|
|
buf = (Lisp_Object *) alloca (size_); \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
|
|
|
|
Lisp_Object arg_; \
|
|
|
|
|
buf = (Lisp_Object *) xmalloc (size_); \
|
|
|
|
|
arg_ = make_save_value (buf, nelt); \
|
|
|
|
|
XSAVE_VALUE (arg_)->dogc = 1; \
|
2004-10-26 22:37:02 +00:00
|
|
|
|
sa_must_free++; \
|
2004-06-22 13:57:18 +00:00
|
|
|
|
record_unwind_protect (safe_alloca_unwind, arg_); \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2004-06-21 21:51:18 +00:00
|
|
|
|
|
2004-04-16 12:51:06 +00:00
|
|
|
|
#endif /* EMACS_LISP_H */
|