diff options
| author | Miles Bader | 2008-01-30 07:57:28 +0000 |
|---|---|---|
| committer | Miles Bader | 2008-01-30 07:57:28 +0000 |
| commit | d235ca2ff8fab139ce797757fcb159d1e28fa7e0 (patch) | |
| tree | 96c5cd1a06a0d9dc26e8470c6eabfc032c0046f3 /src | |
| parent | 3709a060f679dba14df71ae64a0035fa2b5b3106 (diff) | |
| parent | 02cbe062bee38a6705bafb1699d77e3c44cfafcf (diff) | |
| download | emacs-d235ca2ff8fab139ce797757fcb159d1e28fa7e0.tar.gz emacs-d235ca2ff8fab139ce797757fcb159d1e28fa7e0.zip | |
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
Diffstat (limited to 'src')
52 files changed, 676 insertions, 2163 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index be7473f0a82..2242df6e428 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, | 1 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, |
| 2 | # 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | 2 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
| 3 | # Free Software Foundation, Inc. | ||
| 3 | # | 4 | # |
| 4 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 5 | # | 6 | # |
diff --git a/src/ChangeLog b/src/ChangeLog index e942fc32eeb..0645765cdde 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,215 @@ | |||
| 1 | 2008-01-29 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * macterm.c (XTset_vertical_scroll_bar): Fix merge mistake. | ||
| 4 | |||
| 5 | 2008-01-28 Jason Rumney <jasonr@gnu.org> | ||
| 6 | |||
| 7 | * w32.c (stat): Don't double check for networked drive. | ||
| 8 | |||
| 9 | 2008-01-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 10 | |||
| 11 | * window.c (run_window_configuration_change_hook): New function. | ||
| 12 | Code extracted from set_window_buffer. Set the selected frame. | ||
| 13 | (set_window_buffer): Use it. | ||
| 14 | * window.h (run_window_configuration_change_hook): Declare. | ||
| 15 | * dispnew.c (change_frame_size_1): Use it instead of set-window-buffer. | ||
| 16 | |||
| 17 | * keyboard.c (read_char): Yet another int/Lisp_Object mixup (YAILOM). | ||
| 18 | |||
| 19 | 2008-01-27 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 20 | |||
| 21 | * Makefile.in: Remove references to unused macros. | ||
| 22 | |||
| 23 | 2008-01-26 Eli Zaretskii <eliz@gnu.org> | ||
| 24 | |||
| 25 | * w32.c (g_b_init_get_sid_sub_authority) | ||
| 26 | (g_b_init_get_sid_sub_authority_count): New static variables. | ||
| 27 | (GetSidSubAuthority_Proc, GetSidSubAuthorityCount_Proc): New typedefs. | ||
| 28 | (get_sid_sub_authority, get_sid_sub_authority_count): New functions. | ||
| 29 | (init_user_info): Use them to retrieve uid and gid. | ||
| 30 | Use 500/513, the Windows defaults, as Administrator's uid/gid. | ||
| 31 | (fstat): Use pw_uid and pw_gid from the_passwd structure for | ||
| 32 | st_uid and st_gid of the file. | ||
| 33 | |||
| 34 | 2008-01-26 Jason Rumney <jasonr@gnu.org> | ||
| 35 | |||
| 36 | * w32.c (logon_network_drive): New function. | ||
| 37 | (stat): Use it. | ||
| 38 | |||
| 39 | 2008-01-26 Chong Yidong <cyd@stupidchicken.com> | ||
| 40 | |||
| 41 | * xdisp.c (pos_visible_p): Handle the case where charpos falls on | ||
| 42 | invisible text covered with an ellipsis. | ||
| 43 | |||
| 44 | 2008-01-25 Richard Stallman <rms@gnu.org> | ||
| 45 | |||
| 46 | * xdisp.c (redisplay_window): Run Qwindow_text_change_functions and | ||
| 47 | jump back to beginning. Move some other initializations after that. | ||
| 48 | (Qwindow_text_change_functions, Vwindow_text_change_functions): | ||
| 49 | New variables. | ||
| 50 | (syms_of_xdisp): Init them. | ||
| 51 | |||
| 52 | * keyboard.c (read_char): Restore echo_message_buffer after redisplay. | ||
| 53 | |||
| 54 | * buffer.c (reset_buffer_local_variables): | ||
| 55 | Implement `permanent-local-hook'. | ||
| 56 | (Qpermanent_local_hook): New variable. | ||
| 57 | (syms_of_buffer): Init and staticpro it. | ||
| 58 | |||
| 59 | 2008-01-25 Michael Albinus <michael.albinus@gmx.de> | ||
| 60 | |||
| 61 | * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux. | ||
| 62 | |||
| 63 | 2008-01-25 Thien-Thi Nguyen <ttn@gnuvola.org> | ||
| 64 | |||
| 65 | * fns.c (Fclrhash): Return TABLE. | ||
| 66 | |||
| 67 | 2008-01-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 68 | |||
| 69 | * macterm.c (x_scroll_bar_create): Initialize bar->redraw_needed_p. | ||
| 70 | (XTset_vertical_scroll_bar): Redraw scroll bar if bar->redraw_needed_p | ||
| 71 | is set even without positional changes. | ||
| 72 | (x_scroll_bar_clear): Set bar->redraw_needed_p. | ||
| 73 | |||
| 74 | * macterm.h (struct scroll_bar): New member `redraw_needed_p'. | ||
| 75 | |||
| 76 | 2008-01-23 Jason Rumney <jasonr@gnu.org> | ||
| 77 | |||
| 78 | * xterm.c (handle_one_xevent): Revert to counting chars not bytes. | ||
| 79 | |||
| 80 | * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside | ||
| 81 | the unicode range available in MULE by locale-coding-system. | ||
| 82 | Improve dbcs lead byte detection. Set event timestamp and modifiers | ||
| 83 | earlier. | ||
| 84 | |||
| 85 | 2008-01-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 86 | |||
| 87 | * mac.c (mac_emacs_pid) [MAC_OSX]: New variable. | ||
| 88 | [MAC_OSX] (init_mac_osx_environment): Initialize it. | ||
| 89 | [MAC_OSX] (mac_try_close_socket) [SELECT_USE_CFSOCKET]: Return 0 | ||
| 90 | when used on child processes. | ||
| 91 | |||
| 92 | 2008-01-21 Michael Albinus <michael.albinus@gmx.de> | ||
| 93 | |||
| 94 | * dbusbind.c (Fdbus_method_return_internal): Rename from | ||
| 95 | Fdbus_method_return. | ||
| 96 | (Fdbus_unregister_object): Move to dbus.el. | ||
| 97 | (Fdbus_call_method, Fdbus_method_return_internal) | ||
| 98 | (Fdbus_send_signal): Improve debug messages. | ||
| 99 | |||
| 100 | 2008-01-20 Martin Rudalics <rudalics@gmx.at> | ||
| 101 | |||
| 102 | * undo.c (undo_inhibit_record_point): New variable. | ||
| 103 | (syms_of_undo): Initialize it. | ||
| 104 | (record_point): Don't record point when undo_inhibit_record_point | ||
| 105 | is set. | ||
| 106 | |||
| 107 | 2008-01-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 108 | |||
| 109 | * process.c (list_processes_1): Don't use SCHARS on a nil buffer name. | ||
| 110 | |||
| 111 | * xdisp.c (Qauto_hscroll_mode): New var. | ||
| 112 | (syms_of_xdisp): Initialize it. | ||
| 113 | (hscroll_window_tree): Use it to lookup `auto-hscroll-mode' in each | ||
| 114 | window's buffer. | ||
| 115 | (hscroll_windows): Don't check automatic_hscrolling_p here. | ||
| 116 | |||
| 117 | * window.c (set_window_buffer): Don't unnecessarily reset hscroll and | ||
| 118 | vscroll if we're setting window-buffer to the value it already has. | ||
| 119 | |||
| 120 | 2008-01-18 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 121 | |||
| 122 | * m/intel386.h: Remove references to XENIX. | ||
| 123 | |||
| 124 | 2008-01-17 Andreas Schwab <schwab@suse.de> | ||
| 125 | |||
| 126 | * m/amdx86-64.h (START_FILES, LIB_STANDARD): Use HAVE_LIB64_DIR | ||
| 127 | instead of HAVE_X86_64_LIB64_DIR. | ||
| 128 | * m/ibms390x.h (START_FILES, LIB_STANDARD): Likewise. | ||
| 129 | |||
| 130 | 2008-01-17 Glenn Morris <rgm@gnu.org> | ||
| 131 | |||
| 132 | * m/ibms390x.h (START_FILES, LIB_STANDARD): Adjust value according | ||
| 133 | to HAVE_X86_64_LIB64_DIR. | ||
| 134 | |||
| 135 | 2008-01-16 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 136 | |||
| 137 | * s/irix3-3.h: | ||
| 138 | * s/irix4-0.h: | ||
| 139 | * s/386-ix.h: | ||
| 140 | * s/domain.h: | ||
| 141 | * s/hpux9-x11r4.h: | ||
| 142 | * s/hpux9shxr4.h: Remove files for systems no longer supported. | ||
| 143 | |||
| 144 | * sysdep.c: Remove code containing references to symbols defined | ||
| 145 | by unsupported systems. | ||
| 146 | |||
| 147 | 2008-01-16 Glenn Morris <rgm@gnu.org> | ||
| 148 | |||
| 149 | * coding.c (select-safe-coding-system-function): Doc fix. | ||
| 150 | |||
| 151 | 2008-01-15 Glenn Morris <rgm@gnu.org> | ||
| 152 | |||
| 153 | * config.in: Revert 2008-01-13 change: this is a generated file. | ||
| 154 | |||
| 155 | 2008-01-13 Tom Tromey <tromey@redhat.com> | ||
| 156 | |||
| 157 | * lisp.h: Fix typo. | ||
| 158 | |||
| 159 | 2008-01-13 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 160 | |||
| 161 | * m/sequent-ptx.h: | ||
| 162 | * m/sequent.h: | ||
| 163 | * s/ptx.h: | ||
| 164 | * s/ptx4-2.h: | ||
| 165 | * s/ptx4.h: Remove files for systems no longer supported. | ||
| 166 | |||
| 167 | * callproc.c (Fcall_process): Fix previous change. | ||
| 168 | |||
| 169 | 2008-01-13 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 170 | |||
| 171 | * unexsunos4.c: Remove file, system not supported anymore. | ||
| 172 | |||
| 173 | * src/m/mips.h: | ||
| 174 | * src/m/intel386.h: | ||
| 175 | * callproc.c: | ||
| 176 | * config.in: | ||
| 177 | * ecrt0.c: | ||
| 178 | * emacs.c: | ||
| 179 | * fileio.c: | ||
| 180 | * frame.c: | ||
| 181 | * getpagesize.h: | ||
| 182 | * keyboard.c: | ||
| 183 | * lread.c: | ||
| 184 | * process.c: | ||
| 185 | * puresize.h: | ||
| 186 | * sysdep.c: | ||
| 187 | * systty.h: | ||
| 188 | * syswait.h: | ||
| 189 | * unexec.c: | ||
| 190 | * xdisp.c: | ||
| 191 | * alloc.c: Remove code containing references to symbols defined by | ||
| 192 | unsupported systems. | ||
| 193 | |||
| 194 | 2008-01-11 Kenichi Handa <handa@ni.aist.go.jp> | ||
| 195 | |||
| 196 | * coding.c (detect_coding_mask): Fix previous change. | ||
| 197 | |||
| 198 | 2008-01-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 199 | |||
| 200 | * process.c (wait_reading_process_output): Check for window | ||
| 201 | changes caused by timers. | ||
| 202 | |||
| 203 | 2008-01-09 Kenichi Handa <handa@ni.aist.go.jp> | ||
| 204 | |||
| 205 | * coding.c (detect_coding_iso2022): New arg | ||
| 206 | latin_extra_code_state. Allow Latin extra codes only | ||
| 207 | when *latin_extra_code_state is nonzero. | ||
| 208 | (detect_coding_mask): If there is a NULL byte, detect the encoding | ||
| 209 | as UTF-16 or binary. If Latin extra codes exist, detect the | ||
| 210 | encoding as ISO-2022 only when there's no other proper encoding is | ||
| 211 | found. | ||
| 212 | |||
| 1 | 2008-01-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 213 | 2008-01-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 214 | ||
| 3 | * frame.c (Fmake_terminal_frame): Use #ifdef MAC_OS8 instead of | 215 | * frame.c (Fmake_terminal_frame): Use #ifdef MAC_OS8 instead of |
| @@ -1836,8 +2048,7 @@ | |||
| 1836 | 2007-08-29 Dan Nicolaescu <dann@ics.uci.edu> | 2048 | 2007-08-29 Dan Nicolaescu <dann@ics.uci.edu> |
| 1837 | 2049 | ||
| 1838 | * callproc.c (child_setup, getenv_internal): Use the | 2050 | * callproc.c (child_setup, getenv_internal): Use the |
| 1839 | display-environment-variable and term-environment-variable frame | 2051 | display-environment-variable and term-environment-variable frame params. |
| 1840 | params. | ||
| 1841 | (set_initial_environment): Initialise Vprocess_environment. | 2052 | (set_initial_environment): Initialise Vprocess_environment. |
| 1842 | 2053 | ||
| 1843 | * config.in: Disable multi-keyboard support on a mac. | 2054 | * config.in: Disable multi-keyboard support on a mac. |
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index b7187263257..577f1be615d 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -27916,8 +27916,8 @@ See ChangeLog.9 for earlier changes. | |||
| 27916 | ;; add-log-time-zone-rule: t | 27916 | ;; add-log-time-zone-rule: t |
| 27917 | ;; End: | 27917 | ;; End: |
| 27918 | 27918 | ||
| 27919 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 27919 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
| 27920 | 2006, 2007 Free Software Foundation, Inc. | 27920 | 2008 Free Software Foundation, Inc. |
| 27921 | 27921 | ||
| 27922 | This file is part of GNU Emacs. | 27922 | This file is part of GNU Emacs. |
| 27923 | 27923 | ||
diff --git a/src/Makefile.in b/src/Makefile.in index d0943e69eea..9435a88a1ec 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -1032,11 +1032,6 @@ temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} $ | |||
| 1032 | prefix-args${EXEEXT}: prefix-args.c $(config_h) | 1032 | prefix-args${EXEEXT}: prefix-args.c $(config_h) |
| 1033 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args | 1033 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args |
| 1034 | 1034 | ||
| 1035 | /* Do not lose if this was not defined. */ | ||
| 1036 | #ifndef OLDXMENU_OPTIONS | ||
| 1037 | #define OLDXMENU_OPTIONS | ||
| 1038 | #endif | ||
| 1039 | |||
| 1040 | #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (HAVE_GTK) | 1035 | #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (HAVE_GTK) |
| 1041 | 1036 | ||
| 1042 | /* We use stamp-xmenu with these two deps | 1037 | /* We use stamp-xmenu with these two deps |
| @@ -1082,7 +1077,7 @@ C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE | |||
| 1082 | C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE | 1077 | C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE |
| 1083 | C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM | 1078 | C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM |
| 1084 | really-oldXMenu: | 1079 | really-oldXMenu: |
| 1085 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \ | 1080 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ |
| 1086 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ | 1081 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ |
| 1087 | "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \ | 1082 | "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \ |
| 1088 | "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \ | 1083 | "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \ |
diff --git a/src/alloc.c b/src/alloc.c index be75fc47cbf..c1ebd0cf2a3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1928,11 +1928,7 @@ allocate_string () | |||
| 1928 | consing_since_gc += sizeof *s; | 1928 | consing_since_gc += sizeof *s; |
| 1929 | 1929 | ||
| 1930 | #ifdef GC_CHECK_STRING_BYTES | 1930 | #ifdef GC_CHECK_STRING_BYTES |
| 1931 | if (!noninteractive | 1931 | if (!noninteractive) |
| 1932 | #ifdef MAC_OS8 | ||
| 1933 | && current_sblock | ||
| 1934 | #endif | ||
| 1935 | ) | ||
| 1936 | { | 1932 | { |
| 1937 | if (++check_string_bytes_count == 200) | 1933 | if (++check_string_bytes_count == 200) |
| 1938 | { | 1934 | { |
diff --git a/src/buffer.c b/src/buffer.c index 5958c1f91be..c18e3ad8ddf 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -153,6 +153,7 @@ Lisp_Object Qucs_set_table_for_input; | |||
| 153 | int inhibit_modification_hooks; | 153 | int inhibit_modification_hooks; |
| 154 | 154 | ||
| 155 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 155 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 156 | Lisp_Object Qpermanent_local_hook; | ||
| 156 | 157 | ||
| 157 | Lisp_Object Qprotected_field; | 158 | Lisp_Object Qprotected_field; |
| 158 | 159 | ||
| @@ -762,13 +763,38 @@ reset_buffer_local_variables (b, permanent_too) | |||
| 762 | b->local_var_alist = Qnil; | 763 | b->local_var_alist = Qnil; |
| 763 | else | 764 | else |
| 764 | { | 765 | { |
| 765 | Lisp_Object tmp, last = Qnil; | 766 | Lisp_Object tmp, prop, last = Qnil; |
| 766 | for (tmp = b->local_var_alist; CONSP (tmp); tmp = XCDR (tmp)) | 767 | for (tmp = b->local_var_alist; CONSP (tmp); tmp = XCDR (tmp)) |
| 767 | if (CONSP (XCAR (tmp)) | 768 | if (CONSP (XCAR (tmp)) |
| 768 | && SYMBOLP (XCAR (XCAR (tmp))) | 769 | && SYMBOLP (XCAR (XCAR (tmp))) |
| 769 | && !NILP (Fget (XCAR (XCAR (tmp)), Qpermanent_local))) | 770 | && !NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local))) |
| 770 | /* If permanent-local, keep it. */ | 771 | { |
| 771 | last = tmp; | 772 | /* If permanent-local, keep it. */ |
| 773 | last = tmp; | ||
| 774 | if (EQ (prop, Qpermanent_local_hook)) | ||
| 775 | { | ||
| 776 | /* This is a partially permanent hook variable. | ||
| 777 | Preserve only the elements that want to be preserved. */ | ||
| 778 | Lisp_Object list, newlist; | ||
| 779 | list = XCDR (XCAR (tmp)); | ||
| 780 | if (!CONSP (list)) | ||
| 781 | newlist = list; | ||
| 782 | else | ||
| 783 | for (newlist = Qnil; CONSP (list); list = XCDR (list)) | ||
| 784 | { | ||
| 785 | Lisp_Object elt = XCAR (list); | ||
| 786 | /* Preserve element ELT if it's t, | ||
| 787 | if it is a function with a `permanent-local-hook' property, | ||
| 788 | or if it's not a symbol. */ | ||
| 789 | if (! SYMBOLP (elt) | ||
| 790 | || EQ (elt, Qt) | ||
| 791 | || !NILP (Fget (elt, Qpermanent_local_hook))) | ||
| 792 | newlist = Fcons (elt, newlist); | ||
| 793 | } | ||
| 794 | XSETCDR (XCAR (tmp), Fnreverse (newlist)); | ||
| 795 | } | ||
| 796 | } | ||
| 797 | /* Delete this local variable. */ | ||
| 772 | else if (NILP (last)) | 798 | else if (NILP (last)) |
| 773 | b->local_var_alist = XCDR (tmp); | 799 | b->local_var_alist = XCDR (tmp); |
| 774 | else | 800 | else |
| @@ -5308,6 +5334,8 @@ syms_of_buffer () | |||
| 5308 | staticpro (&Vbuffer_alist); | 5334 | staticpro (&Vbuffer_alist); |
| 5309 | staticpro (&Qprotected_field); | 5335 | staticpro (&Qprotected_field); |
| 5310 | staticpro (&Qpermanent_local); | 5336 | staticpro (&Qpermanent_local); |
| 5337 | Qpermanent_local_hook = intern ("permanent-local-hook"); | ||
| 5338 | staticpro (&Qpermanent_local_hook); | ||
| 5311 | staticpro (&Qkill_buffer_hook); | 5339 | staticpro (&Qkill_buffer_hook); |
| 5312 | Qoverlayp = intern ("overlayp"); | 5340 | Qoverlayp = intern ("overlayp"); |
| 5313 | staticpro (&Qoverlayp); | 5341 | staticpro (&Qoverlayp); |
| @@ -5335,6 +5363,7 @@ syms_of_buffer () | |||
| 5335 | staticpro (&Qbefore_change_functions); | 5363 | staticpro (&Qbefore_change_functions); |
| 5336 | Qafter_change_functions = intern ("after-change-functions"); | 5364 | Qafter_change_functions = intern ("after-change-functions"); |
| 5337 | staticpro (&Qafter_change_functions); | 5365 | staticpro (&Qafter_change_functions); |
| 5366 | /* The next one is initialized in init_buffer_once. */ | ||
| 5338 | staticpro (&Qucs_set_table_for_input); | 5367 | staticpro (&Qucs_set_table_for_input); |
| 5339 | 5368 | ||
| 5340 | Qkill_buffer_query_functions = intern ("kill-buffer-query-functions"); | 5369 | Qkill_buffer_query_functions = intern ("kill-buffer-query-functions"); |
| @@ -5575,7 +5604,8 @@ its hooks should not expect certain variables such as | |||
| 5575 | 5604 | ||
| 5576 | DEFVAR_PER_BUFFER ("mode-name", ¤t_buffer->mode_name, | 5605 | DEFVAR_PER_BUFFER ("mode-name", ¤t_buffer->mode_name, |
| 5577 | Qnil, | 5606 | Qnil, |
| 5578 | doc: /* Pretty name of current buffer's major mode (a string). */); | 5607 | doc: /* Pretty name of current buffer's major mode. |
| 5608 | Usually a string. See `mode-line-format' for other possible forms. */); | ||
| 5579 | 5609 | ||
| 5580 | DEFVAR_PER_BUFFER ("local-abbrev-table", ¤t_buffer->abbrev_table, Qnil, | 5610 | DEFVAR_PER_BUFFER ("local-abbrev-table", ¤t_buffer->abbrev_table, Qnil, |
| 5581 | doc: /* Local (mode-specific) abbrev table of current buffer. */); | 5611 | doc: /* Local (mode-specific) abbrev table of current buffer. */); |
diff --git a/src/callproc.c b/src/callproc.c index 4a320bf0b3d..a3b7b7afa4a 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -160,14 +160,14 @@ Lisp_Object | |||
| 160 | call_process_cleanup (fdpid) | 160 | call_process_cleanup (fdpid) |
| 161 | Lisp_Object fdpid; | 161 | Lisp_Object fdpid; |
| 162 | { | 162 | { |
| 163 | #if defined (MSDOS) || defined (MAC_OS8) | 163 | #if defined (MSDOS) |
| 164 | /* for MSDOS fdpid is really (fd . tempfile) */ | 164 | /* for MSDOS fdpid is really (fd . tempfile) */ |
| 165 | register Lisp_Object file; | 165 | register Lisp_Object file; |
| 166 | file = Fcdr (fdpid); | 166 | file = Fcdr (fdpid); |
| 167 | emacs_close (XFASTINT (Fcar (fdpid))); | 167 | emacs_close (XFASTINT (Fcar (fdpid))); |
| 168 | if (strcmp (SDATA (file), NULL_DEVICE) != 0) | 168 | if (strcmp (SDATA (file), NULL_DEVICE) != 0) |
| 169 | unlink (SDATA (file)); | 169 | unlink (SDATA (file)); |
| 170 | #else /* not MSDOS and not MAC_OS8 */ | 170 | #else /* not MSDOS */ |
| 171 | register int pid = XFASTINT (Fcdr (fdpid)); | 171 | register int pid = XFASTINT (Fcdr (fdpid)); |
| 172 | 172 | ||
| 173 | if (call_process_exited) | 173 | if (call_process_exited) |
| @@ -244,10 +244,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 244 | char *outf, *tempfile; | 244 | char *outf, *tempfile; |
| 245 | int outfilefd; | 245 | int outfilefd; |
| 246 | #endif | 246 | #endif |
| 247 | #ifdef MAC_OS8 | ||
| 248 | char *tempfile; | ||
| 249 | int outfilefd; | ||
| 250 | #endif | ||
| 251 | #if 0 | 247 | #if 0 |
| 252 | int mask; | 248 | int mask; |
| 253 | #endif | 249 | #endif |
| @@ -471,32 +467,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 471 | fd[1] = outfilefd; | 467 | fd[1] = outfilefd; |
| 472 | #endif /* MSDOS */ | 468 | #endif /* MSDOS */ |
| 473 | 469 | ||
| 474 | #ifdef MAC_OS8 | ||
| 475 | /* Since we don't have pipes on the Mac, create a temporary file to | ||
| 476 | hold the output of the subprocess. */ | ||
| 477 | tempfile = (char *) alloca (SBYTES (Vtemp_file_name_pattern) + 1); | ||
| 478 | bcopy (SDATA (Vtemp_file_name_pattern), tempfile, | ||
| 479 | SBYTES (Vtemp_file_name_pattern) + 1); | ||
| 480 | |||
| 481 | mktemp (tempfile); | ||
| 482 | |||
| 483 | outfilefd = creat (tempfile, S_IREAD | S_IWRITE); | ||
| 484 | if (outfilefd < 0) | ||
| 485 | { | ||
| 486 | close (filefd); | ||
| 487 | report_file_error ("Opening process output file", | ||
| 488 | Fcons (build_string (tempfile), Qnil)); | ||
| 489 | } | ||
| 490 | fd[0] = filefd; | ||
| 491 | fd[1] = outfilefd; | ||
| 492 | #endif /* MAC_OS8 */ | ||
| 493 | |||
| 494 | if (INTEGERP (buffer)) | 470 | if (INTEGERP (buffer)) |
| 495 | fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; | 471 | fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; |
| 496 | else | 472 | else |
| 497 | { | 473 | { |
| 498 | #ifndef MSDOS | 474 | #ifndef MSDOS |
| 499 | #ifndef MAC_OS8 | ||
| 500 | errno = 0; | 475 | errno = 0; |
| 501 | if (pipe (fd) == -1) | 476 | if (pipe (fd) == -1) |
| 502 | { | 477 | { |
| @@ -504,7 +479,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 504 | report_file_error ("Creating process pipe", Qnil); | 479 | report_file_error ("Creating process pipe", Qnil); |
| 505 | } | 480 | } |
| 506 | #endif | 481 | #endif |
| 507 | #endif | ||
| 508 | #if 0 | 482 | #if 0 |
| 509 | /* Replaced by close_process_descs */ | 483 | /* Replaced by close_process_descs */ |
| 510 | set_exclusive_use (fd[0]); | 484 | set_exclusive_use (fd[0]); |
| @@ -562,52 +536,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 562 | report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); | 536 | report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); |
| 563 | } | 537 | } |
| 564 | 538 | ||
| 565 | #ifdef MAC_OS8 | ||
| 566 | { | ||
| 567 | /* Call run_mac_command in sysdep.c here directly instead of doing | ||
| 568 | a child_setup as for MSDOS and other platforms. Note that this | ||
| 569 | code does not handle passing the environment to the synchronous | ||
| 570 | Mac subprocess. */ | ||
| 571 | char *infn, *outfn, *errfn, *currdn; | ||
| 572 | |||
| 573 | /* close these files so subprocess can write to them */ | ||
| 574 | close (outfilefd); | ||
| 575 | if (fd_error != outfilefd) | ||
| 576 | close (fd_error); | ||
| 577 | fd1 = -1; /* No harm in closing that one! */ | ||
| 578 | |||
| 579 | infn = SDATA (infile); | ||
| 580 | outfn = tempfile; | ||
| 581 | if (NILP (error_file)) | ||
| 582 | errfn = NULL_DEVICE; | ||
| 583 | else if (EQ (Qt, error_file)) | ||
| 584 | errfn = outfn; | ||
| 585 | else | ||
| 586 | errfn = SDATA (error_file); | ||
| 587 | currdn = SDATA (current_dir); | ||
| 588 | pid = run_mac_command (new_argv, currdn, infn, outfn, errfn); | ||
| 589 | |||
| 590 | /* Record that the synchronous process exited and note its | ||
| 591 | termination status. */ | ||
| 592 | synch_process_alive = 0; | ||
| 593 | synch_process_retcode = pid; | ||
| 594 | if (synch_process_retcode < 0) /* means it couldn't be exec'ed */ | ||
| 595 | { | ||
| 596 | synchronize_system_messages_locale (); | ||
| 597 | synch_process_death = strerror (errno); | ||
| 598 | } | ||
| 599 | |||
| 600 | /* Since CRLF is converted to LF within `decode_coding', we can | ||
| 601 | always open a file with binary mode. */ | ||
| 602 | fd[0] = open (tempfile, O_BINARY); | ||
| 603 | if (fd[0] < 0) | ||
| 604 | { | ||
| 605 | unlink (tempfile); | ||
| 606 | close (filefd); | ||
| 607 | report_file_error ("Cannot re-open temporary file", Qnil); | ||
| 608 | } | ||
| 609 | } | ||
| 610 | #else /* not MAC_OS8 */ | ||
| 611 | #ifdef MSDOS /* MW, July 1993 */ | 539 | #ifdef MSDOS /* MW, July 1993 */ |
| 612 | /* Note that on MSDOS `child_setup' actually returns the child process | 540 | /* Note that on MSDOS `child_setup' actually returns the child process |
| 613 | exit status, not its PID, so we assign it to `synch_process_retcode' | 541 | exit status, not its PID, so we assign it to `synch_process_retcode' |
| @@ -670,7 +598,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 670 | if (fd_error >= 0) | 598 | if (fd_error >= 0) |
| 671 | emacs_close (fd_error); | 599 | emacs_close (fd_error); |
| 672 | #endif /* not MSDOS */ | 600 | #endif /* not MSDOS */ |
| 673 | #endif /* not MAC_OS8 */ | ||
| 674 | 601 | ||
| 675 | environ = save_environ; | 602 | environ = save_environ; |
| 676 | 603 | ||
| @@ -704,14 +631,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 704 | /* Enable sending signal if user quits below. */ | 631 | /* Enable sending signal if user quits below. */ |
| 705 | call_process_exited = 0; | 632 | call_process_exited = 0; |
| 706 | 633 | ||
| 707 | #if defined(MSDOS) || defined(MAC_OS8) | 634 | #if defined(MSDOS) |
| 708 | /* MSDOS needs different cleanup information. */ | 635 | /* MSDOS needs different cleanup information. */ |
| 709 | record_unwind_protect (call_process_cleanup, | 636 | record_unwind_protect (call_process_cleanup, |
| 710 | Fcons (make_number (fd[0]), build_string (tempfile))); | 637 | Fcons (make_number (fd[0]), build_string (tempfile))); |
| 711 | #else | 638 | #else |
| 712 | record_unwind_protect (call_process_cleanup, | 639 | record_unwind_protect (call_process_cleanup, |
| 713 | Fcons (make_number (fd[0]), make_number (pid))); | 640 | Fcons (make_number (fd[0]), make_number (pid))); |
| 714 | #endif /* not MSDOS and not MAC_OS8 */ | 641 | #endif /* not MSDOS */ |
| 715 | 642 | ||
| 716 | 643 | ||
| 717 | if (BUFFERP (buffer)) | 644 | if (BUFFERP (buffer)) |
diff --git a/src/coding.c b/src/coding.c index 32a775f3468..89a3090fa56 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9810,7 +9810,9 @@ Function to call to select safe coding system for encoding a text. | |||
| 9810 | 9810 | ||
| 9811 | If set, this function is called to force a user to select a proper | 9811 | If set, this function is called to force a user to select a proper |
| 9812 | coding system which can encode the text in the case that a default | 9812 | coding system which can encode the text in the case that a default |
| 9813 | coding system used in each operation can't encode the text. | 9813 | coding system used in each operation can't encode the text. The |
| 9814 | function should take care that the buffer is not modified while | ||
| 9815 | the coding system is being selected. | ||
| 9814 | 9816 | ||
| 9815 | The default value is `select-safe-coding-system' (which see). */); | 9817 | The default value is `select-safe-coding-system' (which see). */); |
| 9816 | Vselect_safe_coding_system_function = Qnil; | 9818 | Vselect_safe_coding_system_function = Qnil; |
diff --git a/src/config.in b/src/config.in index d548fb77326..3451db40e0e 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -301,6 +301,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 301 | /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ | 301 | /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ |
| 302 | #undef HAVE_LANGINFO_CODESET | 302 | #undef HAVE_LANGINFO_CODESET |
| 303 | 303 | ||
| 304 | /* Define to 1 if the directory /usr/lib64 exists. */ | ||
| 305 | #undef HAVE_LIB64_DIR | ||
| 306 | |||
| 304 | /* Define to 1 if you have the `com_err' library (-lcom_err). */ | 307 | /* Define to 1 if you have the `com_err' library (-lcom_err). */ |
| 305 | #undef HAVE_LIBCOM_ERR | 308 | #undef HAVE_LIBCOM_ERR |
| 306 | 309 | ||
| @@ -720,9 +723,6 @@ Boston, MA 02110-1301, USA. */ | |||
| 720 | /* Define to 1 if you have the X11R6 or newer version of Xt. */ | 723 | /* Define to 1 if you have the X11R6 or newer version of Xt. */ |
| 721 | #undef HAVE_X11XTR6 | 724 | #undef HAVE_X11XTR6 |
| 722 | 725 | ||
| 723 | /* Define to 1 if the file /usr/lib64 exists. */ | ||
| 724 | #undef HAVE_X86_64_LIB64_DIR | ||
| 725 | |||
| 726 | /* Define to 1 if you have the Xaw3d library (-lXaw3d). */ | 726 | /* Define to 1 if you have the Xaw3d library (-lXaw3d). */ |
| 727 | #undef HAVE_XAW3D | 727 | #undef HAVE_XAW3D |
| 728 | 728 | ||
diff --git a/src/dbusbind.c b/src/dbusbind.c index 136cea9adb4..4bc48f3b6e9 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -33,11 +33,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 33 | /* Subroutines. */ | 33 | /* Subroutines. */ |
| 34 | Lisp_Object Qdbus_get_unique_name; | 34 | Lisp_Object Qdbus_get_unique_name; |
| 35 | Lisp_Object Qdbus_call_method; | 35 | Lisp_Object Qdbus_call_method; |
| 36 | Lisp_Object Qdbus_method_return; | 36 | Lisp_Object Qdbus_method_return_internal; |
| 37 | Lisp_Object Qdbus_send_signal; | 37 | Lisp_Object Qdbus_send_signal; |
| 38 | Lisp_Object Qdbus_register_signal; | 38 | Lisp_Object Qdbus_register_signal; |
| 39 | Lisp_Object Qdbus_register_method; | 39 | Lisp_Object Qdbus_register_method; |
| 40 | Lisp_Object Qdbus_unregister_object; | ||
| 41 | 40 | ||
| 42 | /* D-Bus error symbol. */ | 41 | /* D-Bus error symbol. */ |
| 43 | Lisp_Object Qdbus_error; | 42 | Lisp_Object Qdbus_error; |
| @@ -595,10 +594,14 @@ xd_retrieve_arg (dtype, iter) | |||
| 595 | case DBUS_TYPE_INT32: | 594 | case DBUS_TYPE_INT32: |
| 596 | case DBUS_TYPE_UINT32: | 595 | case DBUS_TYPE_UINT32: |
| 597 | { | 596 | { |
| 597 | /* Assignment to EMACS_INT stops GCC whining about limited | ||
| 598 | range of data type. */ | ||
| 598 | dbus_uint32_t val; | 599 | dbus_uint32_t val; |
| 600 | EMACS_INT val1; | ||
| 599 | dbus_message_iter_get_basic (iter, &val); | 601 | dbus_message_iter_get_basic (iter, &val); |
| 600 | XD_DEBUG_MESSAGE ("%c %d", dtype, val); | 602 | XD_DEBUG_MESSAGE ("%c %d", dtype, val); |
| 601 | return make_fixnum_or_float (val); | 603 | val1 = val; |
| 604 | return make_fixnum_or_float (val1); | ||
| 602 | } | 605 | } |
| 603 | 606 | ||
| 604 | case DBUS_TYPE_INT64: | 607 | case DBUS_TYPE_INT64: |
| @@ -833,14 +836,22 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &rest ARGS) */) | |||
| 833 | /* Append parameters to the message. */ | 836 | /* Append parameters to the message. */ |
| 834 | for (i = 5; i < nargs; ++i) | 837 | for (i = 5; i < nargs; ++i) |
| 835 | { | 838 | { |
| 836 | |||
| 837 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 838 | XD_DEBUG_MESSAGE ("Parameter%d %s", | ||
| 839 | i-4, SDATA (format2 ("%s", args[i], Qnil))); | ||
| 840 | |||
| 841 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); | 839 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); |
| 842 | if (XD_DBUS_TYPE_P (args[i])) | 840 | if (XD_DBUS_TYPE_P (args[i])) |
| 843 | ++i; | 841 | { |
| 842 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 843 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | ||
| 844 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, | ||
| 845 | SDATA (format2 ("%s", args[i], Qnil)), | ||
| 846 | SDATA (format2 ("%s", args[i+1], Qnil))); | ||
| 847 | ++i; | ||
| 848 | } | ||
| 849 | else | ||
| 850 | { | ||
| 851 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 852 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, | ||
| 853 | SDATA (format2 ("%s", args[i], Qnil))); | ||
| 854 | } | ||
| 844 | 855 | ||
| 845 | /* Check for valid signature. We use DBUS_TYPE_INVALID as | 856 | /* Check for valid signature. We use DBUS_TYPE_INVALID as |
| 846 | indication that there is no parent type. */ | 857 | indication that there is no parent type. */ |
| @@ -872,7 +883,8 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &rest ARGS) */) | |||
| 872 | { | 883 | { |
| 873 | /* Loop over the parameters of the D-Bus reply message. Construct a | 884 | /* Loop over the parameters of the D-Bus reply message. Construct a |
| 874 | Lisp list, which is returned by `dbus-call-method'. */ | 885 | Lisp list, which is returned by `dbus-call-method'. */ |
| 875 | while ((dtype = dbus_message_iter_get_arg_type (&iter)) != DBUS_TYPE_INVALID) | 886 | while ((dtype = dbus_message_iter_get_arg_type (&iter)) |
| 887 | != DBUS_TYPE_INVALID) | ||
| 876 | { | 888 | { |
| 877 | result = Fcons (xd_retrieve_arg (dtype, &iter), result); | 889 | result = Fcons (xd_retrieve_arg (dtype, &iter), result); |
| 878 | dbus_message_iter_next (&iter); | 890 | dbus_message_iter_next (&iter); |
| @@ -880,7 +892,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &rest ARGS) */) | |||
| 880 | } | 892 | } |
| 881 | else | 893 | else |
| 882 | { | 894 | { |
| 883 | /* No arguments: just return nil. */ | 895 | /* No arguments: just return nil. */ |
| 884 | } | 896 | } |
| 885 | 897 | ||
| 886 | /* Cleanup. */ | 898 | /* Cleanup. */ |
| @@ -895,12 +907,13 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &rest ARGS) */) | |||
| 895 | RETURN_UNGCPRO (Fnreverse (result)); | 907 | RETURN_UNGCPRO (Fnreverse (result)); |
| 896 | } | 908 | } |
| 897 | 909 | ||
| 898 | DEFUN ("dbus-method-return", Fdbus_method_return, Sdbus_method_return, | 910 | DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal, |
| 911 | Sdbus_method_return_internal, | ||
| 899 | 3, MANY, 0, | 912 | 3, MANY, 0, |
| 900 | doc: /* Return to method SERIAL on the D-Bus BUS. | 913 | doc: /* Return for message SERIAL on the D-Bus BUS. |
| 901 | This is an internal function, it shall not be used outside dbus.el. | 914 | This is an internal function, it shall not be used outside dbus.el. |
| 902 | 915 | ||
| 903 | usage: (dbus-method-return BUS SERIAL SERVICE &rest ARGS) */) | 916 | usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) |
| 904 | (nargs, args) | 917 | (nargs, args) |
| 905 | int nargs; | 918 | int nargs; |
| 906 | register Lisp_Object *args; | 919 | register Lisp_Object *args; |
| @@ -948,14 +961,22 @@ usage: (dbus-method-return BUS SERIAL SERVICE &rest ARGS) */) | |||
| 948 | /* Append parameters to the message. */ | 961 | /* Append parameters to the message. */ |
| 949 | for (i = 3; i < nargs; ++i) | 962 | for (i = 3; i < nargs; ++i) |
| 950 | { | 963 | { |
| 951 | |||
| 952 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 953 | XD_DEBUG_MESSAGE ("Parameter%d %s", | ||
| 954 | i-2, SDATA (format2 ("%s", args[i], Qnil))); | ||
| 955 | |||
| 956 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); | 964 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); |
| 957 | if (XD_DBUS_TYPE_P (args[i])) | 965 | if (XD_DBUS_TYPE_P (args[i])) |
| 958 | ++i; | 966 | { |
| 967 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 968 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | ||
| 969 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-2, | ||
| 970 | SDATA (format2 ("%s", args[i], Qnil)), | ||
| 971 | SDATA (format2 ("%s", args[i+1], Qnil))); | ||
| 972 | ++i; | ||
| 973 | } | ||
| 974 | else | ||
| 975 | { | ||
| 976 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 977 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-2, | ||
| 978 | SDATA (format2 ("%s", args[i], Qnil))); | ||
| 979 | } | ||
| 959 | 980 | ||
| 960 | /* Check for valid signature. We use DBUS_TYPE_INVALID as | 981 | /* Check for valid signature. We use DBUS_TYPE_INVALID as |
| 961 | indication that there is no parent type. */ | 982 | indication that there is no parent type. */ |
| @@ -1064,13 +1085,22 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1064 | /* Append parameters to the message. */ | 1085 | /* Append parameters to the message. */ |
| 1065 | for (i = 5; i < nargs; ++i) | 1086 | for (i = 5; i < nargs; ++i) |
| 1066 | { | 1087 | { |
| 1067 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 1068 | XD_DEBUG_MESSAGE ("Parameter%d %s", | ||
| 1069 | i-4, SDATA (format2 ("%s", args[i], Qnil))); | ||
| 1070 | |||
| 1071 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); | 1088 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]); |
| 1072 | if (XD_DBUS_TYPE_P (args[i])) | 1089 | if (XD_DBUS_TYPE_P (args[i])) |
| 1073 | ++i; | 1090 | { |
| 1091 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 1092 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | ||
| 1093 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, | ||
| 1094 | SDATA (format2 ("%s", args[i], Qnil)), | ||
| 1095 | SDATA (format2 ("%s", args[i+1], Qnil))); | ||
| 1096 | ++i; | ||
| 1097 | } | ||
| 1098 | else | ||
| 1099 | { | ||
| 1100 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | ||
| 1101 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, | ||
| 1102 | SDATA (format2 ("%s", args[i], Qnil))); | ||
| 1103 | } | ||
| 1074 | 1104 | ||
| 1075 | /* Check for valid signature. We use DBUS_TYPE_INVALID as | 1105 | /* Check for valid signature. We use DBUS_TYPE_INVALID as |
| 1076 | indication that there is no parent type. */ | 1106 | indication that there is no parent type. */ |
| @@ -1392,56 +1422,6 @@ used for composing the returning D-Bus message. */) | |||
| 1392 | return list2 (key, list3 (service, path, handler)); | 1422 | return list2 (key, list3 (service, path, handler)); |
| 1393 | } | 1423 | } |
| 1394 | 1424 | ||
| 1395 | DEFUN ("dbus-unregister-object", Fdbus_unregister_object, | ||
| 1396 | Sdbus_unregister_object, | ||
| 1397 | 1, 1, 0, | ||
| 1398 | doc: /* Unregister OBJECT from the D-Bus. | ||
| 1399 | OBJECT must be the result of a preceding `dbus-register-signal' or | ||
| 1400 | `dbus-register-method' call. It returns t if OBJECT has been | ||
| 1401 | unregistered, nil otherwise. */) | ||
| 1402 | (object) | ||
| 1403 | Lisp_Object object; | ||
| 1404 | { | ||
| 1405 | Lisp_Object value; | ||
| 1406 | struct gcpro gcpro1; | ||
| 1407 | |||
| 1408 | /* Check parameter. */ | ||
| 1409 | if (!(CONSP (object) && (!NILP (CAR_SAFE (object))) | ||
| 1410 | && CONSP (CDR_SAFE (object)))) | ||
| 1411 | wrong_type_argument (intern ("D-Bus"), object); | ||
| 1412 | |||
| 1413 | /* Find the corresponding entry in the hash table. */ | ||
| 1414 | value = Fgethash (CAR_SAFE (object), Vdbus_registered_functions_table, Qnil); | ||
| 1415 | |||
| 1416 | /* Loop over the registered functions. */ | ||
| 1417 | while (!NILP (value)) | ||
| 1418 | { | ||
| 1419 | GCPRO1 (value); | ||
| 1420 | |||
| 1421 | /* (car value) has the structure (UNAME SERVICE PATH HANDLER). | ||
| 1422 | (cdr object) has the structure ((SERVICE PATH HANDLER) ...). */ | ||
| 1423 | if (!NILP (Fequal (CDR_SAFE (CAR_SAFE (value)), | ||
| 1424 | CAR_SAFE (CDR_SAFE (object))))) | ||
| 1425 | { | ||
| 1426 | /* Compute new hash value. */ | ||
| 1427 | value = Fdelete (CAR_SAFE (value), | ||
| 1428 | Fgethash (CAR_SAFE (object), | ||
| 1429 | Vdbus_registered_functions_table, Qnil)); | ||
| 1430 | if (NILP (value)) | ||
| 1431 | Fremhash (CAR_SAFE (object), Vdbus_registered_functions_table); | ||
| 1432 | else | ||
| 1433 | Fputhash (CAR_SAFE (object), value, | ||
| 1434 | Vdbus_registered_functions_table); | ||
| 1435 | RETURN_UNGCPRO (Qt); | ||
| 1436 | } | ||
| 1437 | UNGCPRO; | ||
| 1438 | value = CDR_SAFE (value); | ||
| 1439 | } | ||
| 1440 | |||
| 1441 | /* Return. */ | ||
| 1442 | return Qnil; | ||
| 1443 | } | ||
| 1444 | |||
| 1445 | 1425 | ||
| 1446 | void | 1426 | void |
| 1447 | syms_of_dbusbind () | 1427 | syms_of_dbusbind () |
| @@ -1455,9 +1435,9 @@ syms_of_dbusbind () | |||
| 1455 | staticpro (&Qdbus_call_method); | 1435 | staticpro (&Qdbus_call_method); |
| 1456 | defsubr (&Sdbus_call_method); | 1436 | defsubr (&Sdbus_call_method); |
| 1457 | 1437 | ||
| 1458 | Qdbus_method_return = intern ("dbus-method-return"); | 1438 | Qdbus_method_return_internal = intern ("dbus-method-return-internal"); |
| 1459 | staticpro (&Qdbus_method_return); | 1439 | staticpro (&Qdbus_method_return_internal); |
| 1460 | defsubr (&Sdbus_method_return); | 1440 | defsubr (&Sdbus_method_return_internal); |
| 1461 | 1441 | ||
| 1462 | Qdbus_send_signal = intern ("dbus-send-signal"); | 1442 | Qdbus_send_signal = intern ("dbus-send-signal"); |
| 1463 | staticpro (&Qdbus_send_signal); | 1443 | staticpro (&Qdbus_send_signal); |
| @@ -1471,10 +1451,6 @@ syms_of_dbusbind () | |||
| 1471 | staticpro (&Qdbus_register_method); | 1451 | staticpro (&Qdbus_register_method); |
| 1472 | defsubr (&Sdbus_register_method); | 1452 | defsubr (&Sdbus_register_method); |
| 1473 | 1453 | ||
| 1474 | Qdbus_unregister_object = intern ("dbus-unregister-object"); | ||
| 1475 | staticpro (&Qdbus_unregister_object); | ||
| 1476 | defsubr (&Sdbus_unregister_object); | ||
| 1477 | |||
| 1478 | Qdbus_error = intern ("dbus-error"); | 1454 | Qdbus_error = intern ("dbus-error"); |
| 1479 | staticpro (&Qdbus_error); | 1455 | staticpro (&Qdbus_error); |
| 1480 | Fput (Qdbus_error, Qerror_conditions, | 1456 | Fput (Qdbus_error, Qerror_conditions, |
diff --git a/src/dispnew.c b/src/dispnew.c index d869fb53f73..a4219ead66d 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6386,9 +6386,7 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | |||
| 6386 | 6386 | ||
| 6387 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 6387 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 6388 | 6388 | ||
| 6389 | /* This isn't quite a no-op: it runs window-configuration-change-hook. */ | 6389 | run_window_configuration_change_hook (f); |
| 6390 | Fset_window_buffer (FRAME_SELECTED_WINDOW (f), | ||
| 6391 | XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer, Qt); | ||
| 6392 | 6390 | ||
| 6393 | unbind_to (count, Qnil); | 6391 | unbind_to (count, Qnil); |
| 6394 | } | 6392 | } |
diff --git a/src/ecrt0.c b/src/ecrt0.c index 36f6caeceb9..41bd1c8b323 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c | |||
| @@ -84,146 +84,6 @@ char **environ; | |||
| 84 | static start1 (); | 84 | static start1 (); |
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | #ifdef APOLLO | ||
| 88 | extern char *malloc(), *realloc(), *(*_libc_malloc) (), *(*_libc_realloc)(); | ||
| 89 | extern void free(), (*_libc_free) (); extern int main(); | ||
| 90 | std_$call void unix_$main(); | ||
| 91 | |||
| 92 | _start() | ||
| 93 | { | ||
| 94 | _libc_malloc = malloc; | ||
| 95 | _libc_realloc = realloc; | ||
| 96 | _libc_free = free; | ||
| 97 | unix_$main(main); /* no return */ | ||
| 98 | } | ||
| 99 | #endif /* APOLLO */ | ||
| 100 | |||
| 101 | #if defined(orion) || defined(pyramid) || defined(celerity) || defined(ALLIANT) || defined(clipper) || defined(sps7) | ||
| 102 | |||
| 103 | #if defined(sps7) && defined(V3x) | ||
| 104 | asm(" section 10"); | ||
| 105 | asm(" ds.b 0xb0"); | ||
| 106 | #endif | ||
| 107 | |||
| 108 | #ifdef ALLIANT | ||
| 109 | /* _start must initialize _curbrk and _minbrk on the first startup; | ||
| 110 | when starting up after dumping, it must initialize them to what they were | ||
| 111 | before the dumping, since they are in the shared library and | ||
| 112 | are not dumped. See ADJUST_EXEC_HEADER in m-alliant.h. */ | ||
| 113 | extern unsigned char *_curbrk, *_minbrk; | ||
| 114 | extern unsigned char end; | ||
| 115 | unsigned char *_setbrk = &end; | ||
| 116 | #ifdef ALLIANT_2800 | ||
| 117 | unsigned char *_end = &end; | ||
| 118 | #endif | ||
| 119 | #endif | ||
| 120 | |||
| 121 | #ifndef DUMMIES | ||
| 122 | #define DUMMIES | ||
| 123 | #endif | ||
| 124 | |||
| 125 | _start (DUMMIES argc, argv, envp) | ||
| 126 | int argc; | ||
| 127 | char **argv, **envp; | ||
| 128 | { | ||
| 129 | #ifdef ALLIANT | ||
| 130 | #ifdef ALLIANT_2800 | ||
| 131 | _curbrk = _end; | ||
| 132 | _minbrk = _end; | ||
| 133 | #else | ||
| 134 | _curbrk = _setbrk; | ||
| 135 | _minbrk = _setbrk; | ||
| 136 | #endif | ||
| 137 | #endif | ||
| 138 | |||
| 139 | environ = envp; | ||
| 140 | |||
| 141 | exit (main (argc, argv, envp)); | ||
| 142 | } | ||
| 143 | |||
| 144 | #endif /* orion or pyramid or celerity or alliant or clipper */ | ||
| 145 | |||
| 146 | #if defined (ns16000) && !defined (sequent) && !defined (UMAX) && !defined (CRT0_DUMMIES) | ||
| 147 | |||
| 148 | _start () | ||
| 149 | { | ||
| 150 | /* On 16000, _start pushes fp onto stack */ | ||
| 151 | start1 (); | ||
| 152 | } | ||
| 153 | |||
| 154 | /* ignore takes care of skipping the fp value pushed in start. */ | ||
| 155 | static | ||
| 156 | start1 (ignore, argc, argv) | ||
| 157 | int ignore; | ||
| 158 | int argc; | ||
| 159 | register char **argv; | ||
| 160 | { | ||
| 161 | environ = argv + argc + 1; | ||
| 162 | |||
| 163 | if (environ == *argv) | ||
| 164 | environ--; | ||
| 165 | exit (main (argc, argv, environ)); | ||
| 166 | } | ||
| 167 | #endif /* ns16000, not sequent and not UMAX, and not the CRT0_DUMMIES method */ | ||
| 168 | |||
| 169 | #ifdef UMAX | ||
| 170 | _start() | ||
| 171 | { | ||
| 172 | asm(" exit [] # undo enter"); | ||
| 173 | asm(" .set exitsc,1"); | ||
| 174 | asm(" .set sigcatchall,0x400"); | ||
| 175 | |||
| 176 | asm(" .globl _exit"); | ||
| 177 | asm(" .globl start"); | ||
| 178 | asm(" .globl __start"); | ||
| 179 | asm(" .globl _main"); | ||
| 180 | asm(" .globl _environ"); | ||
| 181 | asm(" .globl _sigvec"); | ||
| 182 | asm(" .globl sigentry"); | ||
| 183 | |||
| 184 | asm("start:"); | ||
| 185 | asm(" br .xstart"); | ||
| 186 | asm(" .org 0x20"); | ||
| 187 | asm(" .double p_glbl,0,0xf00000,0"); | ||
| 188 | asm(" .org 0x30"); | ||
| 189 | asm(".xstart:"); | ||
| 190 | asm(" adjspb $8"); | ||
| 191 | asm(" movd 8(sp),0(sp) # argc"); | ||
| 192 | asm(" addr 12(sp),r0"); | ||
| 193 | asm(" movd r0,4(sp) # argv"); | ||
| 194 | asm("L1:"); | ||
| 195 | asm(" movd r0,r1"); | ||
| 196 | asm(" addqd $4,r0"); | ||
| 197 | asm(" cmpqd $0,0(r1) # null args term ?"); | ||
| 198 | asm(" bne L1"); | ||
| 199 | asm(" cmpd r0,0(4(sp)) # end of 'env' or 'argv' ?"); | ||
| 200 | asm(" blt L2"); | ||
| 201 | asm(" addqd $-4,r0 # envp's are in list"); | ||
| 202 | asm("L2:"); | ||
| 203 | asm(" movd r0,8(sp) # env"); | ||
| 204 | asm(" movd r0,@_environ # indir is 0 if no env ; not 0 if env"); | ||
| 205 | asm(" movqd $0,tos # setup intermediate signal handler"); | ||
| 206 | asm(" addr @sv,tos"); | ||
| 207 | asm(" movzwd $sigcatchall,tos"); | ||
| 208 | asm(" jsr @_sigvec"); | ||
| 209 | asm(" adjspb $-12"); | ||
| 210 | asm(" jsr @_main"); | ||
| 211 | asm(" adjspb $-12"); | ||
| 212 | asm(" movd r0,tos"); | ||
| 213 | asm(" jsr @_exit"); | ||
| 214 | asm(" adjspb $-4"); | ||
| 215 | asm(" addr @exitsc,r0"); | ||
| 216 | asm(" svc"); | ||
| 217 | asm(" .align 4 # sigvec arg"); | ||
| 218 | asm("sv:"); | ||
| 219 | asm(" .double sigentry"); | ||
| 220 | asm(" .double 0"); | ||
| 221 | asm(" .double 0"); | ||
| 222 | |||
| 223 | asm(" .comm p_glbl,1"); | ||
| 224 | } | ||
| 225 | #endif /* UMAX */ | ||
| 226 | |||
| 227 | #ifdef CRT0_DUMMIES | 87 | #ifdef CRT0_DUMMIES |
| 228 | 88 | ||
| 229 | /* Define symbol "start": here; some systems want that symbol. */ | 89 | /* Define symbol "start": here; some systems want that symbol. */ |
| @@ -295,21 +155,10 @@ start1 (CRT0_DUMMIES argc, xargv) | |||
| 295 | asm (" global _start"); | 155 | asm (" global _start"); |
| 296 | asm (" text"); | 156 | asm (" text"); |
| 297 | asm ("_start:"); | 157 | asm ("_start:"); |
| 298 | #ifndef NU | ||
| 299 | #ifdef STRIDE | ||
| 300 | asm (" comm havefpu%,2"); | ||
| 301 | #else /* m68k, not STRIDE */ | ||
| 302 | asm (" comm splimit%,4"); | 158 | asm (" comm splimit%,4"); |
| 303 | #endif /* STRIDE */ | ||
| 304 | asm (" global exit"); | 159 | asm (" global exit"); |
| 305 | asm (" text"); | 160 | asm (" text"); |
| 306 | #ifdef STRIDE | ||
| 307 | asm (" trap &3"); | ||
| 308 | asm (" mov.w %d0,havefpu%"); | ||
| 309 | #else /* m68k, not STRIDE */ | ||
| 310 | asm (" mov.l %d0,splimit%"); | 161 | asm (" mov.l %d0,splimit%"); |
| 311 | #endif /* STRIDE */ | ||
| 312 | #endif /* not NU */ | ||
| 313 | asm (" jsr start1"); | 162 | asm (" jsr start1"); |
| 314 | asm (" mov.l %d0,(%sp)"); | 163 | asm (" mov.l %d0,(%sp)"); |
| 315 | asm (" jsr exit"); | 164 | asm (" jsr exit"); |
| @@ -319,32 +168,6 @@ start1 (CRT0_DUMMIES argc, xargv) | |||
| 319 | 168 | ||
| 320 | #ifdef m68000 | 169 | #ifdef m68000 |
| 321 | 170 | ||
| 322 | #ifdef ISI68K | ||
| 323 | /* Added by ESM Sun May 24 12:44:02 1987 to get new ISI library to work */ | ||
| 324 | /* Edited by Ray Mon May 15 15:59:56 EST 1989 so we can compile with gcc */ | ||
| 325 | #if defined(BSD4_3) && !defined(__GNUC__) | ||
| 326 | static foo () { | ||
| 327 | #endif | ||
| 328 | asm (" .globl is68020"); | ||
| 329 | asm ("is68020:"); | ||
| 330 | #ifndef BSD4_3 | ||
| 331 | asm (" .long 0x00000000"); | ||
| 332 | asm (" .long 0xffffffff"); | ||
| 333 | /* End of stuff added by ESM */ | ||
| 334 | #endif | ||
| 335 | asm (" .text"); | ||
| 336 | asm (" .globl __start"); | ||
| 337 | asm ("__start:"); | ||
| 338 | asm (" .word 0"); | ||
| 339 | asm (" link a6,#0"); | ||
| 340 | asm (" jbsr _start1"); | ||
| 341 | asm (" unlk a6"); | ||
| 342 | asm (" rts"); | ||
| 343 | #if defined(BSD4_3) && !defined(__GNUC__) | ||
| 344 | } | ||
| 345 | #endif | ||
| 346 | #else /* not ISI68K */ | ||
| 347 | |||
| 348 | _start () | 171 | _start () |
| 349 | { | 172 | { |
| 350 | #ifdef sun | 173 | #ifdef sun |
| @@ -353,7 +176,6 @@ _start () | |||
| 353 | /* On 68000, _start pushes a6 onto stack */ | 176 | /* On 68000, _start pushes a6 onto stack */ |
| 354 | start1 (); | 177 | start1 (); |
| 355 | } | 178 | } |
| 356 | #endif /* not ISI68k */ | ||
| 357 | #endif /* m68000 */ | 179 | #endif /* m68000 */ |
| 358 | #endif /* m68k */ | 180 | #endif /* m68k */ |
| 359 | 181 | ||
| @@ -373,15 +195,6 @@ start1 (ignore, argc, xargv) | |||
| 373 | 195 | ||
| 374 | if ((char *)environ == xargv) | 196 | if ((char *)environ == xargv) |
| 375 | environ--; | 197 | environ--; |
| 376 | #ifdef sun_68881 | ||
| 377 | asm(" jsr f68881_used"); | ||
| 378 | #endif | ||
| 379 | #ifdef sun_fpa | ||
| 380 | asm(" jsr ffpa_used"); | ||
| 381 | #endif | ||
| 382 | #ifdef sun_soft | ||
| 383 | asm(" jsr start_float"); | ||
| 384 | #endif | ||
| 385 | exit (main (argc, argv, environ)); | 198 | exit (main (argc, argv, environ)); |
| 386 | } | 199 | } |
| 387 | 200 | ||
| @@ -503,85 +316,6 @@ char **argv_value; | |||
| 503 | #endif /* new hp assembler */ | 316 | #endif /* new hp assembler */ |
| 504 | #endif /* hp9000s300 */ | 317 | #endif /* hp9000s300 */ |
| 505 | 318 | ||
| 506 | #ifdef GOULD | ||
| 507 | |||
| 508 | /* startup code has to be in near text rather | ||
| 509 | than fartext as allocated by the C compiler. */ | ||
| 510 | asm(" .text"); | ||
| 511 | asm(" .align 2"); | ||
| 512 | asm(" .globl __start"); | ||
| 513 | asm(" .text"); | ||
| 514 | asm("__start:"); | ||
| 515 | /* setup base register b1 (function base). */ | ||
| 516 | asm(" .using b1,."); | ||
| 517 | asm(" tpcbr b1"); | ||
| 518 | /* setup base registers b3 through b7 (data references). */ | ||
| 519 | asm(" file basevals,b3"); | ||
| 520 | /* setup base register b2 (stack pointer); it should be | ||
| 521 | aligned on a 8-word boundary; but because it is pointing | ||
| 522 | to argc, its value should be remembered (in r5). */ | ||
| 523 | asm(" movw b2,r4"); | ||
| 524 | asm(" movw b2,r5"); | ||
| 525 | asm(" andw #~0x1f,r4"); | ||
| 526 | asm(" movw r4,b2"); | ||
| 527 | /* allocate stack frame to do some work. */ | ||
| 528 | asm(" subea 16w,b2"); | ||
| 529 | /* initialize signal catching for UTX/32 1.2; this is | ||
| 530 | necessary to make restart from saved image work. */ | ||
| 531 | asm(" movea sigcatch,r1"); | ||
| 532 | asm(" movw r1,8w[b2]"); | ||
| 533 | asm(" svc #1,#150"); | ||
| 534 | /* setup address of argc for start1. */ | ||
| 535 | asm(" movw r5,8w[b2]"); | ||
| 536 | asm(" func #1,_start1"); | ||
| 537 | asm(" halt"); | ||
| 538 | /* space for ld to store base register initial values. */ | ||
| 539 | asm(" .align 5"); | ||
| 540 | asm("basevals:"); | ||
| 541 | asm(" .word __base3,__base4,__base5,__base6,__base7"); | ||
| 542 | |||
| 543 | static | ||
| 544 | start1 (xargc) | ||
| 545 | int *xargc; | ||
| 546 | { | ||
| 547 | register int argc; | ||
| 548 | register char **argv; | ||
| 549 | |||
| 550 | argc = *xargc; | ||
| 551 | argv = (char **)(xargc) + 1; | ||
| 552 | environ = argv + argc + 1; | ||
| 553 | |||
| 554 | if (environ == argv) | ||
| 555 | environ--; | ||
| 556 | exit (main (argc, argv, environ)); | ||
| 557 | |||
| 558 | } | ||
| 559 | |||
| 560 | #endif /* GOULD */ | ||
| 561 | |||
| 562 | #ifdef elxsi | ||
| 563 | #include <elxsi/argvcache.h> | ||
| 564 | |||
| 565 | extern char **environ; | ||
| 566 | extern int errno; | ||
| 567 | extern void _init_doscan(), _init_iob(); | ||
| 568 | extern char end[]; | ||
| 569 | char *_init_brk = end; | ||
| 570 | |||
| 571 | _start() | ||
| 572 | { | ||
| 573 | environ = exec_cache.ac_envp; | ||
| 574 | brk (_init_brk); | ||
| 575 | errno = 0; | ||
| 576 | _init_doscan (); | ||
| 577 | _init_iob (); | ||
| 578 | _exit (exit (main (exec_cache.ac_argc, | ||
| 579 | exec_cache.ac_argv, | ||
| 580 | exec_cache.ac_envp))); | ||
| 581 | } | ||
| 582 | #endif /* elxsi */ | ||
| 583 | |||
| 584 | |||
| 585 | #ifdef sparc | 319 | #ifdef sparc |
| 586 | asm (".global __start"); | 320 | asm (".global __start"); |
| 587 | asm (".text"); | 321 | asm (".text"); |
diff --git a/src/emacs.c b/src/emacs.c index 1d6fb90fdb5..839582a3bf3 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1364,9 +1364,7 @@ main (argc, argv | |||
| 1364 | #ifdef CLASH_DETECTION | 1364 | #ifdef CLASH_DETECTION |
| 1365 | init_filelock (); | 1365 | init_filelock (); |
| 1366 | #endif | 1366 | #endif |
| 1367 | #ifndef MAC_OS8 | ||
| 1368 | init_atimer (); | 1367 | init_atimer (); |
| 1369 | #endif | ||
| 1370 | running_asynch_code = 0; | 1368 | running_asynch_code = 0; |
| 1371 | 1369 | ||
| 1372 | /* Handle --unibyte and the EMACS_UNIBYTE envvar, | 1370 | /* Handle --unibyte and the EMACS_UNIBYTE envvar, |
| @@ -1559,7 +1557,6 @@ main (argc, argv | |||
| 1559 | /* The basic levels of Lisp must come first. */ | 1557 | /* The basic levels of Lisp must come first. */ |
| 1560 | /* And data must come first of all | 1558 | /* And data must come first of all |
| 1561 | for the sake of symbols like error-message. */ | 1559 | for the sake of symbols like error-message. */ |
| 1562 | #ifndef MAC_OS8 | ||
| 1563 | /* Called before init_window_once for Mac OS Classic. */ | 1560 | /* Called before init_window_once for Mac OS Classic. */ |
| 1564 | syms_of_data (); | 1561 | syms_of_data (); |
| 1565 | #endif | 1562 | #endif |
| @@ -1577,8 +1574,6 @@ main (argc, argv | |||
| 1577 | syms_of_casetab (); | 1574 | syms_of_casetab (); |
| 1578 | syms_of_callproc (); | 1575 | syms_of_callproc (); |
| 1579 | syms_of_category (); | 1576 | syms_of_category (); |
| 1580 | #ifndef MAC_OS8 | ||
| 1581 | /* Called before init_window_once for Mac OS Classic. */ | ||
| 1582 | syms_of_ccl (); | 1577 | syms_of_ccl (); |
| 1583 | #endif | 1578 | #endif |
| 1584 | syms_of_character (); | 1579 | syms_of_character (); |
| @@ -1600,11 +1595,8 @@ main (argc, argv | |||
| 1600 | syms_of_marker (); | 1595 | syms_of_marker (); |
| 1601 | syms_of_minibuf (); | 1596 | syms_of_minibuf (); |
| 1602 | syms_of_process (); | 1597 | syms_of_process (); |
| 1603 | #ifndef MAC_OS8 | ||
| 1604 | /* Called before init_window_once for Mac OS Classic. */ | ||
| 1605 | syms_of_search (); | 1598 | syms_of_search (); |
| 1606 | syms_of_frame (); | 1599 | syms_of_frame (); |
| 1607 | #endif | ||
| 1608 | syms_of_syntax (); | 1600 | syms_of_syntax (); |
| 1609 | syms_of_terminal (); | 1601 | syms_of_terminal (); |
| 1610 | syms_of_term (); | 1602 | syms_of_term (); |
| @@ -1612,10 +1604,7 @@ main (argc, argv | |||
| 1612 | #ifdef HAVE_SOUND | 1604 | #ifdef HAVE_SOUND |
| 1613 | syms_of_sound (); | 1605 | syms_of_sound (); |
| 1614 | #endif | 1606 | #endif |
| 1615 | #ifndef MAC_OS8 | ||
| 1616 | /* Called before init_window_once for Mac OS Classic. */ | ||
| 1617 | syms_of_textprop (); | 1607 | syms_of_textprop (); |
| 1618 | #endif | ||
| 1619 | syms_of_composite (); | 1608 | syms_of_composite (); |
| 1620 | #ifdef VMS | 1609 | #ifdef VMS |
| 1621 | syms_of_vmsproc (); | 1610 | syms_of_vmsproc (); |
| @@ -1700,10 +1689,7 @@ main (argc, argv | |||
| 1700 | 1689 | ||
| 1701 | init_editfns (); /* init_process uses Voperating_system_release. */ | 1690 | init_editfns (); /* init_process uses Voperating_system_release. */ |
| 1702 | init_process (); /* init_display uses add_keyboard_wait_descriptor. */ | 1691 | init_process (); /* init_display uses add_keyboard_wait_descriptor. */ |
| 1703 | #ifndef MAC_OS8 | ||
| 1704 | /* Called before init_window_once for Mac OS Classic. */ | ||
| 1705 | init_keyboard (); /* This too must precede init_sys_modes. */ | 1692 | init_keyboard (); /* This too must precede init_sys_modes. */ |
| 1706 | #endif | ||
| 1707 | #ifdef VMS | 1693 | #ifdef VMS |
| 1708 | init_vmsproc (); /* And this too. */ | 1694 | init_vmsproc (); /* And this too. */ |
| 1709 | #endif /* VMS */ | 1695 | #endif /* VMS */ |
diff --git a/src/fileio.c b/src/fileio.c index 873d5d41d22..26020732160 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -68,10 +68,6 @@ extern int errno; | |||
| 68 | #endif | 68 | #endif |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | #ifdef APOLLO | ||
| 72 | #include <sys/time.h> | ||
| 73 | #endif | ||
| 74 | |||
| 75 | #include "lisp.h" | 71 | #include "lisp.h" |
| 76 | #include "intervals.h" | 72 | #include "intervals.h" |
| 77 | #include "buffer.h" | 73 | #include "buffer.h" |
| @@ -814,12 +810,6 @@ directory_file_name (src, dst) | |||
| 814 | /* Process as Unix format: just remove any final slash. | 810 | /* Process as Unix format: just remove any final slash. |
| 815 | But leave "/" unchanged; do not change it to "". */ | 811 | But leave "/" unchanged; do not change it to "". */ |
| 816 | strcpy (dst, src); | 812 | strcpy (dst, src); |
| 817 | #ifdef APOLLO | ||
| 818 | /* Handle // as root for apollo's. */ | ||
| 819 | if ((slen > 2 && dst[slen - 1] == '/') | ||
| 820 | || (slen > 1 && dst[0] != '/' && dst[slen - 1] == '/')) | ||
| 821 | dst[slen - 1] = 0; | ||
| 822 | #else | ||
| 823 | if (slen > 1 | 813 | if (slen > 1 |
| 824 | && IS_DIRECTORY_SEP (dst[slen - 1]) | 814 | && IS_DIRECTORY_SEP (dst[slen - 1]) |
| 825 | #ifdef DOS_NT | 815 | #ifdef DOS_NT |
| @@ -827,7 +817,6 @@ directory_file_name (src, dst) | |||
| 827 | #endif | 817 | #endif |
| 828 | ) | 818 | ) |
| 829 | dst[slen - 1] = 0; | 819 | dst[slen - 1] = 0; |
| 830 | #endif | ||
| 831 | #ifdef DOS_NT | 820 | #ifdef DOS_NT |
| 832 | CORRECT_DIR_SEPS (dst); | 821 | CORRECT_DIR_SEPS (dst); |
| 833 | #endif | 822 | #endif |
| @@ -1802,10 +1791,6 @@ See also the function `substitute-in-file-name'.") | |||
| 1802 | while (*p) | 1791 | while (*p) |
| 1803 | { | 1792 | { |
| 1804 | if (p[0] == '/' && p[1] == '/' | 1793 | if (p[0] == '/' && p[1] == '/' |
| 1805 | #ifdef APOLLO | ||
| 1806 | /* // at start of filename is meaningful on Apollo system. */ | ||
| 1807 | && nm != p | ||
| 1808 | #endif /* APOLLO */ | ||
| 1809 | ) | 1794 | ) |
| 1810 | nm = p + 1; | 1795 | nm = p + 1; |
| 1811 | if (p[0] == '/' && p[1] == '~') | 1796 | if (p[0] == '/' && p[1] == '~') |
| @@ -2037,10 +2022,6 @@ See also the function `substitute-in-file-name'.") | |||
| 2037 | *o++ = *p++; | 2022 | *o++ = *p++; |
| 2038 | } | 2023 | } |
| 2039 | else if (!strncmp (p, "//", 2) | 2024 | else if (!strncmp (p, "//", 2) |
| 2040 | #ifdef APOLLO | ||
| 2041 | /* // at start of filename is meaningful in Apollo system. */ | ||
| 2042 | && o != target | ||
| 2043 | #endif /* APOLLO */ | ||
| 2044 | ) | 2025 | ) |
| 2045 | { | 2026 | { |
| 2046 | o = target; | 2027 | o = target; |
| @@ -2056,11 +2037,6 @@ See also the function `substitute-in-file-name'.") | |||
| 2056 | { | 2037 | { |
| 2057 | while (o != target && *--o != '/') | 2038 | while (o != target && *--o != '/') |
| 2058 | ; | 2039 | ; |
| 2059 | #ifdef APOLLO | ||
| 2060 | if (o == target + 1 && o[-1] == '/' && o[0] == '/') | ||
| 2061 | ++o; | ||
| 2062 | else | ||
| 2063 | #endif /* APOLLO */ | ||
| 2064 | if (o == target && *o == '/') | 2040 | if (o == target && *o == '/') |
| 2065 | ++o; | 2041 | ++o; |
| 2066 | p += 3; | 2042 | p += 3; |
| @@ -2111,11 +2087,11 @@ search_embedded_absfilename (nm, endp) | |||
| 2111 | #endif /* VMS */ | 2087 | #endif /* VMS */ |
| 2112 | || IS_DIRECTORY_SEP (p[-1])) | 2088 | || IS_DIRECTORY_SEP (p[-1])) |
| 2113 | && file_name_absolute_p (p) | 2089 | && file_name_absolute_p (p) |
| 2114 | #if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) | 2090 | #if defined (WINDOWSNT) || defined(CYGWIN) |
| 2115 | /* // at start of file name is meaningful in Apollo, | 2091 | /* // at start of file name is meaningful in Apollo, |
| 2116 | WindowsNT and Cygwin systems. */ | 2092 | WindowsNT and Cygwin systems. */ |
| 2117 | && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) | 2093 | && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) |
| 2118 | #endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ | 2094 | #endif /* not (WINDOWSNT || CYGWIN) */ |
| 2119 | ) | 2095 | ) |
| 2120 | { | 2096 | { |
| 2121 | for (s = p; *s && (!IS_DIRECTORY_SEP (*s) | 2097 | for (s = p; *s && (!IS_DIRECTORY_SEP (*s) |
| @@ -3801,12 +3777,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3801 | } | 3777 | } |
| 3802 | if (total < 0) | 3778 | if (total < 0) |
| 3803 | #else | 3779 | #else |
| 3804 | #ifndef APOLLO | ||
| 3805 | if (stat (SDATA (filename), &st) < 0) | 3780 | if (stat (SDATA (filename), &st) < 0) |
| 3806 | #else | ||
| 3807 | if ((fd = emacs_open (SDATA (filename), O_RDONLY, 0)) < 0 | ||
| 3808 | || fstat (fd, &st) < 0) | ||
| 3809 | #endif /* not APOLLO */ | ||
| 3810 | #endif /* WINDOWSNT */ | 3781 | #endif /* WINDOWSNT */ |
| 3811 | { | 3782 | { |
| 3812 | if (fd >= 0) emacs_close (fd); | 3783 | if (fd >= 0) emacs_close (fd); |
| @@ -4652,9 +4623,6 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4652 | { | 4623 | { |
| 4653 | if (!EQ (current_buffer->undo_list, Qt)) | 4624 | if (!EQ (current_buffer->undo_list, Qt)) |
| 4654 | current_buffer->undo_list = Qnil; | 4625 | current_buffer->undo_list = Qnil; |
| 4655 | #ifdef APOLLO | ||
| 4656 | stat (SDATA (filename), &st); | ||
| 4657 | #endif | ||
| 4658 | 4626 | ||
| 4659 | if (NILP (handler)) | 4627 | if (NILP (handler)) |
| 4660 | { | 4628 | { |
| @@ -5330,16 +5298,14 @@ This does code conversion according to the value of | |||
| 5330 | but who knows about all the other machines with NFS?) */ | 5298 | but who knows about all the other machines with NFS?) */ |
| 5331 | #if 0 | 5299 | #if 0 |
| 5332 | 5300 | ||
| 5333 | /* On VMS and APOLLO, must do the stat after the close | 5301 | /* On VMS, must do the stat after the close |
| 5334 | since closing changes the modtime. */ | 5302 | since closing changes the modtime. */ |
| 5335 | #ifndef VMS | 5303 | #ifndef VMS |
| 5336 | #ifndef APOLLO | ||
| 5337 | /* Recall that #if defined does not work on VMS. */ | 5304 | /* Recall that #if defined does not work on VMS. */ |
| 5338 | #define FOO | 5305 | #define FOO |
| 5339 | fstat (desc, &st); | 5306 | fstat (desc, &st); |
| 5340 | #endif | 5307 | #endif |
| 5341 | #endif | 5308 | #endif |
| 5342 | #endif | ||
| 5343 | 5309 | ||
| 5344 | /* NFS can report a write failure now. */ | 5310 | /* NFS can report a write failure now. */ |
| 5345 | if (emacs_close (desc) < 0) | 5311 | if (emacs_close (desc) < 0) |
| @@ -4779,12 +4779,13 @@ DEFUN ("hash-table-p", Fhash_table_p, Shash_table_p, 1, 1, 0, | |||
| 4779 | 4779 | ||
| 4780 | 4780 | ||
| 4781 | DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0, | 4781 | DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0, |
| 4782 | doc: /* Clear hash table TABLE. */) | 4782 | doc: /* Clear hash table TABLE and return it. */) |
| 4783 | (table) | 4783 | (table) |
| 4784 | Lisp_Object table; | 4784 | Lisp_Object table; |
| 4785 | { | 4785 | { |
| 4786 | hash_clear (check_hash_table (table)); | 4786 | hash_clear (check_hash_table (table)); |
| 4787 | return Qnil; | 4787 | /* Be compatible with XEmacs. */ |
| 4788 | return table; | ||
| 4788 | } | 4789 | } |
| 4789 | 4790 | ||
| 4790 | 4791 | ||
| @@ -5200,9 +5201,10 @@ invoked by mouse clicks and mouse menu items. */); | |||
| 5200 | 5201 | ||
| 5201 | DEFVAR_BOOL ("use-file-dialog", &use_file_dialog, | 5202 | DEFVAR_BOOL ("use-file-dialog", &use_file_dialog, |
| 5202 | doc: /* *Non-nil means mouse commands use a file dialog to ask for files. | 5203 | doc: /* *Non-nil means mouse commands use a file dialog to ask for files. |
| 5203 | This applies to commands from menus and tool bar buttons. The value of | 5204 | This applies to commands from menus and tool bar buttons even when |
| 5204 | `use-dialog-box' takes precedence over this variable, so a file dialog is only | 5205 | they are initiated from the keyboard. The value of `use-dialog-box' |
| 5205 | used if both `use-dialog-box' and this variable are non-nil. */); | 5206 | takes precedence over this variable, so a file dialog is only used if |
| 5207 | both `use-dialog-box' and this variable are non-nil. */); | ||
| 5206 | use_file_dialog = 1; | 5208 | use_file_dialog = 1; |
| 5207 | 5209 | ||
| 5208 | defsubr (&Sidentity); | 5210 | defsubr (&Sidentity); |
diff --git a/src/frame.c b/src/frame.c index 0a3a910934f..30c5e5e9d36 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -604,9 +604,6 @@ make_terminal_frame (struct terminal *terminal) | |||
| 604 | else | 604 | else |
| 605 | f->output_method = output_termcap; | 605 | f->output_method = output_termcap; |
| 606 | #else | 606 | #else |
| 607 | #ifdef MAC_OS8 | ||
| 608 | make_mac_terminal_frame (f); | ||
| 609 | #else | ||
| 610 | { | 607 | { |
| 611 | f->output_method = output_termcap; | 608 | f->output_method = output_termcap; |
| 612 | f->terminal = terminal; | 609 | f->terminal = terminal; |
| @@ -631,7 +628,6 @@ make_terminal_frame (struct terminal *terminal) | |||
| 631 | FRAME_FOREGROUND_PIXEL(f) = FACE_TTY_DEFAULT_FG_COLOR; | 628 | FRAME_FOREGROUND_PIXEL(f) = FACE_TTY_DEFAULT_FG_COLOR; |
| 632 | FRAME_BACKGROUND_PIXEL(f) = FACE_TTY_DEFAULT_BG_COLOR; | 629 | FRAME_BACKGROUND_PIXEL(f) = FACE_TTY_DEFAULT_BG_COLOR; |
| 633 | #endif | 630 | #endif |
| 634 | #endif /* MAC_OS8 */ | ||
| 635 | #endif /* MSDOS */ | 631 | #endif /* MSDOS */ |
| 636 | 632 | ||
| 637 | if (!noninteractive) | 633 | if (!noninteractive) |
| @@ -698,7 +694,7 @@ affects all frames on the same terminal device. */) | |||
| 698 | abort (); | 694 | abort (); |
| 699 | #else /* not MSDOS */ | 695 | #else /* not MSDOS */ |
| 700 | 696 | ||
| 701 | #if 0 /* #ifdef MAC_OS8 */ | 697 | #if 0 |
| 702 | /* This can happen for multi-tty when using both terminal frames and | 698 | /* This can happen for multi-tty when using both terminal frames and |
| 703 | Carbon frames. */ | 699 | Carbon frames. */ |
| 704 | if (sf->output_method != output_mac) | 700 | if (sf->output_method != output_mac) |
| @@ -1370,13 +1366,7 @@ The functions are run with one arg, the frame to be deleted. */) | |||
| 1370 | if (! FRAME_LIVE_P (f)) | 1366 | if (! FRAME_LIVE_P (f)) |
| 1371 | return Qnil; | 1367 | return Qnil; |
| 1372 | 1368 | ||
| 1373 | if (NILP (force) && !other_visible_frames (f) | 1369 | if (NILP (force) && !other_visible_frames (f)) |
| 1374 | #ifdef MAC_OS8 | ||
| 1375 | /* Terminal frame deleted before any other visible frames are | ||
| 1376 | created. */ | ||
| 1377 | && strcmp (SDATA (f->name), "F1") != 0 | ||
| 1378 | #endif | ||
| 1379 | ) | ||
| 1380 | error ("Attempt to delete the sole visible or iconified frame"); | 1370 | error ("Attempt to delete the sole visible or iconified frame"); |
| 1381 | 1371 | ||
| 1382 | #if 0 | 1372 | #if 0 |
diff --git a/src/getpagesize.h b/src/getpagesize.h index 5c3180dc36e..ab54062f912 100644 --- a/src/getpagesize.h +++ b/src/getpagesize.h | |||
| @@ -43,13 +43,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 43 | # define CLSIZE 1 | 43 | # define CLSIZE 1 |
| 44 | # endif /* no CLSIZE */ | 44 | # endif /* no CLSIZE */ |
| 45 | # else /* no NBPG */ | 45 | # else /* no NBPG */ |
| 46 | # ifdef NBPC | ||
| 47 | # define getpagesize() NBPC | ||
| 48 | # else /* no NBPC */ | ||
| 49 | # ifdef PAGESIZE | 46 | # ifdef PAGESIZE |
| 50 | # define getpagesize() PAGESIZE | 47 | # define getpagesize() PAGESIZE |
| 51 | # endif /* PAGESIZE */ | 48 | # endif /* PAGESIZE */ |
| 52 | # endif /* no NBPC */ | ||
| 53 | # endif /* no NBPG */ | 49 | # endif /* no NBPG */ |
| 54 | # endif /* no EXEC_PAGESIZE */ | 50 | # endif /* no EXEC_PAGESIZE */ |
| 55 | # else /* no HAVE_SYS_PARAM_H */ | 51 | # else /* no HAVE_SYS_PARAM_H */ |
diff --git a/src/keyboard.c b/src/keyboard.c index a88298dabcf..0f7a49d3832 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -95,18 +95,7 @@ volatile int interrupt_input_blocked; | |||
| 95 | during the current critical section. */ | 95 | during the current critical section. */ |
| 96 | int interrupt_input_pending; | 96 | int interrupt_input_pending; |
| 97 | 97 | ||
| 98 | |||
| 99 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 100 | /* Make all keyboard buffers much bigger when using X windows. */ | ||
| 101 | #ifdef MAC_OS8 | ||
| 102 | /* But not too big (local data > 32K error) if on Mac OS Classic. */ | ||
| 103 | #define KBD_BUFFER_SIZE 512 | ||
| 104 | #else | ||
| 105 | #define KBD_BUFFER_SIZE 4096 | ||
| 106 | #endif | ||
| 107 | #else /* No X-windows, character input */ | ||
| 108 | #define KBD_BUFFER_SIZE 4096 | 98 | #define KBD_BUFFER_SIZE 4096 |
| 109 | #endif /* No X-windows */ | ||
| 110 | 99 | ||
| 111 | #ifdef MULTI_KBOARD | 100 | #ifdef MULTI_KBOARD |
| 112 | KBOARD *initial_kboard; | 101 | KBOARD *initial_kboard; |
| @@ -2715,6 +2704,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 2715 | /* if redisplay was requested */ | 2704 | /* if redisplay was requested */ |
| 2716 | if (commandflag >= 0) | 2705 | if (commandflag >= 0) |
| 2717 | { | 2706 | { |
| 2707 | int echo_current = EQ (echo_message_buffer, echo_area_buffer[0]); | ||
| 2708 | |||
| 2718 | /* If there is pending input, process any events which are not | 2709 | /* If there is pending input, process any events which are not |
| 2719 | user-visible, such as X selection_request events. */ | 2710 | user-visible, such as X selection_request events. */ |
| 2720 | if (input_pending | 2711 | if (input_pending |
| @@ -2738,6 +2729,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 2738 | swallow_events (0); | 2729 | swallow_events (0); |
| 2739 | /* If that cleared input_pending, try again to redisplay. */ | 2730 | /* If that cleared input_pending, try again to redisplay. */ |
| 2740 | } | 2731 | } |
| 2732 | |||
| 2733 | /* Prevent the redisplay we just did | ||
| 2734 | from messing up echoing of the input after the prompt. */ | ||
| 2735 | if (commandflag == 0 && echo_current) | ||
| 2736 | echo_message_buffer = echo_area_buffer[0]; | ||
| 2737 | |||
| 2741 | } | 2738 | } |
| 2742 | 2739 | ||
| 2743 | /* Message turns off echoing unless more keystrokes turn it on again. | 2740 | /* Message turns off echoing unless more keystrokes turn it on again. |
| @@ -7234,7 +7231,7 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7234 | if (n_to_read > sizeof cbuf) | 7231 | if (n_to_read > sizeof cbuf) |
| 7235 | n_to_read = sizeof cbuf; | 7232 | n_to_read = sizeof cbuf; |
| 7236 | #else /* no FIONREAD */ | 7233 | #else /* no FIONREAD */ |
| 7237 | #if defined (USG) || defined (DGUX) || defined(CYGWIN) | 7234 | #if defined (USG) || defined(CYGWIN) |
| 7238 | /* Read some input if available, but don't wait. */ | 7235 | /* Read some input if available, but don't wait. */ |
| 7239 | n_to_read = sizeof cbuf; | 7236 | n_to_read = sizeof cbuf; |
| 7240 | fcntl (fileno (tty->input), F_SETFL, O_NDELAY); | 7237 | fcntl (fileno (tty->input), F_SETFL, O_NDELAY); |
| @@ -7284,9 +7281,9 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7284 | ); | 7281 | ); |
| 7285 | 7282 | ||
| 7286 | #ifndef FIONREAD | 7283 | #ifndef FIONREAD |
| 7287 | #if defined (USG) || defined (DGUX) || defined (CYGWIN) | 7284 | #if defined (USG) || defined (CYGWIN) |
| 7288 | fcntl (fileno (tty->input), F_SETFL, 0); | 7285 | fcntl (fileno (tty->input), F_SETFL, 0); |
| 7289 | #endif /* USG or DGUX or CYGWIN */ | 7286 | #endif /* USG or CYGWIN */ |
| 7290 | #endif /* no FIONREAD */ | 7287 | #endif /* no FIONREAD */ |
| 7291 | 7288 | ||
| 7292 | if (nread <= 0) | 7289 | if (nread <= 0) |
diff --git a/src/lisp.h b/src/lisp.h index f3cdd1a26a7..284ee0b2b25 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1413,7 +1413,7 @@ typedef unsigned char UCHAR; | |||
| 1413 | All callers should assure that at least this size of memory is | 1413 | All callers should assure that at least this size of memory is |
| 1414 | allocated at the place pointed by the second argument. | 1414 | allocated at the place pointed by the second argument. |
| 1415 | 1415 | ||
| 1416 | Thers are 6 modifiers, each consumes 2 chars. | 1416 | There are 6 modifiers, each consumes 2 chars. |
| 1417 | The octal form of a character code consumes | 1417 | The octal form of a character code consumes |
| 1418 | (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head). | 1418 | (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head). |
| 1419 | We need one more byte for string terminator `\0'. */ | 1419 | We need one more byte for string terminator `\0'. */ |
diff --git a/src/lread.c b/src/lread.c index 7b43dedecfb..24805abb4eb 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1336,9 +1336,6 @@ complete_filename_p (pathname) | |||
| 1336 | return (IS_DIRECTORY_SEP (s[0]) | 1336 | return (IS_DIRECTORY_SEP (s[0]) |
| 1337 | || (SCHARS (pathname) > 2 | 1337 | || (SCHARS (pathname) > 2 |
| 1338 | && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2])) | 1338 | && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2])) |
| 1339 | #ifdef ALTOS | ||
| 1340 | || *s == '@' | ||
| 1341 | #endif | ||
| 1342 | #ifdef VMS | 1339 | #ifdef VMS |
| 1343 | || index (s, ':') | 1340 | || index (s, ':') |
| 1344 | #endif /* VMS */ | 1341 | #endif /* VMS */ |
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index 37ae8ebb148..cdf8599e9b6 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h | |||
| @@ -146,7 +146,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 146 | #else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !sun */ | 146 | #else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !sun */ |
| 147 | 147 | ||
| 148 | #undef START_FILES | 148 | #undef START_FILES |
| 149 | #ifdef HAVE_X86_64_LIB64_DIR | 149 | #ifdef HAVE_LIB64_DIR |
| 150 | #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o | 150 | #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o |
| 151 | #else | 151 | #else |
| 152 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o | 152 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o |
| @@ -158,7 +158,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 158 | versions of ld are one-pass linkers, we need to mention -lgcc twice, | 158 | versions of ld are one-pass linkers, we need to mention -lgcc twice, |
| 159 | or else we risk getting unresolved externals. */ | 159 | or else we risk getting unresolved externals. */ |
| 160 | #undef LIB_STANDARD | 160 | #undef LIB_STANDARD |
| 161 | #ifdef HAVE_X86_64_LIB64_DIR | 161 | #ifdef HAVE_LIB64_DIR |
| 162 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o | 162 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o |
| 163 | #else | 163 | #else |
| 164 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o | 164 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index 7c0c577523e..443357966b6 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -152,10 +152,18 @@ NOTE-END */ | |||
| 152 | #define XPNTR(a) XUINT (a) | 152 | #define XPNTR(a) XUINT (a) |
| 153 | 153 | ||
| 154 | #undef START_FILES | 154 | #undef START_FILES |
| 155 | #ifdef HAVE_LIB64_DIR | ||
| 155 | #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o | 156 | #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o |
| 157 | #else | ||
| 158 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o | ||
| 159 | #endif | ||
| 156 | 160 | ||
| 157 | #undef LIB_STANDARD | 161 | #undef LIB_STANDARD |
| 162 | #ifdef HAVE_LIB64_DIR | ||
| 158 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o | 163 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o |
| 164 | #else | ||
| 165 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o | ||
| 166 | #endif | ||
| 159 | 167 | ||
| 160 | /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 | 168 | /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 |
| 161 | (do not change this comment) */ | 169 | (do not change this comment) */ |
diff --git a/src/m/intel386.h b/src/m/intel386.h index 6ea2bbc60c6..680a2cc106d 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h | |||
| @@ -85,17 +85,6 @@ NOTE-END */ | |||
| 85 | 85 | ||
| 86 | #define DOT_GLOBAL_START | 86 | #define DOT_GLOBAL_START |
| 87 | 87 | ||
| 88 | #ifdef XENIX | ||
| 89 | /* Data type of load average, as read out of kmem. */ | ||
| 90 | #define LOAD_AVE_TYPE short | ||
| 91 | |||
| 92 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | ||
| 93 | #define LOAD_AVE_CVT(x) (((double) (x)) * 100.0 / FSCALE) | ||
| 94 | |||
| 95 | #define FSCALE 256.0 /* determined by experimentation... */ | ||
| 96 | #endif | ||
| 97 | |||
| 98 | |||
| 99 | #ifdef SOLARIS2 | 88 | #ifdef SOLARIS2 |
| 100 | /* Data type of load average, as read out of kmem. */ | 89 | /* Data type of load average, as read out of kmem. */ |
| 101 | #define LOAD_AVE_TYPE long | 90 | #define LOAD_AVE_TYPE long |
| @@ -153,28 +142,6 @@ NOTE-END */ | |||
| 153 | 142 | ||
| 154 | /* #define VIRT_ADDR_VARIES */ | 143 | /* #define VIRT_ADDR_VARIES */ |
| 155 | 144 | ||
| 156 | #ifdef XENIX | ||
| 157 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 158 | to change the boundary between the text section and data section | ||
| 159 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 160 | code will not be sharable; but that's better than failing completely. */ | ||
| 161 | |||
| 162 | #define NO_REMAP | ||
| 163 | |||
| 164 | /* Since cannot purify, use standard Xenix 386 startup code. */ | ||
| 165 | |||
| 166 | #define START_FILES /lib/386/Sseg.o pre-crt0.o /lib/386/Scrt0.o | ||
| 167 | |||
| 168 | /* These really use terminfo. */ | ||
| 169 | |||
| 170 | #define LIBS_TERMCAP /lib/386/Slibcurses.a \ | ||
| 171 | /lib/386/Slibtinfo.a /lib/386/Slibx.a | ||
| 172 | |||
| 173 | /* Standard libraries for this machine. Since `-l' doesn't work in `ld'. */ | ||
| 174 | /* '__fltused' is unresolved w/o Slibcfp.a */ | ||
| 175 | #define LIB_STANDARD /lib/386/Slibcfp.a /lib/386/Slibc.a | ||
| 176 | #else /* not XENIX */ | ||
| 177 | |||
| 178 | /* this brings in alloca() if we're using cc */ | 145 | /* this brings in alloca() if we're using cc */ |
| 179 | #ifdef USG | 146 | #ifdef USG |
| 180 | #ifndef LIB_STANDARD | 147 | #ifndef LIB_STANDARD |
| @@ -188,7 +155,6 @@ NOTE-END */ | |||
| 188 | #define NO_REMAP | 155 | #define NO_REMAP |
| 189 | #define TEXT_START 0 | 156 | #define TEXT_START 0 |
| 190 | #endif /* USG */ | 157 | #endif /* USG */ |
| 191 | #endif /* not XENIX */ | ||
| 192 | 158 | ||
| 193 | #ifdef USG5_4 | 159 | #ifdef USG5_4 |
| 194 | #define DATA_SEG_BITS 0x08000000 | 160 | #define DATA_SEG_BITS 0x08000000 |
diff --git a/src/m/mips.h b/src/m/mips.h index 866a2a13742..f1401425603 100644 --- a/src/m/mips.h +++ b/src/m/mips.h | |||
| @@ -130,7 +130,7 @@ NOTE-END */ | |||
| 130 | 130 | ||
| 131 | /* Alter some of the options used when linking. */ | 131 | /* Alter some of the options used when linking. */ |
| 132 | 132 | ||
| 133 | #if !defined(NEWSOS5) && !defined(__linux__) | 133 | #if !defined(__linux__) |
| 134 | #ifdef BSD_SYSTEM | 134 | #ifdef BSD_SYSTEM |
| 135 | 135 | ||
| 136 | /* DECstations don't have this library. | 136 | /* DECstations don't have this library. |
| @@ -161,7 +161,7 @@ NOTE-END */ | |||
| 161 | #endif | 161 | #endif |
| 162 | 162 | ||
| 163 | #endif /* not BSD_SYSTEM */ | 163 | #endif /* not BSD_SYSTEM */ |
| 164 | #endif /* not NEWSOS5 && not __linux__ */ | 164 | #endif /* not __linux__ */ |
| 165 | 165 | ||
| 166 | /* The standard definitions of these macros would work ok, | 166 | /* The standard definitions of these macros would work ok, |
| 167 | but these are faster because the constants are short. */ | 167 | but these are faster because the constants are short. */ |
| @@ -173,7 +173,7 @@ NOTE-END */ | |||
| 173 | ((int)(type) << VALBITS) \ | 173 | ((int)(type) << VALBITS) \ |
| 174 | + (((unsigned) (ptr) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))) | 174 | + (((unsigned) (ptr) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))) |
| 175 | 175 | ||
| 176 | #if !defined (NEWSOS5) && !defined (__linux__) | 176 | #if !defined (__linux__) |
| 177 | #ifdef USG | 177 | #ifdef USG |
| 178 | 178 | ||
| 179 | /* Cancel certain parts of standard sysV support. */ | 179 | /* Cancel certain parts of standard sysV support. */ |
| @@ -213,7 +213,7 @@ NOTE-END */ | |||
| 213 | #undef HAVE_UNION_WAIT | 213 | #undef HAVE_UNION_WAIT |
| 214 | #endif /* BSD_SYSTEM */ | 214 | #endif /* BSD_SYSTEM */ |
| 215 | 215 | ||
| 216 | #endif /* not NEWSOS5 && not __linux__ */ | 216 | #endif /* not __linux__ */ |
| 217 | 217 | ||
| 218 | /* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee | 218 | /* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee |
| 219 | (do not change this comment) */ | 219 | (do not change this comment) */ |
diff --git a/src/m/sequent-ptx.h b/src/m/sequent-ptx.h deleted file mode 100644 index de998e9fa31..00000000000 --- a/src/m/sequent-ptx.h +++ /dev/null | |||
| @@ -1,132 +0,0 @@ | |||
| 1 | /* machine description file for SEQUENT machines running DYNIX/ptx | ||
| 2 | Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, | ||
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 3, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 20 | Boston, MA 02110-1301, USA. */ | ||
| 21 | |||
| 22 | |||
| 23 | /* The following line tells the configuration script what sort of | ||
| 24 | operating system this machine is likely to run. | ||
| 25 | USUAL-OPSYS="ptx" */ | ||
| 26 | |||
| 27 | #include "intel386.h" | ||
| 28 | |||
| 29 | /* Define how to take a char and sign-extend into an int. | ||
| 30 | On machines where char is signed, this is a no-op. */ | ||
| 31 | /* CHECK THIS */ | ||
| 32 | #define SIGN_EXTEND_CHAR(c) (c) | ||
| 33 | |||
| 34 | /* Now define a symbol for the cpu type, if your compiler | ||
| 35 | does not define it automatically: | ||
| 36 | Ones defined so far include vax, m68000, ns16000, pyramid, | ||
| 37 | orion, tahoe, APOLLO and many others. */ | ||
| 38 | |||
| 39 | /* BTW: ptx defines _SEQUENT_, i386 */ | ||
| 40 | |||
| 41 | /* Use type int rather than a union, to represent Lisp_Object */ | ||
| 42 | /* This is desirable for most machines. */ | ||
| 43 | |||
| 44 | #define NO_UNION_TYPE | ||
| 45 | |||
| 46 | /* crt0.c should use the vax-bsd style of entry, with these dummy args. */ | ||
| 47 | /* Already defined. Assume prior definition works for PTX. */ | ||
| 48 | #if 0 | ||
| 49 | #undef CRT0_DUMMIES | ||
| 50 | #define CRT0_DUMMIES dummy1, dummy2, dummy3, | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend | ||
| 54 | the 24-bit bit field into an int. In other words, if bit fields | ||
| 55 | are always unsigned. | ||
| 56 | |||
| 57 | If you use NO_UNION_TYPE, this flag does not matter. */ | ||
| 58 | |||
| 59 | #define EXPLICIT_SIGN_EXTEND | ||
| 60 | |||
| 61 | /* Data type of load average, as read out of kmem. */ | ||
| 62 | |||
| 63 | #undef LOAD_AVE_TYPE | ||
| 64 | #define LOAD_AVE_TYPE unsigned long | ||
| 65 | |||
| 66 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | ||
| 67 | |||
| 68 | #undef FSCALE | ||
| 69 | #define FSCALE 1000.0 | ||
| 70 | #undef LOAD_AVE_CVT | ||
| 71 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | ||
| 72 | |||
| 73 | /* Define CANNOT_DUMP on machines where unexec does not work. | ||
| 74 | Then the function dump-emacs will not be defined | ||
| 75 | and temacs will do (load "loadup") automatically unless told otherwise. */ | ||
| 76 | |||
| 77 | /* #define CANNOT_DUMP */ | ||
| 78 | |||
| 79 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 80 | pure and impure space as loaded can vary, and even their | ||
| 81 | relative order cannot be relied on. | ||
| 82 | |||
| 83 | Otherwise Emacs assumes that text space precedes data space, | ||
| 84 | numerically. */ | ||
| 85 | |||
| 86 | /* #define VIRT_ADDR_VARIES */ | ||
| 87 | |||
| 88 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 89 | to change the boundary between the text section and data section | ||
| 90 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 91 | code will not be sharable; but that's better than failing completely. */ | ||
| 92 | /* On PTX, can't seem to get a valid executable unless NO_REMAP is | ||
| 93 | defined. This did work in the Sequent patched Emacs 18.57. */ | ||
| 94 | #ifndef NO_REMAP | ||
| 95 | #define NO_REMAP | ||
| 96 | #endif | ||
| 97 | /* #undef NO_REMAP */ | ||
| 98 | |||
| 99 | /* If a valid PTX executable could be dumped without NO_REMAP defined, | ||
| 100 | here's a guess at some defines to make it work. */ | ||
| 101 | #ifndef NO_REMAP | ||
| 102 | |||
| 103 | /* PTX has getpagesize() but it returns 296. Using the default method of | ||
| 104 | including getpagesize.h in unexec.c returns 4096 which seems more | ||
| 105 | reasonable. */ | ||
| 106 | #undef HAVE_GETPAGESIZE | ||
| 107 | |||
| 108 | /* Override magic number for a.out header. */ | ||
| 109 | #define EXEC_MAGIC 0411 /* from a.out.h: separated I&D */ | ||
| 110 | |||
| 111 | #define ADJUST_TEXT_SCNHDR_SIZE | ||
| 112 | #define ADJUST_TEXTBASE | ||
| 113 | |||
| 114 | /* The file sections in the Symmetry a.out must be on 4K boundaries. */ | ||
| 115 | /* #define DATA_SECTION_ALIGNMENT (4096-1) */ | ||
| 116 | |||
| 117 | #endif /* ifndef NO_REMAP */ | ||
| 118 | |||
| 119 | /* Avoids a compiler bug. */ | ||
| 120 | #define TAHOE_REGISTER_BUG | ||
| 121 | |||
| 122 | /* (short) negative-int doesn't sign-extend correctly. */ | ||
| 123 | #define SHORT_CAST_BUG | ||
| 124 | |||
| 125 | /* Cause compilations to be done in parallel in ymakefile. */ | ||
| 126 | #define MAKE_PARALLEL $& | ||
| 127 | |||
| 128 | /* Use terminfo library. */ | ||
| 129 | #define LIBS_TERMCAP -ltermlib | ||
| 130 | |||
| 131 | /* arch-tag: 0494629b-7e11-4f6f-865f-62254ac46099 | ||
| 132 | (do not change this comment) */ | ||
diff --git a/src/m/sequent.h b/src/m/sequent.h deleted file mode 100644 index 97df4da6e09..00000000000 --- a/src/m/sequent.h +++ /dev/null | |||
| @@ -1,169 +0,0 @@ | |||
| 1 | /* machine description file for SEQUENT BALANCE machines | ||
| 2 | Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, | ||
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 3, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 20 | Boston, MA 02110-1301, USA. */ | ||
| 21 | |||
| 22 | |||
| 23 | /* The following line tells the configuration script what sort of | ||
| 24 | operating system this machine is likely to run. | ||
| 25 | USUAL-OPSYS="note" | ||
| 26 | |||
| 27 | NOTE-START | ||
| 28 | Use -opsystem=bsd4-2, or -opsystem=bsd4-3 on newer systems. | ||
| 29 | NOTE-END */ | ||
| 30 | |||
| 31 | /* NOTE: this file works for DYNIX release 2.0 | ||
| 32 | (not tested on 1.3) on NS32000's */ | ||
| 33 | |||
| 34 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word | ||
| 35 | is the most significant byte. */ | ||
| 36 | |||
| 37 | #undef WORDS_BIG_ENDIAN | ||
| 38 | |||
| 39 | /* Define NO_ARG_ARRAY if you cannot take the address of the first of a | ||
| 40 | * group of arguments and treat it as an array of the arguments. */ | ||
| 41 | |||
| 42 | /* #define NO_ARG_ARRAY */ | ||
| 43 | |||
| 44 | /* Define WORD_MACHINE if addresses and such have | ||
| 45 | * to be corrected before they can be used as byte counts. */ | ||
| 46 | |||
| 47 | /* #define WORD_MACHINE */ | ||
| 48 | |||
| 49 | /* Now define a symbol for the cpu type, if your compiler | ||
| 50 | does not define it automatically: | ||
| 51 | vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO | ||
| 52 | are the ones defined so far. */ | ||
| 53 | |||
| 54 | /* BTW: DYNIX defines sequent, ns32000, and ns16000 (GENIX compatibility) */ | ||
| 55 | #ifndef sequent /* pre DYNIX 2.1 releases */ | ||
| 56 | # define sequent | ||
| 57 | #endif | ||
| 58 | |||
| 59 | /* Use type int rather than a union, to represent Lisp_Object */ | ||
| 60 | /* This is desirable for most machines. */ | ||
| 61 | |||
| 62 | #define NO_UNION_TYPE | ||
| 63 | |||
| 64 | /* crt0.c should use the vax-bsd style of entry, with these dummy args. */ | ||
| 65 | |||
| 66 | #define CRT0_DUMMIES bogus_fp, | ||
| 67 | |||
| 68 | /* crt0.c should define a symbol `start' and do .globl with a dot. */ | ||
| 69 | |||
| 70 | #define DOT_GLOBAL_START | ||
| 71 | |||
| 72 | /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend | ||
| 73 | the 24-bit bit field into an int. In other words, if bit fields | ||
| 74 | are always unsigned. | ||
| 75 | |||
| 76 | If you use NO_UNION_TYPE, this flag does not matter. */ | ||
| 77 | |||
| 78 | #define EXPLICIT_SIGN_EXTEND | ||
| 79 | |||
| 80 | /* Data type of load average, as read out of kmem. */ | ||
| 81 | |||
| 82 | #define LOAD_AVE_TYPE unsigned long | ||
| 83 | |||
| 84 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | ||
| 85 | |||
| 86 | #define FSCALE 1000.0 | ||
| 87 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | ||
| 88 | |||
| 89 | /* Define CANNOT_DUMP on machines where unexec does not work. | ||
| 90 | Then the function dump-emacs will not be defined | ||
| 91 | and temacs will do (load "loadup") automatically unless told otherwise. */ | ||
| 92 | |||
| 93 | /* #define CANNOT_DUMP */ | ||
| 94 | |||
| 95 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 96 | pure and impure space as loaded can vary, and even their | ||
| 97 | relative order cannot be relied on. | ||
| 98 | |||
| 99 | Otherwise Emacs assumes that text space precedes data space, | ||
| 100 | numerically. */ | ||
| 101 | |||
| 102 | /* #define VIRT_ADDR_VARIES */ | ||
| 103 | |||
| 104 | /* Name of file the to look in | ||
| 105 | for the kernel symbol table (for load average) */ | ||
| 106 | |||
| 107 | #undef KERNEL_FILE | ||
| 108 | #define KERNEL_FILE "/dynix" | ||
| 109 | |||
| 110 | /* Avoids a compiler bug */ | ||
| 111 | |||
| 112 | #define TAHOE_REGISTER_BUG | ||
| 113 | |||
| 114 | /* Say that the text segment of a.out includes the header; | ||
| 115 | the header actually occupies the first few bytes of the text segment | ||
| 116 | and is counted in hdr.a_text. Furthermore, the value written | ||
| 117 | in the a_text in the file must have N_ADDRADJ added to it. */ | ||
| 118 | |||
| 119 | #define A_TEXT_OFFSET(HDR) (sizeof (HDR) + N_ADDRADJ (HDR)) | ||
| 120 | |||
| 121 | /* This is the offset of the executable's text, from the start of the file. */ | ||
| 122 | |||
| 123 | #define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr)) | ||
| 124 | |||
| 125 | /* (short) negative-int doesn't sign-extend correctly */ | ||
| 126 | #define SHORT_CAST_BUG | ||
| 127 | |||
| 128 | /* Cause compilations to be done in parallel in ymakefile. */ | ||
| 129 | #define MAKE_PARALLEL & | ||
| 130 | |||
| 131 | /* Say that mailer interlocking uses flock. */ | ||
| 132 | #define MAIL_USE_FLOCK | ||
| 133 | |||
| 134 | /* On many 4.2-based systems, there's a rather tricky bug | ||
| 135 | * with the interpretation of the pid/pgrp value given to | ||
| 136 | * the F_SETOWN fcntl() call. It works as documented EXCEPT | ||
| 137 | * when applied to filedescriptors for sockets, in which case | ||
| 138 | * the sign must be reversed. If your emacs subprocesses get | ||
| 139 | * SIGIO's when they shouldn't, while running on a socket | ||
| 140 | * (e.g. under X windows), you should probably define this. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define F_SETOWN_SOCK_NEG | ||
| 144 | |||
| 145 | /* Some really obscure 4.2-based systems (like Sequent DYNIX) | ||
| 146 | * do not support asynchronous I/O (using SIGIO) on sockets, | ||
| 147 | * even though it works fine on tty's. If you have one of | ||
| 148 | * these systems, define the following, and then use it in | ||
| 149 | * config.h (or elsewhere) to decide when (not) to use SIGIO. | ||
| 150 | */ | ||
| 151 | |||
| 152 | #define NO_SOCK_SIGIO | ||
| 153 | |||
| 154 | /* Define how to search all pty names. | ||
| 155 | This is for Dynix 3.0; delete next 5 definitions for older systems. */ | ||
| 156 | |||
| 157 | #define PTY_MAJOR "pqrstuvwPQRSTUVW" | ||
| 158 | #define PTY_MINOR "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | ||
| 159 | #define PTY_ITERATION \ | ||
| 160 | register int ma, mi; \ | ||
| 161 | for (ma = 0; ma < sizeof(PTY_MAJOR) - 1; ma++) \ | ||
| 162 | for (mi = 0; mi < sizeof(PTY_MINOR) - 1; mi++) | ||
| 163 | #define PTY_NAME_SPRINTF \ | ||
| 164 | sprintf (ptyname, "/dev/pty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); | ||
| 165 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 166 | sprintf (ptyname, "/dev/tty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); | ||
| 167 | |||
| 168 | /* arch-tag: 81caea48-aa64-4021-9544-e969dea71ee8 | ||
| 169 | (do not change this comment) */ | ||
| @@ -5008,6 +5008,9 @@ extern int noninteractive; | |||
| 5008 | sys_select. */ | 5008 | sys_select. */ |
| 5009 | static CFMutableDictionaryRef cfsockets_for_select; | 5009 | static CFMutableDictionaryRef cfsockets_for_select; |
| 5010 | 5010 | ||
| 5011 | /* Process ID of Emacs. */ | ||
| 5012 | static pid_t mac_emacs_pid; | ||
| 5013 | |||
| 5011 | static void | 5014 | static void |
| 5012 | socket_callback (s, type, address, data, info) | 5015 | socket_callback (s, type, address, data, info) |
| 5013 | CFSocketRef s; | 5016 | CFSocketRef s; |
| @@ -5103,7 +5106,7 @@ mac_try_close_socket (fd) | |||
| 5103 | int fd; | 5106 | int fd; |
| 5104 | { | 5107 | { |
| 5105 | #if SELECT_USE_CFSOCKET | 5108 | #if SELECT_USE_CFSOCKET |
| 5106 | if (cfsockets_for_select) | 5109 | if (getpid () == mac_emacs_pid && cfsockets_for_select) |
| 5107 | { | 5110 | { |
| 5108 | void *key = (void *) fd; | 5111 | void *key = (void *) fd; |
| 5109 | CFSocketRef socket = | 5112 | CFSocketRef socket = |
| @@ -5339,6 +5342,8 @@ init_mac_osx_environment () | |||
| 5339 | char *p, *q; | 5342 | char *p, *q; |
| 5340 | struct stat st; | 5343 | struct stat st; |
| 5341 | 5344 | ||
| 5345 | mac_emacs_pid = getpid (); | ||
| 5346 | |||
| 5342 | /* Initialize locale related variables. */ | 5347 | /* Initialize locale related variables. */ |
| 5343 | mac_system_script_code = | 5348 | mac_system_script_code = |
| 5344 | (ScriptCode) GetScriptManagerVariable (smSysScript); | 5349 | (ScriptCode) GetScriptManagerVariable (smSysScript); |
diff --git a/src/macterm.c b/src/macterm.c index a46c9cbbda4..2d03c8918c5 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -5071,6 +5071,7 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height) | |||
| 5071 | #ifdef MAC_OSX | 5071 | #ifdef MAC_OSX |
| 5072 | bar->fringe_extended_p = Qnil; | 5072 | bar->fringe_extended_p = Qnil; |
| 5073 | #endif | 5073 | #endif |
| 5074 | bar->redraw_needed_p = Qnil; | ||
| 5074 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5075 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5075 | bar->track_top = Qnil; | 5076 | bar->track_top = Qnil; |
| 5076 | bar->track_height = Qnil; | 5077 | bar->track_height = Qnil; |
| @@ -5287,14 +5288,24 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5287 | BLOCK_INPUT; | 5288 | BLOCK_INPUT; |
| 5288 | 5289 | ||
| 5289 | /* If already correctly positioned, do nothing. */ | 5290 | /* If already correctly positioned, do nothing. */ |
| 5290 | if (!(XINT (bar->left) == sb_left | 5291 | if (XINT (bar->left) == sb_left |
| 5291 | && XINT (bar->top) == top | 5292 | && XINT (bar->top) == top |
| 5292 | && XINT (bar->width) == sb_width | 5293 | && XINT (bar->width) == sb_width |
| 5293 | && XINT (bar->height) == height | 5294 | && XINT (bar->height) == height |
| 5294 | #ifdef MAC_OSX | 5295 | #ifdef MAC_OSX |
| 5295 | && !NILP (bar->fringe_extended_p) == fringe_extended_p | 5296 | && !NILP (bar->fringe_extended_p) == fringe_extended_p |
| 5296 | #endif | 5297 | #endif |
| 5297 | )) | 5298 | ) |
| 5299 | { | ||
| 5300 | if (!NILP (bar->redraw_needed_p)) | ||
| 5301 | { | ||
| 5302 | #if USE_CG_DRAWING | ||
| 5303 | mac_prepare_for_quickdraw (f); | ||
| 5304 | #endif | ||
| 5305 | Draw1Control (SCROLL_BAR_CONTROL_REF (bar)); | ||
| 5306 | } | ||
| 5307 | } | ||
| 5308 | else | ||
| 5298 | { | 5309 | { |
| 5299 | /* Since toolkit scroll bars are smaller than the space reserved | 5310 | /* Since toolkit scroll bars are smaller than the space reserved |
| 5300 | for them on the frame, we have to clear "under" them. */ | 5311 | for them on the frame, we have to clear "under" them. */ |
| @@ -5336,6 +5347,8 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5336 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; | 5347 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; |
| 5337 | #endif | 5348 | #endif |
| 5338 | 5349 | ||
| 5350 | bar->redraw_needed_p = Qnil; | ||
| 5351 | |||
| 5339 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5352 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5340 | if (NILP (bar->track_top)) | 5353 | if (NILP (bar->track_top)) |
| 5341 | { | 5354 | { |
| @@ -5693,8 +5706,15 @@ void | |||
| 5693 | x_scroll_bar_clear (f) | 5706 | x_scroll_bar_clear (f) |
| 5694 | FRAME_PTR f; | 5707 | FRAME_PTR f; |
| 5695 | { | 5708 | { |
| 5696 | XTcondemn_scroll_bars (f); | 5709 | Lisp_Object bar; |
| 5697 | XTjudge_scroll_bars (f); | 5710 | |
| 5711 | /* We can have scroll bars even if this is 0, | ||
| 5712 | if we just turned off scroll bar mode. | ||
| 5713 | But in that case we should not clear them. */ | ||
| 5714 | if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)) | ||
| 5715 | for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar); | ||
| 5716 | bar = XSCROLL_BAR (bar)->next) | ||
| 5717 | XSCROLL_BAR (bar)->redraw_needed_p = Qt; | ||
| 5698 | } | 5718 | } |
| 5699 | 5719 | ||
| 5700 | 5720 | ||
diff --git a/src/macterm.h b/src/macterm.h index 03016f30e0f..11d7e05a38f 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -457,6 +457,9 @@ struct scroll_bar { | |||
| 457 | Lisp_Object fringe_extended_p; | 457 | Lisp_Object fringe_extended_p; |
| 458 | #endif | 458 | #endif |
| 459 | 459 | ||
| 460 | /* t if redraw needed in the next XTset_vertical_scroll_bar call. */ | ||
| 461 | Lisp_Object redraw_needed_p; | ||
| 462 | |||
| 460 | #ifdef USE_TOOLKIT_SCROLL_BARS | 463 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 461 | /* The position and size of the scroll bar handle track area in | 464 | /* The position and size of the scroll bar handle track area in |
| 462 | pixels, relative to the frame. */ | 465 | pixels, relative to the frame. */ |
diff --git a/src/process.c b/src/process.c index b157ca469b7..e5546488aae 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -78,7 +78,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 78 | #include <client.h> | 78 | #include <client.h> |
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
| 81 | /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */ | 81 | /* On some systems, inet_addr returns a 'struct in_addr'. */ |
| 82 | #ifdef HAVE_BROKEN_INET_ADDR | 82 | #ifdef HAVE_BROKEN_INET_ADDR |
| 83 | #define IN_ADDR struct in_addr | 83 | #define IN_ADDR struct in_addr |
| 84 | #define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1) | 84 | #define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1) |
| @@ -87,12 +87,12 @@ Boston, MA 02110-1301, USA. */ | |||
| 87 | #define NUMERIC_ADDR_ERROR (numeric_addr == -1) | 87 | #define NUMERIC_ADDR_ERROR (numeric_addr == -1) |
| 88 | #endif | 88 | #endif |
| 89 | 89 | ||
| 90 | #if defined(BSD_SYSTEM) || defined(STRIDE) | 90 | #if defined(BSD_SYSTEM) |
| 91 | #include <sys/ioctl.h> | 91 | #include <sys/ioctl.h> |
| 92 | #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) | 92 | #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) |
| 93 | #include <fcntl.h> | 93 | #include <fcntl.h> |
| 94 | #endif /* HAVE_PTYS and no O_NDELAY */ | 94 | #endif /* HAVE_PTYS and no O_NDELAY */ |
| 95 | #endif /* BSD_SYSTEM || STRIDE */ | 95 | #endif /* BSD_SYSTEM */ |
| 96 | 96 | ||
| 97 | #ifdef BROKEN_O_NONBLOCK | 97 | #ifdef BROKEN_O_NONBLOCK |
| 98 | #undef O_NONBLOCK | 98 | #undef O_NONBLOCK |
| @@ -596,7 +596,6 @@ allocate_pty () | |||
| 596 | #else | 596 | #else |
| 597 | sprintf (pty_name, "/dev/tty%c%x", c, i); | 597 | sprintf (pty_name, "/dev/tty%c%x", c, i); |
| 598 | #endif /* no PTY_TTY_NAME_SPRINTF */ | 598 | #endif /* no PTY_TTY_NAME_SPRINTF */ |
| 599 | #ifndef UNIPLUS | ||
| 600 | if (access (pty_name, 6) != 0) | 599 | if (access (pty_name, 6) != 0) |
| 601 | { | 600 | { |
| 602 | emacs_close (fd); | 601 | emacs_close (fd); |
| @@ -606,7 +605,6 @@ allocate_pty () | |||
| 606 | return -1; | 605 | return -1; |
| 607 | # endif /* IRIS */ | 606 | # endif /* IRIS */ |
| 608 | } | 607 | } |
| 609 | #endif /* not UNIPLUS */ | ||
| 610 | setup_pty (fd); | 608 | setup_pty (fd); |
| 611 | return fd; | 609 | return fd; |
| 612 | } | 610 | } |
| @@ -1360,8 +1358,11 @@ list_processes_1 (query_only) | |||
| 1360 | w_proc = i; | 1358 | w_proc = i; |
| 1361 | if (!NILP (p->buffer)) | 1359 | if (!NILP (p->buffer)) |
| 1362 | { | 1360 | { |
| 1363 | if (NILP (XBUFFER (p->buffer)->name) && w_buffer < 8) | 1361 | if (NILP (XBUFFER (p->buffer)->name)) |
| 1364 | w_buffer = 8; /* (Killed) */ | 1362 | { |
| 1363 | if (w_buffer < 8) | ||
| 1364 | w_buffer = 8; /* (Killed) */ | ||
| 1365 | } | ||
| 1365 | else if ((i = SCHARS (XBUFFER (p->buffer)->name), (i > w_buffer))) | 1366 | else if ((i = SCHARS (XBUFFER (p->buffer)->name), (i > w_buffer))) |
| 1366 | w_buffer = i; | 1367 | w_buffer = i; |
| 1367 | } | 1368 | } |
| @@ -1888,12 +1889,12 @@ create_process (process, new_argv, current_dir) | |||
| 1888 | #endif | 1889 | #endif |
| 1889 | if (forkin < 0) | 1890 | if (forkin < 0) |
| 1890 | report_file_error ("Opening pty", Qnil); | 1891 | report_file_error ("Opening pty", Qnil); |
| 1891 | #if defined (RTU) || defined (UNIPLUS) || defined (DONT_REOPEN_PTY) | 1892 | #if defined (DONT_REOPEN_PTY) |
| 1892 | /* In the case that vfork is defined as fork, the parent process | 1893 | /* In the case that vfork is defined as fork, the parent process |
| 1893 | (Emacs) may send some data before the child process completes | 1894 | (Emacs) may send some data before the child process completes |
| 1894 | tty options setup. So we setup tty before forking. */ | 1895 | tty options setup. So we setup tty before forking. */ |
| 1895 | child_setup_tty (forkout); | 1896 | child_setup_tty (forkout); |
| 1896 | #endif /* RTU or UNIPLUS or DONT_REOPEN_PTY */ | 1897 | #endif /* DONT_REOPEN_PTY */ |
| 1897 | #else | 1898 | #else |
| 1898 | forkin = forkout = -1; | 1899 | forkin = forkout = -1; |
| 1899 | #endif /* not USG, or USG_SUBTTY_WORKS */ | 1900 | #endif /* not USG, or USG_SUBTTY_WORKS */ |
| @@ -1934,15 +1935,6 @@ create_process (process, new_argv, current_dir) | |||
| 1934 | set_exclusive_use (outchannel); | 1935 | set_exclusive_use (outchannel); |
| 1935 | #endif | 1936 | #endif |
| 1936 | 1937 | ||
| 1937 | /* Stride people say it's a mystery why this is needed | ||
| 1938 | as well as the O_NDELAY, but that it fails without this. */ | ||
| 1939 | #if defined (STRIDE) || (defined (pfa) && defined (HAVE_PTYS)) | ||
| 1940 | { | ||
| 1941 | int one = 1; | ||
| 1942 | ioctl (inchannel, FIONBIO, &one); | ||
| 1943 | } | ||
| 1944 | #endif | ||
| 1945 | |||
| 1946 | #ifdef O_NONBLOCK | 1938 | #ifdef O_NONBLOCK |
| 1947 | fcntl (inchannel, F_SETFL, O_NONBLOCK); | 1939 | fcntl (inchannel, F_SETFL, O_NONBLOCK); |
| 1948 | fcntl (outchannel, F_SETFL, O_NONBLOCK); | 1940 | fcntl (outchannel, F_SETFL, O_NONBLOCK); |
| @@ -1992,7 +1984,7 @@ create_process (process, new_argv, current_dir) | |||
| 1992 | #ifdef BSD4_1 | 1984 | #ifdef BSD4_1 |
| 1993 | sighold (SIGCHLD); | 1985 | sighold (SIGCHLD); |
| 1994 | #else /* not BSD4_1 */ | 1986 | #else /* not BSD4_1 */ |
| 1995 | #if defined (BSD_SYSTEM) || defined (UNIPLUS) || defined (HPUX) | 1987 | #if defined (BSD_SYSTEM) || defined (HPUX) |
| 1996 | sigsetmask (sigmask (SIGCHLD)); | 1988 | sigsetmask (sigmask (SIGCHLD)); |
| 1997 | #else /* ordinary USG */ | 1989 | #else /* ordinary USG */ |
| 1998 | #if 0 | 1990 | #if 0 |
| @@ -2106,7 +2098,7 @@ create_process (process, new_argv, current_dir) | |||
| 2106 | } | 2098 | } |
| 2107 | #endif /* TIOCNOTTY */ | 2099 | #endif /* TIOCNOTTY */ |
| 2108 | 2100 | ||
| 2109 | #if !defined (RTU) && !defined (UNIPLUS) && !defined (DONT_REOPEN_PTY) | 2101 | #if !defined (DONT_REOPEN_PTY) |
| 2110 | /*** There is a suggestion that this ought to be a | 2102 | /*** There is a suggestion that this ought to be a |
| 2111 | conditional on TIOCSPGRP, | 2103 | conditional on TIOCSPGRP, |
| 2112 | or !(defined (HAVE_SETSID) && defined (TIOCSCTTY)). | 2104 | or !(defined (HAVE_SETSID) && defined (TIOCSCTTY)). |
| @@ -2140,7 +2132,7 @@ create_process (process, new_argv, current_dir) | |||
| 2140 | ioctl (xforkout, TIOCSPGRP, &pgrp); | 2132 | ioctl (xforkout, TIOCSPGRP, &pgrp); |
| 2141 | #endif | 2133 | #endif |
| 2142 | } | 2134 | } |
| 2143 | #endif /* not UNIPLUS and not RTU and not DONT_REOPEN_PTY */ | 2135 | #endif /* not DONT_REOPEN_PTY */ |
| 2144 | 2136 | ||
| 2145 | #ifdef SETUP_SLAVE_PTY | 2137 | #ifdef SETUP_SLAVE_PTY |
| 2146 | if (pty_flag) | 2138 | if (pty_flag) |
| @@ -2167,7 +2159,7 @@ create_process (process, new_argv, current_dir) | |||
| 2167 | #ifdef BSD4_1 | 2159 | #ifdef BSD4_1 |
| 2168 | sigrelse (SIGCHLD); | 2160 | sigrelse (SIGCHLD); |
| 2169 | #else /* not BSD4_1 */ | 2161 | #else /* not BSD4_1 */ |
| 2170 | #if defined (BSD_SYSTEM) || defined (UNIPLUS) || defined (HPUX) | 2162 | #if defined (BSD_SYSTEM) || defined (HPUX) |
| 2171 | sigsetmask (SIGEMPTYMASK); | 2163 | sigsetmask (SIGEMPTYMASK); |
| 2172 | #else /* ordinary USG */ | 2164 | #else /* ordinary USG */ |
| 2173 | #if 0 | 2165 | #if 0 |
| @@ -2178,10 +2170,10 @@ create_process (process, new_argv, current_dir) | |||
| 2178 | #endif /* SIGCHLD */ | 2170 | #endif /* SIGCHLD */ |
| 2179 | #endif /* !POSIX_SIGNALS */ | 2171 | #endif /* !POSIX_SIGNALS */ |
| 2180 | 2172 | ||
| 2181 | #if !defined (RTU) && !defined (UNIPLUS) && !defined (DONT_REOPEN_PTY) | 2173 | #if !defined (DONT_REOPEN_PTY) |
| 2182 | if (pty_flag) | 2174 | if (pty_flag) |
| 2183 | child_setup_tty (xforkout); | 2175 | child_setup_tty (xforkout); |
| 2184 | #endif /* not RTU and not UNIPLUS and not DONT_REOPEN_PTY */ | 2176 | #endif /* not DONT_REOPEN_PTY */ |
| 2185 | #ifdef WINDOWSNT | 2177 | #ifdef WINDOWSNT |
| 2186 | pid = child_setup (xforkin, xforkout, xforkout, | 2178 | pid = child_setup (xforkin, xforkout, xforkout, |
| 2187 | new_argv, 1, current_dir); | 2179 | new_argv, 1, current_dir); |
| @@ -2259,7 +2251,7 @@ create_process (process, new_argv, current_dir) | |||
| 2259 | #ifdef BSD4_1 | 2251 | #ifdef BSD4_1 |
| 2260 | sigrelse (SIGCHLD); | 2252 | sigrelse (SIGCHLD); |
| 2261 | #else /* not BSD4_1 */ | 2253 | #else /* not BSD4_1 */ |
| 2262 | #if defined (BSD_SYSTEM) || defined (UNIPLUS) || defined (HPUX) | 2254 | #if defined (BSD_SYSTEM) || defined (HPUX) |
| 2263 | sigsetmask (SIGEMPTYMASK); | 2255 | sigsetmask (SIGEMPTYMASK); |
| 2264 | #else /* ordinary USG */ | 2256 | #else /* ordinary USG */ |
| 2265 | #if 0 | 2257 | #if 0 |
| @@ -4650,12 +4642,6 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | |||
| 4650 | else if (xerrno == ENOMEM) | 4642 | else if (xerrno == ENOMEM) |
| 4651 | no_avail = 1; | 4643 | no_avail = 1; |
| 4652 | #endif | 4644 | #endif |
| 4653 | #ifdef ALLIANT | ||
| 4654 | /* This happens for no known reason on ALLIANT. | ||
| 4655 | I am guessing that this is the right response. -- RMS. */ | ||
| 4656 | else if (xerrno == EFAULT) | ||
| 4657 | no_avail = 1; | ||
| 4658 | #endif | ||
| 4659 | else if (xerrno == EBADF) | 4645 | else if (xerrno == EBADF) |
| 4660 | { | 4646 | { |
| 4661 | #ifdef AIX | 4647 | #ifdef AIX |
| @@ -4717,6 +4703,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | |||
| 4717 | { | 4703 | { |
| 4718 | int old_timers_run = timers_run; | 4704 | int old_timers_run = timers_run; |
| 4719 | struct buffer *old_buffer = current_buffer; | 4705 | struct buffer *old_buffer = current_buffer; |
| 4706 | Lisp_Object old_window = selected_window; | ||
| 4720 | int leave = 0; | 4707 | int leave = 0; |
| 4721 | 4708 | ||
| 4722 | if (detect_input_pending_run_timers (do_display)) | 4709 | if (detect_input_pending_run_timers (do_display)) |
| @@ -4730,7 +4717,8 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | |||
| 4730 | an alike. Make read_key_sequence aware of that. */ | 4717 | an alike. Make read_key_sequence aware of that. */ |
| 4731 | if (timers_run != old_timers_run | 4718 | if (timers_run != old_timers_run |
| 4732 | && waiting_for_user_input_p == -1 | 4719 | && waiting_for_user_input_p == -1 |
| 4733 | && old_buffer != current_buffer) | 4720 | && (old_buffer != current_buffer |
| 4721 | || !EQ (old_window, selected_window))) | ||
| 4734 | record_asynch_buffer_change (); | 4722 | record_asynch_buffer_change (); |
| 4735 | 4723 | ||
| 4736 | if (leave) | 4724 | if (leave) |
diff --git a/src/puresize.h b/src/puresize.h index 6f2982746ce..89632596546 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -70,7 +70,7 @@ extern void pure_write_error P_ ((void)) NO_RETURN; | |||
| 70 | /* Define PURE_P. */ | 70 | /* Define PURE_P. */ |
| 71 | 71 | ||
| 72 | #if defined(VIRT_ADDR_VARIES) || defined(CYGWIN) | 72 | #if defined(VIRT_ADDR_VARIES) || defined(CYGWIN) |
| 73 | /* For machines like APOLLO where text and data can go anywhere | 73 | /* For machines where text and data can go anywhere |
| 74 | in virtual memory. */ | 74 | in virtual memory. */ |
| 75 | 75 | ||
| 76 | extern EMACS_INT pure[]; | 76 | extern EMACS_INT pure[]; |
diff --git a/src/s/386-ix.h b/src/s/386-ix.h deleted file mode 100644 index 33658dd65e6..00000000000 --- a/src/s/386-ix.h +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | /* Interactive 386/ix. */ | ||
| 2 | |||
| 3 | #include "usg5-3.h" | ||
| 4 | |||
| 5 | #define BROKEN_TIOCGETC | ||
| 6 | |||
| 7 | /* There are some reports that the following is needed | ||
| 8 | with some version of this system. | ||
| 9 | #undef LIBX11_SYSTEM | ||
| 10 | #define LIBX11_SYSTEM -linet | ||
| 11 | */ | ||
| 12 | |||
| 13 | /* This is said to be needed as a result of having _insque rather | ||
| 14 | than insque in -loldX. This may not always be the right thing. */ | ||
| 15 | #define WRONG_NAME_INSQUE | ||
| 16 | |||
| 17 | /* arch-tag: c2fc2d64-46fd-4a87-933b-85eff622829c | ||
| 18 | (do not change this comment) */ | ||
diff --git a/src/s/domain.h b/src/s/domain.h deleted file mode 100644 index ebcdc7ea365..00000000000 --- a/src/s/domain.h +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | #include "bsd4-3.h" | ||
| 2 | |||
| 3 | /* Inhibit using -X, which is the default. */ | ||
| 4 | #define LD_SWITCH_SYSTEM | ||
| 5 | |||
| 6 | /* arch-tag: 08941c4f-d0b6-4ad6-b7e3-7e7fe76c0e94 | ||
| 7 | (do not change this comment) */ | ||
diff --git a/src/s/hpux9-x11r4.h b/src/s/hpux9-x11r4.h deleted file mode 100644 index 6a701d5a412..00000000000 --- a/src/s/hpux9-x11r4.h +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | /* System description file for hpux version 9 using X11R4. */ | ||
| 2 | |||
| 3 | #include "hpux9.h" | ||
| 4 | |||
| 5 | #undef C_SWITCH_X_SYSTEM | ||
| 6 | #define C_SWITCH_X_SYSTEM -I/usr/include/Motif1.1 | ||
| 7 | |||
| 8 | #undef LD_SWITCH_X_DEFAULT | ||
| 9 | #define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1 | ||
| 10 | |||
| 11 | /* arch-tag: 47664d7b-23ce-43e6-acdd-044a4be08da3 | ||
| 12 | (do not change this comment) */ | ||
diff --git a/src/s/hpux9shxr4.h b/src/s/hpux9shxr4.h deleted file mode 100644 index 63810273698..00000000000 --- a/src/s/hpux9shxr4.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #include "hpux9shr.h" | ||
| 2 | |||
| 3 | #undef C_SWITCH_X_SYSTEM | ||
| 4 | #define C_SWITCH_X_SYSTEM -I/usr/include/Motif1.1 | ||
| 5 | |||
| 6 | #undef LD_SWITCH_X_DEFAULT | ||
| 7 | #define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1 | ||
| 8 | |||
| 9 | /* arch-tag: 7f68b8b6-c733-4e6c-81df-39d8d13fb656 | ||
| 10 | (do not change this comment) */ | ||
diff --git a/src/s/irix3-3.h b/src/s/irix3-3.h deleted file mode 100644 index bb5785c6115..00000000000 --- a/src/s/irix3-3.h +++ /dev/null | |||
| @@ -1,156 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Silicon Graphics Irix system 3.3. | ||
| 2 | Copyright (C) 1987, 1990, 1999, 2001, 2002, 2003, 2004, | ||
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 3, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 20 | Boston, MA 02110-1301, USA. */ | ||
| 21 | |||
| 22 | |||
| 23 | /* | ||
| 24 | * Define symbols to identify the version of Unix this is. | ||
| 25 | * Define all the symbols that apply correctly. | ||
| 26 | */ | ||
| 27 | |||
| 28 | #define USG | ||
| 29 | #define USG5 | ||
| 30 | #define IRIS | ||
| 31 | #ifndef IRIX | ||
| 32 | #define IRIX | ||
| 33 | #endif | ||
| 34 | |||
| 35 | /* SYSTEM_TYPE should indicate the kind of system you are using. | ||
| 36 | It sets the Lisp variable system-type. */ | ||
| 37 | |||
| 38 | #define SYSTEM_TYPE "irix" | ||
| 39 | |||
| 40 | /* nomultiplejobs should be defined if your system's shell | ||
| 41 | does not have "job control" (the ability to stop a program, | ||
| 42 | run some other program, then continue the first one). */ | ||
| 43 | |||
| 44 | /* #define NOMULTIPLEJOBS */ | ||
| 45 | |||
| 46 | /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */ | ||
| 47 | |||
| 48 | /* #define INTERRUPT_INPUT */ | ||
| 49 | |||
| 50 | /* Letter to use in finding device name of first pty, | ||
| 51 | if system supports pty's. 'a' means it is /dev/ptya0 */ | ||
| 52 | |||
| 53 | #define FIRST_PTY_LETTER 'a' | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Define HAVE_TERMIO if the system provides sysV-style ioctls | ||
| 57 | * for terminal control. | ||
| 58 | */ | ||
| 59 | |||
| 60 | #define HAVE_TERMIO | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Define HAVE_PTYS if the system supports pty devices. | ||
| 64 | */ | ||
| 65 | |||
| 66 | #define HAVE_PTYS | ||
| 67 | |||
| 68 | /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | ||
| 69 | |||
| 70 | #define HAVE_SOCKETS | ||
| 71 | |||
| 72 | /* | ||
| 73 | * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | ||
| 74 | * The 4.2 opendir, etc., library functions. | ||
| 75 | */ | ||
| 76 | |||
| 77 | /* #define NONSYSTEM_DIR_LIBRARY */ | ||
| 78 | |||
| 79 | /* Define this symbol if your system has the functions bcopy, etc. */ | ||
| 80 | |||
| 81 | #define BSTRING | ||
| 82 | |||
| 83 | /* subprocesses should be defined if you want to | ||
| 84 | have code for asynchronous subprocesses | ||
| 85 | (as used in M-x compile and M-x shell). | ||
| 86 | This is generally OS dependent, and not supported | ||
| 87 | under most USG systems. */ | ||
| 88 | |||
| 89 | #define subprocesses | ||
| 90 | |||
| 91 | /* If your system uses COFF (Common Object File Format) then define the | ||
| 92 | preprocessor symbol "COFF". */ | ||
| 93 | |||
| 94 | /* #define COFF */ | ||
| 95 | |||
| 96 | /* define MAIL_USE_FLOCK if the mailer uses flock | ||
| 97 | to interlock access to /usr/spool/mail/$USER. | ||
| 98 | The alternative is that a lock file named | ||
| 99 | /usr/spool/mail/$USER.lock. */ | ||
| 100 | |||
| 101 | #define MAIL_USE_FLOCK | ||
| 102 | |||
| 103 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 104 | so that Emacs can tell instantly when you try to modify | ||
| 105 | a file that someone else has modified in his Emacs. */ | ||
| 106 | |||
| 107 | /* #define CLASH_DETECTION */ | ||
| 108 | |||
| 109 | /* The file containing the kernel's symbol table is called /unix. */ | ||
| 110 | |||
| 111 | #define KERNEL_FILE "/unix" | ||
| 112 | |||
| 113 | /* The symbol in the kernel where the load average is found | ||
| 114 | is named _avenrun. */ | ||
| 115 | |||
| 116 | #define LDAV_SYMBOL "avenrun" | ||
| 117 | |||
| 118 | |||
| 119 | /* setjmp and longjmp can safely replace _setjmp and _longjmp, | ||
| 120 | but they will run slower. */ | ||
| 121 | |||
| 122 | #define _setjmp setjmp | ||
| 123 | #define _longjmp longjmp | ||
| 124 | |||
| 125 | /* On USG systems these have different names */ | ||
| 126 | |||
| 127 | #define index strchr | ||
| 128 | #define rindex strrchr | ||
| 129 | |||
| 130 | /* USG systems tend to put everything declared static | ||
| 131 | into the initialized data area, which becomes pure after dumping Emacs. | ||
| 132 | Foil this. Emacs carefully avoids static vars inside functions. */ | ||
| 133 | |||
| 134 | /* #define static */ | ||
| 135 | |||
| 136 | /* This is how to get the device name of the tty end of a pty. */ | ||
| 137 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 138 | sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev)); | ||
| 139 | |||
| 140 | |||
| 141 | #define HAVE_SYSVIPC | ||
| 142 | |||
| 143 | /* sioctl.h should be included where appropriate. */ | ||
| 144 | |||
| 145 | #define NEED_SIOCTL | ||
| 146 | |||
| 147 | /* This affects child_setup. */ | ||
| 148 | |||
| 149 | #define SETPGRP_RELEASES_CTTY | ||
| 150 | |||
| 151 | /* This was formerly in LIBS_MACHINE in iris4d.h, | ||
| 152 | but it is not needed for newer system versions. */ | ||
| 153 | #define LIBS_SYSTEM -lsun | ||
| 154 | |||
| 155 | /* arch-tag: cccdd761-2ae9-4e71-a33e-749681c01889 | ||
| 156 | (do not change this comment) */ | ||
diff --git a/src/s/irix4-0.h b/src/s/irix4-0.h deleted file mode 100644 index e06940a0378..00000000000 --- a/src/s/irix4-0.h +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Silicon Graphics Irix system 4.0 | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | This file is part of GNU Emacs. | ||
| 7 | |||
| 8 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 9 | it under the terms of the GNU General Public License as published by | ||
| 10 | the Free Software Foundation; either version 3, or (at your option) | ||
| 11 | any later version. | ||
| 12 | |||
| 13 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | GNU General Public License for more details. | ||
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 20 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 21 | Boston, MA 02110-1301, USA. */ | ||
| 22 | |||
| 23 | |||
| 24 | #include "irix3-3.h" | ||
| 25 | |||
| 26 | #define USG5_3 | ||
| 27 | #define IRIX4 | ||
| 28 | /* XPointer is not defined in the older X headers -- JPff@maths.bath.ac.uk */ | ||
| 29 | #define XPointer caddr_t | ||
| 30 | |||
| 31 | #undef NEED_SIOCTL | ||
| 32 | |||
| 33 | /* Include unistd.h, even though we don't define POSIX. */ | ||
| 34 | #define NEED_UNISTD_H | ||
| 35 | |||
| 36 | /* Make process_send_signal work by "typing" a signal character on the pty. */ | ||
| 37 | #define SIGNALS_VIA_CHARACTERS | ||
| 38 | |||
| 39 | #ifndef __GNUC__ | ||
| 40 | /* use K&R C */ | ||
| 41 | /* We need to increase the expression tree space with -Wf,-XNh | ||
| 42 | (ghazi@caip.rutgers.edu 7/8/97.) | ||
| 43 | */ | ||
| 44 | #define C_SWITCH_SYSTEM -cckr -Wf,-XNh4000 | ||
| 45 | #endif | ||
| 46 | |||
| 47 | /* SGI has all the fancy wait stuff, but we can't include sys/wait.h | ||
| 48 | because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead | ||
| 49 | we'll just define WNOHANG right here. | ||
| 50 | (An implicit decl is good enough for wait3.) */ | ||
| 51 | |||
| 52 | #define WNOHANG 0x1 | ||
| 53 | |||
| 54 | /* No need to use sprintf to get the tty name--we get that from _getpty. */ | ||
| 55 | #undef PTY_TTY_NAME_SPRINTF | ||
| 56 | #define PTY_TTY_NAME_SPRINTF | ||
| 57 | /* No need to get the pty name at all. */ | ||
| 58 | #define PTY_NAME_SPRINTF | ||
| 59 | /* We need only try once to open a pty. */ | ||
| 60 | #define PTY_ITERATION | ||
| 61 | /* Here is how to do it. */ | ||
| 62 | /* It is necessary to prevent SIGCHLD signals within _getpty. | ||
| 63 | So we block them. */ | ||
| 64 | #define PTY_OPEN \ | ||
| 65 | { \ | ||
| 66 | int mask = sigblock (sigmask (SIGCHLD)); \ | ||
| 67 | char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ | ||
| 68 | sigsetmask(mask); \ | ||
| 69 | if (name == 0) \ | ||
| 70 | return -1; \ | ||
| 71 | if (fd < 0) \ | ||
| 72 | return -1; \ | ||
| 73 | if (fstat (fd, &stb) < 0) \ | ||
| 74 | return -1; \ | ||
| 75 | strcpy (pty_name, name); \ | ||
| 76 | } | ||
| 77 | |||
| 78 | /* arch-tag: cfd7e200-a4dc-4f67-9a32-4184c10b0c57 | ||
| 79 | (do not change this comment) */ | ||
diff --git a/src/s/ptx.h b/src/s/ptx.h deleted file mode 100644 index 346aab187cc..00000000000 --- a/src/s/ptx.h +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Sequent DYNIX/ptx 1.x/2.x | ||
| 2 | Copyright (C) 1987, 1990, 1999, 2001, 2002, 2003, 2004, | ||
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 3, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 20 | Boston, MA 02110-1301, USA. */ | ||
| 21 | |||
| 22 | /* This file was written by Bill Burton <billb@progress.com>. Parts were | ||
| 23 | adapted from m-ptx1-2.h and process.c as distributed with the Emacs 18.57 | ||
| 24 | on the Sequent Public software tape. Other parts were adapted from | ||
| 25 | usg5-4.h. */ | ||
| 26 | |||
| 27 | /* Use the SysVr3 file for base configuration even though much is changed. */ | ||
| 28 | #include "usg5-3.h" | ||
| 29 | |||
| 30 | /* Undo these defines because they are incorrect or need to be changed. */ | ||
| 31 | #undef LIB_X11_LIB | ||
| 32 | #undef LIBX11_SYSTEM | ||
| 33 | #undef USG_SHARED_LIBRARIES | ||
| 34 | |||
| 35 | /* <sys/stat.h> *defines* stat as a static function. If "static" | ||
| 36 | is blank, then many files will have a public definition for stat. */ | ||
| 37 | #undef static | ||
| 38 | |||
| 39 | /* PTX supports job control. */ | ||
| 40 | #undef NOMULTIPLEJOBS | ||
| 41 | |||
| 42 | /* PTX has System V streams. */ | ||
| 43 | #define SYSV_STREAMS | ||
| 44 | |||
| 45 | /* Leave out -lPW since it conflicts with term.o and because we're not sure | ||
| 46 | if the alloca found there by autoconf should be trusted on PTX. */ | ||
| 47 | #define LIB_STANDARD -lc | ||
| 48 | |||
| 49 | /* Local define. If TCP/IP is not installed, comment this out. */ | ||
| 50 | #define TCPIP_INSTALLED | ||
| 51 | |||
| 52 | #ifdef TCPIP_INSTALLED | ||
| 53 | #define HAVE_SOCKETS | ||
| 54 | #else | ||
| 55 | #undef subprocesses | ||
| 56 | #endif | ||
| 57 | |||
| 58 | #ifdef HAVE_X_WINDOWS | ||
| 59 | |||
| 60 | #define LIBX11_SYSTEM -lsocket -linet -lnsl | ||
| 61 | /* This is also defined so that lib-src/profile can link. */ | ||
| 62 | #define LIBS_SYSTEM -lseq | ||
| 63 | |||
| 64 | #else /* ! HAVE_X_WINDOWS */ | ||
| 65 | |||
| 66 | #ifdef HAVE_SOCKETS | ||
| 67 | #define LIBS_SYSTEM -lsocket -linet -lnsl -lseq | ||
| 68 | #else | ||
| 69 | #define LIBS_SYSTEM -lseq | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #endif /* ! HAVE_X_WINDOWS */ | ||
| 73 | |||
| 74 | /* No <sioctl.h> */ | ||
| 75 | #define NO_SIOCTL_H | ||
| 76 | |||
| 77 | /* If we have X windows, configure should find gettimeofday in -lX11. | ||
| 78 | Since we emulate gettimeofday below, we really have it anyway. */ | ||
| 79 | #ifndef HAVE_GETTIMEOFDAY | ||
| 80 | #define HAVE_GETTIMEOFDAY | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #ifdef emacs | ||
| 84 | #include <sys/stropts.h> /* Support for pty's */ | ||
| 85 | #include <sys/conf.h> | ||
| 86 | |||
| 87 | /*#define BROKEN_SIGIO*/ /* BROKEN_SIGIO is already defined. PTX | ||
| 88 | has SIGIO, but it's just an alias for | ||
| 89 | SIGPOLL. */ | ||
| 90 | |||
| 91 | /* Emulate gettimeofday() except for the time zone information which Emacs | ||
| 92 | doesn't use anyway. Get_process_stats() is in -lseq. */ | ||
| 93 | #include <sys/procstats.h> | ||
| 94 | #define gettimeofday(tp, tzp) get_process_stats (tp, PS_SELF, 0, 0) | ||
| 95 | |||
| 96 | /* Define timezone since it's not in sys/time.h. Unfortunately, this causes | ||
| 97 | trouble when building with X since this struct is defined in | ||
| 98 | <X11/Xos.h>. */ | ||
| 99 | struct timezone | ||
| 100 | { | ||
| 101 | int tz_minuteswest; | ||
| 102 | int tz_dsttime; | ||
| 103 | }; | ||
| 104 | |||
| 105 | /* Unfortunately, this define is not checked in all files including | ||
| 106 | <X11/Xos.h> so we can't use it. */ | ||
| 107 | /* #define XOS_NEEDS_TIME_H */ | ||
| 108 | |||
| 109 | /* In ptx/WINDOWS, this prevents problems with the timezone struct being | ||
| 110 | redefined in <X11/Xos.h>. It seems the necessary include files are | ||
| 111 | included via systime.h so leaving them out here is not a problem. This | ||
| 112 | may not work in X11R5 or X11R6. */ | ||
| 113 | #define __TIMEVAL__ | ||
| 114 | |||
| 115 | #endif /* emacs */ | ||
| 116 | |||
| 117 | /* PTX doesn't have FIONREAD at all. */ | ||
| 118 | #undef INTERRUPT_INPUT | ||
| 119 | #define BROKEN_FIONREAD | ||
| 120 | |||
| 121 | /* We can support this */ | ||
| 122 | #define CLASH_DETECTION | ||
| 123 | |||
| 124 | /* PTX has termios */ | ||
| 125 | #define HAVE_TERMIOS | ||
| 126 | #undef HAVE_TERMIO | ||
| 127 | #undef BROKEN_TIOCGWINSZ | ||
| 128 | #undef BROKEN_TIOCGETC | ||
| 129 | |||
| 130 | /* It is possible to receive SIGCHLD when there are no children | ||
| 131 | waiting, because a previous waitsys cleaned up the carcass of child | ||
| 132 | without clearing the SIGCHLD pending info. So, use a non-blocking | ||
| 133 | wait3 instead, which maps to waitpid in SysVr4. */ | ||
| 134 | /* Not sure if this is used but PTX does support waitpid. */ | ||
| 135 | /*#define HAVE_WAIT_HEADER*/ | ||
| 136 | /*#define WAITTYPE int*/ | ||
| 137 | #define wait3(status, options, rusage) \ | ||
| 138 | waitpid ((pid_t) -1, (status), (options)) | ||
| 139 | /*#define WRETCODE(w) (w >> 8)*/ | ||
| 140 | |||
| 141 | /* PTX has pty's but not like System V */ | ||
| 142 | #define HAVE_PTYS | ||
| 143 | #undef SYSV_PTYS | ||
| 144 | |||
| 145 | /* Provide pty support which is defined into process.c:allocate_pty. | ||
| 146 | Basic ideas for handling getpseudotty were lifted from process.c in | ||
| 147 | Emacs 18.57 included on the Sequent Public Software tape. However, this | ||
| 148 | implementation bears almost no resemblance to the original and does not | ||
| 149 | require that process.c be patched. */ | ||
| 150 | #define PTY_ITERATION \ | ||
| 151 | char *mastername, *slavename; \ | ||
| 152 | while (1) | ||
| 153 | |||
| 154 | #define PTY_OPEN \ | ||
| 155 | if (failed_count++ >= 5) break; \ | ||
| 156 | if ((fd = getpseudotty (&slavename, &mastername)) < 0) { \ | ||
| 157 | error("Out of ptys."); \ | ||
| 158 | continue; \ | ||
| 159 | } \ | ||
| 160 | strcpy (pty_name, slavename); | ||
| 161 | |||
| 162 | /* Define these to prevent the default logic in process.c:allocate_pty | ||
| 163 | from being used. */ | ||
| 164 | #define PTY_NAME_SPRINTF | ||
| 165 | #define PTY_TTY_NAME_SPRINTF | ||
| 166 | |||
| 167 | /* PTX doesn't seem to have memmove. */ | ||
| 168 | #define MEMMOVE_MISSING | ||
| 169 | |||
| 170 | /* Kenneth Stailey <kstailey@eagle.dol-esa.gov> says this is needed. */ | ||
| 171 | #define POSIX_SIGNALS | ||
| 172 | |||
| 173 | /* arch-tag: 4f5e3abc-643b-413a-bae6-ed212d3af997 | ||
| 174 | (do not change this comment) */ | ||
diff --git a/src/s/ptx4-2.h b/src/s/ptx4-2.h deleted file mode 100644 index 3940093c28d..00000000000 --- a/src/s/ptx4-2.h +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | #include "ptx4.h" | ||
| 2 | |||
| 3 | /* Gelling Kevan (gellingk.eurostar@ems.rail.co.uk) | ||
| 4 | says that PTX 4.2.3 needs this version. */ | ||
| 5 | #undef SETUP_SLAVE_PTY | ||
| 6 | #define SETUP_SLAVE_PTY \ | ||
| 7 | if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | ||
| 8 | fatal ("ioctl I_PUSH ptem", errno); \ | ||
| 9 | if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | ||
| 10 | fatal ("ioctl I_PUSH ldterm", errno); | ||
| 11 | |||
| 12 | /* Gelling Kevan (gellingk.eurostar@ems.rail.co.uk) | ||
| 13 | says that gmalloc.c needs _POSIX_SOURCE. | ||
| 14 | This defines _POSIX_SOURCE only for gmalloc.c. */ | ||
| 15 | #ifdef _MALLOC_INTERNAL | ||
| 16 | #define _POSIX_SOURCE | ||
| 17 | #endif | ||
| 18 | |||
| 19 | /* arch-tag: 10a9fab3-9e84-4e9e-9535-6ff42baf9e77 | ||
| 20 | (do not change this comment) */ | ||
diff --git a/src/s/ptx4.h b/src/s/ptx4.h deleted file mode 100644 index 4e8913a0a6d..00000000000 --- a/src/s/ptx4.h +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | /* s/ file for Sequent "ptx 4", which is a modified SVR5.4. | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | This file is part of GNU Emacs. | ||
| 7 | |||
| 8 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 9 | it under the terms of the GNU General Public License as published by | ||
| 10 | the Free Software Foundation; either version 3, or (at your option) | ||
| 11 | any later version. | ||
| 12 | |||
| 13 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | GNU General Public License for more details. | ||
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 20 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 21 | Boston, MA 02110-1301, USA. */ | ||
| 22 | |||
| 23 | |||
| 24 | /* Tell usg5-4.h not to include filio.h. */ | ||
| 25 | #define NO_FILIO_H | ||
| 26 | |||
| 27 | #include "usg5-4.h" | ||
| 28 | |||
| 29 | /* Marcus Daniels <marcus@sysc.pdx.edu> says that SIGINFO is defined | ||
| 30 | on ptx4 but it is not a signal. Prevent process.c from doing the | ||
| 31 | wrong thing. */ | ||
| 32 | #define BROKEN_SIGINFO | ||
| 33 | |||
| 34 | /* pae@dim.com (Phil Ernhardt) says this correction to | ||
| 35 | the definition in usg5-4.h is needed to prevent | ||
| 36 | all asynchronous subprocesses from exiting right away. */ | ||
| 37 | |||
| 38 | /* James Youngman <jay@gnu.org> found that on "DYNIX/ptx ARNIE 4.0 | ||
| 39 | * V4.4.2 i386", the push of the ttcompat module would fail. It seems | ||
| 40 | * that PTX 4.4.2 doesn't have that module, so if the push fails we | ||
| 41 | * don't kill ourselves. While this version lacks ttcompat, it also | ||
| 42 | * has ptem, but the manual page for ptem indicates that it should | ||
| 43 | * be pushed onto the slave side before the line discipline module. | ||
| 44 | * See also the streampty manual page, if you're curious (and have | ||
| 45 | * a ptx system). | ||
| 46 | */ | ||
| 47 | |||
| 48 | /* rms: I hope that older versions which do have ttcompat | ||
| 49 | will not get confused by the code to use ptem. */ | ||
| 50 | |||
| 51 | #undef SETUP_SLAVE_PTY | ||
| 52 | #define SETUP_SLAVE_PTY \ | ||
| 53 | if (ioctl (xforkin, I_PUSH, "ptem") == -1 && errno != EINVAL) \ | ||
| 54 | fatal ("ioctl I_PUSH ptem", errno); \ | ||
| 55 | if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | ||
| 56 | fatal ("ioctl I_PUSH ldterm", errno); \ | ||
| 57 | if (ioctl (xforkin, I_PUSH, "ttcompat") == -1 && errno != EINVAL) \ | ||
| 58 | fatal ("ioctl I_PUSH ttcompat", errno); | ||
| 59 | |||
| 60 | /* arch-tag: 14621824-8dca-432b-a97a-049fc4ce0e9f | ||
| 61 | (do not change this comment) */ | ||
diff --git a/src/sysdep.c b/src/sysdep.c index 7c7b3810956..01126c4907e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -49,15 +49,6 @@ extern void srandom P_ ((unsigned int)); | |||
| 49 | 49 | ||
| 50 | #include "blockinput.h" | 50 | #include "blockinput.h" |
| 51 | 51 | ||
| 52 | #ifdef MAC_OS8 | ||
| 53 | #include <sys/param.h> | ||
| 54 | |||
| 55 | #ifndef subprocesses | ||
| 56 | /* Nonzero means delete a process right away if it exits (process.c). */ | ||
| 57 | static int delete_exited_processes; | ||
| 58 | #endif | ||
| 59 | #endif /* MAC_OS8 */ | ||
| 60 | |||
| 61 | #ifdef WINDOWSNT | 52 | #ifdef WINDOWSNT |
| 62 | #define read sys_read | 53 | #define read sys_read |
| 63 | #define write sys_write | 54 | #define write sys_write |
| @@ -151,12 +142,12 @@ extern int errno; | |||
| 151 | #undef TIOCSWINSZ | 142 | #undef TIOCSWINSZ |
| 152 | #endif | 143 | #endif |
| 153 | 144 | ||
| 154 | #if defined (USG) || defined (DGUX) | 145 | #if defined (USG) |
| 155 | #include <sys/utsname.h> | 146 | #include <sys/utsname.h> |
| 156 | #ifndef MEMORY_IN_STRING_H | 147 | #ifndef MEMORY_IN_STRING_H |
| 157 | #include <memory.h> | 148 | #include <memory.h> |
| 158 | #endif | 149 | #endif |
| 159 | #if defined (TIOCGWINSZ) || defined (ISC4_0) | 150 | #if defined (TIOCGWINSZ) |
| 160 | #ifdef NEED_SIOCTL | 151 | #ifdef NEED_SIOCTL |
| 161 | #include <sys/sioctl.h> | 152 | #include <sys/sioctl.h> |
| 162 | #endif | 153 | #endif |
| @@ -164,8 +155,8 @@ extern int errno; | |||
| 164 | #include <sys/stream.h> | 155 | #include <sys/stream.h> |
| 165 | #include <sys/ptem.h> | 156 | #include <sys/ptem.h> |
| 166 | #endif | 157 | #endif |
| 167 | #endif /* TIOCGWINSZ or ISC4_0 */ | 158 | #endif /* TIOCGWINSZ */ |
| 168 | #endif /* USG or DGUX */ | 159 | #endif /* USG */ |
| 169 | 160 | ||
| 170 | extern int quit_char; | 161 | extern int quit_char; |
| 171 | 162 | ||
| @@ -345,17 +336,6 @@ discard_tty_input () | |||
| 345 | &buf.main, 0, 0, terminator_mask, 0, 0); | 336 | &buf.main, 0, 0, terminator_mask, 0, 0); |
| 346 | queue_kbd_input (); | 337 | queue_kbd_input (); |
| 347 | #else /* not VMS */ | 338 | #else /* not VMS */ |
| 348 | #ifdef APOLLO | ||
| 349 | { | ||
| 350 | struct tty_display_info *tty; | ||
| 351 | for (tty = tty_list; tty; tty = tty->next) | ||
| 352 | { | ||
| 353 | int zero = 0; | ||
| 354 | if (tty->input) | ||
| 355 | ioctl (fileno (tty->input), TIOCFLUSH, &zero); | ||
| 356 | } | ||
| 357 | } | ||
| 358 | #else /* not Apollo */ | ||
| 359 | #ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ | 339 | #ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ |
| 360 | while (dos_keyread () != -1) | 340 | while (dos_keyread () != -1) |
| 361 | ; | 341 | ; |
| @@ -372,7 +352,6 @@ discard_tty_input () | |||
| 372 | } | 352 | } |
| 373 | } | 353 | } |
| 374 | #endif /* not MSDOS */ | 354 | #endif /* not MSDOS */ |
| 375 | #endif /* not Apollo */ | ||
| 376 | #endif /* not VMS */ | 355 | #endif /* not VMS */ |
| 377 | #endif /* not WINDOWSNT */ | 356 | #endif /* not WINDOWSNT */ |
| 378 | } | 357 | } |
| @@ -532,11 +511,6 @@ wait_for_termination (pid) | |||
| 532 | else | 511 | else |
| 533 | sigpause (SIGEMPTYMASK); | 512 | sigpause (SIGEMPTYMASK); |
| 534 | #else /* not BSD_SYSTEM, and not HPUX version >= 6 */ | 513 | #else /* not BSD_SYSTEM, and not HPUX version >= 6 */ |
| 535 | #if defined (UNIPLUS) | ||
| 536 | if (0 > kill (pid, 0)) | ||
| 537 | break; | ||
| 538 | wait (0); | ||
| 539 | #else /* neither BSD_SYSTEM nor UNIPLUS: random sysV */ | ||
| 540 | #ifdef POSIX_SIGNALS /* would this work for GNU/Linux as well? */ | 514 | #ifdef POSIX_SIGNALS /* would this work for GNU/Linux as well? */ |
| 541 | sigblock (sigmask (SIGCHLD)); | 515 | sigblock (sigmask (SIGCHLD)); |
| 542 | errno = 0; | 516 | errno = 0; |
| @@ -570,7 +544,6 @@ wait_for_termination (pid) | |||
| 570 | #endif /* not WINDOWSNT */ | 544 | #endif /* not WINDOWSNT */ |
| 571 | #endif /* not HAVE_SYSV_SIGPAUSE */ | 545 | #endif /* not HAVE_SYSV_SIGPAUSE */ |
| 572 | #endif /* not POSIX_SIGNALS */ | 546 | #endif /* not POSIX_SIGNALS */ |
| 573 | #endif /* not UNIPLUS */ | ||
| 574 | #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */ | 547 | #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */ |
| 575 | #endif /* not VMS */ | 548 | #endif /* not VMS */ |
| 576 | #else /* not subprocesses */ | 549 | #else /* not subprocesses */ |
| @@ -727,12 +700,6 @@ child_setup_tty (out) | |||
| 727 | if (interrupt_input) | 700 | if (interrupt_input) |
| 728 | reset_sigio (0); | 701 | reset_sigio (0); |
| 729 | #endif /* BSD4_1 */ | 702 | #endif /* BSD4_1 */ |
| 730 | #ifdef RTU | ||
| 731 | { | ||
| 732 | int zero = 0; | ||
| 733 | ioctl (out, FIOASYNC, &zero); | ||
| 734 | } | ||
| 735 | #endif /* RTU */ | ||
| 736 | #endif /* not DOS_NT */ | 703 | #endif /* not DOS_NT */ |
| 737 | } | 704 | } |
| 738 | #endif /* not VMS */ | 705 | #endif /* not VMS */ |
| @@ -821,7 +788,6 @@ sys_suspend () | |||
| 821 | 788 | ||
| 822 | /* Fork a subshell. */ | 789 | /* Fork a subshell. */ |
| 823 | 790 | ||
| 824 | #ifndef MAC_OS8 | ||
| 825 | void | 791 | void |
| 826 | sys_subshell () | 792 | sys_subshell () |
| 827 | { | 793 | { |
| @@ -957,7 +923,6 @@ sys_subshell () | |||
| 957 | synch_process_alive = 0; | 923 | synch_process_alive = 0; |
| 958 | #endif /* !VMS */ | 924 | #endif /* !VMS */ |
| 959 | } | 925 | } |
| 960 | #endif /* !MAC_OS8 */ | ||
| 961 | 926 | ||
| 962 | static void | 927 | static void |
| 963 | save_signal_handlers (saved_handlers) | 928 | save_signal_handlers (saved_handlers) |
| @@ -1066,69 +1031,6 @@ unrequest_sigio (void) | |||
| 1066 | } | 1031 | } |
| 1067 | 1032 | ||
| 1068 | #else /* no FASYNC */ | 1033 | #else /* no FASYNC */ |
| 1069 | #ifdef STRIDE /* Stride doesn't have FASYNC - use FIOASYNC */ | ||
| 1070 | |||
| 1071 | void | ||
| 1072 | request_sigio () | ||
| 1073 | { | ||
| 1074 | int on = 1; | ||
| 1075 | |||
| 1076 | if (noninteractive || read_socket_hook) | ||
| 1077 | return; | ||
| 1078 | |||
| 1079 | /* XXX CURTTY() is bogus here. */ | ||
| 1080 | ioctl (fileno (CURTTY ()->input), FIOASYNC, &on); | ||
| 1081 | interrupts_deferred = 0; | ||
| 1082 | } | ||
| 1083 | |||
| 1084 | void | ||
| 1085 | unrequest_sigio () | ||
| 1086 | { | ||
| 1087 | int off = 0; | ||
| 1088 | |||
| 1089 | if (noninteractive || read_socket_hook) | ||
| 1090 | return; | ||
| 1091 | |||
| 1092 | /* XXX CURTTY() is bogus here. */ | ||
| 1093 | ioctl (fileno (CURTTY ()->input), FIOASYNC, &off); | ||
| 1094 | interrupts_deferred = 1; | ||
| 1095 | } | ||
| 1096 | |||
| 1097 | #else /* not FASYNC, not STRIDE */ | ||
| 1098 | |||
| 1099 | #ifdef _CX_UX | ||
| 1100 | |||
| 1101 | #include <termios.h> | ||
| 1102 | |||
| 1103 | void | ||
| 1104 | request_sigio () | ||
| 1105 | { | ||
| 1106 | int on = 1; | ||
| 1107 | sigset_t st; | ||
| 1108 | |||
| 1109 | if (noninteractive || read_socket_hook) | ||
| 1110 | return; | ||
| 1111 | |||
| 1112 | sigemptyset (&st); | ||
| 1113 | sigaddset (&st, SIGIO); | ||
| 1114 | ioctl (0, FIOASYNC, &on); /* XXX This fails for multiple ttys. */ | ||
| 1115 | interrupts_deferred = 0; | ||
| 1116 | sigprocmask (SIG_UNBLOCK, &st, (sigset_t *)0); | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | void | ||
| 1120 | unrequest_sigio () | ||
| 1121 | { | ||
| 1122 | int off = 0; | ||
| 1123 | |||
| 1124 | if (noninteractive || read_socket_hook) | ||
| 1125 | return; | ||
| 1126 | |||
| 1127 | ioctl (0, FIOASYNC, &off); /* XXX This fails for multiple ttys. */ | ||
| 1128 | interrupts_deferred = 1; | ||
| 1129 | } | ||
| 1130 | |||
| 1131 | #else /* ! _CX_UX */ | ||
| 1132 | #ifndef MSDOS | 1034 | #ifndef MSDOS |
| 1133 | 1035 | ||
| 1134 | void | 1036 | void |
| @@ -1150,8 +1052,6 @@ unrequest_sigio () | |||
| 1150 | } | 1052 | } |
| 1151 | 1053 | ||
| 1152 | #endif /* MSDOS */ | 1054 | #endif /* MSDOS */ |
| 1153 | #endif /* _CX_UX */ | ||
| 1154 | #endif /* STRIDE */ | ||
| 1155 | #endif /* FASYNC */ | 1055 | #endif /* FASYNC */ |
| 1156 | #endif /* F_SETFL */ | 1056 | #endif /* F_SETFL */ |
| 1157 | #endif /* SIGIO */ | 1057 | #endif /* SIGIO */ |
| @@ -1486,10 +1386,6 @@ init_sys_modes (tty_out) | |||
| 1486 | #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS) | 1386 | #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS) |
| 1487 | XSETINT (Vtty_erase_char, tty.main.c_cc[VERASE]); | 1387 | XSETINT (Vtty_erase_char, tty.main.c_cc[VERASE]); |
| 1488 | 1388 | ||
| 1489 | #ifdef DGUX | ||
| 1490 | /* This allows meta to be sent on 8th bit. */ | ||
| 1491 | tty.main.c_iflag &= ~INPCK; /* don't check input for parity */ | ||
| 1492 | #endif | ||
| 1493 | tty.main.c_iflag |= (IGNBRK); /* Ignore break condition */ | 1389 | tty.main.c_iflag |= (IGNBRK); /* Ignore break condition */ |
| 1494 | tty.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ | 1390 | tty.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ |
| 1495 | #ifdef INLCR /* I'm just being cautious, | 1391 | #ifdef INLCR /* I'm just being cautious, |
| @@ -1703,11 +1599,9 @@ init_sys_modes (tty_out) | |||
| 1703 | #ifdef TCXONC | 1599 | #ifdef TCXONC |
| 1704 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TCXONC, 1); | 1600 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TCXONC, 1); |
| 1705 | #endif | 1601 | #endif |
| 1706 | #ifndef APOLLO | ||
| 1707 | #ifdef TIOCSTART | 1602 | #ifdef TIOCSTART |
| 1708 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TIOCSTART, 0); | 1603 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TIOCSTART, 0); |
| 1709 | #endif | 1604 | #endif |
| 1710 | #endif | ||
| 1711 | 1605 | ||
| 1712 | #if defined (HAVE_TERMIOS) || defined (HPUX9) | 1606 | #if defined (HAVE_TERMIOS) || defined (HPUX9) |
| 1713 | #ifdef TCOON | 1607 | #ifdef TCOON |
| @@ -2085,14 +1979,6 @@ setup_pty (fd) | |||
| 2085 | } | 1979 | } |
| 2086 | #endif | 1980 | #endif |
| 2087 | #endif | 1981 | #endif |
| 2088 | #ifdef IBMRTAIX | ||
| 2089 | /* On AIX, the parent gets SIGHUP when a pty attached child dies. So, we */ | ||
| 2090 | /* ignore SIGHUP once we've started a child on a pty. Note that this may */ | ||
| 2091 | /* cause EMACS not to die when it should, i.e., when its own controlling */ | ||
| 2092 | /* tty goes away. I've complained to the AIX developers, and they may */ | ||
| 2093 | /* change this behavior, but I'm not going to hold my breath. */ | ||
| 2094 | signal (SIGHUP, SIG_IGN); | ||
| 2095 | #endif | ||
| 2096 | } | 1982 | } |
| 2097 | #endif /* HAVE_PTYS */ | 1983 | #endif /* HAVE_PTYS */ |
| 2098 | 1984 | ||
| @@ -2377,13 +2263,8 @@ start_of_text () | |||
| 2377 | #ifdef TEXT_START | 2263 | #ifdef TEXT_START |
| 2378 | return ((char *) TEXT_START); | 2264 | return ((char *) TEXT_START); |
| 2379 | #else | 2265 | #else |
| 2380 | #ifdef GOULD | ||
| 2381 | extern csrt (); | ||
| 2382 | return ((char *) csrt); | ||
| 2383 | #else /* not GOULD */ | ||
| 2384 | extern int _start (); | 2266 | extern int _start (); |
| 2385 | return ((char *) _start); | 2267 | return ((char *) _start); |
| 2386 | #endif /* GOULD */ | ||
| 2387 | #endif /* TEXT_START */ | 2268 | #endif /* TEXT_START */ |
| 2388 | } | 2269 | } |
| 2389 | #endif /* not HAVE_TEXT_START */ | 2270 | #endif /* not HAVE_TEXT_START */ |
| @@ -3324,16 +3205,6 @@ get_random () | |||
| 3324 | return val & ((1L << VALBITS) - 1); | 3205 | return val & ((1L << VALBITS) - 1); |
| 3325 | } | 3206 | } |
| 3326 | 3207 | ||
| 3327 | #ifdef WRONG_NAME_INSQUE | ||
| 3328 | |||
| 3329 | insque (q,p) | ||
| 3330 | caddr_t q,p; | ||
| 3331 | { | ||
| 3332 | _insque (q,p); | ||
| 3333 | } | ||
| 3334 | |||
| 3335 | #endif | ||
| 3336 | |||
| 3337 | #ifdef VMS | 3208 | #ifdef VMS |
| 3338 | 3209 | ||
| 3339 | #ifdef getenv | 3210 | #ifdef getenv |
diff --git a/src/systty.h b/src/systty.h index 411286908a3..a7e8c41c698 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -26,9 +26,6 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | 26 | ||
| 27 | /* Include the proper files. */ | 27 | /* Include the proper files. */ |
| 28 | #ifdef HAVE_TERMIO | 28 | #ifdef HAVE_TERMIO |
| 29 | #ifdef __DGUX | ||
| 30 | #include <sys/ioctl.h> | ||
| 31 | #endif | ||
| 32 | #ifndef NO_TERMIO | 29 | #ifndef NO_TERMIO |
| 33 | #include <termio.h> | 30 | #include <termio.h> |
| 34 | #endif /* not NO_TERMIO */ | 31 | #endif /* not NO_TERMIO */ |
| @@ -130,42 +127,18 @@ static struct sensemode { | |||
| 130 | #ifdef SYSV_PTYS | 127 | #ifdef SYSV_PTYS |
| 131 | #include <sys/types.h> | 128 | #include <sys/types.h> |
| 132 | #include <sys/tty.h> | 129 | #include <sys/tty.h> |
| 133 | #ifdef titan | ||
| 134 | #include <sys/ttyhw.h> | ||
| 135 | #include <sys/stream.h> | ||
| 136 | #endif | ||
| 137 | #ifndef NO_PTY_H | 130 | #ifndef NO_PTY_H |
| 138 | #include <sys/pty.h> | 131 | #include <sys/pty.h> |
| 139 | #endif | 132 | #endif |
| 140 | #endif | 133 | #endif |
| 141 | 134 | ||
| 142 | /* saka@pfu.fujitsu.co.JP writes: | ||
| 143 | FASYNC defined in this file. But, FASYNC don't working. | ||
| 144 | so no problem, because unrequest_sigio only need. */ | ||
| 145 | #if defined (pfa) | ||
| 146 | #include <sys/file.h> | ||
| 147 | #endif | ||
| 148 | |||
| 149 | 135 | ||
| 150 | /* Special cases - inhibiting the use of certain features. */ | 136 | /* Special cases - inhibiting the use of certain features. */ |
| 151 | 137 | ||
| 152 | #ifdef APOLLO | ||
| 153 | #undef TIOCSTART | ||
| 154 | #endif | ||
| 155 | |||
| 156 | #ifdef XENIX | ||
| 157 | #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #ifdef BROKEN_TIOCGETC | 138 | #ifdef BROKEN_TIOCGETC |
| 161 | #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ | 139 | #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ |
| 162 | #endif | 140 | #endif |
| 163 | 141 | ||
| 164 | /* UNIPLUS systems may have FIONREAD. */ | ||
| 165 | #ifdef UNIPLUS | ||
| 166 | #include <sys.ioctl.h> | ||
| 167 | #endif | ||
| 168 | |||
| 169 | /* Allow m- file to inhibit use of FIONREAD. */ | 142 | /* Allow m- file to inhibit use of FIONREAD. */ |
| 170 | #ifdef BROKEN_FIONREAD | 143 | #ifdef BROKEN_FIONREAD |
| 171 | #undef FIONREAD | 144 | #undef FIONREAD |
diff --git a/src/syswait.h b/src/syswait.h index 9f652a63b85..6bfab435459 100644 --- a/src/syswait.h +++ b/src/syswait.h | |||
| @@ -79,7 +79,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 79 | 79 | ||
| 80 | #else /* not WAIT_USE_INT */ | 80 | #else /* not WAIT_USE_INT */ |
| 81 | 81 | ||
| 82 | #if (!defined (BSD_SYSTEM) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) | 82 | #if (!defined (BSD_SYSTEM) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) |
| 83 | #define WAITTYPE int | 83 | #define WAITTYPE int |
| 84 | #define WIFSTOPPED(w) ((w&0377) == 0177) | 84 | #define WIFSTOPPED(w) ((w&0377) == 0177) |
| 85 | #define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0) | 85 | #define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0) |
| @@ -129,7 +129,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 129 | #ifndef WIFEXITED | 129 | #ifndef WIFEXITED |
| 130 | #define WIFEXITED(w) (WTERMSIG (w) == 0) | 130 | #define WIFEXITED(w) (WTERMSIG (w) == 0) |
| 131 | #endif | 131 | #endif |
| 132 | #endif /* BSD_SYSTEM || UNIPLUS || STRIDE || HPUX */ | 132 | #endif /* BSD_SYSTEM || HPUX */ |
| 133 | #endif /* not WAIT_USE_INT */ | 133 | #endif /* not WAIT_USE_INT */ |
| 134 | #endif /* no WAITTYPE */ | 134 | #endif /* no WAITTYPE */ |
| 135 | 135 | ||
diff --git a/src/terminal.c b/src/terminal.c index 8b1836b3681..914db8818f3 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Functions related to terminal devices. | 1 | /* Functions related to terminal devices. |
| 2 | Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. | 2 | Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
diff --git a/src/undo.c b/src/undo.c index bf528e23935..77590e4ace8 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -53,8 +53,12 @@ Lisp_Object Qapply; | |||
| 53 | an undo-boundary. */ | 53 | an undo-boundary. */ |
| 54 | Lisp_Object pending_boundary; | 54 | Lisp_Object pending_boundary; |
| 55 | 55 | ||
| 56 | /* Nonzero means do not record point in record_point. */ | ||
| 57 | |||
| 58 | int undo_inhibit_record_point; | ||
| 59 | |||
| 56 | /* Record point as it was at beginning of this command (if necessary) | 60 | /* Record point as it was at beginning of this command (if necessary) |
| 57 | And prepare the undo info for recording a change. | 61 | and prepare the undo info for recording a change. |
| 58 | PT is the position of point that will naturally occur as a result of the | 62 | PT is the position of point that will naturally occur as a result of the |
| 59 | undo record that will be added just after this command terminates. */ | 63 | undo record that will be added just after this command terminates. */ |
| 60 | 64 | ||
| @@ -64,6 +68,14 @@ record_point (pt) | |||
| 64 | { | 68 | { |
| 65 | int at_boundary; | 69 | int at_boundary; |
| 66 | 70 | ||
| 71 | /* Don't record position of pt when undo_inhibit_record_point holds. | ||
| 72 | Needed to avoid inserting a position record in buffer-undo-list | ||
| 73 | when last_point_position has not been set up correctly by | ||
| 74 | command_loop_1, for example, when running a repeat-repeat-char | ||
| 75 | event. */ | ||
| 76 | if (undo_inhibit_record_point) | ||
| 77 | return; | ||
| 78 | |||
| 67 | /* Allocate a cons cell to be the undo boundary after this command. */ | 79 | /* Allocate a cons cell to be the undo boundary after this command. */ |
| 68 | if (NILP (pending_boundary)) | 80 | if (NILP (pending_boundary)) |
| 69 | pending_boundary = Fcons (Qnil, Qnil); | 81 | pending_boundary = Fcons (Qnil, Qnil); |
| @@ -719,6 +731,10 @@ If it returns nil, the other forms of truncation are done. | |||
| 719 | Garbage collection is inhibited around the call to this function, | 731 | Garbage collection is inhibited around the call to this function, |
| 720 | so it must make sure not to do a lot of consing. */); | 732 | so it must make sure not to do a lot of consing. */); |
| 721 | Vundo_outer_limit_function = Qnil; | 733 | Vundo_outer_limit_function = Qnil; |
| 734 | |||
| 735 | DEFVAR_BOOL ("undo-inhibit-record-point", &undo_inhibit_record_point, | ||
| 736 | doc: /* Non-nil means do not record `point' in `buffer-undo-list'. */); | ||
| 737 | undo_inhibit_record_point = 0; | ||
| 722 | } | 738 | } |
| 723 | 739 | ||
| 724 | /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a | 740 | /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a |
diff --git a/src/unexec.c b/src/unexec.c index 05cff698313..b0ef8fc4d51 100644 --- a/src/unexec.c +++ b/src/unexec.c | |||
| @@ -975,92 +975,9 @@ copy_text_and_data (new, a_out) | |||
| 975 | lseek (new, (long) N_TXTOFF (hdr), 0); | 975 | lseek (new, (long) N_TXTOFF (hdr), 0); |
| 976 | #endif /* no A_TEXT_SEEK */ | 976 | #endif /* no A_TEXT_SEEK */ |
| 977 | 977 | ||
| 978 | #ifdef RISCiX | ||
| 979 | |||
| 980 | /* Acorn's RISC-iX has a wacky way of initialising the position of the heap. | ||
| 981 | * There is a little table in crt0.o that is filled at link time with | ||
| 982 | * the min and current brk positions, among other things. When start | ||
| 983 | * runs, it copies the table to where these parameters live during | ||
| 984 | * execution. This data is in text space, so it cannot be modified here | ||
| 985 | * before saving the executable, so the data is written manually. In | ||
| 986 | * addition, the table does not have a label, and the nearest accessible | ||
| 987 | * label (mcount) is not prefixed with a '_', thus making it inaccessible | ||
| 988 | * from within C programs. To overcome this, emacs's executable is passed | ||
| 989 | * through the command 'nm %s | fgrep mcount' into a pipe, and the | ||
| 990 | * resultant output is then used to find the address of 'mcount'. As far as | ||
| 991 | * is possible to determine, in RISC-iX releases prior to 1.2, the negative | ||
| 992 | * offset of the table from mcount is 0x2c, whereas from 1.2 onwards it is | ||
| 993 | * 0x30. bss_end has been rounded up to page boundary. This solution is | ||
| 994 | * based on suggestions made by Kevin Welton and Steve Hunt of Acorn, and | ||
| 995 | * avoids the need for a custom version of crt0.o for emacs which has its | ||
| 996 | * table in data space. | ||
| 997 | */ | ||
| 998 | |||
| 999 | { | ||
| 1000 | char command[1024]; | ||
| 1001 | char errbuf[1024]; | ||
| 1002 | char address_text[32]; | ||
| 1003 | int proforma[4]; | ||
| 1004 | FILE *pfile; | ||
| 1005 | char *temp_ptr; | ||
| 1006 | char c; | ||
| 1007 | int mcount_address, mcount_offset, count; | ||
| 1008 | extern char *_execname; | ||
| 1009 | |||
| 1010 | |||
| 1011 | /* The use of _execname is incompatible with RISCiX 1.1 */ | ||
| 1012 | sprintf (command, "nm %s | fgrep mcount", _execname); | ||
| 1013 | |||
| 1014 | if ( (pfile = popen(command, "r")) == NULL) | ||
| 1015 | { | ||
| 1016 | sprintf (errbuf, "Could not open pipe"); | ||
| 1017 | PERROR (errbuf); | ||
| 1018 | } | ||
| 1019 | |||
| 1020 | count=0; | ||
| 1021 | while ( ((c=getc(pfile)) != EOF) && (c != ' ') && (count < 31)) | ||
| 1022 | address_text[count++]=c; | ||
| 1023 | address_text[count]=0; | ||
| 1024 | |||
| 1025 | if ((count == 0) || pclose(pfile) != NULL) | ||
| 1026 | { | ||
| 1027 | sprintf (errbuf, "Failed to execute the command '%s'\n", command); | ||
| 1028 | PERROR (errbuf); | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | sscanf(address_text, "%x", &mcount_address); | ||
| 1032 | ptr = (char *) unexec_text_start; | ||
| 1033 | mcount_offset = (char *)mcount_address - ptr; | ||
| 1034 | |||
| 1035 | #ifdef RISCiX_1_1 | ||
| 1036 | #define EDATA_OFFSET 0x2c | ||
| 1037 | #else | ||
| 1038 | #define EDATA_OFFSET 0x30 | ||
| 1039 | #endif | ||
| 1040 | |||
| 1041 | end = ptr + mcount_offset - EDATA_OFFSET; | ||
| 1042 | |||
| 1043 | write_segment (new, ptr, end); | ||
| 1044 | |||
| 1045 | proforma[0] = bss_end; /* becomes _edata */ | ||
| 1046 | proforma[1] = bss_end; /* becomes _end */ | ||
| 1047 | proforma[2] = bss_end; /* becomes _minbrk */ | ||
| 1048 | proforma[3] = bss_end; /* becomes _curbrk */ | ||
| 1049 | |||
| 1050 | write (new, proforma, 16); | ||
| 1051 | |||
| 1052 | temp_ptr = ptr; | ||
| 1053 | ptr = end + 16; | ||
| 1054 | end = temp_ptr + hdr.a_text; | ||
| 1055 | |||
| 1056 | write_segment (new, ptr, end); | ||
| 1057 | } | ||
| 1058 | |||
| 1059 | #else /* !RISCiX */ | ||
| 1060 | ptr = (char *) unexec_text_start; | 978 | ptr = (char *) unexec_text_start; |
| 1061 | end = ptr + hdr.a_text; | 979 | end = ptr + hdr.a_text; |
| 1062 | write_segment (new, ptr, end); | 980 | write_segment (new, ptr, end); |
| 1063 | #endif /* RISCiX */ | ||
| 1064 | 981 | ||
| 1065 | ptr = (char *) unexec_data_start; | 982 | ptr = (char *) unexec_data_start; |
| 1066 | end = ptr + hdr.a_data; | 983 | end = ptr + hdr.a_data; |
| @@ -1175,13 +1092,8 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) | |||
| 1175 | { | 1092 | { |
| 1176 | register int nsyms; | 1093 | register int nsyms; |
| 1177 | register int new; | 1094 | register int new; |
| 1178 | #if defined (amdahl_uts) || defined (pfa) | ||
| 1179 | SYMENT symentry; | ||
| 1180 | AUXENT auxentry; | ||
| 1181 | #else | ||
| 1182 | struct syment symentry; | 1095 | struct syment symentry; |
| 1183 | union auxent auxentry; | 1096 | union auxent auxentry; |
| 1184 | #endif | ||
| 1185 | 1097 | ||
| 1186 | if (!lnnoptr || !f_hdr.f_symptr) | 1098 | if (!lnnoptr || !f_hdr.f_symptr) |
| 1187 | return 0; | 1099 | return 0; |
diff --git a/src/unexsunos4.c b/src/unexsunos4.c deleted file mode 100644 index 17f2b298e00..00000000000 --- a/src/unexsunos4.c +++ /dev/null | |||
| @@ -1,381 +0,0 @@ | |||
| 1 | /* Unexec for Sunos 4 using shared libraries. | ||
| 2 | Copyright (C) 1990, 1994, 1999, 2001, 2002, 2003, 2004, | ||
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 3, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 20 | Boston, MA 02110-1301, USA. */ | ||
| 21 | |||
| 22 | /* Contributed by Viktor Dukhovni. */ | ||
| 23 | /* | ||
| 24 | * Unexec for Berkeley a.out format + SUNOS shared libraries | ||
| 25 | * The unexeced executable contains the __DYNAMIC area from the | ||
| 26 | * original text file, and then the rest of data + bss + malloced area of | ||
| 27 | * the current process. (The __DYNAMIC area is at the top of the process | ||
| 28 | * data segment, we use "data_start" defined externally to mark the start | ||
| 29 | * of the "real" data segment.) | ||
| 30 | * | ||
| 31 | * For programs that want to remap some of the data segment read only | ||
| 32 | * a run_time_remap is provided. This attempts to remap largest area starting | ||
| 33 | * and ending on page boundaries between "data_start" and "bndry" | ||
| 34 | * For this it to figure out where the text file is located. A path search | ||
| 35 | * is attempted after trying argv[0] and if all fails we simply do not remap | ||
| 36 | * | ||
| 37 | * One feature of run_time_remap () is mandatory: reseting the break. | ||
| 38 | * | ||
| 39 | * Note that we can no longer map data into the text segment, as this causes | ||
| 40 | * the __DYNAMIC struct to become read only, breaking the runtime loader. | ||
| 41 | * Thus we no longer need to mess with a private crt0.c, the standard one | ||
| 42 | * will do just fine, since environ can live in the writable area between | ||
| 43 | * __DYNAMIC and data_start, just make sure that pre-crt0.o (the name | ||
| 44 | * is somewhat abused here) is loaded first! | ||
| 45 | * | ||
| 46 | */ | ||
| 47 | |||
| 48 | #ifdef emacs | ||
| 49 | #include <config.h> | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #include <sys/param.h> | ||
| 53 | #include <sys/mman.h> | ||
| 54 | #include <sys/file.h> | ||
| 55 | #include <sys/stat.h> | ||
| 56 | #include <string.h> | ||
| 57 | #include <stdio.h> | ||
| 58 | #include <a.out.h> | ||
| 59 | |||
| 60 | #if defined (SUNOS4) || defined (__FreeBSD__) || defined (__NetBSD__) | ||
| 61 | #define UNDO_RELOCATION | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #ifdef UNDO_RELOCATION | ||
| 65 | #include <link.h> | ||
| 66 | #endif | ||
| 67 | |||
| 68 | #ifdef HAVE_UNISTD_H | ||
| 69 | #include <unistd.h> | ||
| 70 | #endif | ||
| 71 | |||
| 72 | /* NetBSD needs this bit, but SunOS does not have it. */ | ||
| 73 | #ifndef MAP_FILE | ||
| 74 | #define MAP_FILE 0 | ||
| 75 | #endif | ||
| 76 | |||
| 77 | |||
| 78 | /* | ||
| 79 | * for programs other than emacs | ||
| 80 | * define data_start + initialized here, and make sure | ||
| 81 | * this object is loaded first! | ||
| 82 | * emacs will define these elsewhere, and load the object containing | ||
| 83 | * data_start (pre-crt0.o or firstfile.o?) first! | ||
| 84 | * The custom crt0.o *must not* be loaded! | ||
| 85 | */ | ||
| 86 | #ifndef emacs | ||
| 87 | static int data_start = 0; | ||
| 88 | static int initialized = 0; | ||
| 89 | #else | ||
| 90 | extern int initialized; | ||
| 91 | extern unsigned data_start; | ||
| 92 | extern int pureptr; | ||
| 93 | #endif | ||
| 94 | |||
| 95 | extern char *getenv (); | ||
| 96 | static unsigned brk_value; | ||
| 97 | static struct exec nhdr; | ||
| 98 | static int rd_only_len; | ||
| 99 | static long cookie; | ||
| 100 | |||
| 101 | |||
| 102 | unexec (new_name, a_name, bndry, bss_start, entry) | ||
| 103 | char *new_name, *a_name; | ||
| 104 | unsigned bndry, bss_start, entry; | ||
| 105 | { | ||
| 106 | int fd, new; | ||
| 107 | char *old; | ||
| 108 | struct exec ohdr; /* Allocate on the stack, not needed in the next life */ | ||
| 109 | struct stat stat; | ||
| 110 | |||
| 111 | if ((fd = open (a_name, O_RDONLY)) < 0) | ||
| 112 | { | ||
| 113 | fprintf (stderr, "%s: open: ", a_name); | ||
| 114 | perror (a_name); | ||
| 115 | exit (1); | ||
| 116 | } | ||
| 117 | if ((new = open (new_name, O_WRONLY | O_CREAT, 0666)) == -1) | ||
| 118 | { | ||
| 119 | fprintf (stderr, "%s: open: ", a_name); | ||
| 120 | perror (new_name); | ||
| 121 | exit (1); | ||
| 122 | } | ||
| 123 | |||
| 124 | if ((fstat (fd, &stat) == -1)) | ||
| 125 | { | ||
| 126 | fprintf (stderr, "%s: ", a_name); | ||
| 127 | perror ("fstat"); | ||
| 128 | exit (1); | ||
| 129 | } | ||
| 130 | |||
| 131 | old = (char *)mmap (0, stat.st_size, PROT_READ, MAP_FILE|MAP_SHARED, fd, 0); | ||
| 132 | if (old == (char *)-1) | ||
| 133 | { | ||
| 134 | fprintf (stderr, "%s: ", a_name); | ||
| 135 | perror ("mmap"); | ||
| 136 | exit (1); | ||
| 137 | } | ||
| 138 | close (fd); | ||
| 139 | |||
| 140 | nhdr = ohdr = (*(struct exec *)old); | ||
| 141 | |||
| 142 | |||
| 143 | /* | ||
| 144 | * Remember a magic cookie so we know we've got the right binary | ||
| 145 | * when remapping. | ||
| 146 | */ | ||
| 147 | cookie = time (0); | ||
| 148 | |||
| 149 | /* Save the break, it is reset to &_end (by ld.so?). */ | ||
| 150 | brk_value = (unsigned) sbrk (0); | ||
| 151 | |||
| 152 | /* | ||
| 153 | * Round up data start to a page boundary (Lose if not a 2 power!) | ||
| 154 | */ | ||
| 155 | data_start = ((((int)&data_start) - 1) & ~(N_PAGSIZ (nhdr) - 1)) + N_PAGSIZ (nhdr); | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Round down read only pages to a multiple of the page size | ||
| 159 | */ | ||
| 160 | if (bndry) | ||
| 161 | rd_only_len = ((int)bndry & ~(N_PAGSIZ (nhdr) - 1)) - data_start; | ||
| 162 | |||
| 163 | #ifndef emacs | ||
| 164 | /* Have to do this some time before dumping the data */ | ||
| 165 | initialized = 1; | ||
| 166 | #endif | ||
| 167 | |||
| 168 | /* Handle new data and bss sizes and optional new entry point. | ||
| 169 | No one actually uses bss_start and entry, but tradition compels | ||
| 170 | one to support them. | ||
| 171 | Could complain if bss_start > brk_value, | ||
| 172 | but the caller is *supposed* to know what she is doing. */ | ||
| 173 | nhdr.a_data = (bss_start ? bss_start : brk_value) - N_DATADDR (nhdr); | ||
| 174 | nhdr.a_bss = bss_start ? brk_value - bss_start : 0; | ||
| 175 | if (entry) | ||
| 176 | nhdr.a_entry = entry; | ||
| 177 | |||
| 178 | /* | ||
| 179 | * Write out the text segment with new header | ||
| 180 | * Dynamic executables are ZMAGIC with N_TXTOFF==0 and the header | ||
| 181 | * part of the text segment, but no need to rely on this. | ||
| 182 | * So write the TEXT first, then go back replace the header. | ||
| 183 | * Doing it in the other order is less general! | ||
| 184 | */ | ||
| 185 | lseek (new, N_TXTOFF (nhdr), L_SET); | ||
| 186 | write (new, old + N_TXTOFF (ohdr), N_TXTOFF (ohdr) + ohdr.a_text); | ||
| 187 | lseek (new, 0L, L_SET); | ||
| 188 | write (new, &nhdr, sizeof (nhdr)); | ||
| 189 | |||
| 190 | /* | ||
| 191 | * Write out the head of the old data segment from the file not | ||
| 192 | * from core, this has the unresolved __DYNAMIC relocation data | ||
| 193 | * we need to reload | ||
| 194 | */ | ||
| 195 | lseek (new, N_DATOFF (nhdr), L_SET); | ||
| 196 | write (new, old + N_DATOFF (ohdr), (int)&data_start - N_DATADDR (ohdr)); | ||
| 197 | |||
| 198 | /* | ||
| 199 | * Copy the rest of the data from core | ||
| 200 | */ | ||
| 201 | write (new, &data_start, N_BSSADDR (nhdr) - (int)&data_start); | ||
| 202 | |||
| 203 | /* | ||
| 204 | * Copy the symbol table and line numbers | ||
| 205 | */ | ||
| 206 | lseek (new, N_TRELOFF (nhdr), L_SET); | ||
| 207 | write (new, old + N_TRELOFF (ohdr), stat.st_size - N_TRELOFF (ohdr)); | ||
| 208 | |||
| 209 | /* Some other BSD systems use this file. | ||
| 210 | We don't know whether this change is right for them. */ | ||
| 211 | #ifdef UNDO_RELOCATION | ||
| 212 | /* Undo the relocations done at startup by ld.so. | ||
| 213 | It will do these relocations again when we start the dumped Emacs. | ||
| 214 | Doing them twice gives incorrect results. */ | ||
| 215 | { | ||
| 216 | unsigned long daddr = N_DATADDR (ohdr); | ||
| 217 | unsigned long rel, erel; | ||
| 218 | #ifdef SUNOS4 | ||
| 219 | #ifdef SUNOS4_SHARED_LIBRARIES | ||
| 220 | extern struct link_dynamic _DYNAMIC; | ||
| 221 | |||
| 222 | /* SunOS4.x's ld_rel is relative to N_TXTADDR. */ | ||
| 223 | if (!ohdr.a_dynamic) | ||
| 224 | /* This was statically linked. */ | ||
| 225 | rel = erel = 0; | ||
| 226 | else if (_DYNAMIC.ld_version < 2) | ||
| 227 | { | ||
| 228 | rel = _DYNAMIC.ld_un.ld_1->ld_rel + N_TXTADDR (ohdr); | ||
| 229 | erel = _DYNAMIC.ld_un.ld_1->ld_hash + N_TXTADDR (ohdr); | ||
| 230 | } | ||
| 231 | else | ||
| 232 | { | ||
| 233 | rel = _DYNAMIC.ld_un.ld_2->ld_rel + N_TXTADDR (ohdr); | ||
| 234 | erel = _DYNAMIC.ld_un.ld_2->ld_hash + N_TXTADDR (ohdr); | ||
| 235 | } | ||
| 236 | #else /* not SUNOS4_SHARED_LIBRARIES */ | ||
| 237 | rel = erel = 0; | ||
| 238 | #endif /* not SUNOS4_SHARED_LIBRARIES */ | ||
| 239 | #ifdef sparc | ||
| 240 | #define REL_INFO_TYPE struct reloc_info_sparc | ||
| 241 | #else | ||
| 242 | #define REL_INFO_TYPE struct relocation_info | ||
| 243 | #endif /* sparc */ | ||
| 244 | #define REL_TARGET_ADDRESS(r) (((REL_INFO_TYPE *)(r))->r_address) | ||
| 245 | #endif /* SUNOS4 */ | ||
| 246 | #if defined (__FreeBSD__) || defined (__NetBSD__) | ||
| 247 | extern struct _dynamic _DYNAMIC; | ||
| 248 | |||
| 249 | /* FreeBSD's LD_REL is a virtual address itself. */ | ||
| 250 | rel = LD_REL (&_DYNAMIC); | ||
| 251 | erel = rel + LD_RELSZ (&_DYNAMIC); | ||
| 252 | #define REL_INFO_TYPE struct relocation_info | ||
| 253 | #define REL_TARGET_ADDRESS(r) (((REL_INFO_TYPE *)(r))->r_address) | ||
| 254 | #endif | ||
| 255 | |||
| 256 | for (; rel < erel; rel += sizeof (REL_INFO_TYPE)) | ||
| 257 | { | ||
| 258 | /* This is the virtual address where ld.so will do relocation. */ | ||
| 259 | unsigned long target = REL_TARGET_ADDRESS (rel); | ||
| 260 | /* This is the offset in the data segment. */ | ||
| 261 | unsigned long segoffset = target - daddr; | ||
| 262 | |||
| 263 | /* If it is located below data_start, we have to do nothing here, | ||
| 264 | because the old data has been already written to the location. */ | ||
| 265 | if (target < (unsigned long)&data_start) | ||
| 266 | continue; | ||
| 267 | |||
| 268 | lseek (new, N_DATOFF (nhdr) + segoffset, L_SET); | ||
| 269 | write (new, old + N_DATOFF (ohdr) + segoffset, sizeof (unsigned long)); | ||
| 270 | } | ||
| 271 | } | ||
| 272 | #endif /* UNDO_RELOCATION */ | ||
| 273 | |||
| 274 | fchmod (new, 0755); | ||
| 275 | } | ||
| 276 | |||
| 277 | void | ||
| 278 | run_time_remap (progname) | ||
| 279 | char *progname; | ||
| 280 | { | ||
| 281 | char aout[MAXPATHLEN]; | ||
| 282 | register char *path, *p; | ||
| 283 | |||
| 284 | /* Just in case */ | ||
| 285 | if (!initialized) | ||
| 286 | return; | ||
| 287 | |||
| 288 | /* Restore the break */ | ||
| 289 | brk ((char *) brk_value); | ||
| 290 | |||
| 291 | /* If nothing to remap: we are done! */ | ||
| 292 | if (rd_only_len == 0) | ||
| 293 | return; | ||
| 294 | |||
| 295 | /* | ||
| 296 | * Attempt to find the executable | ||
| 297 | * First try argv[0], will almost always succeed as shells tend to give | ||
| 298 | * the full path from the hash list rather than using execvp () | ||
| 299 | */ | ||
| 300 | if (is_it (progname)) | ||
| 301 | return; | ||
| 302 | |||
| 303 | /* | ||
| 304 | * If argv[0] is a full path and does not exist, not much sense in | ||
| 305 | * searching further | ||
| 306 | */ | ||
| 307 | if (strchr (progname, '/')) | ||
| 308 | return; | ||
| 309 | |||
| 310 | /* | ||
| 311 | * Try to search for argv[0] on the PATH | ||
| 312 | */ | ||
| 313 | path = getenv ("PATH"); | ||
| 314 | if (path == NULL) | ||
| 315 | return; | ||
| 316 | |||
| 317 | while (*path) | ||
| 318 | { | ||
| 319 | /* copy through ':' or end */ | ||
| 320 | for (p = aout; *p = *path; ++p, ++path) | ||
| 321 | if (*p == ':') | ||
| 322 | { | ||
| 323 | ++path; /* move past ':' */ | ||
| 324 | break; | ||
| 325 | } | ||
| 326 | *p++ = '/'; | ||
| 327 | strcpy (p, progname); | ||
| 328 | /* | ||
| 329 | * aout is a candidate full path name | ||
| 330 | */ | ||
| 331 | if (is_it (aout)) | ||
| 332 | return; | ||
| 333 | } | ||
| 334 | } | ||
| 335 | |||
| 336 | is_it (filename) | ||
| 337 | char *filename; | ||
| 338 | { | ||
| 339 | int fd; | ||
| 340 | long filenames_cookie; | ||
| 341 | struct exec hdr; | ||
| 342 | |||
| 343 | /* | ||
| 344 | * Open an executable and check for a valid header! | ||
| 345 | * Can't bcmp the header with what we had, it may have been stripped! | ||
| 346 | * so we may save looking at non executables with the same name, mostly | ||
| 347 | * directories. | ||
| 348 | */ | ||
| 349 | fd = open (filename, O_RDONLY); | ||
| 350 | if (fd != -1) | ||
| 351 | { | ||
| 352 | if (read (fd, &hdr, sizeof (hdr)) == sizeof (hdr) | ||
| 353 | && !N_BADMAG (hdr) && N_DATOFF (hdr) == N_DATOFF (nhdr) | ||
| 354 | && N_TRELOFF (hdr) == N_TRELOFF (nhdr)) | ||
| 355 | { | ||
| 356 | /* compare cookies */ | ||
| 357 | lseek (fd, N_DATOFF (hdr) + (int)&cookie - N_DATADDR (hdr), L_SET); | ||
| 358 | read (fd, &filenames_cookie, sizeof (filenames_cookie)); | ||
| 359 | if (filenames_cookie == cookie) | ||
| 360 | { /* Eureka */ | ||
| 361 | |||
| 362 | /* | ||
| 363 | * Do the mapping | ||
| 364 | * The PROT_EXEC may not be needed, but it is safer this way. | ||
| 365 | * should the shared library decide to indirect through | ||
| 366 | * addresses in the data segment not part of __DYNAMIC | ||
| 367 | */ | ||
| 368 | mmap ((char *) data_start, rd_only_len, PROT_READ | PROT_EXEC, | ||
| 369 | MAP_FILE | MAP_SHARED | MAP_FIXED, fd, | ||
| 370 | N_DATOFF (hdr) + data_start - N_DATADDR (hdr)); | ||
| 371 | close (fd); | ||
| 372 | return 1; | ||
| 373 | } | ||
| 374 | } | ||
| 375 | close (fd); | ||
| 376 | } | ||
| 377 | return 0; | ||
| 378 | } | ||
| 379 | |||
| 380 | /* arch-tag: 30227420-2c6f-4700-a4f8-9e45e52f53b1 | ||
| 381 | (do not change this comment) */ | ||
| @@ -120,6 +120,8 @@ static BOOL g_b_init_open_process_token; | |||
| 120 | static BOOL g_b_init_get_token_information; | 120 | static BOOL g_b_init_get_token_information; |
| 121 | static BOOL g_b_init_lookup_account_sid; | 121 | static BOOL g_b_init_lookup_account_sid; |
| 122 | static BOOL g_b_init_get_sid_identifier_authority; | 122 | static BOOL g_b_init_get_sid_identifier_authority; |
| 123 | static BOOL g_b_init_get_sid_sub_authority; | ||
| 124 | static BOOL g_b_init_get_sid_sub_authority_count; | ||
| 123 | 125 | ||
| 124 | /* | 126 | /* |
| 125 | BEGIN: Wrapper functions around OpenProcessToken | 127 | BEGIN: Wrapper functions around OpenProcessToken |
| @@ -161,6 +163,12 @@ typedef BOOL (WINAPI * LookupAccountSid_Proc) ( | |||
| 161 | PSID_NAME_USE peUse); | 163 | PSID_NAME_USE peUse); |
| 162 | typedef PSID_IDENTIFIER_AUTHORITY (WINAPI * GetSidIdentifierAuthority_Proc) ( | 164 | typedef PSID_IDENTIFIER_AUTHORITY (WINAPI * GetSidIdentifierAuthority_Proc) ( |
| 163 | PSID pSid); | 165 | PSID pSid); |
| 166 | typedef PDWORD (WINAPI * GetSidSubAuthority_Proc) ( | ||
| 167 | PSID pSid, | ||
| 168 | DWORD n); | ||
| 169 | typedef PUCHAR (WINAPI * GetSidSubAuthorityCount_Proc) ( | ||
| 170 | PSID pSid); | ||
| 171 | |||
| 164 | 172 | ||
| 165 | /* ** A utility function ** */ | 173 | /* ** A utility function ** */ |
| 166 | static BOOL | 174 | static BOOL |
| @@ -349,6 +357,57 @@ PSID_IDENTIFIER_AUTHORITY WINAPI get_sid_identifier_authority ( | |||
| 349 | return (s_pfn_Get_Sid_Identifier_Authority (pSid)); | 357 | return (s_pfn_Get_Sid_Identifier_Authority (pSid)); |
| 350 | } | 358 | } |
| 351 | 359 | ||
| 360 | PDWORD WINAPI get_sid_sub_authority ( | ||
| 361 | PSID pSid, | ||
| 362 | DWORD n) | ||
| 363 | { | ||
| 364 | static GetSidSubAuthority_Proc s_pfn_Get_Sid_Sub_Authority = NULL; | ||
| 365 | static DWORD zero = 0U; | ||
| 366 | HMODULE hm_advapi32 = NULL; | ||
| 367 | if (is_windows_9x () == TRUE) | ||
| 368 | { | ||
| 369 | return &zero; | ||
| 370 | } | ||
| 371 | if (g_b_init_get_sid_sub_authority == 0) | ||
| 372 | { | ||
| 373 | g_b_init_get_sid_sub_authority = 1; | ||
| 374 | hm_advapi32 = LoadLibrary ("Advapi32.dll"); | ||
| 375 | s_pfn_Get_Sid_Sub_Authority = | ||
| 376 | (GetSidSubAuthority_Proc) GetProcAddress ( | ||
| 377 | hm_advapi32, "GetSidSubAuthority"); | ||
| 378 | } | ||
| 379 | if (s_pfn_Get_Sid_Sub_Authority == NULL) | ||
| 380 | { | ||
| 381 | return &zero; | ||
| 382 | } | ||
| 383 | return (s_pfn_Get_Sid_Sub_Authority (pSid, n)); | ||
| 384 | } | ||
| 385 | |||
| 386 | PUCHAR WINAPI get_sid_sub_authority_count ( | ||
| 387 | PSID pSid) | ||
| 388 | { | ||
| 389 | static GetSidSubAuthorityCount_Proc s_pfn_Get_Sid_Sub_Authority_Count = NULL; | ||
| 390 | static UCHAR zero = 0U; | ||
| 391 | HMODULE hm_advapi32 = NULL; | ||
| 392 | if (is_windows_9x () == TRUE) | ||
| 393 | { | ||
| 394 | return &zero; | ||
| 395 | } | ||
| 396 | if (g_b_init_get_sid_sub_authority_count == 0) | ||
| 397 | { | ||
| 398 | g_b_init_get_sid_sub_authority_count = 1; | ||
| 399 | hm_advapi32 = LoadLibrary ("Advapi32.dll"); | ||
| 400 | s_pfn_Get_Sid_Sub_Authority_Count = | ||
| 401 | (GetSidSubAuthorityCount_Proc) GetProcAddress ( | ||
| 402 | hm_advapi32, "GetSidSubAuthorityCount"); | ||
| 403 | } | ||
| 404 | if (s_pfn_Get_Sid_Sub_Authority_Count == NULL) | ||
| 405 | { | ||
| 406 | return &zero; | ||
| 407 | } | ||
| 408 | return (s_pfn_Get_Sid_Sub_Authority_Count (pSid)); | ||
| 409 | } | ||
| 410 | |||
| 352 | /* | 411 | /* |
| 353 | END: Wrapper functions around OpenProcessToken | 412 | END: Wrapper functions around OpenProcessToken |
| 354 | and other functions in advapi32.dll that are only | 413 | and other functions in advapi32.dll that are only |
| @@ -547,39 +606,47 @@ init_user_info () | |||
| 547 | domain, &dlength, &user_type)) | 606 | domain, &dlength, &user_type)) |
| 548 | { | 607 | { |
| 549 | strcpy (the_passwd.pw_name, name); | 608 | strcpy (the_passwd.pw_name, name); |
| 550 | /* Determine a reasonable uid value. */ | 609 | /* Determine a reasonable uid value. */ |
| 551 | if (stricmp ("administrator", name) == 0) | 610 | if (stricmp ("administrator", name) == 0) |
| 552 | { | 611 | { |
| 553 | the_passwd.pw_uid = 0; | 612 | the_passwd.pw_uid = 500; /* well-known Administrator uid */ |
| 554 | the_passwd.pw_gid = 0; | 613 | the_passwd.pw_gid = 513; /* well-known None gid */ |
| 555 | } | 614 | } |
| 556 | else | 615 | else |
| 557 | { | 616 | { |
| 558 | SID_IDENTIFIER_AUTHORITY * pSIA; | 617 | /* Use the last sub-authority value of the RID, the relative |
| 559 | 618 | portion of the SID, as user/group ID. */ | |
| 560 | pSIA = get_sid_identifier_authority (*((PSID *) user_sid)); | 619 | DWORD n_subauthorities = |
| 561 | /* I believe the relative portion is the last 4 bytes (of 6) | 620 | *get_sid_sub_authority_count (*((PSID *) user_sid)); |
| 562 | with msb first. */ | 621 | |
| 563 | the_passwd.pw_uid = ((pSIA->Value[2] << 24) + | 622 | if (n_subauthorities < 1) |
| 564 | (pSIA->Value[3] << 16) + | 623 | the_passwd.pw_uid = 0; /* the "World" RID */ |
| 565 | (pSIA->Value[4] << 8) + | 624 | else |
| 566 | (pSIA->Value[5] << 0)); | 625 | { |
| 567 | /* restrict to conventional uid range for normal users */ | 626 | the_passwd.pw_uid = |
| 568 | the_passwd.pw_uid = the_passwd.pw_uid % 60001; | 627 | *get_sid_sub_authority (*((PSID *) user_sid), |
| 628 | n_subauthorities - 1); | ||
| 629 | /* Restrict to conventional uid range for normal users. */ | ||
| 630 | the_passwd.pw_uid %= 60001; | ||
| 631 | } | ||
| 569 | 632 | ||
| 570 | /* Get group id */ | 633 | /* Get group id */ |
| 571 | if (get_token_information (token, TokenPrimaryGroup, | 634 | if (get_token_information (token, TokenPrimaryGroup, |
| 572 | (PVOID) user_sid, sizeof (user_sid), &trash)) | 635 | (PVOID) user_sid, sizeof (user_sid), &trash)) |
| 573 | { | 636 | { |
| 574 | SID_IDENTIFIER_AUTHORITY * pSIA; | 637 | n_subauthorities = |
| 575 | 638 | *get_sid_sub_authority_count (*((PSID *) user_sid)); | |
| 576 | pSIA = get_sid_identifier_authority (*((PSID *) user_sid)); | 639 | |
| 577 | the_passwd.pw_gid = ((pSIA->Value[2] << 24) + | 640 | if (n_subauthorities < 1) |
| 578 | (pSIA->Value[3] << 16) + | 641 | the_passwd.pw_gid = 0; /* the "World" RID */ |
| 579 | (pSIA->Value[4] << 8) + | 642 | else |
| 580 | (pSIA->Value[5] << 0)); | 643 | { |
| 581 | /* I don't know if this is necessary, but for safety... */ | 644 | the_passwd.pw_gid = |
| 582 | the_passwd.pw_gid = the_passwd.pw_gid % 60001; | 645 | *get_sid_sub_authority (*((PSID *) user_sid), |
| 646 | n_subauthorities - 1); | ||
| 647 | /* I don't know if this is necessary, but for safety... */ | ||
| 648 | the_passwd.pw_gid %= 60001; | ||
| 649 | } | ||
| 583 | } | 650 | } |
| 584 | else | 651 | else |
| 585 | the_passwd.pw_gid = the_passwd.pw_uid; | 652 | the_passwd.pw_gid = the_passwd.pw_uid; |
| @@ -1938,6 +2005,36 @@ unc_volume_file_attributes (const char *path) | |||
| 1938 | return attrs; | 2005 | return attrs; |
| 1939 | } | 2006 | } |
| 1940 | 2007 | ||
| 2008 | /* Ensure a network connection is authenticated. */ | ||
| 2009 | static void | ||
| 2010 | logon_network_drive (const char *path) | ||
| 2011 | { | ||
| 2012 | NETRESOURCE resource; | ||
| 2013 | char share[MAX_PATH]; | ||
| 2014 | int i, n_slashes; | ||
| 2015 | |||
| 2016 | /* Only logon to networked drives. */ | ||
| 2017 | if (!IS_DIRECTORY_SEP (path[0]) || !IS_DIRECTORY_SEP (path[1])) | ||
| 2018 | return; | ||
| 2019 | n_slashes = 2; | ||
| 2020 | strncpy (share, path, MAX_PATH); | ||
| 2021 | /* Truncate to just server and share name. */ | ||
| 2022 | for (i = 2; i < MAX_PATH; i++) | ||
| 2023 | { | ||
| 2024 | if (IS_DIRECTORY_SEP (share[i]) && ++n_slashes > 3) | ||
| 2025 | { | ||
| 2026 | share[i] = '\0'; | ||
| 2027 | break; | ||
| 2028 | } | ||
| 2029 | } | ||
| 2030 | |||
| 2031 | resource.dwType = RESOURCETYPE_DISK; | ||
| 2032 | resource.lpLocalName = NULL; | ||
| 2033 | resource.lpRemoteName = share; | ||
| 2034 | resource.lpProvider = NULL; | ||
| 2035 | |||
| 2036 | WNetAddConnection2 (&resource, NULL, NULL, CONNECT_INTERACTIVE); | ||
| 2037 | } | ||
| 1941 | 2038 | ||
| 1942 | /* Shadow some MSVC runtime functions to map requests for long filenames | 2039 | /* Shadow some MSVC runtime functions to map requests for long filenames |
| 1943 | to reasonable short names if necessary. This was originally added to | 2040 | to reasonable short names if necessary. This was originally added to |
| @@ -2495,6 +2592,8 @@ stat (const char * path, struct stat * buf) | |||
| 2495 | } | 2592 | } |
| 2496 | else | 2593 | else |
| 2497 | { | 2594 | { |
| 2595 | logon_network_drive (name); | ||
| 2596 | |||
| 2498 | fh = FindFirstFile (name, &wfd); | 2597 | fh = FindFirstFile (name, &wfd); |
| 2499 | if (fh == INVALID_HANDLE_VALUE) | 2598 | if (fh == INVALID_HANDLE_VALUE) |
| 2500 | { | 2599 | { |
| @@ -2668,8 +2767,8 @@ fstat (int desc, struct stat * buf) | |||
| 2668 | buf->st_ino = fake_inode; | 2767 | buf->st_ino = fake_inode; |
| 2669 | 2768 | ||
| 2670 | /* consider files to belong to current user */ | 2769 | /* consider files to belong to current user */ |
| 2671 | buf->st_uid = 0; | 2770 | buf->st_uid = the_passwd.pw_uid; |
| 2672 | buf->st_gid = 0; | 2771 | buf->st_gid = the_passwd.pw_gid; |
| 2673 | 2772 | ||
| 2674 | buf->st_dev = info.dwVolumeSerialNumber; | 2773 | buf->st_dev = info.dwVolumeSerialNumber; |
| 2675 | buf->st_rdev = info.dwVolumeSerialNumber; | 2774 | buf->st_rdev = info.dwVolumeSerialNumber; |
diff --git a/src/window.c b/src/window.c index a6648685d4b..d1e3225e198 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3307,6 +3307,25 @@ Fset_window_buffer_unwind (obuf) | |||
| 3307 | EXFUN (Fset_window_fringes, 4); | 3307 | EXFUN (Fset_window_fringes, 4); |
| 3308 | EXFUN (Fset_window_scroll_bars, 4); | 3308 | EXFUN (Fset_window_scroll_bars, 4); |
| 3309 | 3309 | ||
| 3310 | void | ||
| 3311 | run_window_configuration_change_hook (struct frame *f) | ||
| 3312 | { | ||
| 3313 | if (! NILP (Vwindow_configuration_change_hook) | ||
| 3314 | && ! NILP (Vrun_hooks)) | ||
| 3315 | { | ||
| 3316 | int count = SPECPDL_INDEX (); | ||
| 3317 | if (SELECTED_FRAME () != f) | ||
| 3318 | { | ||
| 3319 | Lisp_Object frame; | ||
| 3320 | XSETFRAME (frame, f); | ||
| 3321 | record_unwind_protect (Fselect_frame, Fselected_frame ()); | ||
| 3322 | Fselect_frame (frame); | ||
| 3323 | } | ||
| 3324 | call1 (Vrun_hooks, Qwindow_configuration_change_hook); | ||
| 3325 | unbind_to (count, Qnil); | ||
| 3326 | } | ||
| 3327 | } | ||
| 3328 | |||
| 3310 | /* Make WINDOW display BUFFER as its contents. RUN_HOOKS_P non-zero | 3329 | /* Make WINDOW display BUFFER as its contents. RUN_HOOKS_P non-zero |
| 3311 | means it's allowed to run hooks. See make_frame for a case where | 3330 | means it's allowed to run hooks. See make_frame for a case where |
| 3312 | it's not allowed. KEEP_MARGINS_P non-zero means that the current | 3331 | it's not allowed. KEEP_MARGINS_P non-zero means that the current |
| @@ -3321,6 +3340,7 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | |||
| 3321 | struct window *w = XWINDOW (window); | 3340 | struct window *w = XWINDOW (window); |
| 3322 | struct buffer *b = XBUFFER (buffer); | 3341 | struct buffer *b = XBUFFER (buffer); |
| 3323 | int count = SPECPDL_INDEX (); | 3342 | int count = SPECPDL_INDEX (); |
| 3343 | int samebuf = EQ (buffer, w->buffer); | ||
| 3324 | 3344 | ||
| 3325 | w->buffer = buffer; | 3345 | w->buffer = buffer; |
| 3326 | 3346 | ||
| @@ -3339,16 +3359,28 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | |||
| 3339 | XSETFASTINT (w->window_end_vpos, 0); | 3359 | XSETFASTINT (w->window_end_vpos, 0); |
| 3340 | bzero (&w->last_cursor, sizeof w->last_cursor); | 3360 | bzero (&w->last_cursor, sizeof w->last_cursor); |
| 3341 | w->window_end_valid = Qnil; | 3361 | w->window_end_valid = Qnil; |
| 3342 | w->hscroll = w->min_hscroll = make_number (0); | 3362 | if (!(keep_margins_p && samebuf)) |
| 3343 | w->vscroll = 0; | 3363 | { /* If we're not actually changing the buffer, Don't reset hscroll and |
| 3344 | set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); | 3364 | vscroll. This case happens for example when called from |
| 3345 | set_marker_restricted (w->start, | 3365 | change_frame_size_1, where we use a dummy call to |
| 3346 | make_number (b->last_window_start), | 3366 | Fset_window_buffer on the frame's selected window (and no other) |
| 3347 | buffer); | 3367 | just in order to run window-configuration-change-hook. |
| 3348 | w->start_at_line_beg = Qnil; | 3368 | Resetting hscroll and vscroll here is problematic for things like |
| 3349 | w->force_start = Qnil; | 3369 | image-mode and doc-view-mode since it resets the image's position |
| 3350 | XSETFASTINT (w->last_modified, 0); | 3370 | whenever we resize the frame. */ |
| 3351 | XSETFASTINT (w->last_overlay_modified, 0); | 3371 | w->hscroll = w->min_hscroll = make_number (0); |
| 3372 | w->vscroll = 0; | ||
| 3373 | set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); | ||
| 3374 | set_marker_restricted (w->start, | ||
| 3375 | make_number (b->last_window_start), | ||
| 3376 | buffer); | ||
| 3377 | w->start_at_line_beg = Qnil; | ||
| 3378 | w->force_start = Qnil; | ||
| 3379 | XSETFASTINT (w->last_modified, 0); | ||
| 3380 | XSETFASTINT (w->last_overlay_modified, 0); | ||
| 3381 | } | ||
| 3382 | /* Maybe we could move this into the `if' but it's not obviously safe and | ||
| 3383 | I doubt it's worth the trouble. */ | ||
| 3352 | windows_or_buffers_changed++; | 3384 | windows_or_buffers_changed++; |
| 3353 | 3385 | ||
| 3354 | /* We must select BUFFER for running the window-scroll-functions. | 3386 | /* We must select BUFFER for running the window-scroll-functions. |
| @@ -3395,10 +3427,7 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | |||
| 3395 | if (! NILP (Vwindow_scroll_functions)) | 3427 | if (! NILP (Vwindow_scroll_functions)) |
| 3396 | run_hook_with_args_2 (Qwindow_scroll_functions, window, | 3428 | run_hook_with_args_2 (Qwindow_scroll_functions, window, |
| 3397 | Fmarker_position (w->start)); | 3429 | Fmarker_position (w->start)); |
| 3398 | 3430 | run_window_configuration_change_hook (XFRAME (WINDOW_FRAME (w))); | |
| 3399 | if (! NILP (Vwindow_configuration_change_hook) | ||
| 3400 | && ! NILP (Vrun_hooks)) | ||
| 3401 | call1 (Vrun_hooks, Qwindow_configuration_change_hook); | ||
| 3402 | } | 3431 | } |
| 3403 | 3432 | ||
| 3404 | unbind_to (count, Qnil); | 3433 | unbind_to (count, Qnil); |
diff --git a/src/window.h b/src/window.h index fb56be8bfb7..b2c62fde01f 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -790,6 +790,7 @@ extern void foreach_window P_ ((struct frame *, | |||
| 790 | extern void grow_mini_window P_ ((struct window *, int)); | 790 | extern void grow_mini_window P_ ((struct window *, int)); |
| 791 | extern void shrink_mini_window P_ ((struct window *)); | 791 | extern void shrink_mini_window P_ ((struct window *)); |
| 792 | 792 | ||
| 793 | void run_window_configuration_change_hook (struct frame *f); | ||
| 793 | 794 | ||
| 794 | /* Make WINDOW display BUFFER as its contents. RUN_HOOKS_P non-zero | 795 | /* Make WINDOW display BUFFER as its contents. RUN_HOOKS_P non-zero |
| 795 | means it's allowed to run hooks. See make_frame for a case where | 796 | means it's allowed to run hooks. See make_frame for a case where |
diff --git a/src/xdisp.c b/src/xdisp.c index 99099df7463..2993fbe912f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -239,6 +239,7 @@ extern Lisp_Object Qhelp_echo; | |||
| 239 | 239 | ||
| 240 | Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | 240 | Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; |
| 241 | Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; | 241 | Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; |
| 242 | Lisp_Object Qwindow_text_change_functions, Vwindow_text_change_functions; | ||
| 242 | Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; | 243 | Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions; |
| 243 | Lisp_Object Qinhibit_point_motion_hooks; | 244 | Lisp_Object Qinhibit_point_motion_hooks; |
| 244 | Lisp_Object QCeval, QCfile, QCdata, QCpropertize; | 245 | Lisp_Object QCeval, QCfile, QCdata, QCpropertize; |
| @@ -696,6 +697,7 @@ int trace_move; | |||
| 696 | point visible. */ | 697 | point visible. */ |
| 697 | 698 | ||
| 698 | int automatic_hscrolling_p; | 699 | int automatic_hscrolling_p; |
| 700 | Lisp_Object Qauto_hscroll_mode; | ||
| 699 | 701 | ||
| 700 | /* How close to the margin can point get before the window is scrolled | 702 | /* How close to the margin can point get before the window is scrolled |
| 701 | horizontally. */ | 703 | horizontally. */ |
| @@ -1328,6 +1330,28 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos) | |||
| 1328 | visible_p = 1; | 1330 | visible_p = 1; |
| 1329 | if (visible_p) | 1331 | if (visible_p) |
| 1330 | { | 1332 | { |
| 1333 | Lisp_Object window, prop; | ||
| 1334 | |||
| 1335 | XSETWINDOW (window, w); | ||
| 1336 | prop = Fget_char_property (make_number (it.position.charpos), | ||
| 1337 | Qinvisible, window); | ||
| 1338 | |||
| 1339 | /* If charpos coincides with invisible text covered with an | ||
| 1340 | ellipsis, use the first glyph of the ellipsis to compute | ||
| 1341 | the pixel positions. */ | ||
| 1342 | if (TEXT_PROP_MEANS_INVISIBLE (prop) == 2) | ||
| 1343 | { | ||
| 1344 | struct glyph_row *row = it.glyph_row; | ||
| 1345 | struct glyph *glyph = row->glyphs[TEXT_AREA]; | ||
| 1346 | struct glyph *end = glyph + row->used[TEXT_AREA]; | ||
| 1347 | int x = row->x; | ||
| 1348 | |||
| 1349 | for (; glyph < end && glyph->charpos < charpos; glyph++) | ||
| 1350 | x += glyph->pixel_width; | ||
| 1351 | |||
| 1352 | top_x = x; | ||
| 1353 | } | ||
| 1354 | |||
| 1331 | *x = top_x; | 1355 | *x = top_x; |
| 1332 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); | 1356 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); |
| 1333 | *rtop = max (0, window_top_y - top_y); | 1357 | *rtop = max (0, window_top_y - top_y); |
| @@ -8936,8 +8960,6 @@ echo_area_display (update_frame_p) | |||
| 8936 | if (!FRAME_VISIBLE_P (f) || !f->glyphs_initialized_p) | 8960 | if (!FRAME_VISIBLE_P (f) || !f->glyphs_initialized_p) |
| 8937 | return 0; | 8961 | return 0; |
| 8938 | 8962 | ||
| 8939 | /* The terminal frame is used as the first Emacs frame on the Mac OS. */ | ||
| 8940 | #ifndef MAC_OS8 | ||
| 8941 | #ifdef HAVE_WINDOW_SYSTEM | 8963 | #ifdef HAVE_WINDOW_SYSTEM |
| 8942 | /* When Emacs starts, selected_frame may be the initial terminal | 8964 | /* When Emacs starts, selected_frame may be the initial terminal |
| 8943 | frame. If we let this through, a message would be displayed on | 8965 | frame. If we let this through, a message would be displayed on |
| @@ -8945,7 +8967,6 @@ echo_area_display (update_frame_p) | |||
| 8945 | if (FRAME_INITIAL_P (XFRAME (selected_frame))) | 8967 | if (FRAME_INITIAL_P (XFRAME (selected_frame))) |
| 8946 | return 0; | 8968 | return 0; |
| 8947 | #endif /* HAVE_WINDOW_SYSTEM */ | 8969 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 8948 | #endif | ||
| 8949 | 8970 | ||
| 8950 | /* Redraw garbaged frames. */ | 8971 | /* Redraw garbaged frames. */ |
| 8951 | if (frame_garbaged) | 8972 | if (frame_garbaged) |
| @@ -10535,11 +10556,12 @@ hscroll_window_tree (window) | |||
| 10535 | /* Scroll when cursor is inside this scroll margin. */ | 10556 | /* Scroll when cursor is inside this scroll margin. */ |
| 10536 | h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w); | 10557 | h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w); |
| 10537 | 10558 | ||
| 10538 | if ((XFASTINT (w->hscroll) | 10559 | if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->buffer)) |
| 10539 | && w->cursor.x <= h_margin) | 10560 | && ((XFASTINT (w->hscroll) |
| 10540 | || (cursor_row->enabled_p | 10561 | && w->cursor.x <= h_margin) |
| 10541 | && cursor_row->truncated_on_right_p | 10562 | || (cursor_row->enabled_p |
| 10542 | && (w->cursor.x >= text_area_width - h_margin))) | 10563 | && cursor_row->truncated_on_right_p |
| 10564 | && (w->cursor.x >= text_area_width - h_margin)))) | ||
| 10543 | { | 10565 | { |
| 10544 | struct it it; | 10566 | struct it it; |
| 10545 | int hscroll; | 10567 | int hscroll; |
| @@ -10629,16 +10651,9 @@ static int | |||
| 10629 | hscroll_windows (window) | 10651 | hscroll_windows (window) |
| 10630 | Lisp_Object window; | 10652 | Lisp_Object window; |
| 10631 | { | 10653 | { |
| 10632 | int hscrolled_p; | 10654 | int hscrolled_p = hscroll_window_tree (window); |
| 10633 | 10655 | if (hscrolled_p) | |
| 10634 | if (automatic_hscrolling_p) | 10656 | clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window)))); |
| 10635 | { | ||
| 10636 | hscrolled_p = hscroll_window_tree (window); | ||
| 10637 | if (hscrolled_p) | ||
| 10638 | clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window)))); | ||
| 10639 | } | ||
| 10640 | else | ||
| 10641 | hscrolled_p = 0; | ||
| 10642 | return hscrolled_p; | 10657 | return hscrolled_p; |
| 10643 | } | 10658 | } |
| 10644 | 10659 | ||
| @@ -13032,8 +13047,7 @@ redisplay_window (window, just_this_one_p) | |||
| 13032 | *w->desired_matrix->method = 0; | 13047 | *w->desired_matrix->method = 0; |
| 13033 | #endif | 13048 | #endif |
| 13034 | 13049 | ||
| 13035 | specbind (Qinhibit_point_motion_hooks, Qt); | 13050 | restart: |
| 13036 | |||
| 13037 | reconsider_clip_changes (w, buffer); | 13051 | reconsider_clip_changes (w, buffer); |
| 13038 | 13052 | ||
| 13039 | /* Has the mode line to be updated? */ | 13053 | /* Has the mode line to be updated? */ |
| @@ -13084,10 +13098,6 @@ redisplay_window (window, just_this_one_p) | |||
| 13084 | /* Really select the buffer, for the sake of buffer-local | 13098 | /* Really select the buffer, for the sake of buffer-local |
| 13085 | variables. */ | 13099 | variables. */ |
| 13086 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 13100 | set_buffer_internal_1 (XBUFFER (w->buffer)); |
| 13087 | SET_TEXT_POS (opoint, PT, PT_BYTE); | ||
| 13088 | |||
| 13089 | beg_unchanged = BEG_UNCHANGED; | ||
| 13090 | end_unchanged = END_UNCHANGED; | ||
| 13091 | 13101 | ||
| 13092 | current_matrix_up_to_date_p | 13102 | current_matrix_up_to_date_p |
| 13093 | = (!NILP (w->window_end_valid) | 13103 | = (!NILP (w->window_end_valid) |
| @@ -13096,6 +13106,23 @@ redisplay_window (window, just_this_one_p) | |||
| 13096 | && XFASTINT (w->last_modified) >= MODIFF | 13106 | && XFASTINT (w->last_modified) >= MODIFF |
| 13097 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); | 13107 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); |
| 13098 | 13108 | ||
| 13109 | /* Run the window-bottom-change-functions | ||
| 13110 | if it is possible that the text on the screen has changed | ||
| 13111 | (either due to modification of the text, or any other reason). */ | ||
| 13112 | if (!current_matrix_up_to_date_p | ||
| 13113 | && !NILP (Vwindow_text_change_functions)) | ||
| 13114 | { | ||
| 13115 | safe_run_hooks (Qwindow_text_change_functions); | ||
| 13116 | goto restart; | ||
| 13117 | } | ||
| 13118 | |||
| 13119 | beg_unchanged = BEG_UNCHANGED; | ||
| 13120 | end_unchanged = END_UNCHANGED; | ||
| 13121 | |||
| 13122 | SET_TEXT_POS (opoint, PT, PT_BYTE); | ||
| 13123 | |||
| 13124 | specbind (Qinhibit_point_motion_hooks, Qt); | ||
| 13125 | |||
| 13099 | buffer_unchanged_p | 13126 | buffer_unchanged_p |
| 13100 | = (!NILP (w->window_end_valid) | 13127 | = (!NILP (w->window_end_valid) |
| 13101 | && !current_buffer->clip_changed | 13128 | && !current_buffer->clip_changed |
| @@ -24288,6 +24315,9 @@ syms_of_xdisp () | |||
| 24288 | staticpro (&Qwindow_scroll_functions); | 24315 | staticpro (&Qwindow_scroll_functions); |
| 24289 | Qwindow_scroll_functions = intern ("window-scroll-functions"); | 24316 | Qwindow_scroll_functions = intern ("window-scroll-functions"); |
| 24290 | 24317 | ||
| 24318 | staticpro (&Qwindow_text_change_functions); | ||
| 24319 | Qwindow_text_change_functions = intern ("window-text-change-functions"); | ||
| 24320 | |||
| 24291 | staticpro (&Qredisplay_end_trigger_functions); | 24321 | staticpro (&Qredisplay_end_trigger_functions); |
| 24292 | Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions"); | 24322 | Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions"); |
| 24293 | 24323 | ||
| @@ -24599,6 +24629,11 @@ and its new display-start position. Note that the value of `window-end' | |||
| 24599 | is not valid when these functions are called. */); | 24629 | is not valid when these functions are called. */); |
| 24600 | Vwindow_scroll_functions = Qnil; | 24630 | Vwindow_scroll_functions = Qnil; |
| 24601 | 24631 | ||
| 24632 | DEFVAR_LISP ("window-text-change-functions", | ||
| 24633 | &Vwindow_text_change_functions, | ||
| 24634 | doc: /* Functions to call in redisplay when text in the window might change. */); | ||
| 24635 | Vwindow_text_change_functions = Qnil; | ||
| 24636 | |||
| 24602 | DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, | 24637 | DEFVAR_LISP ("redisplay-end-trigger-functions", &Vredisplay_end_trigger_functions, |
| 24603 | doc: /* Functions called when redisplay of a window reaches the end trigger. | 24638 | doc: /* Functions called when redisplay of a window reaches the end trigger. |
| 24604 | Each function is called with two arguments, the window and the end trigger value. | 24639 | Each function is called with two arguments, the window and the end trigger value. |
| @@ -24708,6 +24743,8 @@ the frame's other specifications determine how to blink the cursor off. */); | |||
| 24708 | DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p, | 24743 | DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p, |
| 24709 | doc: /* *Non-nil means scroll the display automatically to make point visible. */); | 24744 | doc: /* *Non-nil means scroll the display automatically to make point visible. */); |
| 24710 | automatic_hscrolling_p = 1; | 24745 | automatic_hscrolling_p = 1; |
| 24746 | Qauto_hscroll_mode = intern ("auto-hscroll-mode"); | ||
| 24747 | staticpro (&Qauto_hscroll_mode); | ||
| 24711 | 24748 | ||
| 24712 | DEFVAR_INT ("hscroll-margin", &hscroll_margin, | 24749 | DEFVAR_INT ("hscroll-margin", &hscroll_margin, |
| 24713 | doc: /* *How many columns away from the window edge point is allowed to get | 24750 | doc: /* *How many columns away from the window edge point is allowed to get |
diff --git a/src/xterm.c b/src/xterm.c index 1c5daca6425..aea431ea3fa 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6776,9 +6776,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6776 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); | 6776 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); |
| 6777 | } | 6777 | } |
| 6778 | 6778 | ||
| 6779 | /* Previous code updated count by nchars rather than nbytes, | 6779 | count += nchars; |
| 6780 | but that seems bogus to me. ++kfs */ | ||
| 6781 | count += nbytes; | ||
| 6782 | 6780 | ||
| 6783 | inev.ie.kind = NO_EVENT; /* Already stored above. */ | 6781 | inev.ie.kind = NO_EVENT; /* Already stored above. */ |
| 6784 | 6782 | ||
| @@ -7275,7 +7273,9 @@ x_dispatch_event (event, display) | |||
| 7275 | We return as soon as there are no more events to be read. | 7273 | We return as soon as there are no more events to be read. |
| 7276 | 7274 | ||
| 7277 | We return the number of characters stored into the buffer, | 7275 | We return the number of characters stored into the buffer, |
| 7278 | thus pretending to be `read'. | 7276 | thus pretending to be `read' (except the characters we store |
| 7277 | in the keyboard buffer can be multibyte, so are not necessarily | ||
| 7278 | C chars). | ||
| 7279 | 7279 | ||
| 7280 | EXPECTED is nonzero if the caller knows input is available. */ | 7280 | EXPECTED is nonzero if the caller knows input is available. */ |
| 7281 | 7281 | ||