diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-11 21:27:53 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-11 21:27:53 -0500 |
commit | c530e1c2a3a036d71942c354ba11b30a06341fd7 (patch) | |
tree | 184fa6b6c9bb58855aa9f1ae6cded97edc4f10fb /src | |
parent | 295fb2ac59b66c0e2470325a42c8e58c135ed044 (diff) | |
parent | e0e36cac4adaa32ad755a34c811366dd8e4655bc (diff) | |
download | emacs-c530e1c2a3a036d71942c354ba11b30a06341fd7.tar.gz |
Merge from trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog.trunk | 264 | ||||
-rw-r--r-- | src/Makefile.in | 25 | ||||
-rw-r--r-- | src/alloc.c | 8 | ||||
-rw-r--r-- | src/bitmaps/gray.xbm | 2 | ||||
-rw-r--r-- | src/buffer.c | 4 | ||||
-rw-r--r-- | src/callint.c | 18 | ||||
-rw-r--r-- | src/callproc.c | 4 | ||||
-rw-r--r-- | src/casefiddle.c | 5 | ||||
-rw-r--r-- | src/character.c | 4 | ||||
-rw-r--r-- | src/character.h | 3 | ||||
-rw-r--r-- | src/charset.c | 3 | ||||
-rw-r--r-- | src/cmds.c | 7 | ||||
-rw-r--r-- | src/coding.c | 2 | ||||
-rw-r--r-- | src/config.in | 6 | ||||
-rw-r--r-- | src/data.c | 5 | ||||
-rw-r--r-- | src/deps.mk | 239 | ||||
-rw-r--r-- | src/dired.c | 18 | ||||
-rw-r--r-- | src/dispextern.h | 3 | ||||
-rw-r--r-- | src/doc.c | 25 | ||||
-rw-r--r-- | src/doprnt.c | 15 | ||||
-rw-r--r-- | src/editfns.c | 90 | ||||
-rw-r--r-- | src/emacs.c | 2 | ||||
-rw-r--r-- | src/eval.c | 6 | ||||
-rw-r--r-- | src/fileio.c | 152 | ||||
-rw-r--r-- | src/fns.c | 25 | ||||
-rw-r--r-- | src/font.c | 7 | ||||
-rw-r--r-- | src/fontset.c | 2 | ||||
-rw-r--r-- | src/ftfont.c | 12 | ||||
-rw-r--r-- | src/globals.h | 2902 | ||||
-rw-r--r-- | src/image.c | 236 | ||||
-rw-r--r-- | src/indent.c | 2 | ||||
-rw-r--r-- | src/insdel.c | 27 | ||||
-rw-r--r-- | src/keyboard.c | 6 | ||||
-rw-r--r-- | src/keymap.c | 10 | ||||
-rw-r--r-- | src/lisp.h | 15 | ||||
-rw-r--r-- | src/lread.c | 20 | ||||
-rw-r--r-- | src/makefile.w32-in | 223 | ||||
-rw-r--r-- | src/minibuf.c | 4 | ||||
-rw-r--r-- | src/nsselect.m | 2 | ||||
-rw-r--r-- | src/print.c | 24 | ||||
-rw-r--r-- | src/process.c | 34 | ||||
-rw-r--r-- | src/ralloc.c | 3 | ||||
-rw-r--r-- | src/regex.c | 4 | ||||
-rw-r--r-- | src/s/ms-w32.h | 1 | ||||
-rw-r--r-- | src/search.c | 15 | ||||
-rw-r--r-- | src/sysdep.c | 20 | ||||
-rw-r--r-- | src/window.c | 2 | ||||
-rw-r--r-- | src/xdisp.c | 60 | ||||
-rw-r--r-- | src/xfaces.c | 36 | ||||
-rw-r--r-- | src/xfns.c | 8 | ||||
-rw-r--r-- | src/xfont.c | 6 | ||||
-rw-r--r-- | src/xftfont.c | 6 | ||||
-rw-r--r-- | src/xmenu.c | 4 | ||||
-rw-r--r-- | src/xml.c | 13 | ||||
-rw-r--r-- | src/xselect.c | 14 | ||||
-rw-r--r-- | src/xsmfns.c | 145 | ||||
-rw-r--r-- | src/xterm.c | 87 | ||||
-rw-r--r-- | src/xterm.h | 1 |
58 files changed, 1163 insertions, 3723 deletions
diff --git a/src/ChangeLog.trunk b/src/ChangeLog.trunk index f96fe5eb2f8..68a12d4f55a 100644 --- a/src/ChangeLog.trunk +++ b/src/ChangeLog.trunk @@ -1,3 +1,267 @@ +2011-02-10 Glenn Morris <rgm@gnu.org> + + * Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. + +2011-02-09 Eli Zaretskii <eliz@gnu.org> + + * makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): + New macros. + (globals.h, gl-stamp): New targets. + (clean): Clean gl-stamp and globals.h. + +2011-02-09 Andreas Schwab <schwab@linux-m68k.org> + + * Makefile.in (gl-stamp): Create globals.h here. + (globals.h): Don't do it here. + (mostlyclean): Clean globals.h and gl-stamp. + +2011-02-09 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.in ($(otherobj)): Depend on globals.h. + Otherwise 'make -j10' failed on my host, because the build lacked + necessary dependencies, e.g., vm-limit.o depends on globals.h. + +2011-02-08 Tom Tromey <tromey@redhat.com> + + * Makefile.in (NS_OBJC_OBJ): New variable. + (base_obj): Rename from 'obj'. + (obj): New variable. + (globals.h, gl-stamp, $(obj)): New targets. + (GLOBAL_SOURCES): New variable. + * globals.h: Remove. + * nsselect.m (Vselection_alist): Define. Reverts part of + 2011-01-19T22:11:33Z!jan.h.d@swipnet.se. + * buffer.c: Don't use "no_cell" for name of kill-buffer-hook's + variable. + * xselect.c (Vselection_alist): Define. Reverts part of 2011-01-19T23:32:42Z!eggert@cs.ucla.edu. + +2011-02-08 Kenichi Handa <handa@m17n.org> + + * font.c (Ffont_get): Do not cache :otf value. + +2011-02-07 Paul Eggert <eggert@cs.ucla.edu> + + conform to C89 pointer rules + + * dired.c (scmp, file_name_completion): + Change types between char * and unsigned char *, to satisfy C89 + rules about pointer type compatibility. + * casefiddle.c (casify_object, casify_region): Likewise. + * search.c (Freplace_match, Fregexp_quote): Likewise. + * alloc.c (make_string, make_specified_string, make_pure_string): + Likewise. + * data.c (Fstring_to_number): Likewise. + * print.c (float_to_string, PRINTFINISH, printchar, strout): + (print_object): Likewise. + * editfns.c (init_editfns, Fchar_to_string, Fbyte_to_string): + (Fuser_full_name, Fsubst_char_in_region, Ftranslate_region_internal): + (Fformat): Likewise. + * callint.c (Fcall_interactively): Likewise. + * fns.c (string_make_multibyte, string_to_multibyte): + (string_make_unibyte, Fstring_as_unibyte, Fstring_to_unibyte): + (Fbase64_encode_region, base64_encode_1, Fbase64_decode_region, Fmd5): + Likewise. + * lread.c (read1, hash_string): Likewise. + * process.c (read_process_output, send_process, Fprocess_send_region): + Likewise. + * callproc.c (Fcall_process): Likewise. + * doprnt.c (doprnt): Likewise. + * indent.c (compute_motion): Likewise. + * xfont.c (xfont_decode_coding_xlfd): Likewise. + * ralloc.c (resize_bloc): Likewise. + * image.c (tiff_load): Likewise. + * xml.c (make_dom, parse_region): Likewise. + * character.c (strwidth): Make its argument const char *, not const + unsigned char *, since more callers prefer it that way. All callers + changed. + +2011-02-06 Paul Eggert <eggert@cs.ucla.edu> + + * xterm.c (x_alloc_nearest_color_1): Avoid unportable int assumption. + Emacs assumes two's complement elsewhere, but the assumption is + easy to remove here, and this suppresses a warning with Sun C 5.8. + + conform to C89 pointer rules + + * xterm.c (x_draw_fringe_bitmap, handle_one_xevent, x_bitmap_icon): + (same_x_server, x_term_init): + Change types between char * and unsigned char *, to satisfy C89 + rules about pointer type compatibility. + * doc.c (get_doc_string, Fsnarf_documentation): + (Fsubstitute_command_keys): Likewise. + * xfns.c (Fx_open_connection, Fx_window_property): Likewise. + * bitmaps/gray.xbm (gray_bits): Likewise. + * image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load): Likewise. + * keyboard.c (echo_char, MULTI_LETTER_MOD, tty_read_avail_input): + Likewise. + * keymap.c (Ftext_char_description): Likewise. + * minibuf.c (Fread_buffer): Likewise. + * fileio.c (IS_DRIVE) [defined WINDOWSNT]: + (DRIVE_LETTER) [defined DOS_NT]: + (report_file_error, Ffile_name_directory, Ffile_name_nondirectory): + (make_temp_name, Fexpand_file_name, file_name_absolute_p): + (search_embedded_absfilename, Fsubstitute_in_file_name): + (barf_or_query_if_file_exists, Fmake_directory_internal): + (Fdelete_directory_internal, Ffile_name_absolute_p, read_non_regular): + (Finsert_file_contents, Fwrite_region): + Likewise. + * insdel.c (insert, insert_and_inherit, insert_before_markers): + (insert_before_markers_and_inherit, insert_1, insert_1_both): + Likewise. This changes these functions' signatures, which is + more convenient since most callers use char *. All remaining + callers changed. + * editfns.c (general_insert_function): Change signature to + match changes to insert functions' signatures. + * keymap.c (map_keymap_char_table_item, map_keymap_internal): Use + explicit cast when converting between void * and function pointer + types, as C89 requires this. + +2011-02-05 Paul Eggert <eggert@cs.ucla.edu> + + don't ignore chdir failure + * sysdep.c (sys_subshell) [!defined DOS_NT]: Diagnose chdir + failure and exit. + (sys_subshell) [defined DOS_NT]: Mark with a FIXME the two + remaining unchecked chdir calls in this function; some DOS/NT + expert needs to fix them. + * emacs.c (main): Mark with a FIXME the unchecked chdir calls + in this function; some NextStep expert needs to fix them. + +2011-02-05 Glenn Morris <rgm@gnu.org> + + * xfaces.c (Finternal_set_lisp_face_attribute): + Try to clarify some error messages. (Bug#2659) + +2011-02-05 Stefan Monnier <monnier@iro.umontreal.ca> + + * editfns.c (save_restriction_restore): Don't forget to invalidate the + current_column cache (bug#7946). + +2011-02-05 Kenichi Handa <handa@m17n.org> + + * ftfont.c (ftfont_open): Use FC_DUAL only when it is defined. + + * xftfont.c (xftfont_open): Likewise. + +2011-02-05 Andreas Schwab <schwab@linux-m68k.org> + + * window.c (Fselect_window): Add missing return value. + +2011-02-05 Paul Eggert <eggert@cs.ucla.edu> + + xstrcasecmp: conform to C89 pointer rules + * xfaces.c (xstrcasecmp): Change args from const unsigned char * + to const char *, since they're usually low-level C strings, and + this stays compatible with C89 pointer rules. All callers changed. + + * charset.c: conform to C89 pointer rules + (define_charset_internal): Switch between char * and unsigned char *. + + * xmenu.c: conform to C89 const rules + (xmenu_show, xdialog_show): Declare local var as char *, not + const char *, to stay compatible with C89 const rules. + + * xdisp.c: conform to C89 pointer rules + (store_mode_line_noprop, display_string, reseat_to_string): + (c_string_pos, number_of_chars, message_dolog): + (message_log_check_duplicate, set_message_1, store_mode_line_noprop): + (display_mode_element, display_string): + Switch between char * and unsigned char * to stay compatible wth + C89 pointer rules. + + * regex.c: conform to C89 pointer rules + (re_wctype): Add cast, as C89 does not allow assigning between + char * and unsigned char *. + (regex_compile): Likewise. + + sync from gnulib to remove HAVE_STDBOOL_H + * config.in: Regenerate. + +2011-02-04 Eli Zaretskii <eliz@gnu.org> + + * makefile.w32-in (LISP_H, PROCESS_H): New variables. + Replace all uses of lisp.h with $(LISP_H), and all uses of + process.h with $(PROCESS_H). + ($(BLD)/editfns.$(O)): Depend on ../lib/strftime.h. + ($(BLD)/print.$(O)): Depend on ../lib/ftoastr.h and ../lib/intprops.h. + + * deps.mk: Update for recent changes: gnutls support, gnulib + imports, addition of globals.h. + + * makefile.w32-in ($(BLD)/sysdep.$(O)): Depend on + ../lib/ignore-value.h. + +2011-02-03 Paul Eggert <eggert@cs.ucla.edu> + + allow C code to suppress warnings about ignored return values + + We need to go through the code and for each such warning, either + fix the code to pay attention to the returned value, or tell GCC + that we really do want to ignore the returned value. Here is one + example of how to do the latter. + * sysdep.c: Include <ignore-value.h>. + (sys_subshell): Suppress an undesirable warning about not checking + the returned value of 'write', as there's nothing useful one can + do with that returned value. + +2011-02-03 Jan Djärv <jan.h.d@swipnet.se> + + * xterm.c (x_connection_closed): Remove all calls that calls + XSync (Bug#7949). + +2011-02-01 Eli Zaretskii <eliz@gnu.org> + + * image.c (tiff_load): Avoid compiler warning in 2nd arg to + TIFFClientOpen. + +2011-02-01 Jan Djärv <jan.h.d@swipnet.se> + + * xsmfns.c (ice_connection_closed): Call delete_read_fd. + (x_session_check_input): Change args and return type so it can be used + as argument to add_read_fd. Make static. Remove call to select. + Call kbd_buffer_store_event for emacs_event. + (smc_save_yourself_CB): Also store initial argv to SmRestartCommand. + (ice_conn_watch_CB): Call add_read_fd. + + * xterm.c (XTread_socket): Remove HAVE_X_SM block with call to + x_session_check_input. + (x_session_initialized): Remove definition. + (x_initialize): Remove setting of x_session_initialized. + + * xterm.h (x_session_check_input): Remove declaration. + +2011-02-01 Paul Eggert <eggert@cs.ucla.edu> + + format-time-string now supports subsecond time stamp resolution + * editfns.c (emacs_nmemftime): Renamed from emacs_memftimeu, + for consistency with its new argument and with gnulib nstrftime. + All callers changed. New argument NS. + (Fformat_time_string): Check that the time argument's microseconds + component, if any, is in range; this avoids integer overflow and + also nstrftime needs this. Document %N. + +2011-01-31 Andreas Schwab <schwab@linux-m68k.org> + + * image.c (DEF_IMGLIB_FN): Add parameter rettype, use it instead + of int. All uses adjusted. + (PNG_JMPBUF, png_load, jpeg_load, tiff_load, gif_load) + (svg_load_image): Remove casts. + +2011-01-31 Chong Yidong <cyd@stupidchicken.com> + + * image.c (fn_png_longjmp, fn_png_set_longjmp_fn): New png + function definitions for compiling with libpng-1.5. + (PNG_LONGJMP, PNG_JMPBUF): New macros for libpng-1.5. + (my_png_error, png_load): Use them. Suggested by Thomas Klausner + (Bug#7908). + +2011-01-31 Eli Zaretskii <eliz@gnu.org> + + * s/ms-w32.h (HAVE_STRFTIME): Don't define. + + * makefile.w32-in (OBJ2): Remove strftime.$(O). + ($(BLD)/strftime.$(O)): Remove prerequisites. + 2011-01-31 Paul Eggert <eggert@cs.ucla.edu> src/emacs.c now gets version number from configure.in diff --git a/src/Makefile.in b/src/Makefile.in index 98b4c981482..fda65be7084 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -106,7 +106,7 @@ LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@ ## This holds any special options for linking temacs only (ie, not ## used by configure). Not used elsewhere because it sometimes -## contains options that have to do with using Emacs's crt0, +## contains options that have to do with using Emacs's crt0, ## which are only good with temacs. LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ @@ -190,7 +190,7 @@ OLDXMENU=@OLDXMENU@ ## If HAVE_X11 && !USE_GTK, $(OLDXMENU) ../src/$(OLDXMENU); else empty. ## We use stamp-xmenu with these two deps to both ensure that lwlib ## gets remade based on its dependencies in its own makefile, -## and remake temacs if lwlib gets changed by this. +## and remake temacs if lwlib gets changed by this. OLDXMENU_DEPS=@OLDXMENU_DEPS@ ## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible). @@ -241,12 +241,13 @@ MSDOS_SUPPORT_REAL = $(lispsource)/ls-lisp.elc $(lispsource)/disp-table.elc \ $(lispsource)/dos-fns.elc $(lispsource)/dos-w32.elc $(lispsource)/dos-vars.elc \ $(lispsource)/term/internal.elc $(lispsource)/term/pc-win.elc ## $MSDOS_SUPPORT_REAL if MSDOS. -MSDOS_SUPPORT = +MSDOS_SUPPORT = ns_appdir=@ns_appdir@ ns_appbindir=@ns_appbindir@ ns_appsrc=@ns_appsrc@ NS_OBJ=@NS_OBJ@ +NS_OBJC_OBJ=@NS_OBJC_OBJ@ NS_SUPPORT=@NS_SUPPORT@ ## Only set if NS_IMPL_GNUSTEP. GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ @@ -341,7 +342,7 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) ## lastfile must follow all files whose initialized data areas should ## be dumped as pure by dump-emacs. -obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ +base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ emacs.o keyboard.o macros.o keymap.o sysdep.o \ @@ -355,6 +356,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ region-cache.o sound.o atimer.o \ doprnt.o intervals.o textprop.o composite.o md5.o xml.o \ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) +obj = $(base_obj) $(NS_OBJC_OBJ) ## Object files used on some machine or other. ## These go in the DOC file on all machines in case they are needed. @@ -645,6 +647,18 @@ $(libsrc)/make-docfile$(EXEEXT): buildobj.h: Makefile echo "#define BUILDOBJ \"$(obj) $(otherobj) " "\"" > buildobj.h +globals.h: gl-stamp; @true + +GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) + +gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) + @rm -f gl-tmp + $(libsrc)/make-docfile -d $(srcdir) -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp + $(srcdir)/../move-if-change gl-tmp globals.h + echo timestamp > $@ + +$(obj) $(otherobj): globals.h + $(lib)/libgnu.a: $(config_h) cd $(lib) && $(MAKE) libgnu.a @@ -655,7 +669,7 @@ temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu. ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them ## (provided we take a little care that OLDXMENU is never empty). -really-lwlib: +really-lwlib: globals.h cd $(lwlibdir); $(MAKE) $(MFLAGS) \ CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' @true # make -t should not create really-lwlib. @@ -699,6 +713,7 @@ mostlyclean: rm -f ../etc/DOC rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT) rm -f buildobj.h + rm -f globals.h gl-stamp clean: mostlyclean rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) -rm -rf $(DEPDIR) diff --git a/src/alloc.c b/src/alloc.c index 990622a30f6..36c849418f3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2281,7 +2281,8 @@ make_string (const char *contents, EMACS_INT nbytes) register Lisp_Object val; EMACS_INT nchars, multibyte_nbytes; - parse_str_as_multibyte (contents, nbytes, &nchars, &multibyte_nbytes); + parse_str_as_multibyte ((const unsigned char *) contents, nbytes, + &nchars, &multibyte_nbytes); if (nbytes == nchars || nbytes != multibyte_nbytes) /* CONTENTS contains no multibyte sequences or contains an invalid multibyte sequence. We must make unibyte string. */ @@ -2349,7 +2350,8 @@ make_specified_string (const char *contents, if (nchars < 0) { if (multibyte) - nchars = multibyte_chars_in_text (contents, nbytes); + nchars = multibyte_chars_in_text ((const unsigned char *) contents, + nbytes); else nchars = nbytes; } @@ -4707,7 +4709,7 @@ make_pure_string (const char *data, struct Lisp_String *s; s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String); - s->data = find_string_data_in_pure (data, nbytes); + s->data = (unsigned char *) find_string_data_in_pure (data, nbytes); if (s->data == NULL) { s->data = (unsigned char *) pure_alloc (nbytes + 1, -1); diff --git a/src/bitmaps/gray.xbm b/src/bitmaps/gray.xbm index d0e7a02bfac..dc7327e5c1a 100644 --- a/src/bitmaps/gray.xbm +++ b/src/bitmaps/gray.xbm @@ -1,4 +1,4 @@ #define gray_width 2 #define gray_height 2 -static unsigned char gray_bits[] = { +static char gray_bits[] = { 0x01, 0x02}; diff --git a/src/buffer.c b/src/buffer.c index 7a0260f584a..5229f899e65 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1320,7 +1320,7 @@ No argument or nil as argument means do this for the current buffer. */) } /* - DEFVAR_LISP ("kill-buffer-hook", no_cell, "\ + DEFVAR_LISP ("kill-buffer-hook", ..., "\ Hook to be run (by `run-hooks', which see) when a buffer is killed.\n\ The buffer being killed will be current while the hook is running.\n\ See `kill-buffer'." @@ -2401,7 +2401,7 @@ current buffer is cleared. */) *p = tmp[0]; TEMP_SET_PT_BOTH (pos + 1, pos + 1); bytes--; - insert_1_both (tmp + 1, bytes, bytes, 1, 0, 0); + insert_1_both ((char *) tmp + 1, bytes, bytes, 1, 0, 0); /* Now the gap is after the just inserted data. */ pos = GPT; p = GAP_END_ADDR; diff --git a/src/callint.c b/src/callint.c index d2f94f6080f..36d295d750c 100644 --- a/src/callint.c +++ b/src/callint.c @@ -257,8 +257,8 @@ invoke it. If KEYS is omitted or nil, the return value of int next_event; Lisp_Object prefix_arg; - unsigned char *string; - unsigned char *tem; + char *string; + char *tem; /* If varies[i] > 0, the i'th argument shouldn't just have its value in this call quoted in the command history. It should be @@ -325,8 +325,8 @@ invoke it. If KEYS is omitted or nil, the return value of { /* Make a copy of string so that if a GC relocates specs, `string' will still be valid. */ - string = (unsigned char *) alloca (SBYTES (specs) + 1); - memcpy (string, SDATA (specs), SBYTES (specs) + 1); + string = (char *) alloca (SBYTES (specs) + 1); + memcpy (string, SSDATA (specs), SBYTES (specs) + 1); } else { @@ -389,7 +389,7 @@ invoke it. If KEYS is omitted or nil, the return value of { if (!NILP (record_flag)) { - unsigned char *p = string; + char *p = string; while (*p) { if (! (*p == 'r' || *p == 'p' || *p == 'P' @@ -449,7 +449,7 @@ invoke it. If KEYS is omitted or nil, the return value of j += 2; else j++; - tem = (unsigned char *) strchr (tem, '\n'); + tem = strchr (tem, '\n'); if (tem) ++tem; else @@ -780,7 +780,7 @@ invoke it. If KEYS is omitted or nil, the return value of case '+': default: error ("Invalid control letter `%c' (%03o) in interactive calling string", - *tem, *tem); + *tem, (unsigned char) *tem); } if (varies[i] == 0) @@ -789,9 +789,9 @@ invoke it. If KEYS is omitted or nil, the return value of if (NILP (visargs[i]) && STRINGP (args[i])) visargs[i] = args[i]; - tem = (unsigned char *) strchr (tem, '\n'); + tem = strchr (tem, '\n'); if (tem) tem++; - else tem = (unsigned char *) ""; + else tem = ""; } unbind_to (speccount, Qnil); diff --git a/src/callproc.c b/src/callproc.c index 09d0ca5b42c..925eefb4b02 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -696,8 +696,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) faithfully reflect inserted text until we TEMP_SET_PT_BOTH below. */ specbind (Qinhibit_modification_hooks, Qt); - decode_coding_c_string (&process_coding, buf, nread, - curbuf); + decode_coding_c_string (&process_coding, (unsigned char *) buf, + nread, curbuf); unbind_to (count1, Qnil); if (display_on_the_fly && CODING_REQUIRE_DETECTION (&saved_coding) diff --git a/src/casefiddle.c b/src/casefiddle.c index 6f82f99bd26..62d261278ab 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -142,7 +142,7 @@ casify_object (enum case_action flag, Lisp_Object obj) o += CHAR_STRING (c, o); } eassert (o - dst <= o_size); - obj = make_multibyte_string (dst, size, o - dst); + obj = make_multibyte_string ((char *) dst, size, o - dst); SAFE_FREE (); return obj; } @@ -279,7 +279,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) keeping text properties the same. */ replace_range_2 (start, start_byte, start + 1, start_byte + len, - str, 1, tolen, + (char *) str, 1, tolen, 0); len = tolen; } @@ -442,4 +442,3 @@ keys_of_casefiddle (void) initial_define_key (meta_map, 'l', "downcase-word"); initial_define_key (meta_map, 'c', "capitalize-word"); } - diff --git a/src/character.c b/src/character.c index 9936ac281cf..397481e5b39 100644 --- a/src/character.c +++ b/src/character.c @@ -395,9 +395,9 @@ c_string_width (const unsigned char *str, EMACS_INT len, int precision, occupies on the screen. */ EMACS_INT -strwidth (const unsigned char *str, EMACS_INT len) +strwidth (const char *str, EMACS_INT len) { - return c_string_width (str, len, -1, NULL, NULL); + return c_string_width ((const unsigned char *) str, len, -1, NULL, NULL); } /* Return width of Lisp string STRING when displayed in the current diff --git a/src/character.h b/src/character.h index 259aebbb8a8..f2ccb28bb37 100644 --- a/src/character.h +++ b/src/character.h @@ -612,7 +612,7 @@ extern EMACS_INT str_to_multibyte (unsigned char *, EMACS_INT, EMACS_INT); extern EMACS_INT str_as_unibyte (unsigned char *, EMACS_INT); extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *, EMACS_INT, int); -extern EMACS_INT strwidth (const unsigned char *, EMACS_INT); +extern EMACS_INT strwidth (const char *, EMACS_INT); extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int, EMACS_INT *, EMACS_INT *); extern EMACS_INT lisp_string_width (Lisp_Object, int, @@ -630,4 +630,3 @@ extern Lisp_Object string_escape_byte8 (Lisp_Object); do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0) #endif /* EMACS_CHARACTER_H */ - diff --git a/src/charset.c b/src/charset.c index a6046600194..229f2c2cdae 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1253,12 +1253,13 @@ usage: (define-charset-internal ...) */) static int define_charset_internal (Lisp_Object name, int dimension, - const unsigned char *code_space, + const char *code_space_chars, unsigned min_code, unsigned max_code, int iso_final, int iso_revision, int emacs_mule_id, int ascii_compatible, int supplementary, int code_offset) { + const unsigned char *code_space = (const unsigned char *) code_space_chars; Lisp_Object args[charset_arg_max]; Lisp_Object plist[14]; Lisp_Object val; diff --git a/src/cmds.c b/src/cmds.c index ce05b19e1c2..93b7e2b7651 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -466,15 +466,15 @@ internal_self_insert (int c, EMACS_INT n) else if (n > 1) { USE_SAFE_ALLOCA; - unsigned char *strn, *p; - SAFE_ALLOCA (strn, unsigned char*, n * len); + char *strn, *p; + SAFE_ALLOCA (strn, char *, n * len); for (p = strn; n > 0; n--, p += len) memcpy (p, str, len); insert_and_inherit (strn, p - strn); SAFE_FREE (); } else if (n > 0) - insert_and_inherit (str, len); + insert_and_inherit ((char *) str, len); if ((CHAR_TABLE_P (Vauto_fill_chars) ? !NILP (CHAR_TABLE_REF (Vauto_fill_chars, c)) @@ -559,4 +559,3 @@ keys_of_cmds (void) initial_define_key (global_map, Ctl ('E'), "end-of-line"); initial_define_key (global_map, Ctl ('F'), "forward-char"); } - diff --git a/src/coding.c b/src/coding.c index 3a3ba11ee9d..a9f16de56f3 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7880,7 +7880,7 @@ encode_coding_object (struct coding_system *coding, else if (BUFFERP (src_object)) insert_from_buffer (XBUFFER (src_object), from, chars, 0); else - insert_1_both (coding->source + from, chars, bytes, 0, 0, 0); + insert_1_both ((char *) coding->source + from, chars, bytes, 0, 0, 0); if (EQ (src_object, dst_object)) { diff --git a/src/config.in b/src/config.in index 48fc7a23d82..df492bf8f87 100644 --- a/src/config.in +++ b/src/config.in @@ -615,9 +615,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ /* Define to 1 if `speed_t' is declared by <termios.h>. */ #undef HAVE_SPEED_T -/* Define to 1 if stdbool.h conforms to C99. */ -#undef HAVE_STDBOOL_H - /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H @@ -1115,9 +1112,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ # define __restrict__ #endif -/* Define to `unsigned int' if <sys/types.h> does not define. */ -#undef size_t - /* Define to any substitute for sys_siglist. */ #undef sys_siglist diff --git a/src/data.c b/src/data.c index 8b1f4a035ba..83da3e103cb 100644 --- a/src/data.c +++ b/src/data.c @@ -2427,7 +2427,7 @@ present, base 10 is used. BASE must be between 2 and 16 (inclusive). If the base used is not 10, STRING is always parsed as integer. */) (register Lisp_Object string, Lisp_Object base) { - register unsigned char *p; + register char *p; register int b; int sign = 1; Lisp_Object val; @@ -2446,7 +2446,7 @@ If the base used is not 10, STRING is always parsed as integer. */) /* Skip any whitespace at the front of the number. Some versions of atoi do this anyway, so we might as well make Emacs lisp consistent. */ - p = SDATA (string); + p = SSDATA (string); while (*p == ' ' || *p == '\t') p++; @@ -3347,4 +3347,3 @@ init_data (void) signal (SIGEMT, arith_error); #endif /* uts */ } - diff --git a/src/deps.mk b/src/deps.mk index 7f90688c03b..e8ff3dd592e 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -37,106 +37,118 @@ ### Code: atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \ - $(config_h) -bidi.o: bidi.c buffer.h character.h dispextern.h lisp.h \ - biditype.h bidimirror.h $(config_h) + globals.h ../lib/unistd.h $(config_h) +bidi.o: bidi.c buffer.h character.h dispextern.h msdos.h lisp.h \ + biditype.h bidimirror.h globals.h $(config_h) buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \ - $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \ - indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h) -callint.o: callint.c window.h commands.h buffer.h keymap.h \ + $(INTERVALS_H) blockinput.h atimer.h systime.h character.h ../lib/unistd.h \ + indent.h keyboard.h coding.h keymap.h frame.h lisp.h globals.h $(config_h) +callint.o: callint.c window.h commands.h buffer.h keymap.h globals.h msdos.h \ keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h) callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \ process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \ composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \ - buffer.h + buffer.h gnutls.h dispextern.h ../lib/unistd.h globals.h casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \ - composite.h keymap.h lisp.h $(config_h) -casetab.o: casetab.c buffer.h character.h lisp.h $(config_h) + composite.h keymap.h lisp.h globals.h $(config_h) +casetab.o: casetab.c buffer.h character.h lisp.h globals.h $(config_h) category.o: category.c category.h buffer.h charset.h keymap.h \ - character.h lisp.h $(config_h) -ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h) + character.h lisp.h globals.h $(config_h) +ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h \ + globals.h $(config_h) character.o: character.c character.h buffer.h charset.h composite.h disptab.h \ - lisp.h $(config_h) + lisp.h globals.h $(config_h) charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \ - disptab.h lisp.h $(config_h) -chartab.o: charset.h character.h ccl.h lisp.h $(config_h) + disptab.h lisp.h globals.h ../lib/unistd.h $(config_h) +chartab.o: charset.h character.h ccl.h lisp.h globals.h $(config_h) coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ - window.h dispextern.h frame.h termhooks.h lisp.h $(config_h) -cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h) + window.h dispextern.h msdos.h frame.h termhooks.h \ + lisp.h globals.h $(config_h) +cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h msdos.h \ + lisp.h globals.h $(config_h) cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h \ - $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ + globals.h $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ coding.h frame.h composite.h pre-crt0.o: pre-crt0.c dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h) dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \ - coding.h regex.h systime.h blockinput.h atimer.h composite.h + coding.h regex.h systime.h blockinput.h atimer.h composite.h \ + ../lib/unistd.h globals.h dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \ window.h buffer.h termchar.h termopts.h termhooks.h cm.h \ - disptab.h indent.h $(INTERVALS_H) nsgui.h \ + disptab.h indent.h $(INTERVALS_H) nsgui.h ../lib/unistd.h \ xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \ - syssignal.h lisp.h $(config_h) -doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \ - character.h systime.h coding.h composite.h -doprnt.o: doprnt.c character.h lisp.h $(config_h) + syssignal.h gnutls.h lisp.h globals.h $(config_h) +# doc.o's dependency on buildobj.h is in src/Makefile.in. +doc.o: doc.c lisp.h $(config_h) buffer.h keyboard.h keymap.h \ + character.h systime.h coding.h composite.h ../lib/unistd.h globals.h +doprnt.o: doprnt.c character.h lisp.h globals.h ../lib/unistd.h $(config_h) dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ lisp.h $(config_h) editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ - coding.h frame.h blockinput.h atimer.h lisp.h $(config_h) + coding.h frame.h blockinput.h atimer.h ../lib/unistd.h ../lib/strftime.h \ + lisp.h globals.h $(config_h) emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ - window.h dispextern.h keyboard.h keymap.h frame.h coding.h + globals.h ../lib/unistd.h window.h dispextern.h keyboard.h keymap.h \ + frame.h coding.h gnutls.h msdos.h fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ - coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h + coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h \ + commands.h globals.h ../lib/unistd.h filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \ - lisp.h $(config_h) + ../lib/unistd.h lisp.h globals.h $(config_h) filemode.o: filemode.c $(config_h) -frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ - blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \ - msdos.h dosfns.h dispextern.h w32term.h nsgui.h termchar.h coding.h \ - composite.h lisp.h $(config_h) termhooks.h ccl.h -fringe.o: fringe.c dispextern.h nsgui.h frame.h window.h buffer.h termhooks.h \ - blockinput.h atimer.h systime.h lisp.h $(config_h) font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \ - font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h nsgui.h -ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \ - lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \ - ccl.h ftfont.h + font.h lisp.h globals.h $(config_h) buffer.h composite.h fontset.h \ + xterm.h nsgui.h msdos.h fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \ charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \ blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) nsgui.h \ - window.h xterm.h + window.h xterm.h globals.h +frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ + blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \ + msdos.h dosfns.h dispextern.h w32term.h nsgui.h termchar.h coding.h \ + composite.h lisp.h globals.h $(config_h) termhooks.h ccl.h +fringe.o: fringe.c dispextern.h nsgui.h frame.h window.h buffer.h termhooks.h \ + blockinput.h atimer.h systime.h lisp.h globals.h $(config_h) +ftfont.o: ftfont.c dispextern.h frame.h character.h charset.h composite.h \ + font.h lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h \ + fontset.h ccl.h ftfont.h globals.h getloadavg.o: getloadavg.c $(config_h) +gnutls.o: gnutls.c gnutls.h process.h ../lib/unistd.h \ + lisp.h globals.h $(config_h) gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \ - blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \ - charset.h coding.h syssignal.h dispextern.h composite.h + blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h charset.h \ + coding.h syssignal.h dispextern.h composite.h globals.h xsettings.h image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \ systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \ - nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h + nsterm.h nsgui.h ../lib/unistd.h lisp.h globals.h $(config_h) \ + composite.h termhooks.h ccl.h indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) \ termchar.h termopts.h disptab.h region-cache.h character.h category.h \ - keyboard.h systime.h coding.h $(INTERVALS_H) + keyboard.h systime.h coding.h $(INTERVALS_H) globals.h insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \ - dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h) + atimer.h systime.h region-cache.h lisp.h globals.h $(config_h) keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \ commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \ systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \ xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h nsgui.h coding.h \ - lisp.h $(config_h) + process.h ../lib/unistd.h gnutls.h lisp.h globals.h $(config_h) keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) \ - keymap.h window.h coding.h frame.h lisp.h $(config_h) + keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h) lastfile.o: lastfile.c $(config_h) -macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \ - dispextern.h lisp.h $(config_h) systime.h coding.h composite.h +macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \ + dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h gmalloc.o: gmalloc.c $(config_h) ralloc.o: ralloc.c lisp.h $(config_h) -vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h) -marker.o: marker.c buffer.h character.h lisp.h $(config_h) +vm-limit.o: vm-limit.c mem-limits.h lisp.h globals.h $(config_h) +marker.o: marker.c buffer.h character.h lisp.h globals.h $(config_h) md5.o: md5.c md5.h $(config_h) minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ - termhooks.h lisp.h $(config_h) coding.h + termhooks.h lisp.h globals.h $(config_h) coding.h msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h \ @@ -156,39 +168,45 @@ nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \ nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h) process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ - blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ - keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h -regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h \ + blockinput.h atimer.h coding.h msdos.h nsterm.h composite.h \ + keyboard.h lisp.h globals.h $(config_h) character.h xgselect.h sysselect.h \ + ../lib/unistd.h gnutls.h +regex.o: regex.c syntax.h buffer.h lisp.h globals.h $(config_h) regex.h \ category.h character.h -region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h) +region-cache.o: region-cache.c buffer.h region-cache.h \ + lisp.h globals.h $(config_h) scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \ - termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h + termhooks.h lisp.h globals.h $(config_h) systime.h coding.h composite.h \ + window.h search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \ blockinput.h atimer.h systime.h category.h character.h charset.h \ - $(INTERVALS_H) \ - lisp.h $(config_h) -sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h + $(INTERVALS_H) lisp.h globals.h $(config_h) +sound.o: sound.c dispextern.h syssignal.h lisp.h globals.h $(config_h) \ + atimer.h systime.h ../lib/unistd.h msdos.h syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \ - keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h) + keymap.h regex.h $(INTERVALS_H) lisp.h globals.h $(config_h) sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \ frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h \ - $(config_h) composite.h sysselect.h -term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) \ + globals.h $(config_h) composite.h sysselect.h gnutls.h \ + ../lib/unistd.h ../lib/ignore-value.h +term.o: term.c termchar.h termhooks.h termopts.h lisp.h globals.h $(config_h) \ cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \ xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \ - systty.h syssignal.h $(INTERVALS_H) buffer.h + systty.h syssignal.h $(INTERVALS_H) buffer.h ../lib/unistd.h termcap.o: termcap.c lisp.h $(config_h) terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ - keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h -terminfo.o: terminfo.c lisp.h $(config_h) + keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ + msdos.h +terminfo.o: terminfo.c lisp.h globals.h $(config_h) tparam.o: tparam.c lisp.h $(config_h) -undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h) +undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ + lisp.h globals.h $(config_h) unexaix.o: unexaix.c lisp.h $(config_h) unexalpha.o: unexalpha.c $(config_h) unexcw.o: unexcw.c lisp.h $(config_h) unexcoff.o: unexcoff.c lisp.h $(config_h) -unexelf.o: unexelf.c $(config_h) +unexelf.o: unexelf.c ../lib/unistd.h $(config_h) unexhp9k800.o: unexhp9k800.c $(config_h) unexmacosx.o: unexmacosx.c $(config_h) unexsol.o: unexsol.c lisp.h $(config_h) @@ -200,79 +218,90 @@ widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ disptab.h keyboard.h msdos.h coding.h termhooks.h \ keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \ - xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h) -xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ + xterm.h w32term.h nsterm.h nsgui.h lisp.h globals.h $(config_h) +xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h \ coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \ xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \ - blockinput.h atimer.h systime.h keymap.h font.h -xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ + blockinput.h atimer.h systime.h keymap.h font.h globals.h termopts.h \ + ../lib/unistd.h gnutls.h gtkutil.h +xfaces.o: xfaces.c frame.h xterm.h buffer.h blockinput.h \ window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \ systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \ - $(INTERVALS_H) nsgui.h termchar.h termhooks.h font.h lisp.h $(config_h) -xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ + $(INTERVALS_H) nsgui.h termchar.h termhooks.h font.h \ + lisp.h globals.h $(config_h) +xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h \ $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \ character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \ - fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h + fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h globals.h \ + ../lib/unistd.h xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ - font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h -xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ - font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h -ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \ - font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h + font.h lisp.h globals.h $(config_h) atimer.h systime.h fontset.h ccl.h +xftfont.o: xftfont.c dispextern.h xterm.h frame.h blockinput.h character.h \ + charset.h font.h lisp.h globals.h $(config_h) atimer.h systime.h \ + fontset.h ccl.h ftfont.h composite.h +ftxfont.o: ftxfont.c dispextern.h xterm.h frame.h blockinput.h character.h \ + charset.h font.h lisp.h globals.h $(config_h) atimer.h systime.h \ + fontset.h ccl.h menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \ dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \ - lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h nsgui.h + lisp.h globals.h $(config_h) systime.h coding.h composite.h window.h \ + atimer.h nsterm.h w32term.h msdos.h xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \ charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \ - systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \ - keymap.h sysselect.h -xml.o: xml.c buffer.h lisp.h $(config_h) + systime.h gtkutil.h msdos.h coding.h menu.h lisp.h globals.h $(config_h) \ + composite.h keymap.h sysselect.h +xml.o: xml.c buffer.h lisp.h globals.h $(config_h) xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \ dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \ keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \ - coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \ - xsettings.h intervals.h keymap.h xgselect.h sysselect.h + coding.h process.h gtkutil.h font.h fontset.h lisp.h globals.h $(config_h) \ + xsettings.h intervals.h keymap.h xgselect.h sysselect.h ../lib/unistd.h \ + gnutls.h xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \ buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \ - coding.h composite.h -xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h) -xrdb.o: xrdb.c lisp.h $(config_h) epaths.h + coding.h composite.h ../lib/unistd.h globals.h gnutls.h +xgselect.o: xgselect.h systime.h sysselect.h lisp.h globals.h $(config_h) +xrdb.o: xrdb.c lisp.h globals.h $(config_h) epaths.h ../lib/unistd.h xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h \ - xterm.h lisp.h termopts.h frame.h dispextern.h + xterm.h lisp.h termopts.h frame.h dispextern.h ../lib/unistd.h globals.h \ + gnutls.h keyboard.h coding.h composite.h xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \ dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h \ - atimer.h termopts.h + atimer.h termopts.h globals.h ## The files of Lisp proper. alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \ keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \ - $(INTERVALS_H) termhooks.h + $(INTERVALS_H) termhooks.h gnutls.h coding.h ../lib/unistd.h globals.h bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \ - frame.h xterm.h lisp.h $(config_h) + lisp.h globals.h $(config_h) msdos.h data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \ termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \ - lisp.h $(config_h) -eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \ - dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h -floatfns.o: floatfns.c syssignal.h lisp.h $(config_h) + lisp.h globals.h $(config_h) msdos.h +eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h frame.h \ + dispextern.h lisp.h globals.h $(config_h) coding.h composite.h xterm.h \ + msdos.h +floatfns.o: floatfns.c syssignal.h lisp.h globals.h $(config_h) fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h \ - keyboard.h keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \ - blockinput.h atimer.h systime.h xterm.h + keyboard.h keymap.h window.h $(INTERVALS_H) coding.h md5.h \ + blockinput.h atimer.h systime.h xterm.h ../lib/unistd.h globals.h print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ - lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \ - blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h + lisp.h globals.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \ + blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h \ + gnutls.h ../lib/unistd.h ../lib/ftoastr.h ../lib/intprops.h lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ - charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \ - systime.h frame.h blockinput.h atimer.h + charset.h lisp.h globals.h $(config_h) $(INTERVALS_H) termhooks.h \ + coding.h msdos.h systime.h frame.h blockinput.h atimer.h ../lib/unistd.h ## Text properties support. -composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \ - frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h) +composite.o: composite.c composite.h buffer.h character.h coding.h font.h \ + ccl.h frame.h termhooks.h $(INTERVALS_H) window.h \ + lisp.h globals.h $(config_h) intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \ - keymap.h lisp.h $(config_h) systime.h coding.h + keymap.h lisp.h globals.h $(config_h) systime.h coding.h textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \ - lisp.h $(config_h) + lisp.h globals.h $(config_h) ### deps.mk ends here diff --git a/src/dired.c b/src/dired.c index 08aa230f65f..e37055258d6 100644 --- a/src/dired.c +++ b/src/dired.c @@ -99,7 +99,7 @@ Lisp_Object Qfile_name_all_completions; Lisp_Object Qfile_attributes; Lisp_Object Qfile_attributes_lessp; -static int scmp (const unsigned char *, const unsigned char *, int); +static int scmp (const char *, const char *, int); #ifdef WINDOWSNT Lisp_Object @@ -533,7 +533,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v QUIT; if (! DIRENTRY_NONEMPTY (dp) || len < SCHARS (encoded_file) - || 0 <= scmp (dp->d_name, SDATA (encoded_file), + || 0 <= scmp (dp->d_name, SSDATA (encoded_file), SCHARS (encoded_file))) continue; @@ -558,7 +558,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v && matchcount > 1 && !includeall /* This match may allow includeall to 0. */ && len >= bestmatchsize - && 0 > scmp (dp->d_name, SDATA (bestmatch), bestmatchsize)) + && 0 > scmp (dp->d_name, SSDATA (bestmatch), bestmatchsize)) continue; #endif @@ -578,7 +578,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v CONSP (tem); tem = XCDR (tem)) { int elt_len; - unsigned char *p1; + char *p1; elt = XCAR (tem); if (!STRINGP (elt)) @@ -589,7 +589,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v elt_len = SCHARS (elt) - 1; /* -1 for trailing / */ if (elt_len <= 0) continue; - p1 = SDATA (elt); + p1 = SSDATA (elt); if (p1[elt_len] != '/') continue; skip = len - elt_len; @@ -619,7 +619,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v if (skip < 0) continue; if (0 <= scmp (dp->d_name + skip, - SDATA (elt), + SSDATA (elt), SCHARS (elt))) continue; break; @@ -796,13 +796,15 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v else number of chars that match at the beginning. */ static int -scmp (const unsigned char *s1, const unsigned char *s2, int len) +scmp (const char *s1, const char *s2, int len) { register int l = len; if (completion_ignore_case) { - while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++)) + while (l + && (DOWNCASE ((unsigned char) *s1++) + == DOWNCASE ((unsigned char) *s2++))) l--; } else diff --git a/src/dispextern.h b/src/dispextern.h index 26e0bb61f17..6d54ebefd84 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3151,7 +3151,7 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, int *); int ascii_face_of_lisp_face (struct frame *, int); void prepare_face_for_display (struct frame *, struct face *); -int xstrcasecmp (const unsigned char *, const unsigned char *); +int xstrcasecmp (const char *, const char *); int lookup_named_face (struct frame *, Lisp_Object, int); int lookup_basic_face (struct frame *, int); int smaller_face (struct frame *, int, int); @@ -3361,4 +3361,3 @@ extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object, #endif /* HAVE_WINDOW_SYSTEM */ #endif /* not DISPEXTERN_H_INCLUDED */ - diff --git a/src/doc.c b/src/doc.c index f9f67c03863..c56f0b6c9df 100644 --- a/src/doc.c +++ b/src/doc.c @@ -261,7 +261,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) the same way we would read bytes from a file. */ if (definition) { - read_bytecode_pointer = get_doc_string_buffer + offset; + read_bytecode_pointer = (unsigned char *) get_doc_string_buffer + offset; return Fread (Qlambda); } @@ -271,8 +271,10 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) else { /* The data determines whether the string is multibyte. */ - EMACS_INT nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, - to - (get_doc_string_buffer + offset)); + EMACS_INT nchars = + multibyte_chars_in_text (((unsigned char *) get_doc_string_buffer + + offset), + to - (get_doc_string_buffer + offset)); return make_string_from_bytes (get_doc_string_buffer + offset, nchars, to - (get_doc_string_buffer + offset)); @@ -640,7 +642,8 @@ the same file name is found in the `doc-directory'. */) } sym = oblookup (Vobarray, p + 2, - multibyte_chars_in_text (p + 2, end - p - 2), + multibyte_chars_in_text ((unsigned char *) p + 2, + end - p - 2), end - p - 2); /* Check skip_file so that when a function is defined several times in different files (typically, once in xterm, once in @@ -695,10 +698,10 @@ Returns original STRING if no substitutions were made. Otherwise, a new string, without any text properties, is returned. */) (Lisp_Object string) { - unsigned char *buf; + char *buf; int changed = 0; register unsigned char *strp; - register unsigned char *bufp; + register char *bufp; EMACS_INT idx; EMACS_INT bsize; Lisp_Object tem; @@ -731,7 +734,7 @@ a new string, without any text properties, is returned. */) keymap = Voverriding_local_map; bsize = SBYTES (string); - bufp = buf = (unsigned char *) xmalloc (bsize); + bufp = buf = (char *) xmalloc (bsize); strp = SDATA (string); while (strp < SDATA (string) + SBYTES (string)) @@ -778,7 +781,7 @@ a new string, without any text properties, is returned. */) /* Save STRP in IDX. */ idx = strp - SDATA (string); - name = Fintern (make_string (start, length_byte), Qnil); + name = Fintern (make_string ((char *) start, length_byte), Qnil); do_remap: tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil); @@ -800,7 +803,7 @@ a new string, without any text properties, is returned. */) if (NILP (tem)) /* but not on any keys */ { EMACS_INT offset = bufp - buf; - buf = (unsigned char *) xrealloc (buf, bsize += 4); + buf = (char *) xrealloc (buf, bsize += 4); bufp = buf + offset; memcpy (bufp, "M-x ", 4); bufp += 4; @@ -845,7 +848,7 @@ a new string, without any text properties, is returned. */) /* Get the value of the keymap in TEM, or nil if undefined. Do this while still in the user's current buffer in case it is a local variable. */ - name = Fintern (make_string (start, length_byte), Qnil); + name = Fintern (make_string ((char *) start, length_byte), Qnil); tem = Fboundp (name); if (! NILP (tem)) { @@ -894,7 +897,7 @@ a new string, without any text properties, is returned. */) subst: { EMACS_INT offset = bufp - buf; - buf = (unsigned char *) xrealloc (buf, bsize += length_byte); + buf = (char *) xrealloc (buf, bsize += length_byte); bufp = buf + offset; memcpy (bufp, start, length_byte); bufp += length_byte; diff --git a/src/doprnt.c b/src/doprnt.c index 979cce3c402..36eb272caae 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -71,11 +71,11 @@ doprnt (char *buffer, register int bufsize, const char *format, char *big_buffer = 0; register int tem; - unsigned char *string; + char *string; char fixed_buffer[20]; /* Default buffer for small formatting. */ char *fmtcpy; int minlen; - unsigned char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ + char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ if (format_end == 0) format_end = format + strlen (format); @@ -97,7 +97,7 @@ doprnt (char *buffer, register int bufsize, const char *format, fmt++; /* Copy this one %-spec into fmtcpy. */ - string = (unsigned char *) fmtcpy; + string = fmtcpy; *string++ = '%'; while (1) { @@ -166,7 +166,7 @@ doprnt (char *buffer, register int bufsize, const char *format, abort (); sprintf (sprintf_buffer, fmtcpy, va_arg(ap, char *)); /* Now copy into final output, truncating as nec. */ - string = (unsigned char *) sprintf_buffer; + string = sprintf_buffer; goto doit; case 'f': @@ -176,7 +176,7 @@ doprnt (char *buffer, register int bufsize, const char *format, double d = va_arg(ap, double); sprintf (sprintf_buffer, fmtcpy, d); /* Now copy into final output, truncating as nec. */ - string = (unsigned char *) sprintf_buffer; + string = sprintf_buffer; goto doit; } @@ -185,7 +185,7 @@ doprnt (char *buffer, register int bufsize, const char *format, case 's': if (fmtcpy[1] != 's') minlen = atoi (&fmtcpy[1]); - string = va_arg(ap, unsigned char *); + string = va_arg (ap, char *); tem = strlen (string); width = strwidth (string, tem); goto doit1; @@ -242,7 +242,7 @@ doprnt (char *buffer, register int bufsize, const char *format, both are passed the same way, otherwise we'll need to rewrite callers. */ EMACS_INT chr = va_arg(ap, EMACS_INT); - tem = CHAR_STRING ((int) chr, charbuf); + tem = CHAR_STRING ((int) chr, (unsigned char *) charbuf); string = charbuf; string[tem] = 0; width = strwidth (string, tem); @@ -277,4 +277,3 @@ doprnt (char *buffer, register int bufsize, const char *format, *bufptr = 0; /* Make sure our string end with a '\0' */ return bufptr - buffer; } - diff --git a/src/editfns.c b/src/editfns.c index 7364a5bcf15..30acc36f025 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -92,9 +92,9 @@ static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, EMACS_INT *, Lisp_Object, EMACS_INT *); static void update_buffer_properties (EMACS_INT, EMACS_INT); static Lisp_Object region_limit (int); -static size_t emacs_memftimeu (char *, size_t, const char *, - size_t, const struct tm *, int); -static void general_insert_function (void (*) (const unsigned char *, EMACS_INT), +static size_t emacs_nmemftime (char *, size_t, const char *, + size_t, const struct tm *, int, int); +static void general_insert_function (void (*) (const char *, EMACS_INT), void (*) (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int), @@ -120,7 +120,7 @@ void init_editfns (void) { char *user_name; - register unsigned char *p; + register char *p; struct passwd *pw; /* password entry for the current user */ Lisp_Object tem; @@ -165,7 +165,7 @@ init_editfns (void) Vuser_full_name = Fuser_full_name (NILP (tem)? make_number (geteuid()) : Vuser_login_name); - p = (unsigned char *) getenv ("NAME"); + p = getenv ("NAME"); if (p) Vuser_full_name = build_string (p); else if (NILP (Vuser_full_name)) @@ -193,7 +193,7 @@ usage: (char-to-string CHAR) */) CHECK_CHARACTER (character); len = CHAR_STRING (XFASTINT (character), str); - return make_string_from_bytes (str, 1, len); + return make_string_from_bytes ((char *) str, 1, len); } DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, @@ -205,7 +205,7 @@ DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, if (XINT (byte) < 0 || XINT (byte) > 255) error ("Invalid byte"); b = XINT (byte); - return make_string_from_bytes (&b, 1, 1); + return make_string_from_bytes ((char *) &b, 1, 1); } DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, @@ -1329,7 +1329,7 @@ name, or nil if there is no such user. */) (Lisp_Object uid) { struct passwd *pw; - register unsigned char *p, *q; + register char *p, *q; Lisp_Object full; if (NILP (uid)) @@ -1352,26 +1352,26 @@ name, or nil if there is no such user. */) if (!pw) return Qnil; - p = (unsigned char *) USER_FULL_NAME; + p = USER_FULL_NAME; /* Chop off everything after the first comma. */ - q = (unsigned char *) strchr (p, ','); + q = strchr (p, ','); full = make_string (p, q ? q - p : strlen (p)); #ifdef AMPERSAND_FULL_NAME - p = SDATA (full); - q = (unsigned char *) strchr (p, '&'); + p = SSDATA (full); + q = strchr (p, '&'); /* Substitute the login name for the &, upcasing the first character. */ if (q) { - register unsigned char *r; + register char *r; Lisp_Object login; login = Fuser_login_name (make_number (pw->pw_uid)); - r = (unsigned char *) alloca (strlen (p) + SCHARS (login) + 1); + r = (char *) alloca (strlen (p) + SCHARS (login) + 1); memcpy (r, p, q - p); r[q - p] = 0; strcat (r, SSDATA (login)); - r[q - p] = UPCASE (r[q - p]); + r[q - p] = UPCASE ((unsigned char) r[q - p]); strcat (r, q + 1); full = build_string (r); } @@ -1549,6 +1549,7 @@ or (if you need time as a string) `format-time-string'. */) /* Write information into buffer S of size MAXSIZE, according to the FORMAT of length FORMAT_LEN, using time information taken from *TP. Default to Universal Time if UT is nonzero, local time otherwise. + Use NS as the number of nanoseconds in the %N directive. Return the number of bytes written, not including the terminating '\0'. If S is NULL, nothing will be written anywhere; so to determine how many bytes would be written, use NULL for S and @@ -1557,7 +1558,8 @@ or (if you need time as a string) `format-time-string'. */) This function behaves like nstrftime, except it allows null bytes in FORMAT and it does not support nanoseconds. */ static size_t -emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, const struct tm *tp, int ut) +emacs_nmemftime (char *s, size_t maxsize, const char *format, + size_t format_len, const struct tm *tp, int ut, int ns) { size_t total = 0; @@ -1574,7 +1576,7 @@ emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, if (s) s[0] = '\1'; - result = nstrftime (s, maxsize, format, tp, ut, 0); + result = nstrftime (s, maxsize, format, tp, ut, ns); if (s) { @@ -1620,6 +1622,7 @@ by text that describes the specified date and time in TIME: %p is the locale's equivalent of either AM or PM. %M is the minute. %S is the second. +%N is the nanosecond, %6N the microsecond, %3N the millisecond, etc. %Z is the time zone name, %z is the numeric form. %s is the number of seconds since 1970-01-01 00:00:00 +0000. @@ -1649,13 +1652,17 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) { time_t value; int size; + int usec; + int ns; struct tm *tm; int ut = ! NILP (universal); CHECK_STRING (format_string); - if (! lisp_time_argument (time, &value, NULL)) + if (! (lisp_time_argument (time, &value, &usec) + && 0 <= usec && usec < 1000000)) error ("Invalid time specification"); + ns = usec * 1000; format_string = code_convert_string_norecord (format_string, Vlocale_coding_system, 1); @@ -1678,9 +1685,9 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) buf[0] = '\1'; BLOCK_INPUT; - result = emacs_memftimeu (buf, size, SSDATA (format_string), + result = emacs_nmemftime (buf, size, SSDATA (format_string), SBYTES (format_string), - tm, ut); + tm, ut, ns); UNBLOCK_INPUT; if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) return code_convert_string_norecord (make_unibyte_string (buf, result), @@ -1688,10 +1695,10 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) /* If buffer was too small, make it bigger and try again. */ BLOCK_INPUT; - result = emacs_memftimeu (NULL, (size_t) -1, + result = emacs_nmemftime (NULL, (size_t) -1, SSDATA (format_string), SBYTES (format_string), - tm, ut); + tm, ut, ns); UNBLOCK_INPUT; size = result + 1; } @@ -2111,7 +2118,7 @@ set_time_zone_rule (const char *tzstring) static void general_insert_function (void (*insert_func) - (const unsigned char *, EMACS_INT), + (const char *, EMACS_INT), void (*insert_from_string_func) (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int), @@ -2137,7 +2144,7 @@ general_insert_function (void (*insert_func) : multibyte_char_to_unibyte (XINT (val), Qnil)); len = 1; } - (*insert_func) (str, len); + (*insert_func) ((char *) str, len); } else if (STRINGP (val)) { @@ -2250,7 +2257,7 @@ The optional third arg INHERIT, if non-nil, says to inherit text properties from adjoining text, if those properties are sticky. */) (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) { - register unsigned char *string; + register char *string; register EMACS_INT strlen; register int i; register EMACS_INT n; @@ -2270,7 +2277,7 @@ from adjoining text, if those properties are sticky. */) if (n <= 0) return Qnil; strlen = min (n, 256 * len); - string = (unsigned char *) alloca (strlen); + string = (char *) alloca (strlen); for (i = 0; i < strlen; i++) string[i] = str[i % len]; while (n >= strlen) @@ -2821,7 +2828,7 @@ Both characters must have the same length of multi-byte form. */) GCPRO1 (tem); /* Make a multibyte string containing this single character. */ - string = make_multibyte_string (tostr, 1, len); + string = make_multibyte_string ((char *) tostr, 1, len); /* replace_range is less efficient, because it moves the gap, but it handles combining correctly. */ replace_range (pos, pos + 1, string, @@ -3035,7 +3042,7 @@ It returns the number of characters changed. */) /* This is less efficient, because it moves the gap, but it should handle multibyte characters correctly. */ - string = make_multibyte_string (str, 1, str_len); + string = make_multibyte_string ((char *) str, 1, str_len); replace_range (pos, pos + 1, string, 1, 0, 1); len = str_len; } @@ -3249,6 +3256,9 @@ save_restriction_restore (Lisp_Object data) } } + /* Changing the buffer bounds invalidates any recorded current column. */ + invalidate_current_column (); + if (cur) set_buffer_internal (cur); @@ -3501,7 +3511,7 @@ usage: (format STRING &rest OBJECTS) */) register int n; /* The number of the next arg to substitute */ register EMACS_INT total; /* An estimate of the final length */ char *buf, *p; - register unsigned char *format, *end, *format_start; + register char *format, *end, *format_start; int nchars; /* Nonzero if the output should be a multibyte string, which is true if any of the inputs is one. */ @@ -3511,7 +3521,7 @@ usage: (format STRING &rest OBJECTS) */) multibyte character of the previous string. This flag tells if we must consider such a situation or not. */ int maybe_combine_byte; - unsigned char *this_format; + char *this_format; /* Precision for each spec, or -1, a flag value meaning no precision was given in that spec. Element 0, corresonding to the format string itself, will not be used. Element NARGS, corresponding to @@ -3565,7 +3575,7 @@ usage: (format STRING &rest OBJECTS) */) That can only happen from the first large while loop below. */ retry: - format = SDATA (args[0]); + format = SSDATA (args[0]); format_start = format; end = format + SBYTES (args[0]); longest_format = 0; @@ -3595,7 +3605,7 @@ usage: (format STRING &rest OBJECTS) */) { EMACS_INT thissize = 0; EMACS_INT actual_width = 0; - unsigned char *this_format_start = format - 1; + char *this_format_start = format - 1; int field_width = 0; /* General format specifications look like @@ -3775,7 +3785,7 @@ usage: (format STRING &rest OBJECTS) */) /* Now we can no longer jump to retry. TOTAL and LONGEST_FORMAT are known for certain. */ - this_format = (unsigned char *) alloca (longest_format + 1); + this_format = (char *) alloca (longest_format + 1); /* Allocate the space for the result. Note that TOTAL is an overestimate. */ @@ -3786,7 +3796,7 @@ usage: (format STRING &rest OBJECTS) */) n = 0; /* Scan the format and store result in BUF. */ - format = SDATA (args[0]); + format = SSDATA (args[0]); format_start = format; end = format + SBYTES (args[0]); maybe_combine_byte = 0; @@ -3796,7 +3806,7 @@ usage: (format STRING &rest OBJECTS) */) { int minlen; int negative = 0; - unsigned char *this_format_start = format; + char *this_format_start = format; discarded[format - format_start] = 1; format++; @@ -3877,7 +3887,7 @@ usage: (format STRING &rest OBJECTS) */) && !CHAR_HEAD_P (SREF (args[n], 0))) maybe_combine_byte = 1; - p += copy_text (SDATA (args[n]), p, + p += copy_text (SDATA (args[n]), (unsigned char *) p, nbytes, STRING_MULTIBYTE (args[n]), multibyte); @@ -3945,7 +3955,8 @@ usage: (format STRING &rest OBJECTS) */) maybe_combine_byte = 1; this_nchars = strlen (p); if (multibyte) - p += str_to_multibyte (p, buf + total - 1 - p, this_nchars); + p += str_to_multibyte ((unsigned char *) p, + buf + total - 1 - p, this_nchars); else p += this_nchars; nchars += this_nchars; @@ -3972,7 +3983,8 @@ usage: (format STRING &rest OBJECTS) */) else if (multibyte) { /* Convert a single-byte character to multibyte. */ - int len = copy_text (format, p, 1, 0, 1); + int len = copy_text ((unsigned char *) format, (unsigned char *) p, + 1, 0, 1); p += len; format++; @@ -3986,7 +3998,7 @@ usage: (format STRING &rest OBJECTS) */) abort (); if (maybe_combine_byte) - nchars = multibyte_chars_in_text (buf, p - buf); + nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf); val = make_specified_string (buf, nchars, p - buf, multibyte); /* If we allocated BUF with malloc, free it too. */ diff --git a/src/emacs.c b/src/emacs.c index 53786b0adae..4455e6b4d9f 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1296,6 +1296,8 @@ main (int argc, char **argv) #ifdef NS_IMPL_COCOA if (skip_args < argc) { + /* FIXME: Do the right thing if getenv returns NULL, or if + chdir fails. */ if (!strncmp(argv[skip_args], "-psn", 4)) { skip_args += 1; diff --git a/src/eval.c b/src/eval.c index e8b4ae1aba9..9adfc983ced 100644 --- a/src/eval.c +++ b/src/eval.c @@ -136,7 +136,7 @@ init_eval_once (void) specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); specpdl_ptr = specpdl; /* Don't forget to update docs (lispref node "Local Variables"). */ - max_specpdl_size = 1200; /* 1000 is not enough for CEDET's c-by.el. */ + max_specpdl_size = 1300; /* 1000 is not enough for CEDET's c-by.el. */ max_lisp_eval_depth = 600; Vrun_hooks = Qnil; @@ -3845,8 +3845,8 @@ The value the function returns is not used. */); staticpro (&Qinternal_interpreter_environment); #if 0 /* Don't export this variable to Elisp, so noone can mess with it (Just imagine if someone makes it buffer-local). */ - DEFVAR_LISP ("internal-interpreter-environment", - &Vinternal_interpreter_environment, + DEFVAR__LISP ("internal-interpreter-environment", + Vinternal_interpreter_environment, doc: /* If non-nil, the current lexical environment of the lisp interpreter. When lexical binding is not being used, this variable is nil. A value of `(t)' indicates an empty environment, otherwise it is an diff --git a/src/fileio.c b/src/fileio.c index 3c61ee57bf2..429fce9f5a0 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -79,12 +79,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z') #endif #ifdef WINDOWSNT -#define IS_DRIVE(x) isalpha (x) +#define IS_DRIVE(x) isalpha ((unsigned char) (x)) #endif /* Need to lower-case the drive letter, or else expanded filenames will sometimes compare inequal, because `expand-file-name' doesn't always down-case the drive letter. */ -#define DRIVE_LETTER(x) (tolower (x)) +#define DRIVE_LETTER(x) (tolower ((unsigned char) (x))) #endif #include "systime.h" @@ -193,7 +193,7 @@ report_file_error (const char *string, Lisp_Object data) int c; str = SSDATA (errstring); - c = STRING_CHAR (str); + c = STRING_CHAR ((unsigned char *) str); Faset (errstring, make_number (0), make_number (DOWNCASE (c))); } @@ -324,11 +324,11 @@ Given a Unix syntax file name, returns a string ending in slash. */) (Lisp_Object filename) { #ifndef DOS_NT - register const unsigned char *beg; + register const char *beg; #else - register unsigned char *beg; + register char *beg; #endif - register const unsigned char *p; + register const char *p; Lisp_Object handler; CHECK_STRING (filename); @@ -341,10 +341,10 @@ Given a Unix syntax file name, returns a string ending in slash. */) filename = FILE_SYSTEM_CASE (filename); #ifdef DOS_NT - beg = (unsigned char *) alloca (SBYTES (filename) + 1); - memcpy (beg, SDATA (filename), SBYTES (filename) + 1); + beg = (char *) alloca (SBYTES (filename) + 1); + memcpy (beg, SSDATA (filename), SBYTES (filename) + 1); #else - beg = SDATA (filename); + beg = SSDATA (filename); #endif p = beg + SBYTES (filename); @@ -365,8 +365,8 @@ Given a Unix syntax file name, returns a string ending in slash. */) if (p[-1] == ':') { /* MAXPATHLEN+1 is guaranteed to be enough space for getdefdir. */ - unsigned char *res = alloca (MAXPATHLEN + 1); - unsigned char *r = res; + char *res = alloca (MAXPATHLEN + 1); + char *r = res; if (p == beg + 4 && IS_DIRECTORY_SEP (*beg) && beg[1] == ':') { @@ -375,7 +375,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) r += 2; } - if (getdefdir (toupper (*beg) - 'A' + 1, r)) + if (getdefdir (toupper ((unsigned char) *beg) - 'A' + 1, r)) { if (!IS_DIRECTORY_SEP (res[strlen (res) - 1])) strcat (res, "/"); @@ -397,7 +397,7 @@ this is everything after the last slash, or the entire name if it contains no slash. */) (Lisp_Object filename) { - register const unsigned char *beg, *p, *end; + register const char *beg, *p, *end; Lisp_Object handler; CHECK_STRING (filename); @@ -408,7 +408,7 @@ or the entire name if it contains no slash. */) if (!NILP (handler)) return call2 (handler, Qfile_name_nondirectory, filename); - beg = SDATA (filename); + beg = SSDATA (filename); end = p = beg + SBYTES (filename); while (p != beg && !IS_DIRECTORY_SEP (p[-1]) @@ -600,7 +600,7 @@ make_temp_name (Lisp_Object prefix, int base64_p) Lisp_Object val; int len, clen; int pid; - unsigned char *p, *data; + char *p, *data; char pidbuf[20]; int pidlen; @@ -637,8 +637,8 @@ make_temp_name (Lisp_Object prefix, int base64_p) val = make_uninit_multibyte_string (clen + 3 + pidlen, len + 3 + pidlen); if (!STRING_MULTIBYTE (prefix)) STRING_SET_UNIBYTE (val); - data = SDATA (val); - memcpy (data, SDATA (prefix), len); + data = SSDATA (val); + memcpy (data, SSDATA (prefix), len); p = data + len; memcpy (p, pidbuf, pidlen); @@ -744,9 +744,9 @@ filesystem tree, not (expand-file-name ".." dirname). */) { /* These point to SDATA and need to be careful with string-relocation during GC (via DECODE_FILE). */ - unsigned char *nm, *newdir; + char *nm, *newdir; /* This should only point to alloca'd data. */ - unsigned char *target; + char *target; int tlen; struct passwd *pw; @@ -796,7 +796,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) } { - unsigned char *o = SDATA (default_directory); + char *o = SSDATA (default_directory); /* Make sure DEFAULT_DIRECTORY is properly expanded. It would be better to do this down below where we actually use @@ -848,8 +848,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) } /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */ - nm = (unsigned char *) alloca (SBYTES (name) + 1); - memcpy (nm, SDATA (name), SBYTES (name) + 1); + nm = (char *) alloca (SBYTES (name) + 1); + memcpy (nm, SSDATA (name), SBYTES (name) + 1); #ifdef DOS_NT /* Note if special escape prefix is present, but remove for now. */ @@ -864,7 +864,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) drive specifier at the beginning. */ if (IS_DRIVE (nm[0]) && IS_DEVICE_SEP (nm[1])) { - drive = nm[0]; + drive = (unsigned char) nm[0]; nm += 2; } @@ -903,7 +903,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) non-zero value, that means we've discovered that we can't do that cool trick. */ int lose = 0; - unsigned char *p = nm; + char *p = nm; while (*p) { @@ -941,7 +941,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) else #endif /* drive must be set, so this is okay */ - if (strcmp (nm - 2, SDATA (name)) != 0) + if (strcmp (nm - 2, SSDATA (name)) != 0) { char temp[] = " :"; @@ -983,8 +983,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) { Lisp_Object tem; - if (!(newdir = (unsigned char *) egetenv ("HOME"))) - newdir = (unsigned char *) ""; + if (!(newdir = egetenv ("HOME"))) + newdir = ""; nm++; /* egetenv may return a unibyte string, which will bite us since we expect the directory to be multibyte. */ @@ -992,7 +992,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) if (!STRING_MULTIBYTE (tem)) { hdir = DECODE_FILE (tem); - newdir = SDATA (hdir); + newdir = SSDATA (hdir); } #ifdef DOS_NT collapse_newdir = 0; @@ -1000,7 +1000,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) } else /* ~user/filename */ { - unsigned char *o, *p; + char *o, *p; for (p = nm; *p && (!IS_DIRECTORY_SEP (*p)); p++); o = alloca (p - nm + 1); memcpy (o, nm, p - nm); @@ -1011,7 +1011,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) UNBLOCK_INPUT; if (pw) { - newdir = (unsigned char *) pw -> pw_dir; + newdir = pw->pw_dir; nm = p; #ifdef DOS_NT collapse_newdir = 0; @@ -1060,7 +1060,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) #endif && !newdir) { - newdir = SDATA (default_directory); + newdir = SSDATA (default_directory); #ifdef DOS_NT /* Note if special escape prefix is present, but remove for now. */ if (newdir[0] == '/' && newdir[1] == ':') @@ -1093,7 +1093,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { - drive = newdir[0]; + drive = (unsigned char) newdir[0]; newdir += 2; } if (!IS_DIRECTORY_SEP (nm[0])) @@ -1127,7 +1127,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) #ifdef WINDOWSNT if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])) { - unsigned char *p; + char *p; newdir = strcpy (alloca (strlen (newdir) + 1), newdir); p = newdir + 2; while (*p && !IS_DIRECTORY_SEP (*p)) p++; @@ -1153,7 +1153,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) #endif ) { - unsigned char *temp = (unsigned char *) alloca (length); + char *temp = (char *) alloca (length); memcpy (temp, newdir, length - 1); temp[length - 1] = 0; newdir = temp; @@ -1169,10 +1169,10 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* Reserve space for drive specifier and escape prefix, since either or both may need to be inserted. (The Microsoft x86 compiler produces incorrect code if the following two lines are combined.) */ - target = (unsigned char *) alloca (tlen + 4); + target = (char *) alloca (tlen + 4); target += 4; #else /* not DOS_NT */ - target = (unsigned char *) alloca (tlen); + target = (char *) alloca (tlen); #endif /* not DOS_NT */ *target = 0; @@ -1200,8 +1200,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* Now canonicalize by removing `//', `/.' and `/foo/..' if they appear. */ { - unsigned char *p = target; - unsigned char *o = target; + char *p = target; + char *o = target; while (*p) { @@ -1233,7 +1233,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0)) { #ifdef WINDOWSNT - unsigned char *prev_o = o; + char *prev_o = o; #endif while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) ; @@ -1460,7 +1460,7 @@ See also the function `substitute-in-file-name'.") /* If /~ or // appears, discard everything through first slash. */ static int -file_name_absolute_p (const unsigned char *filename) +file_name_absolute_p (const char *filename) { return (IS_DIRECTORY_SEP (*filename) || *filename == '~' @@ -1471,10 +1471,10 @@ file_name_absolute_p (const unsigned char *filename) ); } -static unsigned char * -search_embedded_absfilename (unsigned char *nm, unsigned char *endp) +static char * +search_embedded_absfilename (char *nm, char *endp) { - unsigned char *p, *s; + char *p, *s; for (p = nm + 1; p < endp; p++) { @@ -1491,7 +1491,7 @@ search_embedded_absfilename (unsigned char *nm, unsigned char *endp) for (s = p; *s && (!IS_DIRECTORY_SEP (*s)); s++); if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ { - unsigned char *o = alloca (s - p + 1); + char *o = alloca (s - p + 1); struct passwd *pw; memcpy (o, p, s - p); o [s - p] = 0; @@ -1525,14 +1525,14 @@ If `//' appears, everything up to and including the first of those `/' is discarded. */) (Lisp_Object filename) { - unsigned char *nm; + char *nm; - register unsigned char *s, *p, *o, *x, *endp; - unsigned char *target = NULL; + register char *s, *p, *o, *x, *endp; + char *target = NULL; int total = 0; int substituted = 0; int multibyte; - unsigned char *xnm; + char *xnm; Lisp_Object handler; CHECK_STRING (filename); @@ -1548,7 +1548,7 @@ those `/' is discarded. */) /* Always work on a copy of the string, in case GC happens during decode of environment variables, causing the original Lisp_String data to be relocated. */ - nm = (unsigned char *) alloca (SBYTES (filename) + 1); + nm = (char *) alloca (SBYTES (filename) + 1); memcpy (nm, SDATA (filename), SBYTES (filename) + 1); #ifdef DOS_NT @@ -1600,7 +1600,7 @@ those `/' is discarded. */) } /* Copy out the variable name */ - target = (unsigned char *) alloca (s - o + 1); + target = (char *) alloca (s - o + 1); strncpy (target, o, s - o); target[s - o] = 0; #ifdef DOS_NT @@ -1608,7 +1608,7 @@ those `/' is discarded. */) #endif /* DOS_NT */ /* Get variable value */ - o = (unsigned char *) egetenv (target); + o = egetenv (target); if (o) { /* Don't try to guess a maximum length - UTF8 can use up to @@ -1631,7 +1631,7 @@ those `/' is discarded. */) /* If substitution required, recopy the string and do it */ /* Make space in stack frame for the new copy */ - xnm = (unsigned char *) alloca (SBYTES (filename) + total + 1); + xnm = (char *) alloca (SBYTES (filename) + total + 1); x = xnm; /* Copy the rest of the name through, replacing $ constructs with values */ @@ -1663,7 +1663,7 @@ those `/' is discarded. */) } /* Copy out the variable name */ - target = (unsigned char *) alloca (s - o + 1); + target = (char *) alloca (s - o + 1); strncpy (target, o, s - o); target[s - o] = 0; #ifdef DOS_NT @@ -1671,7 +1671,7 @@ those `/' is discarded. */) #endif /* DOS_NT */ /* Get variable value */ - o = (unsigned char *) egetenv (target); + o = egetenv (target); if (!o) { *x++ = '$'; @@ -1751,7 +1751,8 @@ expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) If QUICK is nonzero, we ask for y or n, not yes or no. */ void -barf_or_query_if_file_exists (Lisp_Object absname, const unsigned char *querystring, int interactive, struct stat *statptr, int quick) +barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring, + int interactive, struct stat *statptr, int quick) { register Lisp_Object tem, encoded_filename; struct stat statbuf; @@ -2027,7 +2028,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal, doc: /* Create a new directory named DIRECTORY. */) (Lisp_Object directory) { - const unsigned char *dir; + const char *dir; Lisp_Object handler; Lisp_Object encoded_dir; @@ -2040,7 +2041,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal, encoded_dir = ENCODE_FILE (directory); - dir = SDATA (encoded_dir); + dir = SSDATA (encoded_dir); #ifdef WINDOWSNT if (mkdir (dir) != 0) @@ -2057,14 +2058,14 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal, doc: /* Delete the directory named DIRECTORY. Does not follow symlinks. */) (Lisp_Object directory) { - const unsigned char *dir; + const char *dir; Lisp_Object handler; Lisp_Object encoded_dir; CHECK_STRING (directory); directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil)); encoded_dir = ENCODE_FILE (directory); - dir = SDATA (encoded_dir); + dir = SSDATA (encoded_dir); if (rmdir (dir) != 0) report_file_error ("Removing directory", list1 (directory)); @@ -2371,7 +2372,7 @@ On Unix, this is a name starting with a `/' or a `~'. */) (Lisp_Object filename) { CHECK_STRING (filename); - return file_name_absolute_p (SDATA (filename)) ? Qt : Qnil; + return file_name_absolute_p (SSDATA (filename)) ? Qt : Qnil; } /* Return nonzero if file FILENAME exists and can be executed. */ @@ -3142,7 +3143,8 @@ read_non_regular (Lisp_Object ignore) immediate_quit = 1; QUIT; nbytes = emacs_read (non_regular_fd, - BEG_ADDR + PT_BYTE - BEG_BYTE + non_regular_inserted, + ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE + + non_regular_inserted), non_regular_nbytes); immediate_quit = 0; return make_number (nbytes); @@ -3196,9 +3198,9 @@ variable `last-coding-system-used' to the coding system actually used. */) Lisp_Object p; EMACS_INT total = 0; int not_regular = 0; - unsigned char read_buf[READ_BUF_SIZE]; + char read_buf[READ_BUF_SIZE]; struct coding_system coding; - unsigned char buffer[1 << 14]; + char buffer[1 << 14]; int replace_handled = 0; int set_coding_system = 0; Lisp_Object coding_system; @@ -3412,7 +3414,7 @@ variable `last-coding-system-used' to the coding system actually used. */) Ferase_buffer (); buf->enable_multibyte_characters = Qnil; - insert_1_both (read_buf, nread, nread, 0, 0, 0); + insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0); TEMP_SET_PT_BOTH (BEG, BEG_BYTE); coding_system = call2 (Vset_auto_coding_function, filename, make_number (nread)); @@ -3506,13 +3508,14 @@ variable `last-coding-system-used' to the coding system actually used. */) nread = emacs_read (fd, buffer, sizeof buffer); if (nread < 0) error ("IO error reading %s: %s", - SDATA (orig_filename), emacs_strerror (errno)); + SSDATA (orig_filename), emacs_strerror (errno)); else if (nread == 0) break; if (CODING_REQUIRE_DETECTION (&coding)) { - coding_system = detect_coding_system (buffer, nread, nread, 1, 0, + coding_system = detect_coding_system ((unsigned char *) buffer, + nread, nread, 1, 0, coding_system); setup_coding_system (coding_system, &coding); } @@ -3714,8 +3717,8 @@ variable `last-coding-system-used' to the coding system actually used. */) BUF_TEMP_SET_PT (XBUFFER (conversion_buffer), BUF_Z (XBUFFER (conversion_buffer))); - decode_coding_c_string (&coding, read_buf, unprocessed + this, - conversion_buffer); + decode_coding_c_string (&coding, (unsigned char *) read_buf, + unprocessed + this, conversion_buffer); unprocessed = coding.carryover_bytes; if (coding.carryover_bytes > 0) memcpy (read_buf, coding.carryover, unprocessed); @@ -3738,8 +3741,8 @@ variable `last-coding-system-used' to the coding system actually used. */) if (unprocessed > 0) { coding.mode |= CODING_MODE_LAST_BLOCK; - decode_coding_c_string (&coding, read_buf, unprocessed, - conversion_buffer); + decode_coding_c_string (&coding, (unsigned char *) read_buf, + unprocessed, conversion_buffer); coding.mode &= ~CODING_MODE_LAST_BLOCK; } @@ -3941,7 +3944,10 @@ variable `last-coding-system-used' to the coding system actually used. */) here doesn't do any harm. */ immediate_quit = 1; QUIT; - this = emacs_read (fd, BEG_ADDR + PT_BYTE - BEG_BYTE + inserted, trytry); + this = emacs_read (fd, + ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE + + inserted), + trytry); immediate_quit = 0; } @@ -4466,7 +4472,7 @@ This calls `write-region-annotate-functions' at the start, and register int desc; int failure; int save_errno = 0; - const unsigned char *fn; + const char *fn; struct stat st; int count = SPECPDL_INDEX (); int count1; @@ -4586,7 +4592,7 @@ This calls `write-region-annotate-functions' at the start, and encoded_filename = ENCODE_FILE (filename); - fn = SDATA (encoded_filename); + fn = SSDATA (encoded_filename); desc = -1; if (!NILP (append)) #ifdef DOS_NT diff --git a/src/fns.c b/src/fns.c index cf8cf3a3d83..326f210f84f 100644 --- a/src/fns.c +++ b/src/fns.c @@ -882,7 +882,7 @@ string_make_multibyte (Lisp_Object string) copy_text (SDATA (string), buf, SBYTES (string), 0, 1); - ret = make_multibyte_string (buf, SCHARS (string), nbytes); + ret = make_multibyte_string ((char *) buf, SCHARS (string), nbytes); SAFE_FREE (); return ret; @@ -914,7 +914,7 @@ string_to_multibyte (Lisp_Object string) memcpy (buf, SDATA (string), SBYTES (string)); str_to_multibyte (buf, nbytes, SBYTES (string)); - ret = make_multibyte_string (buf, SCHARS (string), nbytes); + ret = make_multibyte_string ((char *) buf, SCHARS (string), nbytes); SAFE_FREE (); return ret; @@ -940,7 +940,7 @@ string_make_unibyte (Lisp_Object string) copy_text (SDATA (string), buf, SBYTES (string), 1, 0); - ret = make_unibyte_string (buf, nchars); + ret = make_unibyte_string ((char *) buf, nchars); SAFE_FREE (); return ret; @@ -996,7 +996,7 @@ If STRING is multibyte and contains a character of charset memcpy (str, SDATA (string), bytes); bytes = str_as_unibyte (str, bytes); - string = make_unibyte_string (str, bytes); + string = make_unibyte_string ((char *) str, bytes); xfree (str); } return string; @@ -1079,7 +1079,7 @@ an error is signaled. */) if (converted < chars) error ("Can't convert the %dth character to unibyte", converted); - string = make_unibyte_string (str, chars); + string = make_unibyte_string ((char *) str, chars); xfree (str); } return string; @@ -2985,8 +2985,8 @@ into shorter lines. */) allength += allength / MIME_LINE_LENGTH + 1 + 6; SAFE_ALLOCA (encoded, char *, allength); - encoded_length = base64_encode_1 (BYTE_POS_ADDR (ibeg), encoded, length, - NILP (no_line_break), + encoded_length = base64_encode_1 ((char *) BYTE_POS_ADDR (ibeg), + encoded, length, NILP (no_line_break), !NILP (current_buffer->enable_multibyte_characters)); if (encoded_length > allength) abort (); @@ -3075,7 +3075,7 @@ base64_encode_1 (const char *from, char *to, EMACS_INT length, { if (multibyte) { - c = STRING_CHAR_AND_LENGTH (from + i, bytes); + c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes); if (CHAR_BYTE8_P (c)) c = CHAR_TO_BYTE8 (c); else if (c >= 256) @@ -3115,7 +3115,7 @@ base64_encode_1 (const char *from, char *to, EMACS_INT length, if (multibyte) { - c = STRING_CHAR_AND_LENGTH (from + i, bytes); + c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes); if (CHAR_BYTE8_P (c)) c = CHAR_TO_BYTE8 (c); else if (c >= 256) @@ -3139,7 +3139,7 @@ base64_encode_1 (const char *from, char *to, EMACS_INT length, if (multibyte) { - c = STRING_CHAR_AND_LENGTH (from + i, bytes); + c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes); if (CHAR_BYTE8_P (c)) c = CHAR_TO_BYTE8 (c); else if (c >= 256) @@ -3186,7 +3186,8 @@ If the region can't be decoded, signal an error and don't modify the buffer. */ SAFE_ALLOCA (decoded, char *, allength); move_gap_both (XFASTINT (beg), ibeg); - decoded_length = base64_decode_1 (BYTE_POS_ADDR (ibeg), decoded, length, + decoded_length = base64_decode_1 ((char *) BYTE_POS_ADDR (ibeg), + decoded, length, multibyte, &inserted_chars); if (decoded_length > allength) abort (); @@ -4569,7 +4570,7 @@ guesswork fails. Normally, an error is signaled in such case. */) (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror) { unsigned char digest[16]; - unsigned char value[33]; + char value[33]; int i; EMACS_INT size; EMACS_INT size_byte = 0; diff --git a/src/font.c b/src/font.c index 907271566da..841125a0587 100644 --- a/src/font.c +++ b/src/font.c @@ -315,7 +315,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror if (SYMBOLP (val)) { - unsigned char *s; + char *s; Lisp_Object args[2], elt; /* At first try exact match. */ @@ -325,12 +325,12 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror return ((XINT (AREF (AREF (table, i), 0)) << 8) | (i << 4) | (j - 1)); /* Try also with case-folding match. */ - s = SDATA (SYMBOL_NAME (val)); + s = SSDATA (SYMBOL_NAME (val)); for (i = 0; i < len; i++) for (j = 1; j < ASIZE (AREF (table, i)); j++) { elt = AREF (AREF (table, i), j); - if (xstrcasecmp (s, SDATA (SYMBOL_NAME (elt))) == 0) + if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0) return ((XINT (AREF (AREF (table, i), 0)) << 8) | (i << 4) | (j - 1)); } @@ -3982,7 +3982,6 @@ Layout tags. */) val = fontp->driver->otf_capability (fontp); else val = Fcons (Qnil, Qnil); - font_put_extra (font, QCotf, val); } else val = Fcdr (val); diff --git a/src/fontset.c b/src/fontset.c index f94bc954fa4..f297fd10a71 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1166,7 +1166,7 @@ fs_query_fontset (Lisp_Object name, int name_pattern) this_name = FONTSET_NAME (fontset); if (name_pattern == 1 ? fast_string_match_ignore_case (name, this_name) >= 0 - : !xstrcasecmp (SDATA (name), SDATA (this_name))) + : !xstrcasecmp (SSDATA (name), SSDATA (this_name))) return i; } return -1; diff --git a/src/ftfont.c b/src/ftfont.c index a20f2013e5a..db6b29421dc 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1022,12 +1022,12 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec) if (! NILP (adstyle) && (NILP (this_adstyle) - || xstrcasecmp (SDATA (SYMBOL_NAME (adstyle)), - SDATA (SYMBOL_NAME (this_adstyle))) != 0)) + || xstrcasecmp (SSDATA (SYMBOL_NAME (adstyle)), + SSDATA (SYMBOL_NAME (this_adstyle))) != 0)) continue; if (langname && ! NILP (this_adstyle) - && xstrcasecmp (langname, SDATA (SYMBOL_NAME (this_adstyle)))) + && xstrcasecmp (langname, SSDATA (SYMBOL_NAME (this_adstyle)))) continue; } entity = ftfont_pattern_entity (fontset->fonts[i], @@ -1240,7 +1240,11 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) spacing = XINT (AREF (entity, FONT_SPACING_INDEX)); else spacing = FC_PROPORTIONAL; - if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) + if (spacing != FC_PROPORTIONAL +#ifdef FC_DUAL + && spacing != FC_DUAL +#endif /* FC_DUAL */ + ) font->min_width = font->average_width = font->space_width = (scalable ? ft_face->max_advance_width * size / upEM : ft_face->size->metrics.max_advance >> 6); diff --git a/src/globals.h b/src/globals.h deleted file mode 100644 index f7162baafbc..00000000000 --- a/src/globals.h +++ /dev/null @@ -1,2902 +0,0 @@ -/* Declare all global lisp variables. - - Copyright (C) 2011 Free Software Foundation, Inc. - - This file is part of GNU Emacs. - - GNU Emacs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - 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 - along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ - -struct emacs_globals -{ - - /* Count the amount of consing of various sorts of space. */ - EMACS_INT f_cons_cells_consed; - - EMACS_INT f_floats_consed; - - EMACS_INT f_vector_cells_consed; - - EMACS_INT f_symbols_consed; - - EMACS_INT f_string_chars_consed; - - EMACS_INT f_misc_objects_consed; - - EMACS_INT f_intervals_consed; - - EMACS_INT f_strings_consed; - - /* Minimum number of bytes of consing since GC before next GC. */ - EMACS_INT f_gc_cons_threshold; - - Lisp_Object f_Vgc_cons_percentage; - - /* Nonzero means display messages at beginning and end of GC. */ - int f_garbage_collection_messages; - - /* Non-nil means defun should do purecopy on the function definition. */ - Lisp_Object f_Vpurify_flag; - - /* Non-nil means we are handling a memory-full error. */ - Lisp_Object f_Vmemory_full; - - /* Total number of bytes allocated in pure storage. */ - EMACS_INT f_pure_bytes_used; - - /* Pre-computed signal argument for use when memory is exhausted. */ - Lisp_Object f_Vmemory_signal_data; - - Lisp_Object f_Vpost_gc_hook; - - Lisp_Object f_Vgc_elapsed; - - EMACS_INT f_gcs_done; - - /* Functions to call before and after each text change. */ - Lisp_Object f_Vbefore_change_functions; - - Lisp_Object f_Vafter_change_functions; - - Lisp_Object f_Vtransient_mark_mode; - - /* t means ignore all read-only text properties. - A list means ignore such a property if its value is a member of the list. - Any non-nil value means ignore buffer-read-only. */ - Lisp_Object f_Vinhibit_read_only; - - /* List of functions to call that can query about killing a buffer. - If any of these functions returns nil, we don't kill it. */ - Lisp_Object f_Vkill_buffer_query_functions; - - Lisp_Object f_Vchange_major_mode_hook; - - /* List of functions to call before changing an unmodified buffer. */ - Lisp_Object f_Vfirst_change_hook; - - /* If nonzero, all modification hooks are suppressed. */ - int f_inhibit_modification_hooks; - - Lisp_Object f_Vbyte_code_meter; - - int f_byte_metering_on; - - Lisp_Object f_Vcurrent_prefix_arg; - - Lisp_Object f_Vcommand_history; - - Lisp_Object f_Vcommand_debug_status; - - /* Non-nil means treat the mark as active - even if mark_active is 0. */ - Lisp_Object f_Vmark_even_if_inactive; - - Lisp_Object f_Vmouse_leave_buffer_hook; - - Lisp_Object f_Vexec_path; - Lisp_Object f_Vexec_directory; - Lisp_Object f_Vexec_suffixes; - - Lisp_Object f_Vdata_directory; - Lisp_Object f_Vdoc_directory; - - Lisp_Object f_Vconfigure_info_directory; - Lisp_Object f_Vshared_game_score_directory; - - Lisp_Object f_Vshell_file_name; - - Lisp_Object f_Vprocess_environment; - Lisp_Object f_Vinitial_environment; - - /* Variables to determine word boundary. */ - Lisp_Object f_Vword_combining_categories; - Lisp_Object f_Vword_separating_categories; - - /* This contains all code conversion map available to CCL. */ - Lisp_Object f_Vcode_conversion_map_vector; - - /* Alist of fontname patterns vs corresponding CCL program. */ - Lisp_Object f_Vfont_ccl_encoder_alist; - - /* Vector of registered hash tables for translation. */ - Lisp_Object f_Vtranslation_hash_table_vector; - - /* Vector of translation table ever defined. - ID of a translation table is used to index this vector. */ - Lisp_Object f_Vtranslation_table_vector; - - /* A char-table for characters which may invoke auto-filling. */ - Lisp_Object f_Vauto_fill_chars; - - /* A char-table. An element is non-nil iff the corresponding - character has a printable glyph. */ - Lisp_Object f_Vprintable_chars; - - /* A char-table. An elemnent is a column-width of the corresponding - character. */ - Lisp_Object f_Vchar_width_table; - - /* A char-table. An element is a symbol indicating the direction - property of corresponding character. */ - Lisp_Object f_Vchar_direction_table; - - /* Char table of scripts. */ - Lisp_Object f_Vchar_script_table; - - /* Alist of scripts vs representative characters. */ - Lisp_Object f_Vscript_representative_chars; - - Lisp_Object f_Vunicode_category_table; - - /* List of all charsets. This variable is used only from Emacs - Lisp. */ - Lisp_Object f_Vcharset_list; - - Lisp_Object f_Vcharset_map_path; - - /* If nonzero, don't load charset maps. */ - int f_inhibit_load_charset_map; - - Lisp_Object f_Vcurrent_iso639_language; - - Lisp_Object f_Vpost_self_insert_hook; - - int f_coding_system_require_warning; - - Lisp_Object f_Vselect_safe_coding_system_function; - - /* Mnemonic string for each format of end-of-line. */ - Lisp_Object f_eol_mnemonic_unix; - Lisp_Object f_eol_mnemonic_dos; - Lisp_Object f_eol_mnemonic_mac; - - /* Mnemonic string to indicate format of end-of-line is not yet - decided. */ - Lisp_Object f_eol_mnemonic_undecided; - - Lisp_Object f_Vcoding_system_list; - Lisp_Object f_Vcoding_system_alist; - - /* Coding-system for reading files and receiving data from process. */ - Lisp_Object f_Vcoding_system_for_read; - - /* Coding-system for writing files and sending data to process. */ - Lisp_Object f_Vcoding_system_for_write; - - /* Coding-system actually used in the latest I/O. */ - Lisp_Object f_Vlast_coding_system_used; - - /* Set to non-nil when an error is detected while code conversion. */ - Lisp_Object f_Vlast_code_conversion_error; - - /* A vector of length 256 which contains information about special - Latin codes (especially for dealing with Microsoft codes). */ - Lisp_Object f_Vlatin_extra_code_table; - - /* Flag to inhibit code conversion of end-of-line format. */ - int f_inhibit_eol_conversion; - - /* Flag to inhibit ISO2022 escape sequence detection. */ - int f_inhibit_iso_escape_detection; - - /* Flag to inhibit detection of binary files through null bytes. */ - int f_inhibit_null_byte_detection; - - /* Flag to make buffer-file-coding-system inherit from process-coding. */ - int f_inherit_process_coding_system; - - Lisp_Object f_Vfile_coding_system_alist; - - Lisp_Object f_Vprocess_coding_system_alist; - - Lisp_Object f_Vnetwork_coding_system_alist; - - Lisp_Object f_Vlocale_coding_system; - - /* Flag to tell if we look up translation table on character code - conversion. */ - Lisp_Object f_Venable_character_translation; - - /* Standard translation table to look up on decoding (reading). */ - Lisp_Object f_Vstandard_translation_table_for_decode; - - /* Standard translation table to look up on encoding (writing). */ - Lisp_Object f_Vstandard_translation_table_for_encode; - - /* Alist of charsets vs revision number. */ - Lisp_Object f_Vcharset_revision_table; - - /* Default coding systems used for process I/O. */ - Lisp_Object f_Vdefault_process_coding_system; - - /* Char table for translating Quail and self-inserting input. */ - Lisp_Object f_Vtranslation_table_for_input; - - /* List of symbols `coding-category-xxx' ordered by priority. This - variable is exposed to Emacs Lisp. */ - Lisp_Object f_Vcoding_category_list; - - /* Function to call to adjust composition. */ - Lisp_Object f_Vcompose_chars_after_function; - - Lisp_Object f_Vauto_composition_mode; - - Lisp_Object f_Vauto_composition_function; - - Lisp_Object f_Vcomposition_function_table; - - Lisp_Object f_Vmost_positive_fixnum; - Lisp_Object f_Vmost_negative_fixnum; - - /* Registered buses. */ - Lisp_Object f_Vdbus_registered_buses; - - /* Hash table which keeps function definitions. */ - Lisp_Object f_Vdbus_registered_objects_table; - - /* Whether to debug D-Bus. */ - Lisp_Object f_Vdbus_debug; - - Lisp_Object f_Vcompletion_ignored_extensions; - - /* Non-zero means don't pause redisplay for pending input. (This is - for debugging and for a future implementation of EDT-like - scrolling. */ - int f_redisplay_dont_pause; - - /* If a number (float), check for user input every N seconds. */ - Lisp_Object f_Vredisplay_preemption_period; - - /* Lisp variable visible-bell; enables use of screen-flash instead of - audible bell. */ - int f_visible_bell; - - /* Invert the color of the whole frame, at a low level. */ - int f_inverse_video; - - /* Line speed of the terminal. */ - EMACS_INT f_baud_rate; - - /* Either nil or a symbol naming the window system under which Emacs - creates the first frame. */ - Lisp_Object f_Vinitial_window_system; - - /* Version number of X windows: 10, 11 or nil. */ - Lisp_Object f_Vwindow_system_version; - - /* Vector of glyph definitions. Indexed by glyph number, the contents - are a string which is how to output the glyph. - - If Vglyph_table is nil, a glyph is output by using its low 8 bits - as a character code. - - This is an obsolete feature that is no longer used. The variable - is retained for compatibility. */ - Lisp_Object f_Vglyph_table; - - /* Display table to use for vectors that don't specify their own. */ - Lisp_Object f_Vstandard_display_table; - - /* Nonzero means reading single-character input with prompt so put - cursor on mini-buffer after the prompt. Positive means at end of - text in echo area; negative means at beginning of line. */ - int f_cursor_in_echo_area; - - Lisp_Object f_Vdoc_file_name; - - /* A list of files used to build this Emacs binary. */ - Lisp_Object f_Vbuild_files; - - /* country info */ - EMACS_INT f_dos_country_code; - - EMACS_INT f_dos_codepage; - - EMACS_INT f_dos_timezone_offset; - - EMACS_INT f_dos_decimal_point; - - EMACS_INT f_dos_keyboard_layout; - - EMACS_INT f_dos_hyper_key; - - EMACS_INT f_dos_super_key; - - EMACS_INT f_dos_keypad_mode; - - Lisp_Object f_Vdos_version; - - Lisp_Object f_Vdos_display_scancodes; - - Lisp_Object f_Vdos_windows_version; - - Lisp_Object f_Vbuffer_access_fontify_functions; - - Lisp_Object f_Vbuffer_access_fontified_property; - - /* Non-nil means don't stop at field boundary in text motion commands. */ - Lisp_Object f_Vinhibit_field_text_motion; - - /* Some static data, and a function to initialize it for each run */ - Lisp_Object f_Vsystem_name; - - Lisp_Object f_Vuser_real_login_name; - - Lisp_Object f_Vuser_full_name; - - Lisp_Object f_Vuser_login_name; - - Lisp_Object f_Voperating_system_release; - - /* Command line args from shell, as list of strings. */ - Lisp_Object f_Vcommand_line_args; - - /* The name under which Emacs was invoked, with any leading directory - names discarded. */ - Lisp_Object f_Vinvocation_name; - - /* The directory name from which Emacs was invoked. */ - Lisp_Object f_Vinvocation_directory; - - /* The directory name in which to find subdirs such as lisp and etc. - nil means get them only from PATH_LOADSEARCH. */ - Lisp_Object f_Vinstallation_directory; - - /* The values of `current-time' before and after Emacs initialization. */ - Lisp_Object f_Vbefore_init_time; - Lisp_Object f_Vafter_init_time; - - /* Hook run by `kill-emacs' before it does really anything. */ - Lisp_Object f_Vkill_emacs_hook; - - /* Search path separator. */ - Lisp_Object f_Vpath_separator; - - /* Variable whose value is symbol giving operating system type. */ - Lisp_Object f_Vsystem_type; - - /* Variable whose value is string giving configuration built for. */ - Lisp_Object f_Vsystem_configuration; - - /* Variable whose value is string giving configuration options, - for use when reporting bugs. */ - Lisp_Object f_Vsystem_configuration_options; - - /* Current and previous system locales for messages and time. */ - Lisp_Object f_Vsystem_messages_locale; - - Lisp_Object f_Vprevious_system_messages_locale; - - Lisp_Object f_Vsystem_time_locale; - - Lisp_Object f_Vprevious_system_time_locale; - - /* Copyright and version info. The version number may be updated by - Lisp code. */ - Lisp_Object f_Vemacs_copyright; - Lisp_Object f_Vemacs_version; - - /* Alist of external libraries and files implementing them. */ - Lisp_Object f_Vdynamic_library_alist; - - /* Value of Lisp variable `noninteractive'. - Normally same as C variable `noninteractive' - but nothing terrible happens if user sets this one. */ - int f_noninteractive1; - - /* Nonzero means Emacs was run in --quick mode. */ - int f_inhibit_x_resources; - - Lisp_Object f_Vinhibit_quit; - Lisp_Object f_Vquit_flag; - - /* Maximum size allowed for specpdl allocation */ - EMACS_INT f_max_specpdl_size; - - /* Maximum allowed depth in Lisp evaluations and function calls. */ - EMACS_INT f_max_lisp_eval_depth; - - /* Nonzero means enter debugger before next function call */ - int f_debug_on_next_call; - - /* Non-zero means debugger may continue. This is zero when the - debugger is called during redisplay, where it might not be safe to - continue the interrupted redisplay. */ - int f_debugger_may_continue; - - /* List of conditions (non-nil atom means all) which enter the debugger - if an error is handled by the command loop's error handler. */ - Lisp_Object f_Vdebug_on_error; - - /* List of conditions and regexps specifying error messages which - do not enter the debugger even if Vdebug_on_error says they should. */ - Lisp_Object f_Vdebug_ignored_errors; - - /* Non-nil means call the debugger even if the error will be handled. */ - Lisp_Object f_Vdebug_on_signal; - - /* Hook for edebug to use. */ - Lisp_Object f_Vsignal_hook_function; - - /* Nonzero means enter debugger if a quit signal - is handled by the command loop's error handler. */ - int f_debug_on_quit; - - Lisp_Object f_Vdebugger; - - /* Function to process declarations in defmacro forms. */ - Lisp_Object f_Vmacro_declaration_function; - - /* Coding system for file names, or nil if none. */ - Lisp_Object f_Vfile_name_coding_system; - - /* Coding system for file names used only when - Vfile_name_coding_system is nil. */ - Lisp_Object f_Vdefault_file_name_coding_system; - - /* Alist of elements (REGEXP . HANDLER) for file names - whose I/O is done with a special handler. */ - Lisp_Object f_Vfile_name_handler_alist; - - /* Function to be called to decide a coding system of a reading file. */ - Lisp_Object f_Vset_auto_coding_function; - - /* Functions to be called to process text properties in inserted file. */ - Lisp_Object f_Vafter_insert_file_functions; - - /* Functions to be called to create text property annotations for file. */ - Lisp_Object f_Vwrite_region_annotate_functions; - - Lisp_Object f_Vwrite_region_post_annotation_function; - - /* During build_annotations, each time an annotation function is called, - this holds the annotations made by the previous functions. */ - Lisp_Object f_Vwrite_region_annotations_so_far; - - /* File name in which we write a list of all our auto save files. */ - Lisp_Object f_Vauto_save_list_file_name; - - /* Whether or not files are auto-saved into themselves. */ - Lisp_Object f_Vauto_save_visited_file_name; - - /* Whether or not to continue auto-saving after a large deletion. */ - Lisp_Object f_Vauto_save_include_big_deletions; - - /* Nonzero means skip the call to fsync in Fwrite-region. */ - int f_write_region_inhibit_fsync; - - /* Non-zero means call move-file-to-trash in Fdelete_file or - Fdelete_directory_internal. */ - int f_delete_by_moving_to_trash; - - /* These variables describe handlers that have "already" had a chance - to handle the current operation. - - Vinhibit_file_name_handlers is a list of file name handlers. - Vinhibit_file_name_operation is the operation being handled. - If we try to handle that operation, we ignore those handlers. */ - Lisp_Object f_Vinhibit_file_name_handlers; - - Lisp_Object f_Vinhibit_file_name_operation; - - /* The directory for writing temporary files. */ - Lisp_Object f_Vtemporary_file_directory; - - /* Nonzero enables use of dialog boxes for questions - asked by mouse commands. */ - int f_use_dialog_box; - - /* Nonzero enables use of a file dialog for file name - questions asked by mouse commands. */ - int f_use_file_dialog; - - Lisp_Object f_Vfeatures; - - Lisp_Object f_Vfont_weight_table; - Lisp_Object f_Vfont_slant_table; - Lisp_Object f_Vfont_width_table; - - Lisp_Object f_Vfont_encoding_alist; - - Lisp_Object f_Vfont_log; - - Lisp_Object f_Vfont_encoding_charset_alist; - - Lisp_Object f_Vuse_default_ascent; - - Lisp_Object f_Vignore_relative_composition; - - Lisp_Object f_Valternate_fontname_alist; - - Lisp_Object f_Vfontset_alias_alist; - - Lisp_Object f_Vvertical_centering_font_regexp; - - Lisp_Object f_Votf_script_alist; - - /* If we shall make pointer invisible when typing or not. */ - Lisp_Object f_Vmake_pointer_invisible; - - /* The name we're using in resource queries. Most often "emacs". */ - Lisp_Object f_Vx_resource_name; - - /* The application class we're using in resource queries. - Normally "Emacs". */ - Lisp_Object f_Vx_resource_class; - - /* Lower limit value of the frame opacity (alpha transparency). */ - Lisp_Object f_Vframe_alpha_lower_limit; - - Lisp_Object f_Vmenu_bar_mode; - Lisp_Object f_Vtool_bar_mode; - - Lisp_Object f_Vterminal_frame; - - Lisp_Object f_Vdefault_frame_alist; - - Lisp_Object f_Vdefault_frame_scroll_bars; - - Lisp_Object f_Vmouse_position_function; - - Lisp_Object f_Vmouse_highlight; - - Lisp_Object f_Vdelete_frame_functions; - - int f_focus_follows_mouse; - - /* Non-nil means that newline may flow into the right fringe. */ - Lisp_Object f_Voverflow_newline_into_fringe; - - /* List of known fringe bitmap symbols. - - The fringe bitmap number is stored in the `fringe' property on - those symbols. Names for the built-in bitmaps are installed by - loading fringe.el. - */ - Lisp_Object f_Vfringe_bitmaps; - - /* Search path for bitmap files. */ - Lisp_Object f_Vx_bitmap_file_path; - - /* A list of symbols, one for each supported image type. */ - Lisp_Object f_Vimage_types; - - /* Time in seconds after which images should be removed from the cache - if not displayed. */ - Lisp_Object f_Vimage_cache_eviction_delay; - - Lisp_Object f_Vmax_image_size; - - /* Non-zero means draw a cross on images having `:conversion - disabled'. */ - int f_cross_disabled_images; - - Lisp_Object f_Vimagemagick_render_type; - - /* Indentation can insert tabs if this is non-zero; - otherwise always uses spaces. */ - int f_indent_tabs_mode; - - /* Non-nil means don't call the after-change-functions right away, - just record an element in combine_after_change_list. */ - Lisp_Object f_Vcombine_after_change_calls; - - /* Check all markers in the current buffer, looking for something invalid. */ - int f_check_markers_debug_flag; - - /* Non-nil if the present key sequence was obtained by shift translation. */ - Lisp_Object f_Vthis_command_keys_shift_translated; - - /* If non-nil, the function that implements the display of help. - It's called with one argument, the help string to display. */ - Lisp_Object f_Vshow_help_function; - - /* Nonzero means do menu prompting. */ - int f_menu_prompting; - - /* Character to see next line of menu prompt. */ - Lisp_Object f_menu_prompt_more_char; - - /* Nonzero means disregard local maps for the menu bar. */ - int f_inhibit_local_menu_bar_menus; - - /* The user's hook function for outputting an error message. */ - Lisp_Object f_Vcommand_error_function; - - /* The user's ERASE setting. */ - Lisp_Object f_Vtty_erase_char; - - /* Character to recognize as the help char. */ - Lisp_Object f_Vhelp_char; - - /* List of other event types to recognize as meaning "help". */ - Lisp_Object f_Vhelp_event_list; - - /* Form to execute when help char is typed. */ - Lisp_Object f_Vhelp_form; - - /* Command to run when the help character follows a prefix key. */ - Lisp_Object f_Vprefix_help_command; - - /* List of items that should move to the end of the menu bar. */ - Lisp_Object f_Vmenu_bar_final_items; - - /* Expression to evaluate for the tool bar separator image. - This is used for build_desired_tool_bar_string only. For GTK, we - use GTK tool bar seperators. */ - Lisp_Object f_Vtool_bar_separator_image_expression; - - /* Non-nil means show the equivalent key-binding for - any M-x command that has one. - The value can be a length of time to show the message for. - If the value is non-nil and not a number, we wait 2 seconds. */ - Lisp_Object f_Vsuggest_key_bindings; - - /* How long to display an echo-area message when the minibuffer is active. - If the value is not a number, such messages don't time out. */ - Lisp_Object f_Vminibuffer_message_timeout; - - /* If non-nil, this is a map that overrides all other local maps. */ - Lisp_Object f_Voverriding_local_map; - - /* If non-nil, Voverriding_local_map applies to the menu bar. */ - Lisp_Object f_Voverriding_local_map_menu_flag; - - /* Keymap that defines special misc events that should - be processed immediately at a low level. */ - Lisp_Object f_Vspecial_event_map; - - /* Total number of times command_loop has read a key sequence. */ - EMACS_INT f_num_input_keys; - - /* Last input event read as a command. */ - Lisp_Object f_last_command_event; - - /* Last input character read as a command, not counting menus - reached by the mouse. */ - Lisp_Object f_last_nonmenu_event; - - /* Last input event read for any purpose. */ - Lisp_Object f_last_input_event; - - /* If not Qnil, a list of objects to be read as subsequent command input. */ - Lisp_Object f_Vunread_command_events; - - /* If not Qnil, a list of objects to be read as subsequent command input - including input method processing. */ - Lisp_Object f_Vunread_input_method_events; - - /* If not Qnil, a list of objects to be read as subsequent command input - but NOT including input method processing. */ - Lisp_Object f_Vunread_post_input_method_events; - - /* If not -1, an event to be read as subsequent command input. */ - EMACS_INT f_unread_command_char; - - /* A mask of extra modifier bits to put into every keyboard char. */ - EMACS_INT f_extra_keyboard_modifiers; - - /* Char to use as prefix when a meta character is typed in. - This is bound on entry to minibuffer in case ESC is changed there. */ - Lisp_Object f_meta_prefix_char; - - /* Number of idle seconds before an auto-save and garbage collection. */ - Lisp_Object f_Vauto_save_timeout; - - /* Total number of times read_char has returned, outside of macros. */ - EMACS_INT f_num_nonmacro_input_events; - - /* Auto-save automatically when this many characters have been typed - since the last time. */ - EMACS_INT f_auto_save_interval; - - /* The command being executed by the command loop. - Commands may set this, and the value set will be copied into - current_kboard->Vlast_command instead of the actual command. */ - Lisp_Object f_Vthis_command; - - /* If the lookup of the command returns a binding, the original - command is stored in this-original-command. It is nil otherwise. */ - Lisp_Object f_Vthis_original_command; - - /* A user-visible version of the above, intended to allow users to - figure out where the last event came from, if the event doesn't - carry that information itself (i.e. if it was a character). */ - Lisp_Object f_Vlast_event_frame; - - /* If non-nil, active regions automatically become the window selection. */ - Lisp_Object f_Vselect_active_regions; - - /* The text in the active region prior to modifying the buffer. - Used by the `select-active-regions' feature. */ - Lisp_Object f_Vsaved_region_selection; - - /* Echo unfinished commands after this many seconds of pause. */ - Lisp_Object f_Vecho_keystrokes; - - /* Form to evaluate (if non-nil) when Emacs is started. */ - Lisp_Object f_Vtop_level; - - /* If non-nil, this implements the current input method. */ - Lisp_Object f_Vinput_method_function; - - /* When we call Vinput_method_function, - this holds the echo area message that was just erased. */ - Lisp_Object f_Vinput_method_previous_message; - - /* Non-nil means deactivate the mark at end of this command. */ - Lisp_Object f_Vdeactivate_mark; - - /* Menu bar specified in Lucid Emacs fashion. */ - Lisp_Object f_Vlucid_menu_bar_dirty_flag; - - Lisp_Object f_Vpre_command_hook; - - Lisp_Object f_Vpost_command_hook; - - Lisp_Object f_Vcommand_hook_internal; - - /* Parent keymap of terminal-local function-key-map instances. */ - Lisp_Object f_Vfunction_key_map; - - /* Keymap of key translations that can override keymaps. */ - Lisp_Object f_Vkey_translation_map; - - /* List of deferred actions to be performed at a later time. - The precise format isn't relevant here; we just check whether it is nil. */ - Lisp_Object f_Vdeferred_action_list; - - /* Function to call to handle deferred actions, when there are any. */ - Lisp_Object f_Vdeferred_action_function; - - /* If this flag is non-nil, we check mouse_moved to see when the - mouse moves, and motion events will appear in the input stream. - Otherwise, mouse motion is ignored. */ - Lisp_Object f_do_mouse_tracking; - - /* List of absolute timers. Appears in order of next scheduled event. */ - Lisp_Object f_Vtimer_list; - - /* List of idle time timers. Appears in order of next scheduled event. */ - Lisp_Object f_Vtimer_idle_list; - - /* After a command is executed, if point is moved into a region that - has specific properties (e.g. composition, display), we adjust - point to the boundary of the region. But, if a command sets this - variable to non-nil, we suppress this point adjustment. This - variable is set to nil before reading a command. */ - Lisp_Object f_Vdisable_point_adjustment; - - /* If non-nil, always disable point adjustment. */ - Lisp_Object f_Vglobal_disable_point_adjustment; - - /* If non-nil, events produced by disabled menu items and tool-bar - buttons are not ignored. Help functions bind this to allow help on - those items and buttons. */ - Lisp_Object f_Venable_disabled_menus_and_buttons; - - /* Nonzero means don't try to suspend even if the operating system seems - to support it. */ - int f_cannot_suspend; - - /* Number of seconds between polling for input. This is a Lisp - variable that can be bound. */ - EMACS_INT f_polling_period; - - /* subprocesses */ - Lisp_Object f_Vthrow_on_input; - - /* The maximum time between clicks to make a double-click, or Qnil to - disable double-click detection, or Qt for no time limit. */ - Lisp_Object f_Vdouble_click_time; - - /* Maximum number of pixels the mouse may be moved between clicks - to make a double-click. */ - EMACS_INT f_double_click_fuzz; - - /* was MinibufLocalMap */ - Lisp_Object f_Vminibuffer_local_map; - - /* was MinibufLocalNSMap */ - Lisp_Object f_Vminibuffer_local_ns_map; - - /* was MinibufLocalCompletionMap */ - Lisp_Object f_Vminibuffer_local_completion_map; - - /* keymap used for minibuffers when doing completion in filenames */ - Lisp_Object f_Vminibuffer_local_filename_completion_map; - - /* keymap used for minibuffers when doing completion in filenames - with require-match*/ - Lisp_Object f_Vminibuffer_local_filename_must_match_map; - - /* was MinibufLocalMustMatchMap */ - Lisp_Object f_Vminibuffer_local_must_match_map; - - /* Alist of minor mode variables and keymaps. */ - Lisp_Object f_Vminor_mode_map_alist; - - /* Alist of major-mode-specific overrides for - minor mode variables and keymaps. */ - Lisp_Object f_Vminor_mode_overriding_map_alist; - - /* List of emulation mode keymap alists. */ - Lisp_Object f_Vemulation_mode_map_alists; - - /* A list of all commands given new bindings since a certain time - when nil was stored here. - This is used to speed up recomputation of menu key equivalents - when Emacs starts up. t means don't record anything here. */ - Lisp_Object f_Vdefine_key_rebound_commands; - - Lisp_Object f_Vwhere_is_preferred_modifier; - - Lisp_Object f_Vvalues; - Lisp_Object f_Vstandard_input; - Lisp_Object f_Vafter_load_alist; - - Lisp_Object f_Vlexical_binding; - - Lisp_Object f_Veval_buffer_list; - - /* non-zero if inside `load' */ - int f_load_in_progress; - - /* Directory in which the sources were found. */ - Lisp_Object f_Vsource_directory; - - /* Search path and suffixes for files to be loaded. */ - Lisp_Object f_Vload_path; - Lisp_Object f_Vload_suffixes; - Lisp_Object f_Vload_file_rep_suffixes; - - /* File name of user's init file. */ - Lisp_Object f_Vuser_init_file; - - /* This is the user-visible association list that maps features to - lists of defs in their load files. */ - Lisp_Object f_Vload_history; - - /* This is used to build the load history. */ - Lisp_Object f_Vcurrent_load_list; - - /* List of files that were preloaded. */ - Lisp_Object f_Vpreloaded_file_list; - - /* Name of file actually being read by `load'. */ - Lisp_Object f_Vload_file_name; - - /* Function to use for reading, in `load' and friends. */ - Lisp_Object f_Vload_read_function; - - /* Non-nil means read recursive structures using #n= and #n# syntax. */ - Lisp_Object f_Vread_circle; - - /* Nonzero means load should forcibly load all dynamic doc strings. */ - int f_load_force_doc_strings; - - /* Nonzero means read should convert strings to unibyte. */ - int f_load_convert_to_unibyte; - - /* Function to use for loading an Emacs Lisp source file (not - compiled) instead of readevalloop. */ - Lisp_Object f_Vload_source_file_function; - - /* List of all DEFVAR_BOOL variables. Used by the byte optimizer. */ - Lisp_Object f_Vbyte_boolean_vars; - - /* Whether or not to add a `read-positions' property to symbols - read. */ - Lisp_Object f_Vread_with_symbol_positions; - - /* List of (SYMBOL . POSITION) accumulated so far. */ - Lisp_Object f_Vread_symbol_positions_list; - - Lisp_Object f_Vold_style_backquotes; - - /* Non-zero means load dangerous compiled Lisp files. */ - int f_load_dangerous_libraries; - - /* Non-zero means force printing messages when loading Lisp files. */ - int f_force_load_messages; - - /* A regular expression used to detect files compiled with Emacs. */ - Lisp_Object f_Vbytecomp_version_regexp; - - Lisp_Object f_Vobarray; - - /* Normal hook run whenever a keyboard macro terminates. */ - Lisp_Object f_Vkbd_macro_termination_hook; - - /* Kbd macro currently being executed (a string or vector). */ - Lisp_Object f_Vexecuting_kbd_macro; - - /* Index of next character to fetch from that macro. */ - EMACS_INT f_executing_kbd_macro_index; - - /* Nonzero means enable debugging checks on byte/char correspondences. */ - int f_byte_debug_flag; - - Lisp_Object f_Vhistory_length; - - /* No duplicates in history. */ - int f_history_delete_duplicates; - - /* Non-nil means add new input to history. */ - Lisp_Object f_Vhistory_add_new_input; - - /* Nonzero means let functions called when within a minibuffer - invoke recursive minibuffers (to read arguments, or whatever) */ - int f_enable_recursive_minibuffers; - - /* Nonzero means don't ignore text properties - in Fread_from_minibuffer. */ - int f_minibuffer_allow_text_properties; - - /* help-form is bound to this while in the minibuffer. */ - Lisp_Object f_Vminibuffer_help_form; - - /* Variable which is the history list to add minibuffer values to. */ - Lisp_Object f_Vminibuffer_history_variable; - - /* Current position in the history list (adjusted by M-n and M-p). */ - Lisp_Object f_Vminibuffer_history_position; - - /* Text properties that are added to minibuffer prompts. - These are in addition to the basic `field' property, and stickiness - properties. */ - Lisp_Object f_Vminibuffer_prompt_properties; - - Lisp_Object f_Vminibuffer_setup_hook; - - Lisp_Object f_Vminibuffer_exit_hook; - - Lisp_Object f_Vread_expression_history; - - /* Function to call to read a buffer name. */ - Lisp_Object f_Vread_buffer_function; - - /* Nonzero means completion ignores case. */ - int f_completion_ignore_case; - - int f_read_buffer_completion_ignore_case; - - /* List of regexps that should restrict possible completions. */ - Lisp_Object f_Vcompletion_regexp_list; - - /* Nonzero means raise the minibuffer frame when the minibuffer - is entered. */ - int f_minibuffer_auto_raise; - - /* Keymap for reading expressions. */ - Lisp_Object f_Vread_expression_map; - - Lisp_Object f_Vminibuffer_completion_table; - - Lisp_Object f_Vminibuffer_completion_predicate; - - Lisp_Object f_Vminibuffer_completion_confirm; - - Lisp_Object f_Vminibuffer_completing_file_name; - - Lisp_Object f_Vdos_unsupported_char_glyph; - - Lisp_Object f_Vstandard_output; - - Lisp_Object f_Vfloat_output_format; - - /* Maximum length of list to print in full; noninteger means - effectively infinity */ - Lisp_Object f_Vprint_length; - - /* Maximum depth of list to print in full; noninteger means - effectively infinity. */ - Lisp_Object f_Vprint_level; - - /* Nonzero means print newlines in strings as \n. */ - int f_print_escape_newlines; - - /* Nonzero means to print single-byte non-ascii characters in strings as - octal escapes. */ - int f_print_escape_nonascii; - - /* Nonzero means to print multibyte characters in strings as hex escapes. */ - int f_print_escape_multibyte; - - /* Nonzero means print (quote foo) forms as 'foo, etc. */ - int f_print_quoted; - - /* Non-nil means print #: before uninterned symbols. */ - Lisp_Object f_Vprint_gensym; - - /* Non-nil means print recursive structures using #n= and #n# syntax. */ - Lisp_Object f_Vprint_circle; - - /* Non-nil means keep continuous number for #n= and #n# syntax - between several print functions. */ - Lisp_Object f_Vprint_continuous_numbering; - - Lisp_Object f_Vprint_number_table; - - /* A flag to control printing of `charset' text property. - The default value is Qdefault. */ - Lisp_Object f_Vprint_charset_text_property; - - /* Nonzero means delete a process right away if it exits. */ - int f_delete_exited_processes; - - /* t means use pty, nil means use a pipe, - maybe other values to come. */ - Lisp_Object f_Vprocess_connection_type; - - /* Non-nil means to delay reading process output to improve buffering. - A value of t means that delay is reset after each send, any other - non-nil value does not reset the delay. A value of nil disables - adaptive read buffering completely. */ - Lisp_Object f_Vprocess_adaptive_read_buffering; - - Lisp_Object f_Vsearch_spaces_regexp; - - /* If non-nil, the match data will not be changed during call to - searching or matching functions. This variable is for internal use - only. */ - Lisp_Object f_Vinhibit_changing_match_data; - - int f_words_include_escapes; - - int f_parse_sexp_lookup_properties; - - /* Nonzero means `scan-sexps' treat all multibyte characters as symbol. */ - int f_multibyte_syntax_as_symbol; - - /* Non-zero means an open parenthesis in column 0 is always considered - to be the start of a defun. Zero means an open parenthesis in - column 0 has no special meaning. */ - int f_open_paren_in_column_0_is_defun_start; - - int f_parse_sexp_ignore_comments; - - /* Char-table of functions that find the next or previous word - boundary. */ - Lisp_Object f_Vfind_word_boundary_function_table; - - /* If true, use "vs", otherwise use "ve" to make the cursor visible. */ - int f_visible_cursor; - - /* Functions to call after suspending a tty. */ - Lisp_Object f_Vsuspend_tty_functions; - - /* Functions to call after resuming a tty. */ - Lisp_Object f_Vresume_tty_functions; - - /* Nonzero means no need to redraw the entire frame on resuming a - suspended Emacs. This is useful on terminals with multiple - pages, where one page is used for Emacs and another for all - else. */ - int f_no_redraw_on_reenter; - - /* Provided for lisp packages. */ - int f_system_uses_terminfo; - - /* Function to use to ring the bell. */ - Lisp_Object f_Vring_bell_function; - - Lisp_Object f_Vdelete_terminal_functions; - - Lisp_Object f_Vinhibit_point_motion_hooks; - - Lisp_Object f_Vdefault_text_properties; - - Lisp_Object f_Vchar_property_alias_alist; - - Lisp_Object f_Vtext_property_default_nonsticky; - - /* Limits controlling how much undo information to keep. */ - EMACS_INT f_undo_limit; - - EMACS_INT f_undo_strong_limit; - - Lisp_Object f_Vundo_outer_limit; - - /* Function to call when undo_outer_limit is exceeded. */ - Lisp_Object f_Vundo_outer_limit_function; - - /* Nonzero means do not record point in record_point. */ - int f_undo_inhibit_record_point; - - /* Coding system for communicating with other Windows programs via the - clipboard. */ - Lisp_Object f_Vselection_coding_system; - - /* Coding system for the next communicating with other Windows programs. */ - Lisp_Object f_Vnext_selection_coding_system; - - /* Determine whether to make frame dimensions match the screen buffer, - or the current window size. The former is desirable when running - over telnet, while the latter is more useful when working directly at - the console with a large scroll-back buffer. */ - int f_w32_use_full_screen_buffer; - - /* The colormap for converting color names to RGB values */ - Lisp_Object f_Vw32_color_map; - - /* Non nil if alt key presses are passed on to Windows. */ - Lisp_Object f_Vw32_pass_alt_to_system; - - /* Non nil if alt key is translated to meta_modifier, nil if it is translated - to alt_modifier. */ - Lisp_Object f_Vw32_alt_is_meta; - - /* If non-zero, the windows virtual key code for an alternative quit key. */ - int f_w32_quit_key; - - /* Non nil if left window key events are passed on to Windows (this only - affects whether "tapping" the key opens the Start menu). */ - Lisp_Object f_Vw32_pass_lwindow_to_system; - - /* Non nil if right window key events are passed on to Windows (this - only affects whether "tapping" the key opens the Start menu). */ - Lisp_Object f_Vw32_pass_rwindow_to_system; - - /* Virtual key code used to generate "phantom" key presses in order - to stop system from acting on Windows key events. */ - Lisp_Object f_Vw32_phantom_key_code; - - /* Modifier associated with the left "Windows" key, or nil to act as a - normal key. */ - Lisp_Object f_Vw32_lwindow_modifier; - - /* Modifier associated with the right "Windows" key, or nil to act as a - normal key. */ - Lisp_Object f_Vw32_rwindow_modifier; - - /* Modifier associated with the "Apps" key, or nil to act as a normal - key. */ - Lisp_Object f_Vw32_apps_modifier; - - /* Value is nil if Num Lock acts as a function key. */ - Lisp_Object f_Vw32_enable_num_lock; - - /* Value is nil if Caps Lock acts as a function key. */ - Lisp_Object f_Vw32_enable_caps_lock; - - /* Modifier associated with Scroll Lock, or nil to act as a normal key. */ - Lisp_Object f_Vw32_scroll_lock_modifier; - - /* Switch to control whether we inhibit requests for synthesized bold - and italic versions of fonts. */ - int f_w32_enable_synthesized_fonts; - - /* Enable palette management. */ - Lisp_Object f_Vw32_enable_palette; - - /* Control how close left/right button down events must be to - be converted to a middle button down event. */ - int f_w32_mouse_button_tolerance; - - /* Minimum interval between mouse movement (and scroll bar drag) - events that are passed on to the event loop. */ - int f_w32_mouse_move_interval; - - /* Flag to indicate if XBUTTON events should be passed on to Windows. */ - int f_w32_pass_extra_mouse_buttons_to_system; - - /* Flag to indicate if media keys should be passed on to Windows. */ - int f_w32_pass_multimedia_buttons_to_system; - - /* Non nil if no window manager is in use. */ - Lisp_Object f_Vx_no_window_manager; - - /* The background and shape of the mouse pointer, and shape when not - over text or in the modeline. */ - Lisp_Object f_Vx_pointer_shape; - Lisp_Object f_Vx_nontext_pointer_shape; - Lisp_Object f_Vx_mode_pointer_shape; - - /* TODO: Mouse cursor customization. */ - Lisp_Object f_Vx_hourglass_pointer_shape; - Lisp_Object f_Vx_window_horizontal_drag_shape; - - /* The shape when over mouse-sensitive text. */ - Lisp_Object f_Vx_sensitive_text_pointer_shape; - - /* Color of chars displayed in cursor box. */ - Lisp_Object f_Vx_cursor_fore_pixel; - - /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ - Lisp_Object f_Vx_pixel_size_width_font_regexp; - - /* Alist of bdf fonts and the files that define them. */ - Lisp_Object f_Vw32_bdf_filename_alist; - - /* A flag to control whether fonts are matched strictly or not. */ - int f_w32_strict_fontnames; - - /* A flag to control whether we should only repaint if GetUpdateRect - indicates there is an update region. */ - int f_w32_strict_painting; - - /* The ANSI codepage. */ - int f_w32_ansi_code_page; - - /* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ - Lisp_Object f_Vx_max_tooltip_size; - - /* Associative list linking character set strings to Windows codepages. */ - Lisp_Object f_Vw32_charset_info_alist; - - /* Control whether spawnve quotes arguments as necessary to ensure - correct parsing by child process. Because not all uses of spawnve - are careful about constructing argv arrays, we make this behavior - conditional (off by default). */ - Lisp_Object f_Vw32_quote_process_args; - - /* Control whether create_child causes the process' window to be - hidden. The default is nil. */ - Lisp_Object f_Vw32_start_process_show_window; - - /* Control whether create_child causes the process to inherit Emacs' - console window, or be given a new one of its own. The default is - nil, to allow multiple DOS programs to run on Win95. Having separate - consoles also allows Emacs to cleanly terminate process groups. */ - Lisp_Object f_Vw32_start_process_share_console; - - /* Control whether create_child cause the process to inherit Emacs' - error mode setting. The default is t, to minimize the possibility of - subprocesses blocking when accessing unmounted drives. */ - Lisp_Object f_Vw32_start_process_inherit_error_mode; - - /* Time to sleep before reading from a subprocess output pipe - this - avoids the inefficiency of frequently reading small amounts of data. - This is primarily necessary for handling DOS processes on Windows 95, - but is useful for W32 processes on both Windows 95 and NT as well. */ - int f_w32_pipe_read_delay; - - /* Control conversion of upper case file names to lower case. - nil means no, t means yes. */ - Lisp_Object f_Vw32_downcase_file_names; - - /* Control whether stat() attempts to generate fake but hopefully - "accurate" inode values, by hashing the absolute truenames of files. - This should detect aliasing between long and short names, but still - allows the possibility of hash collisions. */ - Lisp_Object f_Vw32_generate_fake_inodes; - - /* Control whether stat() attempts to determine file type and link count - exactly, at the expense of slower operation. Since true hard links - are supported on NTFS volumes, this is only relevant on NT. */ - Lisp_Object f_Vw32_get_true_file_attributes; - - /* Coding system for communicating with other programs via the - clipboard. */ - - /* Coding system for the next communication with other programs. */ - - /* Non-nil means Emacs uses toolkit scroll bars. */ - Lisp_Object f_Vx_toolkit_scroll_bars; - - /* Non-zero means make use of UNDERLINE_POSITION font properties. */ - int f_x_use_underline_position_properties; - - /* Non-zero means to draw the underline at the same place as the descent line. */ - int f_x_underline_at_descent_line; - - int f_w32_use_visible_system_caret; - - int f_w32_num_mouse_buttons; - - Lisp_Object f_Vw32_swap_mouse_buttons; - - /* Control whether x_raise_frame also sets input focus. */ - Lisp_Object f_Vw32_grab_focus_on_raise; - - /* Control whether Caps Lock affects non-ascii characters. */ - Lisp_Object f_Vw32_capslock_is_shiftlock; - - /* Control whether right-alt and left-ctrl should be recognized as AltGr. */ - Lisp_Object f_Vw32_recognize_altgr; - - /* Non-nil means it is the window for C-M-v to scroll - when the mini-buffer is selected. */ - Lisp_Object f_Vminibuf_scroll_window; - - /* Non-nil means this is the buffer whose window C-M-v should scroll. */ - Lisp_Object f_Vother_window_scroll_buffer; - - /* Non-nil means it's function to call to display temp buffers. */ - Lisp_Object f_Vtemp_buffer_show_function; - - /* Non-zero means line and page scrolling on tall lines (with images) - does partial scrolling by modifying window-vscroll. */ - int f_auto_window_vscroll_p; - - /* Non-zero means to use mode-line-inactive face in all windows but the - selected-window and the minibuffer-scroll-window when the - minibuffer is active. */ - int f_mode_line_in_non_selected_windows; - - /* If a window gets smaller than either of these, it is removed. */ - EMACS_INT f_window_min_height; - - EMACS_INT f_window_min_width; - - /* Number of lines of continuity in scrolling by screenfuls. */ - EMACS_INT f_next_screen_context_lines; - - Lisp_Object f_Vwindow_configuration_change_hook; - - /* Non-nil means scroll commands try to put point - at the same screen height as previously. */ - Lisp_Object f_Vscroll_preserve_screen_position; - - /* Non-nil means that text is inserted before window's markers. */ - Lisp_Object f_Vwindow_point_insertion_type; - - /* If non-nil, then the `recenter' command with a nil argument - the entire frame to be redrawn; the special value `tty' causes the - frame to be redrawn only if it is a tty frame. */ - Lisp_Object f_Vrecenter_redisplay; - - Lisp_Object f_Vwindow_scroll_functions; - - Lisp_Object f_Vwindow_text_change_functions; - - Lisp_Object f_Vredisplay_end_trigger_functions; - - /* Functions called to fontify regions of text. */ - Lisp_Object f_Vfontification_functions; - - /* Non-nil means automatically select any window when the mouse - cursor moves into it. */ - Lisp_Object f_Vmouse_autoselect_window; - - Lisp_Object f_Vwrap_prefix; - - Lisp_Object f_Vline_prefix; - - /* Non-zero means draw tool bar buttons raised when the mouse moves - over them. */ - int f_auto_raise_tool_bar_buttons_p; - - /* Non-zero means to reposition window if cursor line is only partially visible. */ - int f_make_cursor_line_fully_visible_p; - - /* Margin below tool bar in pixels. 0 or nil means no margin. - If value is `internal-border-width' or `border-width', - the corresponding frame parameter is used. */ - Lisp_Object f_Vtool_bar_border; - - /* Margin around tool bar buttons in pixels. */ - Lisp_Object f_Vtool_bar_button_margin; - - /* Thickness of shadow to draw around tool bar buttons. */ - EMACS_INT f_tool_bar_button_relief; - - /* Non-nil means automatically resize tool-bars so that all tool-bar - items are visible, and no blank lines remain. - - If value is `grow-only', only make tool-bar bigger. */ - Lisp_Object f_Vauto_resize_tool_bars; - - /* Type of tool bar. Can be symbols image, text, both or both-hroiz. */ - Lisp_Object f_Vtool_bar_style; - - /* Maximum number of characters a label can have to be shown. */ - EMACS_INT f_tool_bar_max_label_size; - - /* Non-zero means draw block and hollow cursor as wide as the glyph - under it. For example, if a block cursor is over a tab, it will be - drawn as wide as that tab on the display. */ - int f_x_stretch_cursor_p; - - Lisp_Object f_Vinhibit_redisplay; - - /* Non-zero means Lisp evaluation during redisplay is inhibited. */ - int f_inhibit_eval_during_redisplay; - - /* Symbols used in text property values. */ - Lisp_Object f_Vdisplay_pixels_per_inch; - - /* Non-nil means highlight trailing whitespace. */ - Lisp_Object f_Vshow_trailing_whitespace; - - /* Non-nil means escape non-break space and hyphens. */ - Lisp_Object f_Vnobreak_char_display; - - /* Non-nil means show the text cursor in void text areas - i.e. in blank areas after eol and eob. This used to be - the default in 21.3. */ - Lisp_Object f_Vvoid_text_area_pointer; - - /* Nonzero means truncate lines in all windows less wide than the - frame. */ - Lisp_Object f_Vtruncate_partial_width_windows; - - /* A flag to control how to display unibyte 8-bit character. */ - int f_unibyte_display_via_language_environment; - - /* Nonzero means we have more than one non-mini-buffer-only frame. - Not guaranteed to be accurate except while parsing - frame-title-format. */ - int f_multiple_frames; - - Lisp_Object f_Vglobal_mode_string; - - /* List of variables (symbols) which hold markers for overlay arrows. - The symbols on this list are examined during redisplay to determine - where to display overlay arrows. */ - Lisp_Object f_Voverlay_arrow_variable_list; - - /* Marker for where to display an arrow on top of the buffer text. */ - Lisp_Object f_Voverlay_arrow_position; - - /* String to display for the arrow. Only used on terminal frames. */ - Lisp_Object f_Voverlay_arrow_string; - - /* Like mode-line-format, but for the title bar on a visible frame. */ - Lisp_Object f_Vframe_title_format; - - /* Like mode-line-format, but for the title bar on an iconified frame. */ - Lisp_Object f_Vicon_title_format; - - /* List of functions to call when a window's size changes. These - functions get one arg, a frame on which one or more windows' sizes - have changed. */ - Lisp_Object f_Vwindow_size_change_functions; - - Lisp_Object f_Vmenu_bar_update_hook; - - /* Nonzero means highlight the region even in nonselected windows. */ - int f_highlight_nonselected_windows; - - /* If cursor motion alone moves point off frame, try scrolling this - many lines up or down if that will bring it back. */ - EMACS_INT f_emacs_scroll_step; - - /* Nonzero means scroll just far enough to bring point back on the - screen, when appropriate. */ - EMACS_INT f_scroll_conservatively; - - /* Recenter the window whenever point gets within this many lines of - the top or bottom of the window. This value is translated into a - pixel value by multiplying it with FRAME_LINE_HEIGHT, which means - that there is really a fixed pixel height scroll margin. */ - EMACS_INT f_scroll_margin; - - /* Zero means display the mode-line/header-line/menu-bar in the default face - (this slightly odd definition is for compatibility with previous versions - of emacs), non-zero means display them using their respective faces. - - This variable is deprecated. */ - int f_mode_line_inverse_video; - - /* Maximum buffer size for which to display line numbers. */ - Lisp_Object f_Vline_number_display_limit; - - /* Line width to consider when repositioning for line number display. */ - EMACS_INT f_line_number_display_limit_width; - - /* Number of lines to keep in the message log buffer. t means - infinite. nil means don't log at all. */ - Lisp_Object f_Vmessage_log_max; - - int f_inhibit_menubar_update; - - /* When evaluating expressions from menu bar items (enable conditions, - for instance), this is the frame they are being processed for. */ - Lisp_Object f_Vmenu_updating_frame; - - /* Maximum height for resizing mini-windows. Either a float - specifying a fraction of the available height, or an integer - specifying a number of lines. */ - Lisp_Object f_Vmax_mini_window_height; - - /* Non-zero means messages should be displayed with truncated - lines instead of being continued. */ - int f_message_truncate_lines; - - /* How to blink the default frame cursor off. */ - Lisp_Object f_Vblink_cursor_alist; - - /* Variables to turn off display optimizations from Lisp. */ - int f_inhibit_try_window_id; - int f_inhibit_try_window_reusing; - - int f_inhibit_try_cursor_movement; - - /* Non-zero means automatically scroll windows horizontally to make - point visible. */ - int f_automatic_hscrolling_p; - - /* How close to the margin can point get before the window is scrolled - horizontally. */ - EMACS_INT f_hscroll_margin; - - /* How much to scroll horizontally when point is inside the above margin. */ - Lisp_Object f_Vhscroll_step; - - /* The variable `resize-mini-windows'. If nil, don't resize - mini-windows. If t, always resize them to fit the text they - display. If `grow-only', let mini-windows grow only until they - become empty. */ - Lisp_Object f_Vresize_mini_windows; - - /* Space between overline and text. */ - EMACS_INT f_overline_margin; - - /* Require underline to be at least this many screen pixels below baseline - This to avoid underline "merging" with the base of letters at small - font sizes, particularly when x_use_underline_position_properties is on. */ - EMACS_INT f_underline_minimum_offset; - - /* Non-zero means don't free realized faces. Bound while freeing - realized faces is dangerous because glyph matrices might still - reference them. */ - int f_inhibit_free_realized_faces; - - /* Non-zero means we're allowed to display a hourglass pointer. */ - int f_display_hourglass_p; - - /* Number of seconds to wait before displaying an hourglass cursor. */ - Lisp_Object f_Vhourglass_delay; - - /* Char-table to control the display of glyphless characters. */ - Lisp_Object f_Vglyphless_char_display; - - EMACS_INT f_debug_end_pos; - - /* Default stipple pattern used on monochrome displays. This stipple - pattern is used on monochrome displays instead of shades of gray - for a face background color. See `set-face-stipple' for possible - values for this variable. */ - Lisp_Object f_Vface_default_stipple; - - Lisp_Object f_Vscalable_fonts_allowed; - - /* List of regular expressions that matches names of fonts to ignore. */ - Lisp_Object f_Vface_ignored_fonts; - - /* Alist of font name patterns vs the rescaling factor. */ - Lisp_Object f_Vface_font_rescale_alist; - - /* Maximum number of fonts to consider in font_list. If not an - integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */ - Lisp_Object f_Vfont_list_limit; - - /* Alist of global face definitions. Each element is of the form - (FACE . LFACE) where FACE is a symbol naming a face and LFACE - is a Lisp vector of face attributes. These faces are used - to initialize faces for new frames. */ - Lisp_Object f_Vface_new_frame_defaults; - - /* Alist of face remappings. Each element is of the form: - (FACE REPLACEMENT...) which causes display of the face FACE to use - REPLACEMENT... instead. REPLACEMENT... is interpreted the same way - the value of a `face' text property is: it may be (1) A face name, - (2) A list of face names, (3) A property-list of face attribute/value - pairs, or (4) A list of face names intermixed with lists containing - face attribute/value pairs. - - Multiple entries in REPLACEMENT... are merged together to form the final - result, with faces or attributes earlier in the list taking precedence - over those that are later. - - Face-name remapping cycles are suppressed; recursive references use - the underlying face instead of the remapped face. */ - Lisp_Object f_Vface_remapping_alist; - - /* An alist of defined terminal colors and their RGB values. */ - Lisp_Object f_Vtty_defined_color_alist; - - /* LessTif/Motif version info. */ - Lisp_Object f_Vmotif_version_string; - - /* GTK+ version info */ - Lisp_Object f_Vgtk_version_string; - - /* Non-zero means prompt with the old GTK file selection dialog. */ - int f_x_gtk_use_old_file_dialog; - - /* If non-zero, by default show hidden files in the GTK file chooser. */ - int f_x_gtk_show_hidden_files; - - /* If non-zero, don't show additional help text in the GTK file chooser. */ - int f_x_gtk_file_dialog_help_text; - - /* If non-zero, don't collapse to tool bar when it is detached. */ - int f_x_gtk_whole_detached_tool_bar; - - /* If non-zero, use Gtk+ tooltips. */ - int f_x_gtk_use_system_tooltips; - - /* The background and shape of the mouse pointer, and shape when not - over text or in the modeline. */ - - /* The shape when over mouse-sensitive text. */ - - /* If non-nil, the pointer shape to indicate that windows can be - dragged horizontally. */ - - /* Color of chars displayed in cursor box. */ - - /* Non nil if no window manager is in use. */ - - /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ - - /* Maximum size for tooltips; a cons (COLUMNS . ROWS). */ - - Lisp_Object f_Vx_lost_selection_functions; - - Lisp_Object f_Vx_sent_selection_functions; - - /* This is an alist whose CARs are selection-types (whose names are the same - as the names of X Atoms) and whose CDRs are the names of Lisp functions to - call to convert the given Emacs selection value to a string representing - the given selection type. This is for Lisp-level extension of the emacs - selection handling. */ - Lisp_Object f_Vselection_converter_alist; - - /* If the selection owner takes too long to reply to a selection request, - we give up on it. This is in milliseconds (0 = no timeout.) */ - EMACS_INT f_x_selection_timeout; - - int f_use_system_font; - - Lisp_Object f_Vxft_settings; - - /* The client session id for this session as a lisp object. */ - Lisp_Object f_Vx_session_id; - - /* The id we had the previous session. This is only available if we - have been started by the session manager with SMID_OPT. */ - Lisp_Object f_Vx_session_previous_id; - - /* Non-nil means Emacs uses toolkit scroll bars. */ - - /* Non-zero means make use of UNDERLINE_POSITION font properties. */ - - /* Non-zero means to draw the underline at the same place as the descent line. */ - - /* Non-zero means to not move point as a result of clicking on a - frame to focus it (when focus-follows-mouse is nil). */ - int f_x_mouse_click_focus_ignore_position; - - /* The keysyms to use for the various modifiers. */ - Lisp_Object f_Vx_alt_keysym; - Lisp_Object f_Vx_hyper_keysym; - Lisp_Object f_Vx_meta_keysym; - Lisp_Object f_Vx_super_keysym; - - Lisp_Object f_Vx_keysym_table; - - /* Lisp communications */ - Lisp_Object f_ns_input_file, f_ns_input_font, f_ns_input_fontsize, - f_ns_input_line; - Lisp_Object f_ns_input_color, f_ns_input_text, f_ns_working_text; - Lisp_Object f_ns_input_spi_name, f_ns_input_spi_arg; - - /* Specifies which emacs modifier should be generated when NS receives - the Alternate modifier. May be Qnone or any of the modifier lisp symbols. - */ - Lisp_Object f_ns_alternate_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the right Alternate modifier. Has same values as ns_alternate_modifier - plus the value Qleft which means whatever value ns_alternate_modifier has. - */ - Lisp_Object f_ns_right_alternate_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the Command modifier. May be any of the modifier lisp symbols. */ - Lisp_Object f_ns_command_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the right Command modifier. Has same values as ns_command_modifier plus - the value Qleft which means whatever value ns_command_modifier has. */ - Lisp_Object f_ns_right_command_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the Control modifier. May be any of the modifier lisp symbols. */ - Lisp_Object f_ns_control_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the right Control modifier. Has same values as ns_control_modifier plus - the value Qleft which means whatever value ns_control_modifier has. */ - Lisp_Object f_ns_right_control_modifier; - - /* Specifies which emacs modifier should be generated when NS receives - the Function modifier (laptops). May be any of the modifier lisp symbols. - */ - Lisp_Object f_ns_function_modifier; - - /* Control via default 'GSFontAntiAlias' on OS X and GNUstep. */ - Lisp_Object f_ns_antialias_text; - - /* Confirm on exit. */ - Lisp_Object f_ns_confirm_quit; - - /* Alist of elements (REGEXP . IMAGE) for images of icons associated - to frames.*/ - Lisp_Object f_Vns_icon_type_alist; - - /* Toolkit version support. */ - Lisp_Object f_Vns_version_string; - - Lisp_Object f_Vns_sent_selection_hooks; - Lisp_Object f_Vns_lost_selection_hooks; - - /* This is an association list whose elements are of the form - ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) - SELECTION-NAME is a lisp symbol, whose name is the name of an X Atom. - SELECTION-VALUE is the value that emacs owns for that selection. - It may be any kind of Lisp object. - SELECTION-TIMESTAMP is the time at which emacs began owning this - selection, as a cons of two 16-bit numbers (making a 32 bit time.) - FRAME is the frame for which we made the selection. - If there is an entry in this alist, then it can be assumed that Emacs owns - that selection. - The only (eq) parts of this list that are visible from Lisp are the - selection-values. */ - Lisp_Object f_Vselection_alist; - - Lisp_Object f_Vns_reg_to_script; - - -}; - -extern struct emacs_globals globals; - -#define Vafter_change_functions \ - globals.f_Vafter_change_functions -#define Vafter_init_time \ - globals.f_Vafter_init_time -#define Vafter_insert_file_functions \ - globals.f_Vafter_insert_file_functions -#define Vafter_load_alist \ - globals.f_Vafter_load_alist -#define Valternate_fontname_alist \ - globals.f_Valternate_fontname_alist -#define Vauto_composition_function \ - globals.f_Vauto_composition_function -#define Vauto_composition_mode \ - globals.f_Vauto_composition_mode -#define Vauto_fill_chars \ - globals.f_Vauto_fill_chars -#define Vauto_resize_tool_bars \ - globals.f_Vauto_resize_tool_bars -#define Vauto_save_include_big_deletions \ - globals.f_Vauto_save_include_big_deletions -#define Vauto_save_list_file_name \ - globals.f_Vauto_save_list_file_name -#define Vauto_save_timeout \ - globals.f_Vauto_save_timeout -#define Vauto_save_visited_file_name \ - globals.f_Vauto_save_visited_file_name -#define Vbefore_change_functions \ - globals.f_Vbefore_change_functions -#define Vbefore_init_time \ - globals.f_Vbefore_init_time -#define Vblink_cursor_alist \ - globals.f_Vblink_cursor_alist -#define Vbuffer_access_fontified_property \ - globals.f_Vbuffer_access_fontified_property -#define Vbuffer_access_fontify_functions \ - globals.f_Vbuffer_access_fontify_functions -#define Vbuild_files \ - globals.f_Vbuild_files -#define Vbyte_boolean_vars \ - globals.f_Vbyte_boolean_vars -#define Vbyte_code_meter \ - globals.f_Vbyte_code_meter -#define Vbytecomp_version_regexp \ - globals.f_Vbytecomp_version_regexp -#define Vchange_major_mode_hook \ - globals.f_Vchange_major_mode_hook -#define Vchar_direction_table \ - globals.f_Vchar_direction_table -#define Vchar_property_alias_alist \ - globals.f_Vchar_property_alias_alist -#define Vchar_script_table \ - globals.f_Vchar_script_table -#define Vchar_width_table \ - globals.f_Vchar_width_table -#define Vcharset_list \ - globals.f_Vcharset_list -#define Vcharset_map_path \ - globals.f_Vcharset_map_path -#define Vcharset_revision_table \ - globals.f_Vcharset_revision_table -#define Vcode_conversion_map_vector \ - globals.f_Vcode_conversion_map_vector -#define Vcoding_category_list \ - globals.f_Vcoding_category_list -#define Vcoding_system_alist \ - globals.f_Vcoding_system_alist -#define Vcoding_system_for_read \ - globals.f_Vcoding_system_for_read -#define Vcoding_system_for_write \ - globals.f_Vcoding_system_for_write -#define Vcoding_system_list \ - globals.f_Vcoding_system_list -#define Vcombine_after_change_calls \ - globals.f_Vcombine_after_change_calls -#define Vcommand_debug_status \ - globals.f_Vcommand_debug_status -#define Vcommand_error_function \ - globals.f_Vcommand_error_function -#define Vcommand_history \ - globals.f_Vcommand_history -#define Vcommand_hook_internal \ - globals.f_Vcommand_hook_internal -#define Vcommand_line_args \ - globals.f_Vcommand_line_args -#define Vcompletion_ignored_extensions \ - globals.f_Vcompletion_ignored_extensions -#define Vcompletion_regexp_list \ - globals.f_Vcompletion_regexp_list -#define Vcompose_chars_after_function \ - globals.f_Vcompose_chars_after_function -#define Vcomposition_function_table \ - globals.f_Vcomposition_function_table -#define Vconfigure_info_directory \ - globals.f_Vconfigure_info_directory -#define Vcurrent_iso639_language \ - globals.f_Vcurrent_iso639_language -#define Vcurrent_load_list \ - globals.f_Vcurrent_load_list -#define Vcurrent_prefix_arg \ - globals.f_Vcurrent_prefix_arg -#define Vdata_directory \ - globals.f_Vdata_directory -#define Vdbus_debug \ - globals.f_Vdbus_debug -#define Vdbus_registered_buses \ - globals.f_Vdbus_registered_buses -#define Vdbus_registered_objects_table \ - globals.f_Vdbus_registered_objects_table -#define Vdeactivate_mark \ - globals.f_Vdeactivate_mark -#define Vdebug_ignored_errors \ - globals.f_Vdebug_ignored_errors -#define Vdebug_on_error \ - globals.f_Vdebug_on_error -#define Vdebug_on_signal \ - globals.f_Vdebug_on_signal -#define Vdebugger \ - globals.f_Vdebugger -#define Vdefault_file_name_coding_system \ - globals.f_Vdefault_file_name_coding_system -#define Vdefault_frame_alist \ - globals.f_Vdefault_frame_alist -#define Vdefault_frame_scroll_bars \ - globals.f_Vdefault_frame_scroll_bars -#define Vdefault_process_coding_system \ - globals.f_Vdefault_process_coding_system -#define Vdefault_text_properties \ - globals.f_Vdefault_text_properties -#define Vdeferred_action_function \ - globals.f_Vdeferred_action_function -#define Vdeferred_action_list \ - globals.f_Vdeferred_action_list -#define Vdefine_key_rebound_commands \ - globals.f_Vdefine_key_rebound_commands -#define Vdelete_frame_functions \ - globals.f_Vdelete_frame_functions -#define Vdelete_terminal_functions \ - globals.f_Vdelete_terminal_functions -#define Vdisable_point_adjustment \ - globals.f_Vdisable_point_adjustment -#define Vdisplay_pixels_per_inch \ - globals.f_Vdisplay_pixels_per_inch -#define Vdoc_directory \ - globals.f_Vdoc_directory -#define Vdoc_file_name \ - globals.f_Vdoc_file_name -#define Vdos_display_scancodes \ - globals.f_Vdos_display_scancodes -#define Vdos_unsupported_char_glyph \ - globals.f_Vdos_unsupported_char_glyph -#define Vdos_version \ - globals.f_Vdos_version -#define Vdos_windows_version \ - globals.f_Vdos_windows_version -#define Vdouble_click_time \ - globals.f_Vdouble_click_time -#define Vdynamic_library_alist \ - globals.f_Vdynamic_library_alist -#define Vecho_keystrokes \ - globals.f_Vecho_keystrokes -#define Vemacs_copyright \ - globals.f_Vemacs_copyright -#define Vemacs_version \ - globals.f_Vemacs_version -#define Vemulation_mode_map_alists \ - globals.f_Vemulation_mode_map_alists -#define Venable_character_translation \ - globals.f_Venable_character_translation -#define Venable_disabled_menus_and_buttons \ - globals.f_Venable_disabled_menus_and_buttons -#define Veval_buffer_list \ - globals.f_Veval_buffer_list -#define Vexec_directory \ - globals.f_Vexec_directory -#define Vexec_path \ - globals.f_Vexec_path -#define Vexec_suffixes \ - globals.f_Vexec_suffixes -#define Vkbd_macro_termination_hook \ - globals.f_Vkbd_macro_termination_hook -#define Vexecuting_kbd_macro \ - globals.f_Vexecuting_kbd_macro -#define Vface_default_stipple \ - globals.f_Vface_default_stipple -#define Vface_font_rescale_alist \ - globals.f_Vface_font_rescale_alist -#define Vface_ignored_fonts \ - globals.f_Vface_ignored_fonts -#define Vface_new_frame_defaults \ - globals.f_Vface_new_frame_defaults -#define Vface_remapping_alist \ - globals.f_Vface_remapping_alist -#define Vfeatures \ - globals.f_Vfeatures -#define Vfile_coding_system_alist \ - globals.f_Vfile_coding_system_alist -#define Vfile_name_coding_system \ - globals.f_Vfile_name_coding_system -#define Vfile_name_handler_alist \ - globals.f_Vfile_name_handler_alist -#define Vfind_word_boundary_function_table \ - globals.f_Vfind_word_boundary_function_table -#define Vfirst_change_hook \ - globals.f_Vfirst_change_hook -#define Vfloat_output_format \ - globals.f_Vfloat_output_format -#define Vfont_ccl_encoder_alist \ - globals.f_Vfont_ccl_encoder_alist -#define Vfont_encoding_alist \ - globals.f_Vfont_encoding_alist -#define Vfont_encoding_charset_alist \ - globals.f_Vfont_encoding_charset_alist -#define Vfont_list_limit \ - globals.f_Vfont_list_limit -#define Vfont_log \ - globals.f_Vfont_log -#define Vfont_slant_table \ - globals.f_Vfont_slant_table -#define Vfont_weight_table \ - globals.f_Vfont_weight_table -#define Vfont_width_table \ - globals.f_Vfont_width_table -#define Vfontification_functions \ - globals.f_Vfontification_functions -#define Vfontset_alias_alist \ - globals.f_Vfontset_alias_alist -#define Vframe_alpha_lower_limit \ - globals.f_Vframe_alpha_lower_limit -#define Vframe_title_format \ - globals.f_Vframe_title_format -#define Vfringe_bitmaps \ - globals.f_Vfringe_bitmaps -#define Vfunction_key_map \ - globals.f_Vfunction_key_map -#define Vgc_cons_percentage \ - globals.f_Vgc_cons_percentage -#define Vgc_elapsed \ - globals.f_Vgc_elapsed -#define Vglobal_disable_point_adjustment \ - globals.f_Vglobal_disable_point_adjustment -#define Vglobal_mode_string \ - globals.f_Vglobal_mode_string -#define Vglyph_table \ - globals.f_Vglyph_table -#define Vglyphless_char_display \ - globals.f_Vglyphless_char_display -#define Vgtk_version_string \ - globals.f_Vgtk_version_string -#define Vhelp_char \ - globals.f_Vhelp_char -#define Vhelp_event_list \ - globals.f_Vhelp_event_list -#define Vhelp_form \ - globals.f_Vhelp_form -#define Vhistory_add_new_input \ - globals.f_Vhistory_add_new_input -#define Vhistory_length \ - globals.f_Vhistory_length -#define Vhourglass_delay \ - globals.f_Vhourglass_delay -#define Vhscroll_step \ - globals.f_Vhscroll_step -#define Vicon_title_format \ - globals.f_Vicon_title_format -#define Vignore_relative_composition \ - globals.f_Vignore_relative_composition -#define Vimage_cache_eviction_delay \ - globals.f_Vimage_cache_eviction_delay -#define Vimage_types \ - globals.f_Vimage_types -#define Vimagemagick_render_type \ - globals.f_Vimagemagick_render_type -#define Vinhibit_changing_match_data \ - globals.f_Vinhibit_changing_match_data -#define Vinhibit_field_text_motion \ - globals.f_Vinhibit_field_text_motion -#define Vinhibit_file_name_handlers \ - globals.f_Vinhibit_file_name_handlers -#define Vinhibit_file_name_operation \ - globals.f_Vinhibit_file_name_operation -#define Vinhibit_point_motion_hooks \ - globals.f_Vinhibit_point_motion_hooks -#define Vinhibit_quit \ - globals.f_Vinhibit_quit -#define Vinhibit_read_only \ - globals.f_Vinhibit_read_only -#define Vinhibit_redisplay \ - globals.f_Vinhibit_redisplay -#define Vinitial_environment \ - globals.f_Vinitial_environment -#define Vinitial_window_system \ - globals.f_Vinitial_window_system -#define Vinput_method_function \ - globals.f_Vinput_method_function -#define Vinput_method_previous_message \ - globals.f_Vinput_method_previous_message -#define Vinstallation_directory \ - globals.f_Vinstallation_directory -#define Vinvocation_directory \ - globals.f_Vinvocation_directory -#define Vinvocation_name \ - globals.f_Vinvocation_name -#define Vkey_translation_map \ - globals.f_Vkey_translation_map -#define Vkill_buffer_query_functions \ - globals.f_Vkill_buffer_query_functions -#define Vkill_emacs_hook \ - globals.f_Vkill_emacs_hook -#define Vlast_code_conversion_error \ - globals.f_Vlast_code_conversion_error -#define Vlast_coding_system_used \ - globals.f_Vlast_coding_system_used -#define Vlast_event_frame \ - globals.f_Vlast_event_frame -#define Vlatin_extra_code_table \ - globals.f_Vlatin_extra_code_table -#define Vline_number_display_limit \ - globals.f_Vline_number_display_limit -#define Vline_prefix \ - globals.f_Vline_prefix -#define Vload_file_name \ - globals.f_Vload_file_name -#define Vload_file_rep_suffixes \ - globals.f_Vload_file_rep_suffixes -#define Vload_history \ - globals.f_Vload_history -#define Vload_path \ - globals.f_Vload_path -#define Vload_read_function \ - globals.f_Vload_read_function -#define Vload_source_file_function \ - globals.f_Vload_source_file_function -#define Vload_suffixes \ - globals.f_Vload_suffixes -#define Vlocale_coding_system \ - globals.f_Vlocale_coding_system -#define Vlucid_menu_bar_dirty_flag \ - globals.f_Vlucid_menu_bar_dirty_flag -#define Vmacro_declaration_function \ - globals.f_Vmacro_declaration_function -#define Vmake_pointer_invisible \ - globals.f_Vmake_pointer_invisible -#define Vmark_even_if_inactive \ - globals.f_Vmark_even_if_inactive -#define Vmax_image_size \ - globals.f_Vmax_image_size -#define Vmax_mini_window_height \ - globals.f_Vmax_mini_window_height -#define Vmemory_full \ - globals.f_Vmemory_full -#define Vmemory_signal_data \ - globals.f_Vmemory_signal_data -#define Vmenu_bar_final_items \ - globals.f_Vmenu_bar_final_items -#define Vmenu_bar_mode \ - globals.f_Vmenu_bar_mode -#define Vmenu_bar_update_hook \ - globals.f_Vmenu_bar_update_hook -#define Vmenu_updating_frame \ - globals.f_Vmenu_updating_frame -#define Vmessage_log_max \ - globals.f_Vmessage_log_max -#define Vminibuf_scroll_window \ - globals.f_Vminibuf_scroll_window -#define Vminibuffer_completing_file_name \ - globals.f_Vminibuffer_completing_file_name -#define Vminibuffer_completion_confirm \ - globals.f_Vminibuffer_completion_confirm -#define Vminibuffer_completion_predicate \ - globals.f_Vminibuffer_completion_predicate -#define Vminibuffer_completion_table \ - globals.f_Vminibuffer_completion_table -#define Vminibuffer_exit_hook \ - globals.f_Vminibuffer_exit_hook -#define Vminibuffer_help_form \ - globals.f_Vminibuffer_help_form -#define Vminibuffer_history_position \ - globals.f_Vminibuffer_history_position -#define Vminibuffer_history_variable \ - globals.f_Vminibuffer_history_variable -#define Vminibuffer_local_completion_map \ - globals.f_Vminibuffer_local_completion_map -#define Vminibuffer_local_filename_completion_map \ - globals.f_Vminibuffer_local_filename_completion_map -#define Vminibuffer_local_filename_must_match_map \ - globals.f_Vminibuffer_local_filename_must_match_map -#define Vminibuffer_local_map \ - globals.f_Vminibuffer_local_map -#define Vminibuffer_local_must_match_map \ - globals.f_Vminibuffer_local_must_match_map -#define Vminibuffer_local_ns_map \ - globals.f_Vminibuffer_local_ns_map -#define Vminibuffer_message_timeout \ - globals.f_Vminibuffer_message_timeout -#define Vminibuffer_prompt_properties \ - globals.f_Vminibuffer_prompt_properties -#define Vminibuffer_setup_hook \ - globals.f_Vminibuffer_setup_hook -#define Vminor_mode_map_alist \ - globals.f_Vminor_mode_map_alist -#define Vminor_mode_overriding_map_alist \ - globals.f_Vminor_mode_overriding_map_alist -#define Vmost_negative_fixnum \ - globals.f_Vmost_negative_fixnum -#define Vmost_positive_fixnum \ - globals.f_Vmost_positive_fixnum -#define Vmotif_version_string \ - globals.f_Vmotif_version_string -#define Vmouse_autoselect_window \ - globals.f_Vmouse_autoselect_window -#define Vmouse_highlight \ - globals.f_Vmouse_highlight -#define Vmouse_leave_buffer_hook \ - globals.f_Vmouse_leave_buffer_hook -#define Vmouse_position_function \ - globals.f_Vmouse_position_function -#define Vnetwork_coding_system_alist \ - globals.f_Vnetwork_coding_system_alist -#define Vnext_selection_coding_system \ - globals.f_Vnext_selection_coding_system -#define Vnobreak_char_display \ - globals.f_Vnobreak_char_display -#define Vobarray \ - globals.f_Vobarray -#define Vold_style_backquotes \ - globals.f_Vold_style_backquotes -#define Voperating_system_release \ - globals.f_Voperating_system_release -#define Votf_script_alist \ - globals.f_Votf_script_alist -#define Vother_window_scroll_buffer \ - globals.f_Vother_window_scroll_buffer -#define Voverflow_newline_into_fringe \ - globals.f_Voverflow_newline_into_fringe -#define Voverlay_arrow_position \ - globals.f_Voverlay_arrow_position -#define Voverlay_arrow_string \ - globals.f_Voverlay_arrow_string -#define Voverlay_arrow_variable_list \ - globals.f_Voverlay_arrow_variable_list -#define Voverriding_local_map \ - globals.f_Voverriding_local_map -#define Voverriding_local_map_menu_flag \ - globals.f_Voverriding_local_map_menu_flag -#define Vpath_separator \ - globals.f_Vpath_separator -#define Vpost_command_hook \ - globals.f_Vpost_command_hook -#define Vpost_gc_hook \ - globals.f_Vpost_gc_hook -#define Vpost_self_insert_hook \ - globals.f_Vpost_self_insert_hook -#define Vpre_command_hook \ - globals.f_Vpre_command_hook -#define Vprefix_help_command \ - globals.f_Vprefix_help_command -#define Vpreloaded_file_list \ - globals.f_Vpreloaded_file_list -#define Vprevious_system_messages_locale \ - globals.f_Vprevious_system_messages_locale -#define Vprevious_system_time_locale \ - globals.f_Vprevious_system_time_locale -#define Vprint_charset_text_property \ - globals.f_Vprint_charset_text_property -#define Vprint_circle \ - globals.f_Vprint_circle -#define Vprint_continuous_numbering \ - globals.f_Vprint_continuous_numbering -#define Vprint_gensym \ - globals.f_Vprint_gensym -#define Vprint_length \ - globals.f_Vprint_length -#define Vprint_level \ - globals.f_Vprint_level -#define Vprint_number_table \ - globals.f_Vprint_number_table -#define Vprintable_chars \ - globals.f_Vprintable_chars -#define Vprocess_adaptive_read_buffering \ - globals.f_Vprocess_adaptive_read_buffering -#define Vprocess_coding_system_alist \ - globals.f_Vprocess_coding_system_alist -#define Vprocess_connection_type \ - globals.f_Vprocess_connection_type -#define Vprocess_environment \ - globals.f_Vprocess_environment -#define Vpurify_flag \ - globals.f_Vpurify_flag -#define Vquit_flag \ - globals.f_Vquit_flag -#define Vread_buffer_function \ - globals.f_Vread_buffer_function -#define Vread_expression_history \ - globals.f_Vread_expression_history -#define Vread_circle \ - globals.f_Vread_circle -#define Vread_expression_map \ - globals.f_Vread_expression_map -#define Vread_symbol_positions_list \ - globals.f_Vread_symbol_positions_list -#define Vread_with_symbol_positions \ - globals.f_Vread_with_symbol_positions -#define Vrecenter_redisplay \ - globals.f_Vrecenter_redisplay -#define Vredisplay_end_trigger_functions \ - globals.f_Vredisplay_end_trigger_functions -#define Vredisplay_preemption_period \ - globals.f_Vredisplay_preemption_period -#define Vresize_mini_windows \ - globals.f_Vresize_mini_windows -#define Vresume_tty_functions \ - globals.f_Vresume_tty_functions -#define Vring_bell_function \ - globals.f_Vring_bell_function -#define Vsaved_region_selection \ - globals.f_Vsaved_region_selection -#define Vscalable_fonts_allowed \ - globals.f_Vscalable_fonts_allowed -#define Vscript_representative_chars \ - globals.f_Vscript_representative_chars -#define Vscroll_preserve_screen_position \ - globals.f_Vscroll_preserve_screen_position -#define Vsearch_spaces_regexp \ - globals.f_Vsearch_spaces_regexp -#define Vselect_active_regions \ - globals.f_Vselect_active_regions -#define Vselect_safe_coding_system_function \ - globals.f_Vselect_safe_coding_system_function -#define Vselection_coding_system \ - globals.f_Vselection_coding_system -#define Vselection_converter_alist \ - globals.f_Vselection_converter_alist -#define Vset_auto_coding_function \ - globals.f_Vset_auto_coding_function -#define Vshared_game_score_directory \ - globals.f_Vshared_game_score_directory -#define Vshell_file_name \ - globals.f_Vshell_file_name -#define Vshow_help_function \ - globals.f_Vshow_help_function -#define Vshow_trailing_whitespace \ - globals.f_Vshow_trailing_whitespace -#define Vsignal_hook_function \ - globals.f_Vsignal_hook_function -#define Vsource_directory \ - globals.f_Vsource_directory -#define Vspecial_event_map \ - globals.f_Vspecial_event_map -#define Vstandard_display_table \ - globals.f_Vstandard_display_table -#define Vstandard_input \ - globals.f_Vstandard_input -#define Vstandard_output \ - globals.f_Vstandard_output -#define Vstandard_translation_table_for_decode \ - globals.f_Vstandard_translation_table_for_decode -#define Vstandard_translation_table_for_encode \ - globals.f_Vstandard_translation_table_for_encode -#define Vsuggest_key_bindings \ - globals.f_Vsuggest_key_bindings -#define Vsuspend_tty_functions \ - globals.f_Vsuspend_tty_functions -#define Vsystem_configuration \ - globals.f_Vsystem_configuration -#define Vsystem_configuration_options \ - globals.f_Vsystem_configuration_options -#define Vsystem_messages_locale \ - globals.f_Vsystem_messages_locale -#define Vsystem_name \ - globals.f_Vsystem_name -#define Vsystem_time_locale \ - globals.f_Vsystem_time_locale -#define Vsystem_type \ - globals.f_Vsystem_type -#define Vtemp_buffer_show_function \ - globals.f_Vtemp_buffer_show_function -#define Vtemporary_file_directory \ - globals.f_Vtemporary_file_directory -#define Vterminal_frame \ - globals.f_Vterminal_frame -#define Vtext_property_default_nonsticky \ - globals.f_Vtext_property_default_nonsticky -#define Vthis_command \ - globals.f_Vthis_command -#define Vthis_command_keys_shift_translated \ - globals.f_Vthis_command_keys_shift_translated -#define Vthis_original_command \ - globals.f_Vthis_original_command -#define Vthrow_on_input \ - globals.f_Vthrow_on_input -#define Vtimer_idle_list \ - globals.f_Vtimer_idle_list -#define Vtimer_list \ - globals.f_Vtimer_list -#define Vtool_bar_border \ - globals.f_Vtool_bar_border -#define Vtool_bar_button_margin \ - globals.f_Vtool_bar_button_margin -#define Vtool_bar_mode \ - globals.f_Vtool_bar_mode -#define Vtool_bar_separator_image_expression \ - globals.f_Vtool_bar_separator_image_expression -#define Vtool_bar_style \ - globals.f_Vtool_bar_style -#define Vtop_level \ - globals.f_Vtop_level -#define Vtransient_mark_mode \ - globals.f_Vtransient_mark_mode -#define Vtranslation_hash_table_vector \ - globals.f_Vtranslation_hash_table_vector -#define Vtranslation_table_for_input \ - globals.f_Vtranslation_table_for_input -#define Vtranslation_table_vector \ - globals.f_Vtranslation_table_vector -#define Vtruncate_partial_width_windows \ - globals.f_Vtruncate_partial_width_windows -#define Vtty_defined_color_alist \ - globals.f_Vtty_defined_color_alist -#define Vtty_erase_char \ - globals.f_Vtty_erase_char -#define Vundo_outer_limit \ - globals.f_Vundo_outer_limit -#define Vundo_outer_limit_function \ - globals.f_Vundo_outer_limit_function -#define Vunicode_category_table \ - globals.f_Vunicode_category_table -#define Vunread_command_events \ - globals.f_Vunread_command_events -#define Vunread_input_method_events \ - globals.f_Vunread_input_method_events -#define Vunread_post_input_method_events \ - globals.f_Vunread_post_input_method_events -#define Vuse_default_ascent \ - globals.f_Vuse_default_ascent -#define Vuser_full_name \ - globals.f_Vuser_full_name -#define Vuser_init_file \ - globals.f_Vuser_init_file -#define Vuser_login_name \ - globals.f_Vuser_login_name -#define Vuser_real_login_name \ - globals.f_Vuser_real_login_name -#define Vvalues \ - globals.f_Vvalues -#define Vvertical_centering_font_regexp \ - globals.f_Vvertical_centering_font_regexp -#define Vvoid_text_area_pointer \ - globals.f_Vvoid_text_area_pointer -#define Vw32_alt_is_meta \ - globals.f_Vw32_alt_is_meta -#define Vw32_apps_modifier \ - globals.f_Vw32_apps_modifier -#define Vw32_bdf_filename_alist \ - globals.f_Vw32_bdf_filename_alist -#define Vw32_capslock_is_shiftlock \ - globals.f_Vw32_capslock_is_shiftlock -#define Vw32_charset_info_alist \ - globals.f_Vw32_charset_info_alist -#define Vw32_color_map \ - globals.f_Vw32_color_map -#define Vw32_downcase_file_names \ - globals.f_Vw32_downcase_file_names -#define Vw32_enable_caps_lock \ - globals.f_Vw32_enable_caps_lock -#define Vw32_enable_num_lock \ - globals.f_Vw32_enable_num_lock -#define Vw32_enable_palette \ - globals.f_Vw32_enable_palette -#define Vw32_generate_fake_inodes \ - globals.f_Vw32_generate_fake_inodes -#define Vw32_get_true_file_attributes \ - globals.f_Vw32_get_true_file_attributes -#define Vw32_grab_focus_on_raise \ - globals.f_Vw32_grab_focus_on_raise -#define Vw32_lwindow_modifier \ - globals.f_Vw32_lwindow_modifier -#define Vw32_pass_alt_to_system \ - globals.f_Vw32_pass_alt_to_system -#define Vw32_pass_lwindow_to_system \ - globals.f_Vw32_pass_lwindow_to_system -#define Vw32_pass_rwindow_to_system \ - globals.f_Vw32_pass_rwindow_to_system -#define Vw32_phantom_key_code \ - globals.f_Vw32_phantom_key_code -#define Vw32_quote_process_args \ - globals.f_Vw32_quote_process_args -#define Vw32_recognize_altgr \ - globals.f_Vw32_recognize_altgr -#define Vw32_rwindow_modifier \ - globals.f_Vw32_rwindow_modifier -#define Vw32_scroll_lock_modifier \ - globals.f_Vw32_scroll_lock_modifier -#define Vw32_start_process_inherit_error_mode \ - globals.f_Vw32_start_process_inherit_error_mode -#define Vw32_start_process_share_console \ - globals.f_Vw32_start_process_share_console -#define Vw32_start_process_show_window \ - globals.f_Vw32_start_process_show_window -#define Vw32_swap_mouse_buttons \ - globals.f_Vw32_swap_mouse_buttons -#define Vwhere_is_preferred_modifier \ - globals.f_Vwhere_is_preferred_modifier -#define Vwindow_configuration_change_hook \ - globals.f_Vwindow_configuration_change_hook -#define Vwindow_point_insertion_type \ - globals.f_Vwindow_point_insertion_type -#define Vwindow_scroll_functions \ - globals.f_Vwindow_scroll_functions -#define Vwindow_size_change_functions \ - globals.f_Vwindow_size_change_functions -#define Vwindow_system_version \ - globals.f_Vwindow_system_version -#define Vwindow_text_change_functions \ - globals.f_Vwindow_text_change_functions -#define Vword_combining_categories \ - globals.f_Vword_combining_categories -#define Vword_separating_categories \ - globals.f_Vword_separating_categories -#define Vwrap_prefix \ - globals.f_Vwrap_prefix -#define Vwrite_region_annotate_functions \ - globals.f_Vwrite_region_annotate_functions -#define Vwrite_region_annotations_so_far \ - globals.f_Vwrite_region_annotations_so_far -#define Vwrite_region_post_annotation_function \ - globals.f_Vwrite_region_post_annotation_function -#define Vx_alt_keysym \ - globals.f_Vx_alt_keysym -#define Vx_bitmap_file_path \ - globals.f_Vx_bitmap_file_path -#define Vx_cursor_fore_pixel \ - globals.f_Vx_cursor_fore_pixel -#define Vx_hourglass_pointer_shape \ - globals.f_Vx_hourglass_pointer_shape -#define Vx_hyper_keysym \ - globals.f_Vx_hyper_keysym -#define Vx_keysym_table \ - globals.f_Vx_keysym_table -#define Vx_lost_selection_functions \ - globals.f_Vx_lost_selection_functions -#define Vx_max_tooltip_size \ - globals.f_Vx_max_tooltip_size -#define Vx_meta_keysym \ - globals.f_Vx_meta_keysym -#define Vx_mode_pointer_shape \ - globals.f_Vx_mode_pointer_shape -#define Vx_no_window_manager \ - globals.f_Vx_no_window_manager -#define Vx_nontext_pointer_shape \ - globals.f_Vx_nontext_pointer_shape -#define Vx_pixel_size_width_font_regexp \ - globals.f_Vx_pixel_size_width_font_regexp -#define Vx_pointer_shape \ - globals.f_Vx_pointer_shape -#define Vx_resource_class \ - globals.f_Vx_resource_class -#define Vx_resource_name \ - globals.f_Vx_resource_name -#define Vx_sensitive_text_pointer_shape \ - globals.f_Vx_sensitive_text_pointer_shape -#define Vx_sent_selection_functions \ - globals.f_Vx_sent_selection_functions -#define Vx_session_id \ - globals.f_Vx_session_id -#define Vx_session_previous_id \ - globals.f_Vx_session_previous_id -#define Vx_super_keysym \ - globals.f_Vx_super_keysym -#define Vx_toolkit_scroll_bars \ - globals.f_Vx_toolkit_scroll_bars -#define Vx_window_horizontal_drag_shape \ - globals.f_Vx_window_horizontal_drag_shape -#define Vxft_settings \ - globals.f_Vxft_settings -#define auto_raise_tool_bar_buttons_p \ - globals.f_auto_raise_tool_bar_buttons_p -#define auto_save_interval \ - globals.f_auto_save_interval -#define auto_window_vscroll_p \ - globals.f_auto_window_vscroll_p -#define automatic_hscrolling_p \ - globals.f_automatic_hscrolling_p -#define baud_rate \ - globals.f_baud_rate -#define byte_debug_flag \ - globals.f_byte_debug_flag -#define byte_metering_on \ - globals.f_byte_metering_on -#define cannot_suspend \ - globals.f_cannot_suspend -#define check_markers_debug_flag \ - globals.f_check_markers_debug_flag -#define coding_system_require_warning \ - globals.f_coding_system_require_warning -#define completion_ignore_case \ - globals.f_completion_ignore_case -#define cons_cells_consed \ - globals.f_cons_cells_consed -#define cross_disabled_images \ - globals.f_cross_disabled_images -#define cursor_in_echo_area \ - globals.f_cursor_in_echo_area -#define debug_end_pos \ - globals.f_debug_end_pos -#define debug_on_next_call \ - globals.f_debug_on_next_call -#define debug_on_quit \ - globals.f_debug_on_quit -#define debugger_may_continue \ - globals.f_debugger_may_continue -#define delete_by_moving_to_trash \ - globals.f_delete_by_moving_to_trash -#define delete_exited_processes \ - globals.f_delete_exited_processes -#define display_hourglass_p \ - globals.f_display_hourglass_p -#define do_mouse_tracking \ - globals.f_do_mouse_tracking -#define dos_codepage \ - globals.f_dos_codepage -#define dos_country_code \ - globals.f_dos_country_code -#define dos_decimal_point \ - globals.f_dos_decimal_point -#define dos_hyper_key \ - globals.f_dos_hyper_key -#define dos_keyboard_layout \ - globals.f_dos_keyboard_layout -#define dos_keypad_mode \ - globals.f_dos_keypad_mode -#define dos_super_key \ - globals.f_dos_super_key -#define dos_timezone_offset \ - globals.f_dos_timezone_offset -#define double_click_fuzz \ - globals.f_double_click_fuzz -#define emacs_scroll_step \ - globals.f_emacs_scroll_step -#define enable_recursive_minibuffers \ - globals.f_enable_recursive_minibuffers -#define eol_mnemonic_dos \ - globals.f_eol_mnemonic_dos -#define eol_mnemonic_mac \ - globals.f_eol_mnemonic_mac -#define eol_mnemonic_undecided \ - globals.f_eol_mnemonic_undecided -#define eol_mnemonic_unix \ - globals.f_eol_mnemonic_unix -#define executing_kbd_macro_index \ - globals.f_executing_kbd_macro_index -#define extra_keyboard_modifiers \ - globals.f_extra_keyboard_modifiers -#define floats_consed \ - globals.f_floats_consed -#define focus_follows_mouse \ - globals.f_focus_follows_mouse -#define force_load_messages \ - globals.f_force_load_messages -#define garbage_collection_messages \ - globals.f_garbage_collection_messages -#define gc_cons_threshold \ - globals.f_gc_cons_threshold -#define gcs_done \ - globals.f_gcs_done -#define highlight_nonselected_windows \ - globals.f_highlight_nonselected_windows -#define history_delete_duplicates \ - globals.f_history_delete_duplicates -#define hscroll_margin \ - globals.f_hscroll_margin -#define indent_tabs_mode \ - globals.f_indent_tabs_mode -#define inherit_process_coding_system \ - globals.f_inherit_process_coding_system -#define inhibit_eol_conversion \ - globals.f_inhibit_eol_conversion -#define inhibit_eval_during_redisplay \ - globals.f_inhibit_eval_during_redisplay -#define inhibit_free_realized_faces \ - globals.f_inhibit_free_realized_faces -#define inhibit_iso_escape_detection \ - globals.f_inhibit_iso_escape_detection -#define inhibit_load_charset_map \ - globals.f_inhibit_load_charset_map -#define inhibit_local_menu_bar_menus \ - globals.f_inhibit_local_menu_bar_menus -#define inhibit_menubar_update \ - globals.f_inhibit_menubar_update -#define inhibit_modification_hooks \ - globals.f_inhibit_modification_hooks -#define inhibit_null_byte_detection \ - globals.f_inhibit_null_byte_detection -#define inhibit_try_cursor_movement \ - globals.f_inhibit_try_cursor_movement -#define inhibit_try_window_id \ - globals.f_inhibit_try_window_id -#define inhibit_try_window_reusing \ - globals.f_inhibit_try_window_reusing -#define inhibit_x_resources \ - globals.f_inhibit_x_resources -#define intervals_consed \ - globals.f_intervals_consed -#define inverse_video \ - globals.f_inverse_video -#define last_command_event \ - globals.f_last_command_event -#define last_input_event \ - globals.f_last_input_event -#define last_nonmenu_event \ - globals.f_last_nonmenu_event -#define line_number_display_limit_width \ - globals.f_line_number_display_limit_width -#define load_convert_to_unibyte \ - globals.f_load_convert_to_unibyte -#define load_dangerous_libraries \ - globals.f_load_dangerous_libraries -#define load_force_doc_strings \ - globals.f_load_force_doc_strings -#define load_in_progress \ - globals.f_load_in_progress -#define make_cursor_line_fully_visible_p \ - globals.f_make_cursor_line_fully_visible_p -#define max_lisp_eval_depth \ - globals.f_max_lisp_eval_depth -#define max_specpdl_size \ - globals.f_max_specpdl_size -#define menu_prompt_more_char \ - globals.f_menu_prompt_more_char -#define menu_prompting \ - globals.f_menu_prompting -#define message_truncate_lines \ - globals.f_message_truncate_lines -#define meta_prefix_char \ - globals.f_meta_prefix_char -#define minibuffer_allow_text_properties \ - globals.f_minibuffer_allow_text_properties -#define minibuffer_auto_raise \ - globals.f_minibuffer_auto_raise -#define misc_objects_consed \ - globals.f_misc_objects_consed -#define mode_line_in_non_selected_windows \ - globals.f_mode_line_in_non_selected_windows -#define mode_line_inverse_video \ - globals.f_mode_line_inverse_video -#define multibyte_syntax_as_symbol \ - globals.f_multibyte_syntax_as_symbol -#define multiple_frames \ - globals.f_multiple_frames -#define next_screen_context_lines \ - globals.f_next_screen_context_lines -#define no_redraw_on_reenter \ - globals.f_no_redraw_on_reenter -#define noninteractive1 \ - globals.f_noninteractive1 -#define num_input_keys \ - globals.f_num_input_keys -#define num_nonmacro_input_events \ - globals.f_num_nonmacro_input_events -#define open_paren_in_column_0_is_defun_start \ - globals.f_open_paren_in_column_0_is_defun_start -#define overline_margin \ - globals.f_overline_margin -#define parse_sexp_ignore_comments \ - globals.f_parse_sexp_ignore_comments -#define parse_sexp_lookup_properties \ - globals.f_parse_sexp_lookup_properties -#define polling_period \ - globals.f_polling_period -#define print_escape_multibyte \ - globals.f_print_escape_multibyte -#define print_escape_newlines \ - globals.f_print_escape_newlines -#define print_escape_nonascii \ - globals.f_print_escape_nonascii -#define print_quoted \ - globals.f_print_quoted -#define pure_bytes_used \ - globals.f_pure_bytes_used -#define read_buffer_completion_ignore_case \ - globals.f_read_buffer_completion_ignore_case -#define redisplay_dont_pause \ - globals.f_redisplay_dont_pause -#define scroll_conservatively \ - globals.f_scroll_conservatively -#define scroll_margin \ - globals.f_scroll_margin -#define string_chars_consed \ - globals.f_string_chars_consed -#define strings_consed \ - globals.f_strings_consed -#define symbols_consed \ - globals.f_symbols_consed -#define system_uses_terminfo \ - globals.f_system_uses_terminfo -#define tool_bar_button_relief \ - globals.f_tool_bar_button_relief -#define tool_bar_max_label_size \ - globals.f_tool_bar_max_label_size -#define underline_minimum_offset \ - globals.f_underline_minimum_offset -#define undo_inhibit_record_point \ - globals.f_undo_inhibit_record_point -#define undo_limit \ - globals.f_undo_limit -#define undo_strong_limit \ - globals.f_undo_strong_limit -#define unibyte_display_via_language_environment \ - globals.f_unibyte_display_via_language_environment -#define unread_command_char \ - globals.f_unread_command_char -#define use_dialog_box \ - globals.f_use_dialog_box -#define use_file_dialog \ - globals.f_use_file_dialog -#define use_system_font \ - globals.f_use_system_font -#define vector_cells_consed \ - globals.f_vector_cells_consed -#define visible_bell \ - globals.f_visible_bell -#define visible_cursor \ - globals.f_visible_cursor -#define w32_ansi_code_page \ - globals.f_w32_ansi_code_page -#define w32_enable_synthesized_fonts \ - globals.f_w32_enable_synthesized_fonts -#define w32_mouse_button_tolerance \ - globals.f_w32_mouse_button_tolerance -#define w32_mouse_move_interval \ - globals.f_w32_mouse_move_interval -#define w32_num_mouse_buttons \ - globals.f_w32_num_mouse_buttons -#define w32_pass_extra_mouse_buttons_to_system \ - globals.f_w32_pass_extra_mouse_buttons_to_system -#define w32_pass_multimedia_buttons_to_system \ - globals.f_w32_pass_multimedia_buttons_to_system -#define w32_pipe_read_delay \ - globals.f_w32_pipe_read_delay -#define w32_quit_key \ - globals.f_w32_quit_key -#define w32_strict_fontnames \ - globals.f_w32_strict_fontnames -#define w32_strict_painting \ - globals.f_w32_strict_painting -#define w32_use_full_screen_buffer \ - globals.f_w32_use_full_screen_buffer -#define w32_use_visible_system_caret \ - globals.f_w32_use_visible_system_caret -#define window_min_height \ - globals.f_window_min_height -#define window_min_width \ - globals.f_window_min_width -#define words_include_escapes \ - globals.f_words_include_escapes -#define write_region_inhibit_fsync \ - globals.f_write_region_inhibit_fsync -#define x_gtk_file_dialog_help_text \ - globals.f_x_gtk_file_dialog_help_text -#define x_gtk_show_hidden_files \ - globals.f_x_gtk_show_hidden_files -#define x_gtk_use_old_file_dialog \ - globals.f_x_gtk_use_old_file_dialog -#define x_gtk_use_system_tooltips \ - globals.f_x_gtk_use_system_tooltips -#define x_gtk_whole_detached_tool_bar \ - globals.f_x_gtk_whole_detached_tool_bar -#define x_mouse_click_focus_ignore_position \ - globals.f_x_mouse_click_focus_ignore_position -#define x_selection_timeout \ - globals.f_x_selection_timeout -#define x_stretch_cursor_p \ - globals.f_x_stretch_cursor_p -#define x_underline_at_descent_line \ - globals.f_x_underline_at_descent_line -#define x_use_underline_position_properties \ - globals.f_x_use_underline_position_properties -#define ns_input_file \ - globals.f_ns_input_file -#define ns_input_font \ - globals.f_ns_input_font -#define ns_input_fontsize \ - globals.f_ns_input_fontsize -#define ns_input_line \ - globals.f_ns_input_line -#define ns_input_color \ - globals.f_ns_input_color -#define ns_input_text \ - globals.f_ns_input_text -#define ns_working_text \ - globals.f_ns_working_text -#define ns_input_spi_name \ - globals.f_ns_input_spi_name -#define ns_input_spi_arg \ - globals.f_ns_input_spi_arg -#define ns_alternate_modifier \ - globals.f_ns_alternate_modifier -#define ns_right_alternate_modifier \ - globals.f_ns_right_alternate_modifier -#define ns_command_modifier \ - globals.f_ns_command_modifier -#define ns_right_command_modifier \ - globals.f_ns_right_command_modifier -#define ns_control_modifier \ - globals.f_ns_control_modifier -#define ns_right_control_modifier \ - globals.f_ns_right_control_modifier -#define ns_function_modifier \ - globals.f_ns_function_modifier -#define ns_antialias_text \ - globals.f_ns_antialias_text -#define ns_confirm_quit \ - globals.f_ns_confirm_quit -#define Vns_icon_type_alist \ - globals.f_Vns_icon_type_alist -#define Vns_version_string \ - globals.f_Vns_version_string -#define Vns_sent_selection_hooks \ - globals.f_Vns_sent_selection_hooks -#define Vns_lost_selection_hooks \ - globals.f_Vns_lost_selection_hooks -#define Vselection_alist \ - globals.f_Vselection_alist -#define Vns_reg_to_script \ - globals.f_Vns_reg_to_script diff --git a/src/image.c b/src/image.c index 10038eecd85..f4a50e92ab1 100644 --- a/src/image.c +++ b/src/image.c @@ -1896,7 +1896,7 @@ mark_image_cache (struct image_cache *c) #ifdef HAVE_NTGUI /* Macro for defining functions that will be loaded from image DLLs. */ -#define DEF_IMGLIB_FN(func,args) int (FAR CDECL *fn_##func)args +#define DEF_IMGLIB_FN(rettype,func,args) rettype (FAR CDECL *fn_##func)args /* Macro for loading those image functions from the library. */ #define LOAD_IMGLIB_FN(lib,func) { \ @@ -2226,7 +2226,7 @@ static int xbm_load_image (struct frame *f, struct image *img, static int xbm_image_p (Lisp_Object object); static int xbm_read_bitmap_data (struct frame *f, unsigned char *, unsigned char *, - int *, int *, unsigned char **, int); + int *, int *, char **, int); static int xbm_file_p (Lisp_Object); @@ -2614,7 +2614,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data, static int xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end, - int *width, int *height, unsigned char **data, + int *width, int *height, char **data, int inhibit_image_error) { unsigned char *s = contents; @@ -2622,7 +2622,7 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e int padding_p = 0; int v10 = 0; int bytes_per_line, i, nbytes; - unsigned char *p; + char *p; int value; int LA1; @@ -2706,7 +2706,7 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e bytes_per_line = (*width + 7) / 8 + padding_p; nbytes = bytes_per_line * *height; - p = *data = (unsigned char *) xmalloc (nbytes); + p = *data = (char *) xmalloc (nbytes); if (v10) { @@ -2768,7 +2768,7 @@ xbm_load_image (struct frame *f, struct image *img, unsigned char *contents, unsigned char *end) { int rc; - unsigned char *data; + char *data; int success_p = 0; rc = xbm_read_bitmap_data (f, contents, end, &img->width, &img->height, @@ -2936,7 +2936,7 @@ xbm_load (struct frame *f, struct image *img) else if (STRINGP (data)) bits = SSDATA (data); else - bits = XBOOL_VECTOR (data)->data; + bits = (char *) XBOOL_VECTOR (data)->data; #ifdef WINDOWSNT { @@ -3251,12 +3251,12 @@ xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void * /* XPM library details. */ -DEF_IMGLIB_FN (XpmFreeAttributes, (XpmAttributes *)); -DEF_IMGLIB_FN (XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **, +DEF_IMGLIB_FN (void, XpmFreeAttributes, (XpmAttributes *)); +DEF_IMGLIB_FN (int, XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **, xpm_XImage **, XpmAttributes *)); -DEF_IMGLIB_FN (XpmReadFileToImage, (Display *, char *, xpm_XImage **, +DEF_IMGLIB_FN (int, XpmReadFileToImage, (Display *, char *, xpm_XImage **, xpm_XImage **, XpmAttributes *)); -DEF_IMGLIB_FN (XImageFree, (xpm_XImage *)); +DEF_IMGLIB_FN (void, XImageFree, (xpm_XImage *)); static int init_xpm_functions (Lisp_Object libraries) @@ -3906,7 +3906,7 @@ xpm_load_image (struct frame *f, while (num_colors-- > 0) { - unsigned char *color, *max_color; + char *color, *max_color; int key, next_key, max_key = 0; Lisp_Object symbol_color = Qnil, color_val; XColor cdef; @@ -3958,7 +3958,7 @@ xpm_load_image (struct frame *f, if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) { - if (xstrcasecmp (SDATA (XCDR (specified_color)), "None") == 0) + if (xstrcasecmp (SSDATA (XCDR (specified_color)), "None") == 0) color_val = Qt; else if (x_defined_color (f, SDATA (XCDR (specified_color)), &cdef, 0)) @@ -5419,31 +5419,36 @@ png_image_p (Lisp_Object object) #ifdef HAVE_NTGUI /* PNG library details. */ -DEF_IMGLIB_FN (png_get_io_ptr, (png_structp)); -DEF_IMGLIB_FN (png_sig_cmp, (png_bytep, png_size_t, png_size_t)); -DEF_IMGLIB_FN (png_create_read_struct, (png_const_charp, png_voidp, - png_error_ptr, png_error_ptr)); -DEF_IMGLIB_FN (png_create_info_struct, (png_structp)); -DEF_IMGLIB_FN (png_destroy_read_struct, (png_structpp, png_infopp, png_infopp)); -DEF_IMGLIB_FN (png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); -DEF_IMGLIB_FN (png_set_sig_bytes, (png_structp, int)); -DEF_IMGLIB_FN (png_read_info, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_get_IHDR, (png_structp, png_infop, +DEF_IMGLIB_FN (png_voidp, png_get_io_ptr, (png_structp)); +DEF_IMGLIB_FN (int, png_sig_cmp, (png_bytep, png_size_t, png_size_t)); +DEF_IMGLIB_FN (png_structp, png_create_read_struct, (png_const_charp, png_voidp, + png_error_ptr, png_error_ptr)); +DEF_IMGLIB_FN (png_infop, png_create_info_struct, (png_structp)); +DEF_IMGLIB_FN (void, png_destroy_read_struct, (png_structpp, png_infopp, png_infopp)); +DEF_IMGLIB_FN (void, png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); +DEF_IMGLIB_FN (void, png_set_sig_bytes, (png_structp, int)); +DEF_IMGLIB_FN (void, png_read_info, (png_structp, png_infop)); +DEF_IMGLIB_FN (png_uint_32, png_get_IHDR, (png_structp, png_infop, png_uint_32 *, png_uint_32 *, int *, int *, int *, int *, int *)); -DEF_IMGLIB_FN (png_get_valid, (png_structp, png_infop, png_uint_32)); -DEF_IMGLIB_FN (png_set_strip_16, (png_structp)); -DEF_IMGLIB_FN (png_set_expand, (png_structp)); -DEF_IMGLIB_FN (png_set_gray_to_rgb, (png_structp)); -DEF_IMGLIB_FN (png_set_background, (png_structp, png_color_16p, +DEF_IMGLIB_FN (png_uint_32, png_get_valid, (png_structp, png_infop, png_uint_32)); +DEF_IMGLIB_FN (void, png_set_strip_16, (png_structp)); +DEF_IMGLIB_FN (void, png_set_expand, (png_structp)); +DEF_IMGLIB_FN (void, png_set_gray_to_rgb, (png_structp)); +DEF_IMGLIB_FN (void, png_set_background, (png_structp, png_color_16p, int, int, double)); -DEF_IMGLIB_FN (png_get_bKGD, (png_structp, png_infop, png_color_16p *)); -DEF_IMGLIB_FN (png_read_update_info, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_get_channels, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_get_rowbytes, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_read_image, (png_structp, png_bytepp)); -DEF_IMGLIB_FN (png_read_end, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_error, (png_structp, png_const_charp)); +DEF_IMGLIB_FN (png_uint_32, png_get_bKGD, (png_structp, png_infop, png_color_16p *)); +DEF_IMGLIB_FN (void, png_read_update_info, (png_structp, png_infop)); +DEF_IMGLIB_FN (png_byte, png_get_channels, (png_structp, png_infop)); +DEF_IMGLIB_FN (png_size_t, png_get_rowbytes, (png_structp, png_infop)); +DEF_IMGLIB_FN (void, png_read_image, (png_structp, png_bytepp)); +DEF_IMGLIB_FN (void, png_read_end, (png_structp, png_infop)); +DEF_IMGLIB_FN (void, png_error, (png_structp, png_const_charp)); + +#if (PNG_LIBPNG_VER >= 10500) +DEF_IMGLIB_FN (void, png_longjmp, (png_structp, int)); +DEF_IMGLIB_FN (jmp_buf *, png_set_longjmp_fn, (png_structp, png_longjmp_ptr, size_t)); +#endif /* libpng version >= 1.5 */ static int init_png_functions (Lisp_Object libraries) @@ -5475,6 +5480,12 @@ init_png_functions (Lisp_Object libraries) LOAD_IMGLIB_FN (library, png_read_image); LOAD_IMGLIB_FN (library, png_read_end); LOAD_IMGLIB_FN (library, png_error); + +#if (PNG_LIBPNG_VER >= 10500) + LOAD_IMGLIB_FN (library, png_longjmp); + LOAD_IMGLIB_FN (library, png_set_longjmp_fn); +#endif /* libpng version >= 1.5 */ + return 1; } #else @@ -5501,8 +5512,24 @@ init_png_functions (Lisp_Object libraries) #define fn_png_read_end png_read_end #define fn_png_error png_error +#if (PNG_LIBPNG_VER >= 10500) +#define fn_png_longjmp png_longjmp +#define fn_png_set_longjmp_fn png_set_longjmp_fn +#endif /* libpng version >= 1.5 */ + #endif /* HAVE_NTGUI */ + +#if (PNG_LIBPNG_VER < 10500) +#define PNG_LONGJMP(ptr) (longjmp ((ptr)->jmpbuf, 1)) +#define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) +#else +/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ +#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) +#define PNG_JMPBUF(ptr) \ + (*fn_png_set_longjmp_fn((ptr), longjmp, sizeof (jmp_buf))) +#endif + /* Error and warning handlers installed when the PNG library is initialized. */ @@ -5513,7 +5540,7 @@ my_png_error (png_struct *png_ptr, const char *msg) /* Avoid compiler warning about deprecated direct access to png_ptr's fields in libpng versions 1.4.x. */ image_error ("PNG error: %s", build_string (msg), Qnil); - longjmp (png_ptr->jmpbuf, 1); + PNG_LONGJMP (png_ptr); } @@ -5644,19 +5671,17 @@ png_load (struct frame *f, struct image *img) tbr.bytes += sizeof (sig); } - /* Initialize read and info structs for PNG lib. Casting return - value avoids a GCC warning on W32. */ - png_ptr = (png_structp)fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, - NULL, my_png_error, - my_png_warning); + /* Initialize read and info structs for PNG lib. */ + png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, + NULL, my_png_error, + my_png_warning); if (!png_ptr) { if (fp) fclose (fp); return 0; } - /* Casting return value avoids a GCC warning on W32. */ - info_ptr = (png_infop)fn_png_create_info_struct (png_ptr); + info_ptr = fn_png_create_info_struct (png_ptr); if (!info_ptr) { fn_png_destroy_read_struct (&png_ptr, NULL, NULL); @@ -5664,8 +5689,7 @@ png_load (struct frame *f, struct image *img) return 0; } - /* Casting return value avoids a GCC warning on W32. */ - end_info = (png_infop)fn_png_create_info_struct (png_ptr); + end_info = fn_png_create_info_struct (png_ptr); if (!end_info) { fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); @@ -5675,7 +5699,7 @@ png_load (struct frame *f, struct image *img) /* Set error jump-back. We come back here when the PNG library detects an error. */ - if (setjmp (png_ptr->jmpbuf)) + if (setjmp (PNG_JMPBUF (png_ptr))) { error: if (png_ptr) @@ -6028,14 +6052,14 @@ jpeg_image_p (Lisp_Object object) #ifdef HAVE_NTGUI /* JPEG library details. */ -DEF_IMGLIB_FN (jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); -DEF_IMGLIB_FN (jpeg_start_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (jpeg_finish_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (jpeg_destroy_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (jpeg_read_header, (j_decompress_ptr, boolean)); -DEF_IMGLIB_FN (jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); -DEF_IMGLIB_FN (jpeg_std_error, (struct jpeg_error_mgr *)); -DEF_IMGLIB_FN (jpeg_resync_to_restart, (j_decompress_ptr, int)); +DEF_IMGLIB_FN (void, jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); +DEF_IMGLIB_FN (boolean, jpeg_start_decompress, (j_decompress_ptr)); +DEF_IMGLIB_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr)); +DEF_IMGLIB_FN (void, jpeg_destroy_decompress, (j_decompress_ptr)); +DEF_IMGLIB_FN (int, jpeg_read_header, (j_decompress_ptr, boolean)); +DEF_IMGLIB_FN (JDIMENSION, jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); +DEF_IMGLIB_FN (struct jpeg_error_mgr *, jpeg_std_error, (struct jpeg_error_mgr *)); +DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int)); static int init_jpeg_functions (Lisp_Object libraries) @@ -6335,9 +6359,8 @@ jpeg_load (struct frame *f, struct image *img) } /* Customize libjpeg's error handling to call my_error_exit when an - error is detected. This function will perform a longjmp. - Casting return value avoids a GCC warning on W32. */ - cinfo.err = (struct jpeg_error_mgr *)fn_jpeg_std_error (&mgr.pub); + error is detected. This function will perform a longjmp. */ + cinfo.err = fn_jpeg_std_error (&mgr.pub); mgr.pub.error_exit = my_error_exit; if ((rc = setjmp (mgr.setjmp_buffer)) != 0) @@ -6561,17 +6584,17 @@ tiff_image_p (Lisp_Object object) #ifdef HAVE_NTGUI /* TIFF library details. */ -DEF_IMGLIB_FN (TIFFSetErrorHandler, (TIFFErrorHandler)); -DEF_IMGLIB_FN (TIFFSetWarningHandler, (TIFFErrorHandler)); -DEF_IMGLIB_FN (TIFFOpen, (const char *, const char *)); -DEF_IMGLIB_FN (TIFFClientOpen, (const char *, const char *, thandle_t, +DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetErrorHandler, (TIFFErrorHandler)); +DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetWarningHandler, (TIFFErrorHandler)); +DEF_IMGLIB_FN (TIFF *, TIFFOpen, (const char *, const char *)); +DEF_IMGLIB_FN (TIFF *, TIFFClientOpen, (const char *, const char *, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc)); -DEF_IMGLIB_FN (TIFFGetField, (TIFF *, ttag_t, ...)); -DEF_IMGLIB_FN (TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); -DEF_IMGLIB_FN (TIFFClose, (TIFF *)); -DEF_IMGLIB_FN (TIFFSetDirectory, (TIFF *, tdir_t)); +DEF_IMGLIB_FN (int, TIFFGetField, (TIFF *, ttag_t, ...)); +DEF_IMGLIB_FN (int, TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); +DEF_IMGLIB_FN (void, TIFFClose, (TIFF *)); +DEF_IMGLIB_FN (int, TIFFSetDirectory, (TIFF *, tdir_t)); static int init_tiff_functions (Lisp_Object libraries) @@ -6754,9 +6777,8 @@ tiff_load (struct frame *f, struct image *img) return 0; } - /* Try to open the image file. Casting return value avoids a - GCC warning on W32. */ - tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r"); + /* Try to open the image file. */ + tiff = fn_TIFFOpen (SSDATA (file), "r"); if (tiff == NULL) { image_error ("Cannot open `%s'", file, Qnil); @@ -6776,16 +6798,14 @@ tiff_load (struct frame *f, struct image *img) memsrc.len = SBYTES (specified_data); memsrc.index = 0; - /* Casting arguments return value avoids a GCC warning on W32. */ - tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r", - (thandle_t) &memsrc, - (TIFFReadWriteProc) tiff_read_from_memory, - (TIFFReadWriteProc) tiff_write_from_memory, - tiff_seek_in_memory, - tiff_close_memory, - tiff_size_of_memory, - tiff_mmap_memory, - tiff_unmap_memory); + tiff = fn_TIFFClientOpen ("memory_source", "r", (thandle_t)&memsrc, + (TIFFReadWriteProc) tiff_read_from_memory, + (TIFFReadWriteProc) tiff_write_from_memory, + tiff_seek_in_memory, + tiff_close_memory, + tiff_size_of_memory, + tiff_mmap_memory, + tiff_unmap_memory); if (!tiff) { @@ -7014,10 +7034,10 @@ gif_image_p (Lisp_Object object) #ifdef HAVE_NTGUI /* GIF library details. */ -DEF_IMGLIB_FN (DGifCloseFile, (GifFileType *)); -DEF_IMGLIB_FN (DGifSlurp, (GifFileType *)); -DEF_IMGLIB_FN (DGifOpen, (void *, InputFunc)); -DEF_IMGLIB_FN (DGifOpenFileName, (const char *)); +DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *)); +DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *)); +DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); +DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *)); static int init_gif_functions (Lisp_Object libraries) @@ -7110,9 +7130,8 @@ gif_load (struct frame *f, struct image *img) return 0; } - /* Open the GIF file. Casting return value avoids a GCC warning - on W32. */ - gif = (GifFileType *)fn_DGifOpenFileName (SDATA (file)); + /* Open the GIF file. */ + gif = fn_DGifOpenFileName (SDATA (file)); if (gif == NULL) { image_error ("Cannot open `%s'", file, Qnil); @@ -7133,8 +7152,7 @@ gif_load (struct frame *f, struct image *img) memsrc.len = SBYTES (specified_data); memsrc.index = 0; - /* Casting return value avoids a GCC warning on W32. */ - gif = (GifFileType *) fn_DGifOpen (&memsrc, gif_read_from_memory); + gif = fn_DGifOpen (&memsrc, gif_read_from_memory); if (!gif) { image_error ("Cannot open memory source `%s'", img->spec, Qnil); @@ -7982,25 +8000,25 @@ svg_image_p (Lisp_Object object) #ifdef HAVE_NTGUI /* SVG library functions. */ -DEF_IMGLIB_FN (rsvg_handle_new); -DEF_IMGLIB_FN (rsvg_handle_get_dimensions); -DEF_IMGLIB_FN (rsvg_handle_write); -DEF_IMGLIB_FN (rsvg_handle_close); -DEF_IMGLIB_FN (rsvg_handle_get_pixbuf); -DEF_IMGLIB_FN (rsvg_handle_free); - -DEF_IMGLIB_FN (gdk_pixbuf_get_width); -DEF_IMGLIB_FN (gdk_pixbuf_get_height); -DEF_IMGLIB_FN (gdk_pixbuf_get_pixels); -DEF_IMGLIB_FN (gdk_pixbuf_get_rowstride); -DEF_IMGLIB_FN (gdk_pixbuf_get_colorspace); -DEF_IMGLIB_FN (gdk_pixbuf_get_n_channels); -DEF_IMGLIB_FN (gdk_pixbuf_get_has_alpha); -DEF_IMGLIB_FN (gdk_pixbuf_get_bits_per_sample); - -DEF_IMGLIB_FN (g_type_init); -DEF_IMGLIB_FN (g_object_unref); -DEF_IMGLIB_FN (g_error_free); +DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new); +DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions); +DEF_IMGLIB_FN (gboolean, rsvg_handle_write); +DEF_IMGLIB_FN (gboolean, rsvg_handle_close); +DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf); +DEF_IMGLIB_FN (void, rsvg_handle_free); + +DEF_IMGLIB_FN (int, gdk_pixbuf_get_width); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_height); +DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride); +DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels); +DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample); + +DEF_IMGLIB_FN (void, g_type_init); +DEF_IMGLIB_FN (void, g_object_unref); +DEF_IMGLIB_FN (void, g_error_free); Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; @@ -8147,7 +8165,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * gnome type library functions. */ fn_g_type_init (); /* Make a handle to a new rsvg object. */ - rsvg_handle = (RsvgHandle *) fn_rsvg_handle_new (); + rsvg_handle = fn_rsvg_handle_new (); /* Parse the contents argument and fill in the rsvg_handle. */ fn_rsvg_handle_write (rsvg_handle, contents, size, &error); @@ -8167,14 +8185,14 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * /* We can now get a valid pixel buffer from the svg file, if all went ok. */ - pixbuf = (GdkPixbuf *) fn_rsvg_handle_get_pixbuf (rsvg_handle); + pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle); if (!pixbuf) goto rsvg_error; fn_g_object_unref (rsvg_handle); /* Extract some meta data from the svg handle. */ width = fn_gdk_pixbuf_get_width (pixbuf); height = fn_gdk_pixbuf_get_height (pixbuf); - pixels = (const guint8 *) fn_gdk_pixbuf_get_pixels (pixbuf); + pixels = fn_gdk_pixbuf_get_pixels (pixbuf); rowstride = fn_gdk_pixbuf_get_rowstride (pixbuf); /* Validate the svg meta data. */ diff --git a/src/indent.c b/src/indent.c index b40cb9f50b6..84ce140c5ba 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1250,7 +1250,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ unsigned char *ovstr; EMACS_INT ovlen = overlay_strings (pos, win, &ovstr); hpos += ((multibyte && ovlen > 0) - ? strwidth (ovstr, ovlen) : ovlen); + ? strwidth ((char *) ovstr, ovlen) : ovlen); } did_motion = 0; diff --git a/src/insdel.c b/src/insdel.c index 8923a9e12e5..db76f770dad 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -668,11 +668,11 @@ count_size_as_multibyte (const unsigned char *ptr, EMACS_INT nbytes) prepare_to_modify_buffer could relocate the text. */ void -insert (const unsigned char *string, EMACS_INT nbytes) +insert (const char *string, EMACS_INT nbytes) { if (nbytes > 0) { - EMACS_INT len = chars_in_text (string, nbytes), opoint; + EMACS_INT len = chars_in_text ((unsigned char *) string, nbytes), opoint; insert_1_both (string, len, nbytes, 0, 1, 0); opoint = PT - len; signal_after_change (opoint, 0, len); @@ -683,11 +683,11 @@ insert (const unsigned char *string, EMACS_INT nbytes) /* Likewise, but inherit text properties from neighboring characters. */ void -insert_and_inherit (const unsigned char *string, EMACS_INT nbytes) +insert_and_inherit (const char *string, EMACS_INT nbytes) { if (nbytes > 0) { - EMACS_INT len = chars_in_text (string, nbytes), opoint; + EMACS_INT len = chars_in_text ((unsigned char *) string, nbytes), opoint; insert_1_both (string, len, nbytes, 1, 1, 0); opoint = PT - len; signal_after_change (opoint, 0, len); @@ -711,7 +711,7 @@ insert_char (int c) str[0] = c; } - insert (str, len); + insert ((char *) str, len); } /* Insert the null-terminated string S before point. */ @@ -728,11 +728,11 @@ insert_string (const char *s) since gc could happen and relocate it. */ void -insert_before_markers (const unsigned char *string, EMACS_INT nbytes) +insert_before_markers (const char *string, EMACS_INT nbytes) { if (nbytes > 0) { - EMACS_INT len = chars_in_text (string, nbytes), opoint; + EMACS_INT len = chars_in_text ((unsigned char *) string, nbytes), opoint; insert_1_both (string, len, nbytes, 0, 1, 1); opoint = PT - len; signal_after_change (opoint, 0, len); @@ -743,12 +743,12 @@ insert_before_markers (const unsigned char *string, EMACS_INT nbytes) /* Likewise, but inherit text properties from neighboring characters. */ void -insert_before_markers_and_inherit (const unsigned char *string, +insert_before_markers_and_inherit (const char *string, EMACS_INT nbytes) { if (nbytes > 0) { - EMACS_INT len = chars_in_text (string, nbytes), opoint; + EMACS_INT len = chars_in_text ((unsigned char *) string, nbytes), opoint; insert_1_both (string, len, nbytes, 1, 1, 1); opoint = PT - len; signal_after_change (opoint, 0, len); @@ -759,11 +759,11 @@ insert_before_markers_and_inherit (const unsigned char *string, /* Subroutine used by the insert functions above. */ void -insert_1 (const unsigned char *string, EMACS_INT nbytes, +insert_1 (const char *string, EMACS_INT nbytes, int inherit, int prepare, int before_markers) { - insert_1_both (string, chars_in_text (string, nbytes), nbytes, - inherit, prepare, before_markers); + insert_1_both (string, chars_in_text ((unsigned char *) string, nbytes), + nbytes, inherit, prepare, before_markers); } @@ -884,7 +884,7 @@ count_combining_after (const unsigned char *string, are the same as in insert_1. */ void -insert_1_both (const unsigned char *string, +insert_1_both (const char *string, EMACS_INT nchars, EMACS_INT nbytes, int inherit, int prepare, int before_markers) { @@ -2382,4 +2382,3 @@ as well as hooks attached to text properties and overlays. */); defsubr (&Scombine_after_change_execute); } - diff --git a/src/keyboard.c b/src/keyboard.c index badc785b1c1..eb586183f08 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -483,7 +483,7 @@ echo_char (Lisp_Object c) ptr = buffer + offset; } - ptr += copy_text (SDATA (name), ptr, nbytes, + ptr += copy_text (SDATA (name), (unsigned char *) ptr, nbytes, STRING_MULTIBYTE (name), 1); } @@ -6518,7 +6518,7 @@ parse_solitary_modifier (Lisp_Object symbol) #define MULTI_LETTER_MOD(BIT, NAME, LEN) \ if (LEN == SBYTES (name) \ - && ! strncmp (SDATA (name), NAME, LEN)) \ + && ! strncmp (SSDATA (name), NAME, LEN)) \ return BIT; case 'A': @@ -6949,7 +6949,7 @@ tty_read_avail_input (struct terminal *terminal, NREAD is set to the number of chars read. */ do { - nread = emacs_read (fileno (tty->input), cbuf, n_to_read); + nread = emacs_read (fileno (tty->input), (char *) cbuf, n_to_read); /* POSIX infers that processes which are not in the session leader's process group won't get SIGHUP's at logout time. BSDI adheres to this part standard and returns -1 from read (0) with errno==EIO diff --git a/src/keymap.c b/src/keymap.c index 1e6b76a4642..8ee4f41bd6f 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -584,7 +584,8 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val) { if (!NILP (val)) { - map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; + map_keymap_function_t fun = + (map_keymap_function_t) XSAVE_VALUE (XCAR (args))->pointer; args = XCDR (args); /* If the key is a range, make a copy since map_char_table modifies it in place. */ @@ -629,7 +630,7 @@ map_keymap_internal (Lisp_Object map, else if (CHAR_TABLE_P (binding)) { map_char_table (map_keymap_char_table_item, Qnil, binding, - Fcons (make_save_value (fun, 0), + Fcons (make_save_value ((void *) fun, 0), Fcons (make_save_value (data, 0), args))); } @@ -2474,7 +2475,7 @@ See Info node `(elisp)Describing Characters' for examples. */) (Lisp_Object character) { /* Currently MAX_MULTIBYTE_LENGTH is 4 (< 6). */ - unsigned char str[6]; + char str[6]; int c; CHECK_NUMBER (character); @@ -2482,7 +2483,7 @@ See Info node `(elisp)Describing Characters' for examples. */) c = XINT (character); if (!ASCII_CHAR_P (c)) { - int len = CHAR_STRING (c, str); + int len = CHAR_STRING (c, (unsigned char *) str); return make_multibyte_string (str, 1, len); } @@ -3975,4 +3976,3 @@ keys_of_keymap (void) initial_define_key (global_map, 033, "ESC-prefix"); initial_define_key (global_map, Ctl ('X'), "Control-X-prefix"); } - diff --git a/src/lisp.h b/src/lisp.h index 67efda398a2..906736bacad 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2581,10 +2581,10 @@ 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, +extern void insert (const char *, EMACS_INT); +extern void insert_and_inherit (const char *, EMACS_INT); +extern void insert_1 (const char *, EMACS_INT, int, int, int); +extern void insert_1_both (const 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, @@ -2592,9 +2592,8 @@ extern void insert_from_string (Lisp_Object, EMACS_INT, EMACS_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_before_markers (const char *, EMACS_INT); +extern void insert_before_markers_and_inherit (const char *, EMACS_INT); extern void insert_from_string_before_markers (Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int); @@ -2816,7 +2815,7 @@ extern void print_error_message (Lisp_Object, Lisp_Object, const char *, extern Lisp_Object internal_with_output_to_temp_buffer (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); #define FLOAT_TO_STRING_BUFSIZE 350 -extern void float_to_string (unsigned char *, double); +extern void float_to_string (char *, double); extern void syms_of_print (void); /* Defined in doprnt.c */ diff --git a/src/lread.c b/src/lread.c index c4ae8313525..02b2fa39075 100644 --- a/src/lread.c +++ b/src/lread.c @@ -97,9 +97,6 @@ Lisp_Object read_objects; This is set to 1 by read1 temporarily while handling #@NUMBER. */ static int load_each_byte; -/* If non-nil `readevalloop' evaluates code in a lexical environment. */ -Lisp_Object Vlexical_binding; - /* List of descriptors now open for Fload. */ static Lisp_Object load_descriptor_list; @@ -2904,7 +2901,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) ; else if (force_singlebyte) { - nchars = str_as_unibyte (read_buffer, p - read_buffer); + nchars = str_as_unibyte ((unsigned char *) read_buffer, + p - read_buffer); p = read_buffer + nchars; } else @@ -2974,7 +2972,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) } if (multibyte) - p += CHAR_STRING (c, p); + p += CHAR_STRING (c, (unsigned char *) p); else *p++ = c; c = READCHAR; @@ -3083,7 +3081,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) Lisp_Object name, result; EMACS_INT nbytes = p - read_buffer; EMACS_INT nchars - = (multibyte ? multibyte_chars_in_text (read_buffer, nbytes) + = (multibyte + ? multibyte_chars_in_text ((unsigned char *) read_buffer, + nbytes) : nbytes); if (uninterned_symbol && ! NILP (Vpurify_flag)) @@ -3596,7 +3596,7 @@ Lisp_Object initial_obarray; int oblookup_last_bucket_number; -static int hash_string (const unsigned char *ptr, int len); +static int hash_string (const char *ptr, int len); /* Get an error if OBARRAY is not an obarray. If it is one, return it. */ @@ -3854,10 +3854,10 @@ oblookup (Lisp_Object obarray, register const char *ptr, EMACS_INT size, EMACS_I } static int -hash_string (const unsigned char *ptr, int len) +hash_string (const char *ptr, int len) { - register const unsigned char *p = ptr; - register const unsigned char *end = p + len; + register const char *p = ptr; + register const char *end = p + len; register unsigned char c; register int hash = 0; diff --git a/src/makefile.w32-in b/src/makefile.w32-in index ad21419ca7f..ce4b9f35de8 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -113,7 +113,6 @@ OBJ2 = $(BLD)/sysdep.$(O) \ $(BLD)/textprop.$(O) \ $(BLD)/vm-limit.$(O) \ $(BLD)/region-cache.$(O) \ - $(BLD)/strftime.$(O) \ $(BLD)/bidi.$(O) \ $(BLD)/charset.$(O) \ $(BLD)/character.$(O) \ @@ -204,6 +203,38 @@ make-buildobj-SH: echo $(OBJ2) '\' >> buildobj.h echo '$(DQUOTE)' >> buildobj.h +GLOBAL_SOURCES = dosfns.c msdos.c \ + xterm.c xfns.c xmenu.c xselect.c xrdb.c xsmfns.c fringe.c image.c \ + fontset.c menu.c dbusbind.c \ + w32.c w32console.c w32fns.c w32heap.c w32inevt.c \ + w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c \ + font.c w32font.c w32uniscribe.c \ + dispnew.c frame.c scroll.c xdisp.c window.c bidi.c \ + charset.c coding.c category.c ccl.c character.c chartab.c \ + cm.c term.c terminal.c xfaces.c \ + emacs.c keyboard.c macros.c keymap.c sysdep.c \ + buffer.c filelock.c insdel.c marker.c \ + minibuf.c fileio.c dired.c filemode.c \ + cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \ + alloc.c data.c doc.c editfns.c callint.c \ + eval.c floatfns.c fns.c print.c lread.c \ + syntax.c bytecode.c \ + process.c callproc.c unexw32.c \ + region-cache.c sound.c atimer.c \ + doprnt.c intervals.c textprop.c composite.c md5.c +SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ + xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o +obj = $(GLOBAL_SOURCES:.c=.o) + +globals.h: gl-stamp + +gl-stamp: ../lib-src/$(BLD)/make-docfile.exe $(GLOBAL_SOURCES) + - $(DEL) gl-tmp + "../lib-src/$(BLD)/make-docfile" -d . -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp + cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h" + - $(DEL) gl-tmp + echo timestamp > $@ + bootstrap: bootstrap-emacs # @@ -280,7 +311,7 @@ clean: - $(DEL) "s/*.h~" "m/*.h~" - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) - - $(DEL) stamp_BLD + - $(DEL) stamp_BLD gl-stamp globals.h - $(DEL) buildobj.h distclean: cleanall @@ -348,13 +379,15 @@ CONFIG_H = $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/m/intel386.h \ $(EMACS_ROOT)/src/config.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h +LISP_H = $(SRC)/lisp.h $(SRC)/globals.h +PROCESS_H = $(SRC)/process.h $(SRC)/gnutls.h $(BLD)/alloc.$(O) : \ $(SRC)/alloc.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -365,7 +398,7 @@ $(BLD)/alloc.$(O) : \ $(SRC)/frame.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/puresize.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -379,7 +412,7 @@ $(BLD)/atimer.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/syssignal.h \ @@ -388,7 +421,7 @@ $(BLD)/atimer.$(O) : \ $(BLD)/bidi.$(O) : \ $(SRC)/bidi.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/bidimirror.h \ $(SRC)/biditype.h \ $(SRC)/buffer.h \ @@ -402,7 +435,7 @@ $(BLD)/buffer.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/param.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -424,7 +457,7 @@ $(BLD)/buffer.$(O) : \ $(BLD)/bytecode.$(O) : \ $(SRC)/bytecode.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/dispextern.h \ @@ -436,7 +469,7 @@ $(BLD)/callint.$(O) : \ $(SRC)/callint.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/coding.h \ $(SRC)/commands.h \ @@ -454,7 +487,7 @@ $(BLD)/callproc.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -466,7 +499,7 @@ $(BLD)/callproc.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/epaths.h \ $(SRC)/frame.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/systty.h \ @@ -477,7 +510,7 @@ $(BLD)/callproc.$(O) : \ $(BLD)/casefiddle.$(O) : \ $(SRC)/casefiddle.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/commands.h \ @@ -488,14 +521,14 @@ $(BLD)/casefiddle.$(O) : \ $(BLD)/casetab.$(O) : \ $(SRC)/casetab.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h $(BLD)/category.$(O) : \ $(SRC)/category.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/category.h \ $(SRC)/character.h \ @@ -505,7 +538,7 @@ $(BLD)/category.$(O) : \ $(BLD)/ccl.$(O) : \ $(SRC)/ccl.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/ccl.h \ $(SRC)/character.h \ $(SRC)/charset.h \ @@ -515,7 +548,7 @@ $(BLD)/ccl.$(O) : \ $(BLD)/character.$(O) : \ $(SRC)/character.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/charset.h \ @@ -526,7 +559,7 @@ $(BLD)/charset.$(O) : \ $(SRC)/charset.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/charset.h \ @@ -537,7 +570,7 @@ $(BLD)/charset.$(O) : \ $(BLD)/chartab.$(O) : \ $(SRC)/chartab.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/ccl.h \ $(SRC)/character.h \ $(SRC)/charset.h @@ -546,7 +579,7 @@ $(BLD)/cmds.$(O) : \ $(SRC)/cmds.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/coding.h \ @@ -564,7 +597,7 @@ $(BLD)/cmds.$(O) : \ $(BLD)/coding.$(O) : \ $(SRC)/coding.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/ccl.h \ $(SRC)/character.h \ @@ -580,7 +613,7 @@ $(BLD)/coding.$(O) : \ $(BLD)/composite.$(O) : \ $(SRC)/composite.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/ccl.h \ $(SRC)/character.h \ @@ -598,7 +631,7 @@ $(BLD)/data.$(O) : \ $(SRC)/data.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/ccl.h \ $(SRC)/character.h \ @@ -622,7 +655,7 @@ $(BLD)/dired.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/dir.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -640,7 +673,7 @@ $(BLD)/dispnew.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -655,7 +688,7 @@ $(BLD)/dispnew.$(O) : \ $(SRC)/indent.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/termchar.h \ @@ -672,7 +705,7 @@ $(BLD)/doc.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/coding.h \ @@ -685,7 +718,7 @@ $(BLD)/doprnt.$(O) : \ $(SRC)/doprnt.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/character.h $(BLD)/editfns.$(O) : \ @@ -694,7 +727,8 @@ $(BLD)/editfns.$(O) : \ $(EMACS_ROOT)/nt/inc/pwd.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(EMACS_ROOT)/lib/strftime.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -714,7 +748,7 @@ $(BLD)/emacs.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -723,10 +757,11 @@ $(BLD)/emacs.$(O) : \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ + $(SRC)/gnutls.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/systty.h \ @@ -740,7 +775,7 @@ $(BLD)/eval.$(O) : \ $(SRC)/eval.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/coding.h \ @@ -758,7 +793,7 @@ $(BLD)/fileio.$(O) : \ $(EMACS_ROOT)/nt/inc/pwd.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -780,7 +815,7 @@ $(BLD)/filelock.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/coding.h \ @@ -798,7 +833,7 @@ $(BLD)/firstfile.$(O) : \ $(BLD)/floatfns.$(O) : \ $(SRC)/floatfns.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/syssignal.h $(BLD)/fns.$(O) : \ @@ -808,7 +843,7 @@ $(BLD)/fns.$(O) : \ $(EMACS_ROOT)/nt/inc/nl_types.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -829,7 +864,7 @@ $(BLD)/fns.$(O) : \ $(BLD)/font.$(O) : \ $(SRC)/font.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/ccl.h \ $(SRC)/character.h \ @@ -847,7 +882,7 @@ $(BLD)/fontset.$(O) : \ $(SRC)/fontset.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -872,7 +907,7 @@ $(BLD)/frame.$(O) : \ $(SRC)/frame.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -897,7 +932,7 @@ $(BLD)/fringe.$(O) : \ $(SRC)/fringe.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -919,7 +954,7 @@ $(BLD)/image.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/ccl.h \ @@ -940,7 +975,7 @@ $(BLD)/indent.$(O) : \ $(SRC)/indent.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/category.h \ $(SRC)/character.h \ @@ -963,7 +998,7 @@ $(BLD)/insdel.$(O) : \ $(SRC)/insdel.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -980,7 +1015,7 @@ $(BLD)/intervals.$(O) : \ $(SRC)/intervals.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ @@ -998,7 +1033,7 @@ $(BLD)/keyboard.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1013,7 +1048,7 @@ $(BLD)/keyboard.$(O) : \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ $(SRC)/macros.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/puresize.h \ $(SRC)/syntax.h \ $(SRC)/syssignal.h \ @@ -1029,7 +1064,7 @@ $(BLD)/keymap.$(O) : \ $(SRC)/keymap.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1059,7 +1094,7 @@ $(BLD)/lread.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1081,7 +1116,7 @@ $(BLD)/macros.$(O) : \ $(SRC)/macros.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/coding.h \ $(SRC)/commands.h \ @@ -1096,7 +1131,7 @@ $(BLD)/macros.$(O) : \ $(BLD)/marker.$(O) : \ $(SRC)/marker.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h @@ -1109,7 +1144,7 @@ $(BLD)/menu.$(O) : \ $(SRC)/menu.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/coding.h \ @@ -1129,7 +1164,7 @@ $(BLD)/minibuf.$(O) : \ $(SRC)/minibuf.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/character.h \ $(SRC)/coding.h \ @@ -1155,12 +1190,12 @@ $(BLD)/w32.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/coding.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ $(SRC)/ndir.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/w32.h \ $(SRC)/w32gui.h \ @@ -1169,14 +1204,14 @@ $(BLD)/w32.$(O) : \ $(BLD)/w32heap.$(O) : \ $(SRC)/w32heap.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/w32heap.h $(BLD)/w32inevt.$(O) : \ $(SRC)/w32inevt.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/coding.h \ @@ -1198,12 +1233,12 @@ $(BLD)/w32proc.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/character.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/syswait.h \ @@ -1215,7 +1250,7 @@ $(BLD)/w32proc.$(O) : \ $(BLD)/w32console.$(O) : \ $(SRC)/w32console.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/character.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ @@ -1232,7 +1267,9 @@ $(BLD)/print.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(EMACS_ROOT)/lib/ftoastr.h \ + $(EMACS_ROOT)/lib/intprops.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1246,7 +1283,7 @@ $(BLD)/print.$(O) : \ $(SRC)/frame.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/termchar.h \ $(SRC)/termhooks.h \ @@ -1263,7 +1300,7 @@ $(BLD)/process.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1274,7 +1311,7 @@ $(BLD)/process.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ $(SRC)/keyboard.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/sysselect.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -1291,7 +1328,7 @@ $(BLD)/ralloc.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/getpagesize.h \ @@ -1300,7 +1337,7 @@ $(BLD)/ralloc.$(O) : \ $(BLD)/regex.$(O) : \ $(SRC)/regex.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/category.h \ $(SRC)/character.h \ @@ -1310,7 +1347,7 @@ $(BLD)/regex.$(O) : \ $(BLD)/region-cache.$(O) : \ $(SRC)/region-cache.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/region-cache.h @@ -1318,7 +1355,7 @@ $(BLD)/scroll.$(O) : \ $(SRC)/scroll.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/coding.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ @@ -1334,7 +1371,7 @@ $(BLD)/search.$(O) : \ $(SRC)/search.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1356,22 +1393,17 @@ $(BLD)/sound.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/dispextern.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/w32gui.h -$(BLD)/strftime.$(O) : \ - $(SRC)/strftime.c \ - $(CONFIG_H) \ - $(EMACS_ROOT)/nt/inc/sys/time.h - $(BLD)/syntax.$(O) : \ $(SRC)/syntax.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/category.h \ $(SRC)/character.h \ @@ -1394,7 +1426,8 @@ $(BLD)/sysdep.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(EMACS_ROOT)/lib/ignore-value.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/cm.h \ @@ -1403,7 +1436,7 @@ $(BLD)/sysdep.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ $(SRC)/keyboard.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/sysselect.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -1422,7 +1455,7 @@ $(BLD)/term.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1450,7 +1483,7 @@ $(BLD)/terminal.$(O) : \ $(SRC)/terminal.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/charset.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ @@ -1465,7 +1498,7 @@ $(BLD)/terminal.$(O) : \ $(BLD)/textprop.$(O) : \ $(SRC)/textprop.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ @@ -1476,12 +1509,12 @@ $(BLD)/textprop.$(O) : \ $(BLD)/tparam.$(O) : \ $(SRC)/tparam.c \ $(CONFIG_H) \ - $(SRC)/lisp.h + $(LISP_H) $(BLD)/undo.$(O) : \ $(SRC)/undo.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/commands.h \ $(SRC)/dispextern.h \ @@ -1496,14 +1529,14 @@ $(BLD)/unexw32.$(O) : \ $(BLD)/vm-limit.$(O) : \ $(SRC)/vm-limit.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/mem-limits.h $(BLD)/window.$(O) : \ $(SRC)/window.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1529,7 +1562,7 @@ $(BLD)/xdisp.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1549,7 +1582,7 @@ $(BLD)/xdisp.$(O) : \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ $(SRC)/macros.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/region-cache.h \ $(SRC)/systime.h \ $(SRC)/termchar.h \ @@ -1563,7 +1596,7 @@ $(BLD)/xfaces.$(O) : \ $(SRC)/xfaces.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1589,7 +1622,7 @@ $(BLD)/w32fns.$(O) : \ $(SRC)/w32fns.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1618,7 +1651,7 @@ $(BLD)/w32menu.$(O) : \ $(SRC)/w32menu.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1642,7 +1675,7 @@ $(BLD)/w32term.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1659,7 +1692,7 @@ $(BLD)/w32term.$(O) : \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ - $(SRC)/process.h \ + $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/systty.h \ $(SRC)/termchar.h \ @@ -1675,7 +1708,7 @@ $(BLD)/w32select.$(O) : \ $(SRC)/w32select.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/character.h \ @@ -1692,7 +1725,7 @@ $(BLD)/w32reg.$(O) : \ $(SRC)/w32reg.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/systime.h \ @@ -1703,7 +1736,7 @@ $(BLD)/w32xfns.$(O) : \ $(SRC)/w32xfns.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/charset.h \ @@ -1720,7 +1753,7 @@ $(BLD)/w32xfns.$(O) : \ $(BLD)/w32font.$(O) : \ $(SRC)/w32font.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/ccl.h \ $(SRC)/character.h \ $(SRC)/charset.h \ @@ -1737,7 +1770,7 @@ $(BLD)/w32font.$(O) : \ $(BLD)/w32uniscribe.$(O) : \ $(SRC)/w32uniscribe.c \ $(CONFIG_H) \ - $(SRC)/lisp.h \ + $(LISP_H) \ $(SRC)/ccl.h \ $(SRC)/character.h \ $(SRC)/charset.h \ diff --git a/src/minibuf.c b/src/minibuf.c index a19a650d008..67b4e824561 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1092,7 +1092,7 @@ function, instead of the usual behavior. */) (Lisp_Object prompt, Lisp_Object def, Lisp_Object require_match) { Lisp_Object args[4], result; - unsigned char *s; + char *s; int len; int count = SPECPDL_INDEX (); @@ -1114,7 +1114,7 @@ function, instead of the usual behavior. */) if (STRINGP (prompt)) { - s = SDATA (prompt); + s = SSDATA (prompt); len = strlen (s); if (len >= 2 && s[len - 2] == ':' && s[len - 1] == ' ') len = len - 2; diff --git a/src/nsselect.m b/src/nsselect.m index 299a24e4a8c..950fb1f1f14 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -39,6 +39,8 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME; +static Lisp_Object Vselection_alist; + static Lisp_Object Qforeign_selection; /* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */ diff --git a/src/print.c b/src/print.c index 170ccc7fa84..2c4762047ac 100644 --- a/src/print.c +++ b/src/print.c @@ -177,9 +177,9 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; { \ unsigned char *temp \ = (unsigned char *) alloca (print_buffer_pos + 1); \ - copy_text (print_buffer, temp, print_buffer_pos_byte, \ - 1, 0); \ - insert_1_both (temp, print_buffer_pos, \ + copy_text ((unsigned char *) print_buffer, temp, \ + print_buffer_pos_byte, 1, 0); \ + insert_1_both ((char *) temp, print_buffer_pos, \ print_buffer_pos, 0, 1, 0); \ } \ else \ @@ -254,7 +254,7 @@ printchar (unsigned int ch, Lisp_Object fun) setup_echo_area_for_printing (multibyte_p); insert_char (ch); - message_dolog (str, len, 0, multibyte_p); + message_dolog ((char *) str, len, 0, multibyte_p); } } } @@ -317,7 +317,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, int len; for (i = 0; i < size_byte; i += len) { - int ch = STRING_CHAR_AND_LENGTH (ptr + i, len); + int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i, + len); insert_char (ch); } } @@ -343,7 +344,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, corresponding character code before handing it to PRINTCHAR. */ int len; - int ch = STRING_CHAR_AND_LENGTH (ptr + i, len); + int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i, + len); PRINTCHAR (ch); i += len; } @@ -1016,9 +1018,9 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context, */ void -float_to_string (unsigned char *buf, double data) +float_to_string (char *buf, double data) { - unsigned char *cp; + char *cp; int width; /* Check for plus infinity in a way that won't lose @@ -1067,7 +1069,7 @@ float_to_string (unsigned char *buf, double data) /* Check that the spec we have is fully valid. This means not only valid for printf, but meant for floats, and reasonable. */ - cp = SDATA (Vfloat_output_format); + cp = SSDATA (Vfloat_output_format); if (cp[0] != '%') goto lose; @@ -1519,7 +1521,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag For a char code that could be in a unibyte string, when found in a multibyte string, always use a hex escape so it reads back as multibyte. */ - unsigned char outbuf[50]; + char outbuf[50]; if (CHAR_BYTE8_P (c)) sprintf (outbuf, "\\%03o", CHAR_TO_BYTE8 (c)); @@ -1538,7 +1540,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag or when explicitly requested, print single-byte non-ASCII string chars using octal escapes. */ - unsigned char outbuf[5]; + char outbuf[5]; sprintf (outbuf, "\\%03o", c); strout (outbuf, -1, -1, printcharfun, 0); } diff --git a/src/process.c b/src/process.c index ca29145bfd4..80e70e49f8e 100644 --- a/src/process.c +++ b/src/process.c @@ -5287,7 +5287,7 @@ read_process_output (Lisp_Object proc, register int channel) save the match data in a special nonrecursive fashion. */ running_asynch_code = 1; - decode_coding_c_string (coding, chars, nbytes, Qt); + decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt); text = coding->dst_object; Vlast_coding_system_used = CODING_ID_NAME (coding->id); /* A new coding system might be found. */ @@ -5391,7 +5391,7 @@ read_process_output (Lisp_Object proc, register int channel) if (! (BEGV <= PT && PT <= ZV)) Fwiden (); - decode_coding_c_string (coding, chars, nbytes, Qt); + decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt); text = coding->dst_object; Vlast_coding_system_used = CODING_ID_NAME (coding->id); /* A new coding system might be found. See the comment in the @@ -5495,7 +5495,7 @@ send_process_trap (int ignore) This function can evaluate Lisp code and can garbage collect. */ static void -send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, +send_process (volatile Lisp_Object proc, const char *volatile buf, volatile EMACS_INT len, volatile Lisp_Object object) { /* Use volatile to protect variables from being clobbered by longjmp. */ @@ -5573,7 +5573,7 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, set_buffer_internal (XBUFFER (object)); save_pt = PT, save_pt_byte = PT_BYTE; - from_byte = PTR_BYTE_POS (buf); + from_byte = PTR_BYTE_POS ((unsigned char *) buf); from = BYTE_TO_CHAR (from_byte); to = BYTE_TO_CHAR (from_byte + len); TEMP_SET_PT_BOTH (from, from_byte); @@ -5595,7 +5595,7 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, len = coding->produced; object = coding->dst_object; - buf = SDATA (object); + buf = SSDATA (object); } if (pty_max_bytes == 0) @@ -5629,7 +5629,7 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, #ifdef DATAGRAM_SOCKETS if (DATAGRAM_CHAN_P (outfd)) { - rv = sendto (outfd, (char *) buf, this, + rv = sendto (outfd, buf, this, 0, datagram_address[outfd].sa, datagram_address[outfd].len); if (rv < 0 && errno == EMSGSIZE) @@ -5646,10 +5646,10 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, if (XPROCESS (proc)->gnutls_p) rv = emacs_gnutls_write (outfd, XPROCESS (proc), - (char *) buf, this); + buf, this); else #endif - rv = emacs_write (outfd, (char *) buf, this); + rv = emacs_write (outfd, buf, this); #ifdef ADAPTIVE_READ_BUFFERING if (p->read_output_delay > 0 && p->adaptive_read_buffering == 1) @@ -5706,9 +5706,10 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, /* Running filters might relocate buffers or strings. Arrange to relocate BUF. */ if (BUFFERP (object)) - offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf); + offset = BUF_PTR_BYTE_POS (XBUFFER (object), + (unsigned char *) buf); else if (STRINGP (object)) - offset = buf - SDATA (object); + offset = buf - SSDATA (object); #ifdef EMACS_HAS_USECS wait_reading_process_output (0, 20000, 0, 0, Qnil, NULL, 0); @@ -5717,9 +5718,10 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, #endif if (BUFFERP (object)) - buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset); + buf = (char *) BUF_BYTE_ADDRESS (XBUFFER (object), + offset); else if (STRINGP (object)) - buf = offset + SDATA (object); + buf = offset + SSDATA (object); rv = 0; } @@ -5770,7 +5772,7 @@ Output from processes can arrive in between bunches. */) start1 = CHAR_TO_BYTE (XINT (start)); end1 = CHAR_TO_BYTE (XINT (end)); - send_process (proc, BYTE_POS_ADDR (start1), end1 - start1, + send_process (proc, (char *) BYTE_POS_ADDR (start1), end1 - start1, Fcurrent_buffer ()); return Qnil; @@ -5789,7 +5791,7 @@ Output from processes can arrive in between bunches. */) Lisp_Object proc; CHECK_STRING (string); proc = get_process (process); - send_process (proc, SDATA (string), + send_process (proc, SSDATA (string), SBYTES (string), string); return Qnil; } @@ -6168,10 +6170,10 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) ; else { - unsigned char *name; + char *name; CHECK_SYMBOL (sigcode); - name = SDATA (SYMBOL_NAME (sigcode)); + name = SSDATA (SYMBOL_NAME (sigcode)); if (!strncmp (name, "SIG", 3) || !strncmp (name, "sig", 3)) name += 3; diff --git a/src/ralloc.c b/src/ralloc.c index ee8493b89a4..9c601a0ac24 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -648,7 +648,7 @@ resize_bloc (bloc_ptr bloc, SIZE size) else { memmove (bloc->new_data, bloc->data, old_size); - memset (bloc->new_data + old_size, 0, size - old_size); + memset ((char *) bloc->new_data + old_size, 0, size - old_size); *bloc->variable = bloc->data = bloc->new_data; } } @@ -1259,4 +1259,3 @@ r_alloc_init (void) use_relocatable_buffers = 1; } - diff --git a/src/regex.c b/src/regex.c index cb6edc2e356..9284be95ffb 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2118,7 +2118,7 @@ struct range_table_work_area re_wctype_t re_wctype (const re_char *str) { - const char *string = str; + const char *string = (const char *) str; if (STREQ (string, "alnum")) return RECC_ALNUM; else if (STREQ (string, "alpha")) return RECC_ALPHA; else if (STREQ (string, "word")) return RECC_WORD; @@ -2700,7 +2700,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct main_pend = pend; main_pattern = pattern; p = pattern = whitespace_regexp; - pend = p + strlen (p); + pend = p + strlen ((const char *) p); break; } diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index d247cf866f9..4c3b84dfe4c 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -159,7 +159,6 @@ struct sigaction { #undef HAVE_SETPGID #undef HAVE_GETCWD #define HAVE_SHUTDOWN 1 -#define HAVE_STRFTIME 1 #define LOCALTIME_CACHE #define HAVE_INET_SOCKETS 1 diff --git a/src/search.c b/src/search.c index c0f8d8067e6..09dae0ed0f5 100644 --- a/src/search.c +++ b/src/search.c @@ -2705,7 +2705,7 @@ since only regular expressions have distinguished subexpressions. */) idx = c - '0'; } else if (c == '\\') - add_len = 1, add_stuff = "\\"; + add_len = 1, add_stuff = (unsigned char *) "\\"; else { xfree (substed); @@ -2755,10 +2755,11 @@ since only regular expressions have distinguished subexpressions. */) EMACS_INT nchars = multibyte_chars_in_text (substed, substed_len); - newtext = make_multibyte_string (substed, nchars, substed_len); + newtext = make_multibyte_string ((char *) substed, nchars, + substed_len); } else - newtext = make_unibyte_string (substed, substed_len); + newtext = make_unibyte_string ((char *) substed, substed_len); } xfree (substed); } @@ -3145,17 +3146,17 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0, doc: /* Return a regexp string which matches exactly STRING and nothing else. */) (Lisp_Object string) { - register unsigned char *in, *out, *end; - register unsigned char *temp; + register char *in, *out, *end; + register char *temp; int backslashes_added = 0; CHECK_STRING (string); - temp = (unsigned char *) alloca (SBYTES (string) * 2); + temp = (char *) alloca (SBYTES (string) * 2); /* Now copy the data into the new string, inserting escapes. */ - in = SDATA (string); + in = SSDATA (string); end = in + SBYTES (string); out = temp; diff --git a/src/sysdep.c b/src/sysdep.c index 5f82d2d534c..5760d0224eb 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -31,6 +31,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif /* HAVE_LIMITS_H */ #include <unistd.h> +#include <ignore-value.h> + #include "lisp.h" #include "sysselect.h" #include "blockinput.h" @@ -263,7 +265,7 @@ void init_baud_rate (int fd) { int emacs_ospeed; - + if (noninteractive) emacs_ospeed = 0; else @@ -546,8 +548,13 @@ sys_subshell (void) sh = "sh"; /* Use our buffer's default directory for the subshell. */ - if (str) - chdir ((char *) str); + if (str && chdir ((char *) str) != 0) + { +#ifndef DOS_NT + ignore_value (write (1, "Can't chdir\n", 12)); + _exit (1); +#endif + } close_process_descs (); /* Close Emacs's pipes/ptys */ @@ -565,7 +572,7 @@ sys_subshell (void) setenv ("PWD", str, 1); } st = system (sh); - chdir (oldwd); + chdir (oldwd); /* FIXME: Do the right thing on chdir failure. */ if (epwd) putenv (old_pwd); /* restore previous value */ } @@ -573,12 +580,12 @@ sys_subshell (void) #ifdef WINDOWSNT /* Waits for process completion */ pid = _spawnlp (_P_WAIT, sh, sh, NULL); - chdir (oldwd); + chdir (oldwd); /* FIXME: Do the right thing on chdir failure. */ if (pid == -1) write (1, "Can't execute subshell", 22); #else /* not WINDOWSNT */ execlp (sh, sh, (char *) 0); - write (1, "Can't execute subshell", 22); + ignore_value (write (1, "Can't execute subshell", 22)); _exit (1); #endif /* not WINDOWSNT */ #endif /* not MSDOS */ @@ -3058,4 +3065,3 @@ system_process_attributes (Lisp_Object pid) } #endif /* !defined (WINDOWSNT) */ - diff --git a/src/window.c b/src/window.c index 41eed893d6a..abf01758c3f 100644 --- a/src/window.c +++ b/src/window.c @@ -3589,7 +3589,7 @@ Note that the main editor command loop selects the buffer of the selected window before each command. */) (register Lisp_Object window, Lisp_Object norecord) { - select_window (window, norecord, 0); + return select_window (window, norecord, 0); } static Lisp_Object diff --git a/src/xdisp.c b/src/xdisp.c index 5f86a594968..630c1dcda85 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -773,7 +773,7 @@ static void reconsider_clip_changes (struct window *, struct buffer *); static int text_outside_line_unchanged_p (struct window *, EMACS_INT, EMACS_INT); static void store_mode_line_noprop_char (char); -static int store_mode_line_noprop (const unsigned char *, int, int); +static int store_mode_line_noprop (const char *, int, int); static void handle_stop (struct it *); static void handle_stop_backwards (struct it *, EMACS_INT); static int single_display_spec_intangible_p (Lisp_Object); @@ -831,7 +831,7 @@ static const char *decode_mode_spec (struct window *, int, int, int, static void display_menu_bar (struct window *); static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, EMACS_INT *); -static int display_string (const unsigned char *, Lisp_Object, Lisp_Object, +static int display_string (const char *, Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT, struct it *, int, int, int, int); static void compute_line_metrics (struct it *); static void run_redisplay_end_trigger_hook (struct it *); @@ -854,7 +854,7 @@ static int next_element_from_stretch (struct it *); static void load_overlay_strings (struct it *, EMACS_INT); static int init_from_display_pos (struct it *, struct window *, struct display_pos *); -static void reseat_to_string (struct it *, const unsigned char *, +static void reseat_to_string (struct it *, const char *, Lisp_Object, EMACS_INT, EMACS_INT, int, int); static enum move_it_result move_it_in_display_line_to (struct it *, EMACS_INT, int, @@ -869,8 +869,8 @@ static int forward_to_next_line_start (struct it *, int *); static struct text_pos string_pos_nchars_ahead (struct text_pos, Lisp_Object, EMACS_INT); static struct text_pos string_pos (EMACS_INT, Lisp_Object); -static struct text_pos c_string_pos (EMACS_INT, const unsigned char *, int); -static EMACS_INT number_of_chars (const unsigned char *, int); +static struct text_pos c_string_pos (EMACS_INT, const char *, int); +static EMACS_INT number_of_chars (const char *, int); static void compute_stop_pos (struct it *); static void compute_string_pos (struct text_pos *, struct text_pos, Lisp_Object); @@ -1383,7 +1383,7 @@ string_pos (EMACS_INT charpos, Lisp_Object string) means recognize multibyte characters. */ static struct text_pos -c_string_pos (EMACS_INT charpos, const unsigned char *s, int multibyte_p) +c_string_pos (EMACS_INT charpos, const char *s, int multibyte_p) { struct text_pos pos; @@ -1397,7 +1397,7 @@ c_string_pos (EMACS_INT charpos, const unsigned char *s, int multibyte_p) SET_TEXT_POS (pos, 0, 0); while (charpos--) { - string_char_and_length (s, &len); + string_char_and_length ((const unsigned char *) s, &len); s += len; CHARPOS (pos) += 1; BYTEPOS (pos) += len; @@ -1414,7 +1414,7 @@ c_string_pos (EMACS_INT charpos, const unsigned char *s, int multibyte_p) non-zero means recognize multibyte characters. */ static EMACS_INT -number_of_chars (const unsigned char *s, int multibyte_p) +number_of_chars (const char *s, int multibyte_p) { EMACS_INT nchars; @@ -1422,7 +1422,7 @@ number_of_chars (const unsigned char *s, int multibyte_p) { EMACS_INT rest = strlen (s); int len; - unsigned char *p = (unsigned char *) s; + const unsigned char *p = (const unsigned char *) s; for (nchars = 0; rest > 0; ++nchars) { @@ -3172,7 +3172,7 @@ handle_fontified_prop (struct it *it) specbind (Qfontification_functions, Qnil); xassert (it->end_charpos == ZV); - + if (!CONSP (val) || EQ (XCAR (val), Qlambda)) safe_call1 (val, pos); else @@ -3218,7 +3218,7 @@ handle_fontified_prop (struct it *it) as is/was done in grep.el where some escapes sequences are turned into face properties (bug#7876). */ it->end_charpos = ZV; - + /* Return HANDLED_RECOMPUTE_PROPS only if function fontified something. This avoids an endless loop if they failed to fontify the text for which reason ever. */ @@ -5442,7 +5442,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) calling this function. */ static void -reseat_to_string (struct it *it, const unsigned char *s, Lisp_Object string, +reseat_to_string (struct it *it, const char *s, Lisp_Object string, EMACS_INT charpos, EMACS_INT precision, int field_width, int multibyte) { @@ -5474,7 +5474,7 @@ reseat_to_string (struct it *it, const unsigned char *s, Lisp_Object string, } else { - it->s = s; + it->s = (const unsigned char *) s; it->string = Qnil; /* Note that we use IT->current.pos, not it->current.string_pos, @@ -7884,6 +7884,8 @@ message_log_maybe_newline (void) void message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) { + const unsigned char *msg = (const unsigned char *) m; + if (!NILP (Vmemory_full)) return; @@ -7928,13 +7930,13 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) { EMACS_INT i; int c, char_bytes; - unsigned char work[1]; + char work[1]; /* Convert a multibyte string to single-byte for the *Message* buffer. */ for (i = 0; i < nbytes; i += char_bytes) { - c = string_char_and_length (m + i, &char_bytes); + c = string_char_and_length (msg + i, &char_bytes); work[0] = (ASCII_CHAR_P (c) ? c : multibyte_char_to_unibyte (c, Qnil)); @@ -7946,7 +7948,6 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) { EMACS_INT i; int c, char_bytes; - unsigned char *msg = (unsigned char *) m; unsigned char str[MAX_MULTIBYTE_LENGTH]; /* Convert a single-byte string to multibyte for the *Message* buffer. */ @@ -7955,7 +7956,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) c = msg[i]; MAKE_CHAR_MULTIBYTE (c); char_bytes = CHAR_STRING (c, str); - insert_1_both (str, 1, char_bytes, 1, 0, 0); + insert_1_both ((char *) str, 1, char_bytes, 1, 0, 0); } } else if (nbytes) @@ -8079,7 +8080,7 @@ message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, int n = 0; while (*p1 >= '0' && *p1 <= '9') n = n * 10 + *p1++ - '0'; - if (strncmp (p1, " times]\n", 8) == 0) + if (strncmp ((char *) p1, " times]\n", 8) == 0) return n+1; } return 0; @@ -9154,6 +9155,7 @@ static int set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p) { const char *s = (const char *) a1; + const unsigned char *msg = (const unsigned char *) s; Lisp_Object string = a2; /* Change multibyteness of the echo buffer appropriately. */ @@ -9191,12 +9193,12 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby /* Convert from multi-byte to single-byte. */ EMACS_INT i; int c, n; - unsigned char work[1]; + char work[1]; /* Convert a multibyte string to single-byte. */ for (i = 0; i < nbytes; i += n) { - c = string_char_and_length (s + i, &n); + c = string_char_and_length (msg + i, &n); work[0] = (ASCII_CHAR_P (c) ? c : multibyte_char_to_unibyte (c, Qnil)); @@ -9209,7 +9211,6 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby /* Convert from single-byte to multi-byte. */ EMACS_INT i; int c, n; - const unsigned char *msg = (const unsigned char *) s; unsigned char str[MAX_MULTIBYTE_LENGTH]; /* Convert a single-byte string to multibyte. */ @@ -9218,7 +9219,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby c = msg[i]; MAKE_CHAR_MULTIBYTE (c); n = CHAR_STRING (c, str); - insert_1_both (str, 1, n, 1, 0, 0); + insert_1_both ((char *) str, 1, n, 1, 0, 0); } } else @@ -9517,7 +9518,7 @@ store_mode_line_noprop_char (char c) /* Store part of a frame title in mode_line_noprop_buf, beginning at - mode_line_noprop_ptr. STR is the string to store. Do not copy + mode_line_noprop_ptr. STRING is the string to store. Do not copy characters that yield more columns than PRECISION; PRECISION <= 0 means copy the whole string. Pad with spaces until FIELD_WIDTH number of characters have been copied; FIELD_WIDTH <= 0 means don't @@ -9525,13 +9526,14 @@ store_mode_line_noprop_char (char c) frame title. */ static int -store_mode_line_noprop (const unsigned char *str, int field_width, int precision) +store_mode_line_noprop (const char *string, int field_width, int precision) { + const unsigned char *str = (const unsigned char *) string; int n = 0; EMACS_INT dummy, nbytes; /* Copy at most PRECISION chars from STR. */ - nbytes = strlen (str); + nbytes = strlen (string); n += c_string_width (str, nbytes, precision, &dummy, &nbytes); while (nbytes--) store_mode_line_noprop_char (*str++); @@ -18396,7 +18398,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, { case MODE_LINE_NOPROP: case MODE_LINE_TITLE: - n += store_mode_line_noprop (SDATA (elt), -1, prec); + n += store_mode_line_noprop (SSDATA (elt), -1, prec); break; case MODE_LINE_STRING: n += store_mode_line_string (NULL, elt, 1, 0, prec, Qnil); @@ -18440,7 +18442,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, { case MODE_LINE_NOPROP: case MODE_LINE_TITLE: - n += store_mode_line_noprop (SDATA (elt) + last_offset, 0, prec); + n += store_mode_line_noprop (SSDATA (elt) + last_offset, 0, prec); break; case MODE_LINE_STRING: { @@ -18495,7 +18497,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, { int multibyte; EMACS_INT bytepos, charpos; - const unsigned char *spec; + const char *spec; Lisp_Object string; bytepos = percent_position; @@ -19746,7 +19748,7 @@ display_count_lines (EMACS_INT start, EMACS_INT start_byte, Value is the number of columns displayed. */ static int -display_string (const unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string, +display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_string, EMACS_INT face_string_pos, EMACS_INT start, struct it *it, int field_width, int precision, int max_x, int multibyte) { diff --git a/src/xfaces.c b/src/xfaces.c index f1d21c098f0..82ad0b9aeb6 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -716,12 +716,14 @@ x_free_gc (struct frame *f, GC gc) are in ISO8859-1. */ int -xstrcasecmp (const unsigned char *s1, const unsigned char *s2) +xstrcasecmp (const char *s1, const char *s2) { while (*s1 && *s2) { - unsigned char c1 = tolower (*s1); - unsigned char c2 = tolower (*s2); + unsigned char b1 = *s1; + unsigned char b2 = *s2; + unsigned char c1 = tolower (b1); + unsigned char c2 = tolower (b2); if (c1 != c2) return c1 < c2 ? -1 : 1; ++s1, ++s2; @@ -2897,7 +2899,7 @@ FRAME 0 means change the face on all frames, and change the default { /* The default face must have an absolute size. */ if (!INTEGERP (value) || XINT (value) <= 0) - signal_error ("Invalid default face height", value); + signal_error ("Default face height not absolute and positive", value); } else { @@ -2907,7 +2909,7 @@ FRAME 0 means change the face on all frames, and change the default make_number (10), Qnil); if (!INTEGERP (test) || XINT (test) <= 0) - signal_error ("Invalid face height", value); + signal_error ("Face height does not produce a positive integer", value); } } @@ -3466,13 +3468,13 @@ face_boolean_x_resource_value (Lisp_Object value, int signal_p) xassert (STRINGP (value)); - if (xstrcasecmp (SDATA (value), "on") == 0 - || xstrcasecmp (SDATA (value), "true") == 0) + if (xstrcasecmp (SSDATA (value), "on") == 0 + || xstrcasecmp (SSDATA (value), "true") == 0) result = Qt; - else if (xstrcasecmp (SDATA (value), "off") == 0 - || xstrcasecmp (SDATA (value), "false") == 0) + else if (xstrcasecmp (SSDATA (value), "off") == 0 + || xstrcasecmp (SSDATA (value), "false") == 0) result = Qnil; - else if (xstrcasecmp (SDATA (value), "unspecified") == 0) + else if (xstrcasecmp (SSDATA (value), "unspecified") == 0) result = Qunspecified; else if (signal_p) signal_error ("Invalid face attribute value from X resource", value); @@ -3491,7 +3493,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", CHECK_SYMBOL (attr); CHECK_STRING (value); - if (xstrcasecmp (SDATA (value), "unspecified") == 0) + if (xstrcasecmp (SSDATA (value), "unspecified") == 0) value = Qunspecified; else if (EQ (attr, QCheight)) { @@ -4051,10 +4053,10 @@ lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) { xassert (lface_fully_specified_p (lface1) && lface_fully_specified_p (lface2)); - return (xstrcasecmp (SDATA (lface1[LFACE_FAMILY_INDEX]), - SDATA (lface2[LFACE_FAMILY_INDEX])) == 0 - && xstrcasecmp (SDATA (lface1[LFACE_FOUNDRY_INDEX]), - SDATA (lface2[LFACE_FOUNDRY_INDEX])) == 0 + return (xstrcasecmp (SSDATA (lface1[LFACE_FAMILY_INDEX]), + SSDATA (lface2[LFACE_FAMILY_INDEX])) == 0 + && xstrcasecmp (SSDATA (lface1[LFACE_FOUNDRY_INDEX]), + SSDATA (lface2[LFACE_FOUNDRY_INDEX])) == 0 && EQ (lface1[LFACE_HEIGHT_INDEX], lface2[LFACE_HEIGHT_INDEX]) && EQ (lface1[LFACE_SWIDTH_INDEX], lface2[LFACE_SWIDTH_INDEX]) && EQ (lface1[LFACE_WEIGHT_INDEX], lface2[LFACE_WEIGHT_INDEX]) @@ -4063,8 +4065,8 @@ lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) && (EQ (lface1[LFACE_FONTSET_INDEX], lface2[LFACE_FONTSET_INDEX]) || (STRINGP (lface1[LFACE_FONTSET_INDEX]) && STRINGP (lface2[LFACE_FONTSET_INDEX]) - && ! xstrcasecmp (SDATA (lface1[LFACE_FONTSET_INDEX]), - SDATA (lface2[LFACE_FONTSET_INDEX])))) + && ! xstrcasecmp (SSDATA (lface1[LFACE_FONTSET_INDEX]), + SSDATA (lface2[LFACE_FONTSET_INDEX])))) ); } diff --git a/src/xfns.c b/src/xfns.c index f8ac7c3f760..ce2d91e0df1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4067,7 +4067,7 @@ terminate Emacs if we can't open the connection. \(In the Nextstep version, the last two arguments are currently ignored.) */) (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) { - unsigned char *xrm_option; + char *xrm_option; struct x_display_info *dpyinfo; CHECK_STRING (display); @@ -4080,9 +4080,9 @@ terminate Emacs if we can't open the connection. #endif if (! NILP (xrm_string)) - xrm_option = SDATA (xrm_string); + xrm_option = SSDATA (xrm_string); else - xrm_option = (unsigned char *) 0; + xrm_option = (char *) 0; validate_x_resource_name (); @@ -4394,7 +4394,7 @@ no value of TYPE (always string in the MS Windows case). */) } if (NILP (vector_ret_p)) - prop_value = make_string (tmp_data, size); + prop_value = make_string ((char *) tmp_data, size); else prop_value = x_property_data_to_lisp (f, tmp_data, diff --git a/src/xfont.c b/src/xfont.c index 51b1c1c6ded..f8aace3663c 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -164,8 +164,8 @@ xfont_get_cache (FRAME_PTR f) static int compare_font_names (const void *name1, const void *name2) { - return xstrcasecmp (*(const unsigned char **) name1, - *(const unsigned char **) name2); + return xstrcasecmp (*(const char **) name1, + *(const char **) name2); } /* Decode XLFD as iso-8859-1 into OUTPUT, and return the byte length @@ -182,7 +182,7 @@ xfont_decode_coding_xlfd (char *xlfd, int len, char *output) while (*p0) { c = *(unsigned char *) p0++; - p1 += CHAR_STRING (c, p1); + p1 += CHAR_STRING (c, (unsigned char *) p1); if (--len == 0) break; } diff --git a/src/xftfont.c b/src/xftfont.c index e7eabc47c39..084ca735171 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -411,7 +411,11 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) ascii_printable[i] = ' ' + i; } BLOCK_INPUT; - if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) + if (spacing != FC_PROPORTIONAL +#ifdef FC_DUAL + && spacing != FC_DUAL +#endif /* FC_DUAL */ + ) { font->min_width = font->average_width = font->space_width = xftfont->max_advance_width; diff --git a/src/xmenu.c b/src/xmenu.c index 8ab10be8fac..ad1a764eab8 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1668,7 +1668,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* Create a new pane. */ Lisp_Object pane_name, prefix; - const char *pane_string; + char *pane_string; pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); @@ -2016,7 +2016,7 @@ xdialog_show (FRAME_PTR f, representing the text label and buttons. */ { Lisp_Object pane_name, prefix; - const char *pane_string; + char *pane_string; pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; pane_string = (NILP (pane_name) diff --git a/src/xml.c b/src/xml.c index 16907d4b44a..12ef14e6b9f 100644 --- a/src/xml.c +++ b/src/xml.c @@ -32,7 +32,7 @@ Lisp_Object make_dom (xmlNode *node) { if (node->type == XML_ELEMENT_NODE) { - Lisp_Object result = Fcons (intern (node->name), Qnil); + Lisp_Object result = Fcons (intern ((char *) node->name), Qnil); xmlNode *child; xmlAttr *property; Lisp_Object plist = Qnil; @@ -44,8 +44,9 @@ Lisp_Object make_dom (xmlNode *node) if (property->children && property->children->content) { - plist = Fcons (Fcons (intern (property->name), - build_string (property->children->content)), + char *content = (char *) property->children->content; + plist = Fcons (Fcons (intern ((char *) property->name), + build_string (content)), plist); } property = property->next; @@ -65,7 +66,7 @@ Lisp_Object make_dom (xmlNode *node) else if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE) { if (node->content) - return build_string (node->content); + return build_string ((char *) node->content); else return Qnil; } @@ -102,13 +103,13 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); if (htmlp) - doc = htmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), + doc = htmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), bytes, burl, "utf-8", HTML_PARSE_RECOVER|HTML_PARSE_NONET| HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| HTML_PARSE_NOBLANKS); else - doc = xmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), + doc = xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), bytes, burl, "utf-8", XML_PARSE_NONET|XML_PARSE_NOWARNING| XML_PARSE_NOERROR); diff --git a/src/xselect.c b/src/xselect.c index 96c8b9c4c47..a502a74f904 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -126,6 +126,20 @@ static Lisp_Object Qforeign_selection; /* Defined in keyboard.c. */ extern unsigned long last_event_timestamp; +/* This is an association list whose elements are of the form + ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) + SELECTION-NAME is a lisp symbol, whose name is the name of an X Atom. + SELECTION-VALUE is the value that emacs owns for that selection. + It may be any kind of Lisp object. + SELECTION-TIMESTAMP is the time at which emacs began owning this selection, + as a cons of two 16-bit numbers (making a 32 bit time.) + FRAME is the frame for which we made the selection. + If there is an entry in this alist, then it can be assumed that Emacs owns + that selection. + The only (eq) parts of this list that are visible from Lisp are the + selection-values. */ +static Lisp_Object Vselection_alist; + /* Define a queue to save up SELECTION_REQUEST_EVENT events for later diff --git a/src/xsmfns.c b/src/xsmfns.c index 15db459e149..825cec451d9 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -38,6 +38,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "termhooks.h" #include "termopts.h" #include "xterm.h" +#include "process.h" +#include "keyboard.h" /* This is the event used when SAVE_SESSION_EVENT occurs. */ @@ -82,28 +84,20 @@ static void ice_connection_closed (void) { if (ice_fd >= 0) - delete_keyboard_wait_descriptor (ice_fd); + delete_read_fd (ice_fd); ice_fd = -1; } /* Handle any messages from the session manager. If no connection is - open to a session manager, just return 0. - Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */ + open to a session manager, just return. */ -int -x_session_check_input (struct input_event *bufp) +static void +x_session_check_input (int fd, void *data, int for_read) { - SELECT_TYPE read_fds; - EMACS_TIME tmout; int ret; - if (ice_fd == -1) return 0; - FD_ZERO (&read_fds); - FD_SET (ice_fd, &read_fds); - - tmout.tv_sec = 0; - tmout.tv_usec = 0; + if (ice_fd == -1) return; /* Reset this so wo can check kind after callbacks have been called by IceProcessMessages. The smc_interact_CB sets the kind to @@ -111,33 +105,21 @@ x_session_check_input (struct input_event *bufp) will be called. */ emacs_event.kind = NO_EVENT; - ret = select (ice_fd+1, &read_fds, - (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout); - - if (ret < 0) + ret = IceProcessMessages (SmcGetIceConnection (smc_conn), + (IceReplyWaitInfo *)0, (Bool *)0); + if (ret != IceProcessMessagesSuccess) { + /* Either IO error or Connection closed. */ + if (ret == IceProcessMessagesIOError) + IceCloseConnection (SmcGetIceConnection (smc_conn)); + ice_connection_closed (); } - else if (ret > 0 && FD_ISSET (ice_fd, &read_fds)) - { - ret = IceProcessMessages (SmcGetIceConnection (smc_conn), - (IceReplyWaitInfo *)0, (Bool *)0); - if (ret != IceProcessMessagesSuccess) - { - /* Either IO error or Connection closed. */ - if (ret == IceProcessMessagesIOError) - IceCloseConnection (SmcGetIceConnection (smc_conn)); - - ice_connection_closed (); - } - } /* Check if smc_interact_CB was called and we shall generate a SAVE_SESSION_EVENT. */ if (emacs_event.kind != NO_EVENT) - memcpy (bufp, &emacs_event, sizeof (struct input_event)); - - return emacs_event.kind != NO_EVENT ? 1 : 0; + kbd_buffer_store_event (&emacs_event); } /* Return non-zero if we have a connection to a session manager. */ @@ -181,11 +163,11 @@ smc_save_yourself_CB (SmcConn smcConn, SmProp *props[NR_PROPS]; SmProp prop_ptr[NR_PROPS]; - SmPropValue values[20]; - int val_idx = 0; + SmPropValue values[20], *vp; + int val_idx = 0, vp_idx = 0; int props_idx = 0; int i; - char *cwd = NULL; + char *cwd = get_current_dir_name (); char *smid_opt, *chdir_opt = NULL; /* How to start a new instance of Emacs. */ @@ -208,40 +190,6 @@ smc_save_yourself_CB (SmcConn smcConn, props[props_idx]->vals[0].value = SDATA (Vinvocation_name); ++props_idx; - /* How to restart Emacs. */ - props[props_idx] = &prop_ptr[props_idx]; - props[props_idx]->name = xstrdup (SmRestartCommand); - props[props_idx]->type = xstrdup (SmLISTofARRAY8); - /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir */ - props[props_idx]->num_vals = 4; - props[props_idx]->vals = &values[val_idx]; - props[props_idx]->vals[0].length = strlen (emacs_program); - props[props_idx]->vals[0].value = emacs_program; - - smid_opt = xmalloc (strlen (SMID_OPT) + strlen (client_id) + 1); - strcpy (smid_opt, SMID_OPT); - strcat (smid_opt, client_id); - - props[props_idx]->vals[1].length = strlen (smid_opt); - props[props_idx]->vals[1].value = smid_opt; - - props[props_idx]->vals[2].length = strlen (NOSPLASH_OPT); - props[props_idx]->vals[2].value = NOSPLASH_OPT; - - cwd = get_current_dir_name (); - if (cwd) - { - chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1); - strcpy (chdir_opt, CHDIR_OPT); - strcat (chdir_opt, cwd); - - props[props_idx]->vals[3].length = strlen (chdir_opt); - props[props_idx]->vals[3].value = chdir_opt; - } - - val_idx += cwd ? 4 : 3; - ++props_idx; - /* User id. */ props[props_idx] = &prop_ptr[props_idx]; props[props_idx]->name = xstrdup (SmUserID); @@ -266,12 +214,53 @@ smc_save_yourself_CB (SmcConn smcConn, } + /* How to restart Emacs. */ + props[props_idx] = &prop_ptr[props_idx]; + props[props_idx]->name = xstrdup (SmRestartCommand); + props[props_idx]->type = xstrdup (SmLISTofARRAY8); + /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir ... */ + i = 3 + initial_argc; + props[props_idx]->num_vals = i; + vp = (SmPropValue *) xmalloc (i * sizeof(*vp)); + props[props_idx]->vals = vp; + props[props_idx]->vals[vp_idx].length = strlen (emacs_program); + props[props_idx]->vals[vp_idx++].value = emacs_program; + + smid_opt = xmalloc (strlen (SMID_OPT) + strlen (client_id) + 1); + strcpy (smid_opt, SMID_OPT); + strcat (smid_opt, client_id); + + props[props_idx]->vals[vp_idx].length = strlen (smid_opt); + props[props_idx]->vals[vp_idx++].value = smid_opt; + + props[props_idx]->vals[vp_idx].length = strlen (NOSPLASH_OPT); + props[props_idx]->vals[vp_idx++].value = NOSPLASH_OPT; + + if (cwd) + { + chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1); + strcpy (chdir_opt, CHDIR_OPT); + strcat (chdir_opt, cwd); + + props[props_idx]->vals[vp_idx].length = strlen (chdir_opt); + props[props_idx]->vals[vp_idx++].value = chdir_opt; + } + + for (i = 1; i < initial_argc; ++i) + { + props[props_idx]->vals[vp_idx].length = strlen (initial_argv[i]); + props[props_idx]->vals[vp_idx++].value = initial_argv[i]; + } + + ++props_idx; + SmcSetProperties (smcConn, props_idx, props); xfree (smid_opt); xfree (chdir_opt); + xfree (cwd); + xfree (vp); - free (cwd); for (i = 0; i < props_idx; ++i) { xfree (props[i]->type); @@ -355,7 +344,8 @@ ice_io_error_handler (IceConn iceConn) uses ICE as it transport protocol. */ static void -ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, int opening, IcePointer *watchData) +ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, + int opening, IcePointer *watchData) { if (! opening) { @@ -364,16 +354,7 @@ ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, int opening, IcePoint } ice_fd = IceConnectionNumber (iceConn); -#ifdef F_SETOWN - fcntl (ice_fd, F_SETOWN, getpid ()); -#endif /* ! defined (F_SETOWN) */ - -#ifdef SIGIO - if (interrupt_input) - init_sigio (ice_fd); -#endif /* ! defined (SIGIO) */ - - add_keyboard_wait_descriptor (ice_fd); + add_read_fd (ice_fd, x_session_check_input, NULL); } /* Create the client leader window. */ diff --git a/src/xterm.c b/src/xterm.c index b6e596b854a..31f002fa05c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -797,15 +797,15 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring if (p->which) { - unsigned char *bits; + char *bits; Pixmap pixmap, clipmask = (Pixmap) 0; int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); XGCValues gcv; if (p->wd > 8) - bits = (unsigned char *)(p->bits + p->dh); + bits = (char *) (p->bits + p->dh); else - bits = (unsigned char *)p->bits + p->dh; + bits = (char *) p->bits + p->dh; /* Draw the bitmap. I believe these small pixmaps can be cached by the server. */ @@ -1706,7 +1706,7 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) a least-squares matching, which is what X uses for closest color matching with StaticColor visuals. */ int nearest, i; - unsigned long nearest_delta = ~0; + unsigned long nearest_delta = ~ (unsigned long) 0; int ncells; const XColor *cells = x_color_cells (dpy, &ncells); @@ -6320,7 +6320,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, coding_system = Vlocale_coding_system; nbytes = XmbLookupString (FRAME_XIC (f), - &event.xkey, copy_bufptr, + &event.xkey, (char *) copy_bufptr, copy_bufsiz, &keysym, &status_return); if (status_return == XBufferOverflow) @@ -6328,7 +6328,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, copy_bufsiz = nbytes + 1; copy_bufptr = (unsigned char *) alloca (copy_bufsiz); nbytes = XmbLookupString (FRAME_XIC (f), - &event.xkey, copy_bufptr, + &event.xkey, (char *) copy_bufptr, copy_bufsiz, &keysym, &status_return); } @@ -6345,11 +6345,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, abort (); } else - nbytes = XLookupString (&event.xkey, copy_bufptr, + nbytes = XLookupString (&event.xkey, (char *) copy_bufptr, copy_bufsiz, &keysym, &compose_status); #else - nbytes = XLookupString (&event.xkey, copy_bufptr, + nbytes = XLookupString (&event.xkey, (char *) copy_bufptr, copy_bufsiz, &keysym, &compose_status); #endif @@ -7036,23 +7036,6 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold ++handling_signal; -#ifdef HAVE_X_SM - /* Only check session manager input for the primary display. */ - if (terminal->id == 1 && x_session_have_connection ()) - { - struct input_event inev; - BLOCK_INPUT; - /* We don't need to EVENT_INIT (inev) here, as - x_session_check_input copies an entire input_event. */ - if (x_session_check_input (&inev)) - { - kbd_buffer_store_event_hold (&inev, hold_quit); - count++; - } - UNBLOCK_INPUT; - } -#endif - /* For debugging, this gives a way to fake an I/O error. */ if (terminal->display_info.x == XTread_socket_fake_io_error) { @@ -7462,7 +7445,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) /* If all else fails, use the (black and white) xbm image. */ if (rc == -1) { - rc = x_create_bitmap_from_data (f, gnu_xbm_bits, + rc = x_create_bitmap_from_data (f, (char *) gnu_xbm_bits, gnu_xbm_width, gnu_xbm_height); if (rc == -1) return 1; @@ -7711,12 +7694,6 @@ x_connection_closed (Display *dpy, const char *error_message) strcpy (error_msg, error_message); handling_signal = 0; - /* Prevent being called recursively because of an error condition - below. Otherwise, we might end up with printing ``can't find per - display information'' in the recursive call instead of printing - the original message here. */ - x_catch_errors (dpy); - /* Inhibit redisplay while frames are being deleted. */ specbind (Qinhibit_redisplay, Qt); @@ -7759,26 +7736,9 @@ x_connection_closed (Display *dpy, const char *error_message) first place, so don't try to close it. */ if (dpyinfo) { -#ifdef USE_X_TOOLKIT - /* We have to close the display to inform Xt that it doesn't - exist anymore. If we don't, Xt will continue to wait for - events from the display. As a consequence, a sequence of - - M-x make-frame-on-display RET :1 RET - ...kill the new frame, so that we get an IO error... - M-x make-frame-on-display RET :1 RET - - will indefinitely wait in Xt for events for display `:1', - opened in the first call to make-frame-on-display. - - Closing the display is reported to lead to a bus error on - OpenWindows in certain situations. I suspect that is a bug - in OpenWindows. I don't know how to circumvent it here. */ - fatal_error_signal_hook = x_fatal_error_signal; - XtCloseDisplay (dpy); - fatal_error_signal_hook = NULL; -#endif /* USE_X_TOOLKIT */ - + /* We can not call XtCloseDisplay here because it calls XSync. + XSync inside the error handler apparently hangs Emacs. On + current Xt versions, this isn't needed either. */ #ifdef USE_GTK /* A long-standing GTK bug prevents proper disconnect handling (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, @@ -7809,8 +7769,6 @@ For details, see etc/PROBLEMS.\n", } } - x_uncatch_errors (); - if (terminal_list == 0) { fprintf (stderr, "%s\n", error_msg); @@ -9750,17 +9708,13 @@ static int x_timeout_atimer_activated_flag; static int x_initialized; -#ifdef HAVE_X_SM -static int x_session_initialized; -#endif - /* Test whether two display-name strings agree up to the dot that separates the screen number from the server number. */ static int same_x_server (const char *name1, const char *name2) { int seen_colon = 0; - const unsigned char *system_name = SDATA (Vsystem_name); + const char *system_name = SSDATA (Vsystem_name); int system_name_length = strlen (system_name); int length_until_period = 0; @@ -9874,7 +9828,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) } if (! x_display_ok (SSDATA (display_name))) - error ("Display %s can't be opened", SDATA (display_name)); + error ("Display %s can't be opened", SSDATA (display_name)); #ifdef USE_GTK { @@ -9886,7 +9840,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) if (x_initialized++ > 1) { - xg_display_open (SDATA (display_name), &dpy); + xg_display_open (SSDATA (display_name), &dpy); } else { @@ -9902,7 +9856,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) if (! NILP (display_name)) { argv[argc++] = display_opt; - argv[argc++] = SDATA (display_name); + argv[argc++] = SSDATA (display_name); } argv[argc++] = name_opt; @@ -9935,7 +9889,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) abs_file = Fexpand_file_name (s, Qnil); if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) - gtk_rc_parse (SDATA (abs_file)); + gtk_rc_parse (SSDATA (abs_file)); } XSetErrorHandler (x_error_handler); @@ -9979,7 +9933,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) #else /* not USE_X_TOOLKIT */ XSetLocaleModifiers (""); - dpy = XOpenDisplay (SDATA (display_name)); + dpy = XOpenDisplay (SSDATA (display_name)); #endif /* not USE_X_TOOLKIT */ #endif /* not USE_GTK*/ @@ -10078,7 +10032,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) + SBYTES (Vsystem_name) + 2); sprintf (dpyinfo->x_id_name, "%s@%s", - SDATA (Vinvocation_name), SDATA (Vsystem_name)); + SSDATA (Vinvocation_name), SSDATA (Vsystem_name)); /* Figure out which modifier bits mean what. */ x_find_modifier_meanings (dpyinfo); @@ -10672,9 +10626,6 @@ x_initialize (void) last_tool_bar_item = -1; any_help_event_p = 0; ignore_next_mouse_click_timeout = 0; -#ifdef HAVE_X_SM - x_session_initialized = 0; -#endif #ifdef USE_GTK current_count = -1; diff --git a/src/xterm.h b/src/xterm.h index 4775655a7ff..48d68557796 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1076,7 +1076,6 @@ extern void widget_store_internal_border (Widget); /* Defined in xsmfns.c */ #ifdef HAVE_X_SM extern void x_session_initialize (struct x_display_info *dpyinfo); -extern int x_session_check_input (struct input_event *bufp); extern int x_session_have_connection (void); extern void x_session_close (void); #endif |