diff options
| author | Miles Bader | 2007-02-26 23:03:45 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-02-26 23:03:45 +0000 |
| commit | a73d7753f965734247be482efa125da5235996da (patch) | |
| tree | 56af26fb1a12a2c93c146aac923947968c4c9d76 /src | |
| parent | 55a5664de23c07003d4d2584fc065619609500b6 (diff) | |
| parent | f6f3d0b9133d06b29523c7bc744130cddc5c8d6b (diff) | |
| download | emacs-a73d7753f965734247be482efa125da5235996da.tar.gz emacs-a73d7753f965734247be482efa125da5235996da.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 638-652)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 202)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-177
Diffstat (limited to 'src')
50 files changed, 1109 insertions, 271 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 723f8f6b21c..4eed8c4c705 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -977,7 +977,7 @@ Print $ as a lisp object of any type. | |||
| 977 | end | 977 | end |
| 978 | 978 | ||
| 979 | define xprintstr | 979 | define xprintstr |
| 980 | set $data = $arg0->data | 980 | set $data = (char *) $arg0->data |
| 981 | output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) | 981 | output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) |
| 982 | end | 982 | end |
| 983 | 983 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 63d39d7e6dc..a01b3137e95 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,160 @@ | |||
| 1 | 2007-02-25 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * m/xtensa.h: New file. | ||
| 4 | |||
| 5 | 2007-02-24 Nick Roberts <nickrob@snap.net.nz> | ||
| 6 | |||
| 7 | * .gdbinit (xprintstr): Ensure GDB (> 6.6) prints symbol name | ||
| 8 | as strings and not character arrays. | ||
| 9 | |||
| 10 | 2007-02-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 11 | |||
| 12 | * macterm.c [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag) | ||
| 13 | (x_set_toolkit_scroll_bar_thumb): Add bar->min_handle as margin to | ||
| 14 | scroll bar handle size in order to avoid `scroll backward' problem. | ||
| 15 | (x_scroll_bar_create, XTset_vertical_scroll_bar) | ||
| 16 | [USE_TOOLKIT_SCROLL_BARS]: Initialize bar->min_handle. | ||
| 17 | |||
| 18 | * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: New | ||
| 19 | member `min_handle'. | ||
| 20 | |||
| 21 | 2007-02-23 Kim F. Storm <storm@cua.dk> | ||
| 22 | |||
| 23 | * print.c (print): Reset print_number_index if Vprint_number_table | ||
| 24 | is nil. | ||
| 25 | |||
| 26 | 2007-02-23 Eli Zaretskii <eliz@gnu.org> | ||
| 27 | |||
| 28 | * w32.c (stat, get_long_basename, is_unc_volume): Use _mbspbrk | ||
| 29 | instead of strpbrk. | ||
| 30 | |||
| 31 | 2007-02-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 32 | |||
| 33 | * macmenu.c (mac_menu_show): Call unbind_to early. Use variable | ||
| 34 | `menu_item_selection' as in W32 version. | ||
| 35 | [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Add explicit | ||
| 36 | braces to avoid ambiguous `else'. | ||
| 37 | |||
| 38 | * macterm.c (mac_display_info_for_display): Remove function. | ||
| 39 | (mac_flush_display_optional) [USE_CG_DRAWING]: New function. | ||
| 40 | (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for | ||
| 41 | flush_display_optional. | ||
| 42 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press): New | ||
| 43 | argument MOUSE_POS. All uses changed. Set bar->dragging to | ||
| 44 | negative integer if scroll bar handle is pressed. | ||
| 45 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release): Negative | ||
| 46 | bar->dragging means scroll bar handle is not dragged. | ||
| 47 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial | ||
| 48 | offset of scroll bar handle from negative bar->dragging. | ||
| 49 | (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll | ||
| 50 | bar click is compared against mapped one. Set down/up_modifier | ||
| 51 | for scroll bar click event with control key. | ||
| 52 | |||
| 53 | * macterm.h (x_display_info_for_display): Remove extern. | ||
| 54 | (SCROLL_BAR_UNPACK, SET_SCROLL_BAR_CONTROL_HANDLE): Don't limit | ||
| 55 | value to be unpacked to 32-bit on LP64 model. | ||
| 56 | |||
| 57 | 2007-02-23 Kenichi Handa <handa@m17n.org> | ||
| 58 | |||
| 59 | * process.c (send_process_object_unwind): New function. | ||
| 60 | (send_process_object): New function. | ||
| 61 | (Fprocess_send_region): Call send_process_object. | ||
| 62 | (Fprocess_send_string): Likewise. | ||
| 63 | |||
| 64 | 2007-02-22 Jason Rumney <jasonr@gnu.org> | ||
| 65 | |||
| 66 | * w32menu.c (w32_menu_show): Mark the frame's menu as inactive | ||
| 67 | when popup menu finishes. | ||
| 68 | |||
| 69 | * w32fns.c (menubar_in_use): New flag. | ||
| 70 | (w32_wnd_proc) [WM_INITMENU, WM_EXITMENULOOP, WM_TIMER, WM_COMMAND]: | ||
| 71 | Use it. | ||
| 72 | |||
| 73 | * w32menu.c (Fx_popup_menu): Don't free menu strings here. | ||
| 74 | (w32_menu_show): Do it here instead. | ||
| 75 | |||
| 76 | * w32fns.c (w32_wnd_proc) [WM_INITMENU]: Set menubar_active frame | ||
| 77 | parameter. | ||
| 78 | |||
| 79 | * w32menu.c (current_popup_menu): Make available globally. | ||
| 80 | (menubar_selection_callback): Free menu strings before pushing the | ||
| 81 | menu event into the keyboard buffer. Remove | ||
| 82 | menu_command_in_progress. | ||
| 83 | |||
| 84 | * w32fns.c (current_popup_menu): Use from w32menu.c. | ||
| 85 | (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active | ||
| 86 | and current_popup_menu to determine whether a menubar menu has | ||
| 87 | been cancelled. | ||
| 88 | |||
| 89 | * w32term.h (w32_output): Remove menu_command_in_progress. | ||
| 90 | |||
| 91 | 2007-02-22 Kim F. Storm <storm@cua.dk> | ||
| 92 | |||
| 93 | * dispnew.c (update_frame, update_single_window): Set force_p here if | ||
| 94 | redisplay_dont_pause is set or Vredisplay_preemption_period is nil... | ||
| 95 | (update_window, update_frame_1): ... instead of here. | ||
| 96 | (update_text_area): Clear mouse face on header lines. | ||
| 97 | |||
| 98 | 2007-02-21 Kim F. Storm <storm@cua.dk> | ||
| 99 | |||
| 100 | * minibuf.c (Fassoc_string): Doc fix. Allow symbol for KEY too. | ||
| 101 | |||
| 102 | 2007-02-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 103 | |||
| 104 | * macterm.c (WINDOW_RESOURCE, TERM_WINDOW_RESOURCE): Remove macros. | ||
| 105 | [USE_MAC_TSM] (mac_handle_text_input_event): Remove unused variable | ||
| 106 | `mapped_modifiers'. | ||
| 107 | (XTread_socket) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1020]: Use Keyboard | ||
| 108 | Layout Services routines to get current Unicode keyboard layout. | ||
| 109 | |||
| 110 | 2007-02-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 111 | |||
| 112 | * frame.c (x_set_screen_gamma): Apply gamma value to the frame's | ||
| 113 | bgcolor. | ||
| 114 | |||
| 115 | 2007-02-19 Kim F. Storm <storm@cua.dk> | ||
| 116 | |||
| 117 | * minibuf.c (Fassoc_string): Allow symbols as keys. | ||
| 118 | |||
| 119 | * w32term.c (w32_set_scroll_bar_thumb): Don't resize scroll-bar | ||
| 120 | handle while dragging, except when we get close to eob. | ||
| 121 | Fix position and size calculations so we don't scroll backwards | ||
| 122 | just by clicking on the handle. | ||
| 123 | |||
| 124 | 2007-02-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 125 | |||
| 126 | * Makefile.in (${emacsapp}Contents/Resources/Emacs.rsrc) | ||
| 127 | [HAVE_CARBON]: Remove target. | ||
| 128 | (macosx-app) [HAVE_CARBON]: Don't depend on it. | ||
| 129 | |||
| 130 | 2007-02-17 Juanma Barranquero <lekktu@gmail.com> | ||
| 131 | |||
| 132 | * callproc.c (syms_of_callproc) <doc-directory>: | ||
| 133 | <configure-info-directory>: | ||
| 134 | (Fgetenv_internal): Fix typos in docstrings. | ||
| 135 | |||
| 136 | * doc.c (Fsubstitute_command_keys): Fix typo in docstring. | ||
| 137 | |||
| 138 | 2007-02-16 Andreas Schwab <schwab@suse.de> | ||
| 139 | |||
| 140 | * frame.c (Fmodify_frame_parameters): Return a value. | ||
| 141 | |||
| 142 | * editfns.c (Fformat): Add support for '+' flag. | ||
| 143 | * doprnt.c (doprnt1): Likewise. Fix overflow checking. | ||
| 144 | |||
| 145 | 2007-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 146 | |||
| 147 | * s/umips.h: Unused file removed. | ||
| 148 | |||
| 149 | 2007-02-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 150 | |||
| 151 | * xfaces.c (Fcolor_distance): Don't continue checking a color for | ||
| 152 | errors after it has been correctly parsed as an RGB list. | ||
| 153 | |||
| 154 | 2007-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 155 | |||
| 156 | * xterm.c (do_ewmh_fullscreen): Also check for _NET_WM_STATE_FULLSCREEN. | ||
| 157 | |||
| 1 | 2007-02-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 158 | 2007-02-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 159 | ||
| 3 | * macfns.c (Fx_focus_frame): Move current process to foreground if | 160 | * macfns.c (Fx_focus_frame): Move current process to foreground if |
| @@ -510,7 +667,7 @@ | |||
| 510 | 667 | ||
| 511 | 2006-12-19 Juanma Barranquero <lekktu@gmail.com> | 668 | 2006-12-19 Juanma Barranquero <lekktu@gmail.com> |
| 512 | 669 | ||
| 513 | * buffer.c (syms_of_buffer) <buffer-display-table> | 670 | * buffer.c (syms_of_buffer) <buffer-display-table>: |
| 514 | <scroll-up-aggressively, scroll-down-aggressively>: Doc fixes. | 671 | <scroll-up-aggressively, scroll-down-aggressively>: Doc fixes. |
| 515 | 672 | ||
| 516 | 2006-12-17 Richard Stallman <rms@gnu.org> | 673 | 2006-12-17 Richard Stallman <rms@gnu.org> |
diff --git a/src/Makefile.in b/src/Makefile.in index ceb9a1d5888..c5e1c18116b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -1335,15 +1335,10 @@ macosx-bundle: ${emacsapp}Contents/Resources/English.lproj \ | |||
| 1335 | ${emacsapp}Contents/Info.plist ${emacsapp}Contents/PkgInfo \ | 1335 | ${emacsapp}Contents/Info.plist ${emacsapp}Contents/PkgInfo \ |
| 1336 | ${emacsapp}Contents/Resources/Emacs.icns \ | 1336 | ${emacsapp}Contents/Resources/Emacs.icns \ |
| 1337 | ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings | 1337 | ${emacsapp}Contents/Resources/English.lproj/InfoPlist.strings |
| 1338 | macosx-app: macosx-bundle ${emacsapp}Contents/MacOS/Emacs \ | 1338 | macosx-app: macosx-bundle ${emacsapp}Contents/MacOS/Emacs |
| 1339 | ${emacsapp}Contents/Resources/Emacs.rsrc | ||
| 1340 | ${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT} | 1339 | ${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT} |
| 1341 | mkdir -p ${emacsapp}Contents/MacOS/; | 1340 | mkdir -p ${emacsapp}Contents/MacOS/; |
| 1342 | cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT} | 1341 | cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT} |
| 1343 | ${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r | ||
| 1344 | /Developer/Tools/Rez -useDF \ | ||
| 1345 | -o ${emacsapp}Contents/Resources/Emacs.rsrc \ | ||
| 1346 | /System/Library/Frameworks/Carbon.framework/Headers/Carbon.r $< | ||
| 1347 | #endif | 1342 | #endif |
| 1348 | 1343 | ||
| 1349 | ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c | 1344 | ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c |
diff --git a/src/callproc.c b/src/callproc.c index 6af47f0ed3e..c5e747ff6d2 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1370,7 +1370,7 @@ getenv_internal (var, varlen, value, valuelen) | |||
| 1370 | DEFUN ("getenv-internal", Fgetenv_internal, Sgetenv_internal, 1, 1, 0, | 1370 | DEFUN ("getenv-internal", Fgetenv_internal, Sgetenv_internal, 1, 1, 0, |
| 1371 | doc: /* Return the value of environment variable VAR, as a string. | 1371 | doc: /* Return the value of environment variable VAR, as a string. |
| 1372 | VAR should be a string. Value is nil if VAR is undefined in the environment. | 1372 | VAR should be a string. Value is nil if VAR is undefined in the environment. |
| 1373 | This function consults the variable ``process-environment'' for its value. */) | 1373 | This function consults the variable `process-environment' for its value. */) |
| 1374 | (var) | 1374 | (var) |
| 1375 | Lisp_Object var; | 1375 | Lisp_Object var; |
| 1376 | { | 1376 | { |
| @@ -1580,12 +1580,12 @@ These are files intended for Emacs to use while it runs. */); | |||
| 1580 | 1580 | ||
| 1581 | DEFVAR_LISP ("doc-directory", &Vdoc_directory, | 1581 | DEFVAR_LISP ("doc-directory", &Vdoc_directory, |
| 1582 | doc: /* Directory containing the DOC file that comes with GNU Emacs. | 1582 | doc: /* Directory containing the DOC file that comes with GNU Emacs. |
| 1583 | This is usually the same as data-directory. */); | 1583 | This is usually the same as `data-directory'. */); |
| 1584 | 1584 | ||
| 1585 | DEFVAR_LISP ("configure-info-directory", &Vconfigure_info_directory, | 1585 | DEFVAR_LISP ("configure-info-directory", &Vconfigure_info_directory, |
| 1586 | doc: /* For internal use by the build procedure only. | 1586 | doc: /* For internal use by the build procedure only. |
| 1587 | This is the name of the directory in which the build procedure installed | 1587 | This is the name of the directory in which the build procedure installed |
| 1588 | Emacs's info files; the default value for Info-default-directory-list | 1588 | Emacs's info files; the default value for `Info-default-directory-list' |
| 1589 | includes this. */); | 1589 | includes this. */); |
| 1590 | Vconfigure_info_directory = build_string (PATH_INFO); | 1590 | Vconfigure_info_directory = build_string (PATH_INFO); |
| 1591 | 1591 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index ccda3eca550..97cd210396c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3827,8 +3827,12 @@ update_frame (f, force_p, inhibit_hairy_id_p) | |||
| 3827 | int paused_p; | 3827 | int paused_p; |
| 3828 | struct window *root_window = XWINDOW (f->root_window); | 3828 | struct window *root_window = XWINDOW (f->root_window); |
| 3829 | 3829 | ||
| 3830 | if (redisplay_dont_pause) | ||
| 3831 | force_p = 1; | ||
| 3830 | #if PERIODIC_PREEMPTION_CHECKING | 3832 | #if PERIODIC_PREEMPTION_CHECKING |
| 3831 | if (!force_p && NUMBERP (Vredisplay_preemption_period)) | 3833 | else if (NILP (Vredisplay_preemption_period)) |
| 3834 | force_p = 1; | ||
| 3835 | else if (!force_p && NUMBERP (Vredisplay_preemption_period)) | ||
| 3832 | { | 3836 | { |
| 3833 | EMACS_TIME tm; | 3837 | EMACS_TIME tm; |
| 3834 | double p = XFLOATINT (Vredisplay_preemption_period); | 3838 | double p = XFLOATINT (Vredisplay_preemption_period); |
| @@ -3982,8 +3986,12 @@ update_single_window (w, force_p) | |||
| 3982 | /* Record that this is not a frame-based redisplay. */ | 3986 | /* Record that this is not a frame-based redisplay. */ |
| 3983 | set_frame_matrix_frame (NULL); | 3987 | set_frame_matrix_frame (NULL); |
| 3984 | 3988 | ||
| 3989 | if (redisplay_dont_pause) | ||
| 3990 | force_p = 1; | ||
| 3985 | #if PERIODIC_PREEMPTION_CHECKING | 3991 | #if PERIODIC_PREEMPTION_CHECKING |
| 3986 | if (!force_p && NUMBERP (Vredisplay_preemption_period)) | 3992 | else if (NILP (Vredisplay_preemption_period)) |
| 3993 | force_p = 1; | ||
| 3994 | else if (!force_p && NUMBERP (Vredisplay_preemption_period)) | ||
| 3987 | { | 3995 | { |
| 3988 | EMACS_TIME tm; | 3996 | EMACS_TIME tm; |
| 3989 | double p = XFLOATINT (Vredisplay_preemption_period); | 3997 | double p = XFLOATINT (Vredisplay_preemption_period); |
| @@ -4165,13 +4173,8 @@ update_window (w, force_p) | |||
| 4165 | #endif | 4173 | #endif |
| 4166 | 4174 | ||
| 4167 | /* Check pending input the first time so that we can quickly return. */ | 4175 | /* Check pending input the first time so that we can quickly return. */ |
| 4168 | if (redisplay_dont_pause) | 4176 | #if !PERIODIC_PREEMPTION_CHECKING |
| 4169 | force_p = 1; | 4177 | if (!force_p) |
| 4170 | #if PERIODIC_PREEMPTION_CHECKING | ||
| 4171 | else if (NILP (Vredisplay_preemption_period)) | ||
| 4172 | force_p = 1; | ||
| 4173 | #else | ||
| 4174 | else if (!force_p) | ||
| 4175 | detect_input_pending_ignore_squeezables (); | 4178 | detect_input_pending_ignore_squeezables (); |
| 4176 | #endif | 4179 | #endif |
| 4177 | 4180 | ||
| @@ -4395,8 +4398,10 @@ update_text_area (w, vpos) | |||
| 4395 | mouse-face areas after scrolling and other operations. | 4398 | mouse-face areas after scrolling and other operations. |
| 4396 | However, it causes excessive flickering when mouse is moved | 4399 | However, it causes excessive flickering when mouse is moved |
| 4397 | across the mode line. Luckily, turning it off for the mode | 4400 | across the mode line. Luckily, turning it off for the mode |
| 4398 | line doesn't seem to hurt anything. -- cyd. */ | 4401 | line doesn't seem to hurt anything. -- cyd. |
| 4399 | || (current_row->mouse_face_p && !current_row->mode_line_p) | 4402 | But it is still needed for the header line. -- kfs. */ |
| 4403 | || (current_row->mouse_face_p | ||
| 4404 | && !(current_row->mode_line_p && vpos > 0)) | ||
| 4400 | || current_row->x != desired_row->x) | 4405 | || current_row->x != desired_row->x) |
| 4401 | { | 4406 | { |
| 4402 | rif->cursor_to (vpos, 0, desired_row->y, desired_row->x); | 4407 | rif->cursor_to (vpos, 0, desired_row->y, desired_row->x); |
| @@ -5215,13 +5220,8 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5215 | if (preempt_count <= 0) | 5220 | if (preempt_count <= 0) |
| 5216 | preempt_count = 1; | 5221 | preempt_count = 1; |
| 5217 | 5222 | ||
| 5218 | if (redisplay_dont_pause) | 5223 | #if !PERIODIC_PREEMPTION_CHECKING |
| 5219 | force_p = 1; | 5224 | if (!force_p && detect_input_pending_ignore_squeezables ()) |
| 5220 | #if PERIODIC_PREEMPTION_CHECKING | ||
| 5221 | else if (NILP (Vredisplay_preemption_period)) | ||
| 5222 | force_p = 1; | ||
| 5223 | #else | ||
| 5224 | else if (!force_p && detect_input_pending_ignore_squeezables ()) | ||
| 5225 | { | 5225 | { |
| 5226 | pause = 1; | 5226 | pause = 1; |
| 5227 | goto do_pause; | 5227 | goto do_pause; |
| @@ -745,7 +745,7 @@ as the keymap for future \\=\\[COMMAND] substrings. | |||
| 745 | \\=\\= quotes the following character and is discarded; | 745 | \\=\\= quotes the following character and is discarded; |
| 746 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. | 746 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. |
| 747 | 747 | ||
| 748 | Returns original STRING if no substitutions were made. Othwerwise, | 748 | Returns original STRING if no substitutions were made. Otherwise, |
| 749 | a new string, without any text properties, is returned. */) | 749 | a new string, without any text properties, is returned. */) |
| 750 | (string) | 750 | (string) |
| 751 | Lisp_Object string; | 751 | Lisp_Object string; |
diff --git a/src/doprnt.c b/src/doprnt.c index d3c8557c251..bb8c582ccd2 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -106,7 +106,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 106 | char tembuf[DBL_MAX_10_EXP + 100]; | 106 | char tembuf[DBL_MAX_10_EXP + 100]; |
| 107 | 107 | ||
| 108 | /* Size of sprintf_buffer. */ | 108 | /* Size of sprintf_buffer. */ |
| 109 | int size_allocated = sizeof (tembuf); | 109 | unsigned size_allocated = sizeof (tembuf); |
| 110 | 110 | ||
| 111 | /* Buffer to use for sprintf. Either tembuf or same as BIG_BUFFER. */ | 111 | /* Buffer to use for sprintf. Either tembuf or same as BIG_BUFFER. */ |
| 112 | char *sprintf_buffer = tembuf; | 112 | char *sprintf_buffer = tembuf; |
| @@ -136,12 +136,12 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 136 | { | 136 | { |
| 137 | if (*fmt == '%') /* Check for a '%' character */ | 137 | if (*fmt == '%') /* Check for a '%' character */ |
| 138 | { | 138 | { |
| 139 | int size_bound = 0; | 139 | unsigned size_bound = 0; |
| 140 | int width; /* Columns occupied by STRING. */ | 140 | int width; /* Columns occupied by STRING. */ |
| 141 | 141 | ||
| 142 | fmt++; | 142 | fmt++; |
| 143 | /* Copy this one %-spec into fmtcpy. */ | 143 | /* Copy this one %-spec into fmtcpy. */ |
| 144 | string = (unsigned char *)fmtcpy; | 144 | string = (unsigned char *) fmtcpy; |
| 145 | *string++ = '%'; | 145 | *string++ = '%'; |
| 146 | while (1) | 146 | while (1) |
| 147 | { | 147 | { |
| @@ -152,11 +152,11 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 152 | This might be a field width or a precision; e.g. | 152 | This might be a field width or a precision; e.g. |
| 153 | %1.1000f and %1000.1f both might need 1000+ bytes. | 153 | %1.1000f and %1000.1f both might need 1000+ bytes. |
| 154 | Parse the width or precision, checking for overflow. */ | 154 | Parse the width or precision, checking for overflow. */ |
| 155 | int n = *fmt - '0'; | 155 | unsigned n = *fmt - '0'; |
| 156 | while ('0' <= fmt[1] && fmt[1] <= '9') | 156 | while ('0' <= fmt[1] && fmt[1] <= '9') |
| 157 | { | 157 | { |
| 158 | if (n * 10 / 10 != n | 158 | if (n * 10 / 10 != n |
| 159 | || (n = n * 10 + (fmt[1] - '0')) < 0) | 159 | || (n = n * 10 + (fmt[1] - '0')) < n) |
| 160 | error ("Format width or precision too large"); | 160 | error ("Format width or precision too large"); |
| 161 | *string++ = *++fmt; | 161 | *string++ = *++fmt; |
| 162 | } | 162 | } |
| @@ -164,7 +164,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 164 | if (size_bound < n) | 164 | if (size_bound < n) |
| 165 | size_bound = n; | 165 | size_bound = n; |
| 166 | } | 166 | } |
| 167 | else if (*fmt == '-' || *fmt == ' ' || *fmt == '.') | 167 | else if (*fmt == '-' || *fmt == ' ' || *fmt == '.' || *fmt == '+') |
| 168 | ; | 168 | ; |
| 169 | else | 169 | else |
| 170 | break; | 170 | break; |
| @@ -174,10 +174,9 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 174 | 174 | ||
| 175 | /* Make the size bound large enough to handle floating point formats | 175 | /* Make the size bound large enough to handle floating point formats |
| 176 | with large numbers. */ | 176 | with large numbers. */ |
| 177 | size_bound += DBL_MAX_10_EXP + 50; | 177 | if (size_bound + DBL_MAX_10_EXP + 50 < size_bound) |
| 178 | |||
| 179 | if (size_bound < 0) | ||
| 180 | error ("Format width or precision too large"); | 178 | error ("Format width or precision too large"); |
| 179 | size_bound += DBL_MAX_10_EXP + 50; | ||
| 181 | 180 | ||
| 182 | /* Make sure we have that much. */ | 181 | /* Make sure we have that much. */ |
| 183 | if (size_bound > size_allocated) | 182 | if (size_bound > size_allocated) |
| @@ -213,7 +212,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 213 | abort (); | 212 | abort (); |
| 214 | sprintf (sprintf_buffer, fmtcpy, args[cnt++]); | 213 | sprintf (sprintf_buffer, fmtcpy, args[cnt++]); |
| 215 | /* Now copy into final output, truncating as nec. */ | 214 | /* Now copy into final output, truncating as nec. */ |
| 216 | string = (unsigned char *)sprintf_buffer; | 215 | string = (unsigned char *) sprintf_buffer; |
| 217 | goto doit; | 216 | goto doit; |
| 218 | 217 | ||
| 219 | case 'f': | 218 | case 'f': |
| @@ -227,7 +226,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 227 | u.half[1] = args[cnt++]; | 226 | u.half[1] = args[cnt++]; |
| 228 | sprintf (sprintf_buffer, fmtcpy, u.d); | 227 | sprintf (sprintf_buffer, fmtcpy, u.d); |
| 229 | /* Now copy into final output, truncating as nec. */ | 228 | /* Now copy into final output, truncating as nec. */ |
| 230 | string = (unsigned char *)sprintf_buffer; | 229 | string = (unsigned char *) sprintf_buffer; |
| 231 | goto doit; | 230 | goto doit; |
| 232 | } | 231 | } |
| 233 | 232 | ||
| @@ -240,13 +239,13 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) | |||
| 240 | minlen = atoi (&fmtcpy[1]); | 239 | minlen = atoi (&fmtcpy[1]); |
| 241 | if (lispstrings) | 240 | if (lispstrings) |
| 242 | { | 241 | { |
| 243 | string = ((struct Lisp_String *)args[cnt])->data; | 242 | string = ((struct Lisp_String *) args[cnt])->data; |
| 244 | tem = STRING_BYTES ((struct Lisp_String *)args[cnt]); | 243 | tem = STRING_BYTES ((struct Lisp_String *) args[cnt]); |
| 245 | cnt++; | 244 | cnt++; |
| 246 | } | 245 | } |
| 247 | else | 246 | else |
| 248 | { | 247 | { |
| 249 | string = (unsigned char *)args[cnt++]; | 248 | string = (unsigned char *) args[cnt++]; |
| 250 | tem = strlen (string); | 249 | tem = strlen (string); |
| 251 | } | 250 | } |
| 252 | width = strwidth (string, tem); | 251 | width = strwidth (string, tem); |
diff --git a/src/editfns.c b/src/editfns.c index 3e27ca0cf43..70cfac36fb1 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3528,7 +3528,7 @@ Use %% to put a single % into the output. | |||
| 3528 | 3528 | ||
| 3529 | The basic structure of a %-sequence is | 3529 | The basic structure of a %-sequence is |
| 3530 | % <flags> <width> <precision> character | 3530 | % <flags> <width> <precision> character |
| 3531 | where flags is [- #0]+, width is [0-9]+, and precision is .[0-9]+ | 3531 | where flags is [-+ #0]+, width is [0-9]+, and precision is .[0-9]+ |
| 3532 | 3532 | ||
| 3533 | usage: (format STRING &rest OBJECTS) */) | 3533 | usage: (format STRING &rest OBJECTS) */) |
| 3534 | (nargs, args) | 3534 | (nargs, args) |
| @@ -3641,7 +3641,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3641 | 3641 | ||
| 3642 | where | 3642 | where |
| 3643 | 3643 | ||
| 3644 | flags ::= [- #0]+ | 3644 | flags ::= [-+ #0]+ |
| 3645 | field-width ::= [0-9]+ | 3645 | field-width ::= [0-9]+ |
| 3646 | precision ::= '.' [0-9]* | 3646 | precision ::= '.' [0-9]* |
| 3647 | 3647 | ||
| @@ -3655,7 +3655,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3655 | 3655 | ||
| 3656 | while (format != end | 3656 | while (format != end |
| 3657 | && (*format == '-' || *format == '0' || *format == '#' | 3657 | && (*format == '-' || *format == '0' || *format == '#' |
| 3658 | || * format == ' ')) | 3658 | || * format == ' ' || *format == '+')) |
| 3659 | ++format; | 3659 | ++format; |
| 3660 | 3660 | ||
| 3661 | if (*format >= '0' && *format <= '9') | 3661 | if (*format >= '0' && *format <= '9') |
| @@ -3832,7 +3832,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3832 | discarded[format - format_start] = 1; | 3832 | discarded[format - format_start] = 1; |
| 3833 | format++; | 3833 | format++; |
| 3834 | 3834 | ||
| 3835 | while (index("-0# ", *format)) | 3835 | while (index("-+0# ", *format)) |
| 3836 | { | 3836 | { |
| 3837 | if (*format == '-') | 3837 | if (*format == '-') |
| 3838 | { | 3838 | { |
diff --git a/src/frame.c b/src/frame.c index 5e0ed8175d3..284b04494a8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2331,6 +2331,8 @@ enabled such bindings for that variable with `make-variable-frame-local'. */) | |||
| 2331 | call1 (Qframe_set_background_mode, frame); | 2331 | call1 (Qframe_set_background_mode, frame); |
| 2332 | } | 2332 | } |
| 2333 | } | 2333 | } |
| 2334 | |||
| 2335 | return Qnil; | ||
| 2334 | } | 2336 | } |
| 2335 | 2337 | ||
| 2336 | DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, | 2338 | DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, |
| @@ -3068,18 +3070,30 @@ x_set_screen_gamma (f, new_value, old_value) | |||
| 3068 | struct frame *f; | 3070 | struct frame *f; |
| 3069 | Lisp_Object new_value, old_value; | 3071 | Lisp_Object new_value, old_value; |
| 3070 | { | 3072 | { |
| 3073 | Lisp_Object bgcolor; | ||
| 3074 | |||
| 3071 | if (NILP (new_value)) | 3075 | if (NILP (new_value)) |
| 3072 | f->gamma = 0; | 3076 | f->gamma = 0; |
| 3073 | else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0) | 3077 | else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0) |
| 3074 | { | 3078 | /* The value 0.4545 is the normal viewing gamma. */ |
| 3075 | Fclear_face_cache (Qnil); | 3079 | f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value)); |
| 3076 | /* The value 0.4545 is the normal viewing gamma. */ | ||
| 3077 | f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value)); | ||
| 3078 | } | ||
| 3079 | else | 3080 | else |
| 3080 | signal_error ("Invalid screen-gamma", new_value); | 3081 | signal_error ("Invalid screen-gamma", new_value); |
| 3081 | 3082 | ||
| 3082 | clear_face_cache (0); | 3083 | /* Apply the new gamma value to the frame background. */ |
| 3084 | bgcolor = Fassq (Qbackground_color, f->param_alist); | ||
| 3085 | if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) | ||
| 3086 | { | ||
| 3087 | Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter); | ||
| 3088 | if (NATNUMP (index) | ||
| 3089 | && (XFASTINT (index) | ||
| 3090 | < sizeof (frame_parms)/sizeof (frame_parms[0])) | ||
| 3091 | && rif->frame_parm_handlers[XFASTINT (index)]) | ||
| 3092 | (*(rif->frame_parm_handlers[XFASTINT (index)])) | ||
| 3093 | (f, bgcolor, Qnil); | ||
| 3094 | } | ||
| 3095 | |||
| 3096 | Fclear_face_cache (Qnil); | ||
| 3083 | } | 3097 | } |
| 3084 | 3098 | ||
| 3085 | 3099 | ||
| @@ -1,3 +1,32 @@ | |||
| 1 | /* XPM */ | ||
| 2 | /* Emacs "E" icon | ||
| 3 | |||
| 4 | Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | Author: Andrew Zhilin <andrew_zhilin@yahoo.com> | ||
| 7 | |||
| 8 | This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 11 | it under the terms of the GNU General Public License as published by | ||
| 12 | the Free Software Foundation; either version 2, or (at your option) | ||
| 13 | any later version. | ||
| 14 | |||
| 15 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | GNU General Public License for more details. | ||
| 19 | |||
| 20 | You should have received a copy of the GNU General Public License | ||
| 21 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 22 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 23 | Boston, MA 02110-1301, USA. | ||
| 24 | |||
| 25 | Commentary: | ||
| 26 | |||
| 27 | This is a version of one of the GNU Emacs icon set posted to | ||
| 28 | emacs-devel in October 2005 by Andrew Zhilin. | ||
| 29 | */ | ||
| 1 | #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) | 30 | #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) |
| 2 | static char * gnu_xpm_bits[] = { | 31 | static char * gnu_xpm_bits[] = { |
| 3 | "32 32 173 2", | 32 | "32 32 173 2", |
diff --git a/src/m/mips4.h b/src/m/mips4.h index 4b79e466fb3..06db7d5dff0 100644 --- a/src/m/mips4.h +++ b/src/m/mips4.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* machine description file for Mips running RISCOS version 4. */ | 1 | /* machine description file for Mips running RISCOS version 4. |
| 2 | |||
| 3 | Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 1, 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 | |||
| 2 | 23 | ||
| 3 | #include "mips.h" | 24 | #include "mips.h" |
| 4 | 25 | ||
diff --git a/src/m/news-risc.h b/src/m/news-risc.h index 2ecaff41cb9..07e055dac9a 100644 --- a/src/m/news-risc.h +++ b/src/m/news-risc.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* news-risc.h is for the "RISC News". */ | 1 | /* news-risc.h is for the "RISC News". |
| 2 | |||
| 3 | Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 1, 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 | |||
| 2 | 23 | ||
| 3 | #include "mips.h" | 24 | #include "mips.h" |
| 4 | 25 | ||
diff --git a/src/m/pmax.h b/src/m/pmax.h index c83c514ab98..1f2869a09d3 100644 --- a/src/m/pmax.h +++ b/src/m/pmax.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* Machine description file for DEC MIPS machines. */ | 1 | /* Machine description file for DEC MIPS machines. |
| 2 | |||
| 3 | Copyright (C) 1992, 1999, 2001, 2002, 2003, 2004, | ||
| 4 | 2005, 2006, 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "mips.h" | 24 | #include "mips.h" |
| 4 | 25 | ||
diff --git a/src/m/xtensa.h b/src/m/xtensa.h new file mode 100644 index 00000000000..c5039e1a8a1 --- /dev/null +++ b/src/m/xtensa.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* Machine description file for Tensilica Xtensa. | ||
| 2 | Copyright (C) 2007 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 1, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 19 | Boston, MA 02110-1301, USA. */ | ||
| 20 | |||
| 21 | #define NO_ARG_ARRAY | ||
| 22 | #define NO_UNION_TYPE | ||
| 23 | |||
| 24 | #ifdef __LITTLE_ENDIAN | ||
| 25 | #undef WORDS_BIG_ENDIAN | ||
| 26 | #else | ||
| 27 | #define WORDS_BIG_ENDIAN | ||
| 28 | #endif | ||
| 29 | |||
| 30 | /* arch-tag: fe5872de-d565-4d81-8fe0-ea19865b3e6a | ||
| 31 | (do not change this comment) */ | ||
diff --git a/src/macmenu.c b/src/macmenu.c index 3ea09412650..82322515c31 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -2012,9 +2012,8 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2012 | char **error; | 2012 | char **error; |
| 2013 | { | 2013 | { |
| 2014 | int i; | 2014 | int i; |
| 2015 | UInt32 refcon; | ||
| 2016 | int menu_item_choice; | 2015 | int menu_item_choice; |
| 2017 | int menu_item_selection; | 2016 | UInt32 menu_item_selection; |
| 2018 | MenuHandle menu; | 2017 | MenuHandle menu; |
| 2019 | Point pos; | 2018 | Point pos; |
| 2020 | widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; | 2019 | widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; |
| @@ -2229,7 +2228,6 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2229 | LocalToGlobal (&pos); | 2228 | LocalToGlobal (&pos); |
| 2230 | 2229 | ||
| 2231 | /* No selection has been chosen yet. */ | 2230 | /* No selection has been chosen yet. */ |
| 2232 | menu_item_choice = 0; | ||
| 2233 | menu_item_selection = 0; | 2231 | menu_item_selection = 0; |
| 2234 | 2232 | ||
| 2235 | record_unwind_protect (pop_down_menu, make_save_value (f, 0)); | 2233 | record_unwind_protect (pop_down_menu, make_save_value (f, 0)); |
| @@ -2240,20 +2238,18 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2240 | 2238 | ||
| 2241 | /* Display the menu. */ | 2239 | /* Display the menu. */ |
| 2242 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); | 2240 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); |
| 2243 | menu_item_selection = LoWord (menu_item_choice); | ||
| 2244 | 2241 | ||
| 2245 | /* Get the refcon to find the correct item */ | 2242 | /* Get the refcon to find the correct item */ |
| 2246 | if (menu_item_selection) | 2243 | if (menu_item_choice) |
| 2247 | { | 2244 | { |
| 2248 | MenuHandle sel_menu = GetMenuHandle (HiWord (menu_item_choice)); | 2245 | MenuHandle sel_menu = GetMenuHandle (HiWord (menu_item_choice)); |
| 2249 | if (sel_menu) { | 2246 | |
| 2250 | GetMenuItemRefCon (sel_menu, menu_item_selection, &refcon); | 2247 | if (sel_menu) |
| 2251 | } | 2248 | GetMenuItemRefCon (sel_menu, LoWord (menu_item_choice), |
| 2249 | &menu_item_selection); | ||
| 2252 | } | 2250 | } |
| 2253 | else if (! for_click) | 2251 | |
| 2254 | /* Make "Cancel" equivalent to C-g unless this menu was popped up by | 2252 | unbind_to (specpdl_count, Qnil); |
| 2255 | a mouse press. */ | ||
| 2256 | Fsignal (Qquit, Qnil); | ||
| 2257 | 2253 | ||
| 2258 | /* Find the selected item, and its pane, to return | 2254 | /* Find the selected item, and its pane, to return |
| 2259 | the proper value. */ | 2255 | the proper value. */ |
| @@ -2290,7 +2286,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2290 | { | 2286 | { |
| 2291 | entry | 2287 | entry |
| 2292 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_VALUE]; | 2288 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_VALUE]; |
| 2293 | if ((int) (EMACS_INT) refcon == i) | 2289 | if (menu_item_selection == i) |
| 2294 | { | 2290 | { |
| 2295 | if (keymaps != 0) | 2291 | if (keymaps != 0) |
| 2296 | { | 2292 | { |
| @@ -2313,8 +2309,6 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2313 | /* Make "Cancel" equivalent to C-g. */ | 2309 | /* Make "Cancel" equivalent to C-g. */ |
| 2314 | Fsignal (Qquit, Qnil); | 2310 | Fsignal (Qquit, Qnil); |
| 2315 | 2311 | ||
| 2316 | unbind_to (specpdl_count, Qnil); | ||
| 2317 | |||
| 2318 | return Qnil; | 2312 | return Qnil; |
| 2319 | } | 2313 | } |
| 2320 | 2314 | ||
| @@ -2386,10 +2380,12 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2386 | typeUInt32, NULL, sizeof (UInt32), | 2380 | typeUInt32, NULL, sizeof (UInt32), |
| 2387 | NULL, &key_code); | 2381 | NULL, &key_code); |
| 2388 | if (err == noErr) | 2382 | if (err == noErr) |
| 2389 | if (mac_quit_char_key_p (modifiers, key_code)) | 2383 | { |
| 2390 | err = QuitAppModalLoopForWindow (window); | 2384 | if (mac_quit_char_key_p (modifiers, key_code)) |
| 2391 | else | 2385 | err = QuitAppModalLoopForWindow (window); |
| 2392 | err = eventNotHandledErr; | 2386 | else |
| 2387 | err = eventNotHandledErr; | ||
| 2388 | } | ||
| 2393 | } | 2389 | } |
| 2394 | break; | 2390 | break; |
| 2395 | } | 2391 | } |
diff --git a/src/macterm.c b/src/macterm.c index 7ea0d1138e2..3a403c39c26 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -1918,18 +1918,16 @@ x_flush (f) | |||
| 1918 | 1918 | ||
| 1919 | #define XFlush(DISPLAY) (void) 0 | 1919 | #define XFlush(DISPLAY) (void) 0 |
| 1920 | 1920 | ||
| 1921 | 1921 | #if USE_CG_DRAWING | |
| 1922 | /* Return the struct mac_display_info corresponding to DPY. There's | 1922 | static void |
| 1923 | only one. */ | 1923 | mac_flush_display_optional (f) |
| 1924 | 1924 | struct frame *f; | |
| 1925 | struct mac_display_info * | ||
| 1926 | mac_display_info_for_display (dpy) | ||
| 1927 | Display *dpy; | ||
| 1928 | { | 1925 | { |
| 1929 | return &one_mac_display_info; | 1926 | BLOCK_INPUT; |
| 1927 | mac_prepare_for_quickdraw (f); | ||
| 1928 | UNBLOCK_INPUT; | ||
| 1930 | } | 1929 | } |
| 1931 | 1930 | #endif | |
| 1932 | |||
| 1933 | 1931 | ||
| 1934 | /*********************************************************************** | 1932 | /*********************************************************************** |
| 1935 | Starting and ending an update | 1933 | Starting and ending an update |
| @@ -4651,7 +4649,7 @@ static void construct_scroll_bar_click P_ ((struct scroll_bar *, int, | |||
| 4651 | static OSStatus get_control_part_bounds P_ ((ControlHandle, ControlPartCode, | 4649 | static OSStatus get_control_part_bounds P_ ((ControlHandle, ControlPartCode, |
| 4652 | Rect *)); | 4650 | Rect *)); |
| 4653 | static void x_scroll_bar_handle_press P_ ((struct scroll_bar *, | 4651 | static void x_scroll_bar_handle_press P_ ((struct scroll_bar *, |
| 4654 | ControlPartCode, | 4652 | ControlPartCode, Point, |
| 4655 | struct input_event *)); | 4653 | struct input_event *)); |
| 4656 | static void x_scroll_bar_handle_release P_ ((struct scroll_bar *, | 4654 | static void x_scroll_bar_handle_release P_ ((struct scroll_bar *, |
| 4657 | struct input_event *)); | 4655 | struct input_event *)); |
| @@ -4764,9 +4762,10 @@ get_control_part_bounds (ch, part_code, rect) | |||
| 4764 | } | 4762 | } |
| 4765 | 4763 | ||
| 4766 | static void | 4764 | static void |
| 4767 | x_scroll_bar_handle_press (bar, part_code, bufp) | 4765 | x_scroll_bar_handle_press (bar, part_code, mouse_pos, bufp) |
| 4768 | struct scroll_bar *bar; | 4766 | struct scroll_bar *bar; |
| 4769 | ControlPartCode part_code; | 4767 | ControlPartCode part_code; |
| 4768 | Point mouse_pos; | ||
| 4770 | struct input_event *bufp; | 4769 | struct input_event *bufp; |
| 4771 | { | 4770 | { |
| 4772 | int part = control_part_code_to_scroll_bar_part (part_code); | 4771 | int part = control_part_code_to_scroll_bar_part (part_code); |
| @@ -4779,10 +4778,18 @@ x_scroll_bar_handle_press (bar, part_code, bufp) | |||
| 4779 | construct_scroll_bar_click (bar, part, bufp); | 4778 | construct_scroll_bar_click (bar, part, bufp); |
| 4780 | HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code); | 4779 | HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code); |
| 4781 | set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY); | 4780 | set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY); |
| 4781 | bar->dragging = Qnil; | ||
| 4782 | } | ||
| 4783 | else | ||
| 4784 | { | ||
| 4785 | Rect r; | ||
| 4786 | |||
| 4787 | get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar), | ||
| 4788 | kControlIndicatorPart, &r); | ||
| 4789 | XSETINT (bar->dragging, - (mouse_pos.v - r.top) - 1); | ||
| 4782 | } | 4790 | } |
| 4783 | 4791 | ||
| 4784 | last_scroll_bar_part = part; | 4792 | last_scroll_bar_part = part; |
| 4785 | bar->dragging = Qnil; | ||
| 4786 | tracked_scroll_bar = bar; | 4793 | tracked_scroll_bar = bar; |
| 4787 | } | 4794 | } |
| 4788 | 4795 | ||
| @@ -4792,7 +4799,7 @@ x_scroll_bar_handle_release (bar, bufp) | |||
| 4792 | struct input_event *bufp; | 4799 | struct input_event *bufp; |
| 4793 | { | 4800 | { |
| 4794 | if (last_scroll_bar_part != scroll_bar_handle | 4801 | if (last_scroll_bar_part != scroll_bar_handle |
| 4795 | || !GC_NILP (bar->dragging)) | 4802 | || (INTEGERP (bar->dragging) && XINT (bar->dragging) >= 0)) |
| 4796 | construct_scroll_bar_click (bar, scroll_bar_end_scroll, bufp); | 4803 | construct_scroll_bar_click (bar, scroll_bar_end_scroll, bufp); |
| 4797 | 4804 | ||
| 4798 | HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0); | 4805 | HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0); |
| @@ -4820,13 +4827,11 @@ x_scroll_bar_handle_drag (win, bar, mouse_pos, bufp) | |||
| 4820 | get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar), | 4827 | get_control_part_bounds (SCROLL_BAR_CONTROL_HANDLE (bar), |
| 4821 | kControlIndicatorPart, &r); | 4828 | kControlIndicatorPart, &r); |
| 4822 | 4829 | ||
| 4823 | if (GC_NILP (bar->dragging)) | 4830 | if (INTEGERP (bar->dragging) && XINT (bar->dragging) < 0) |
| 4824 | XSETINT (bar->dragging, mouse_pos.v - r.top); | 4831 | XSETINT (bar->dragging, - (XINT (bar->dragging) + 1)); |
| 4825 | 4832 | ||
| 4826 | top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top); | 4833 | top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top); |
| 4827 | top_range = (XINT (bar->track_height) - (r.bottom - r.top)) * | 4834 | top_range = XINT (bar->track_height) - XINT (bar->min_handle); |
| 4828 | (1.0 + (float) GetControlViewSize (ch) / GetControl32BitMaximum (ch)) | ||
| 4829 | + .5; | ||
| 4830 | 4835 | ||
| 4831 | if (top < 0) | 4836 | if (top < 0) |
| 4832 | top = 0; | 4837 | top = 0; |
| @@ -4893,13 +4898,16 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4893 | if (XINT (bar->track_height) == 0) | 4898 | if (XINT (bar->track_height) == 0) |
| 4894 | return; | 4899 | return; |
| 4895 | 4900 | ||
| 4896 | if (whole == 0) | 4901 | if (whole <= portion) |
| 4897 | value = 0, viewsize = 1, maximum = 0; | 4902 | value = 0, viewsize = 1, maximum = 0; |
| 4898 | else | 4903 | else |
| 4899 | { | 4904 | { |
| 4900 | value = position; | 4905 | float scale; |
| 4901 | viewsize = portion; | 4906 | |
| 4902 | maximum = max (0, whole - portion); | 4907 | maximum = XINT (bar->track_height) - XINT (bar->min_handle); |
| 4908 | scale = (float) maximum / (whole - portion); | ||
| 4909 | value = position * scale + 0.5f; | ||
| 4910 | viewsize = (int) (portion * scale + 0.5f) + XINT (bar->min_handle); | ||
| 4903 | } | 4911 | } |
| 4904 | 4912 | ||
| 4905 | BLOCK_INPUT; | 4913 | BLOCK_INPUT; |
| @@ -4980,6 +4988,7 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height) | |||
| 4980 | #ifdef USE_TOOLKIT_SCROLL_BARS | 4988 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 4981 | bar->track_top = Qnil; | 4989 | bar->track_top = Qnil; |
| 4982 | bar->track_height = Qnil; | 4990 | bar->track_height = Qnil; |
| 4991 | bar->min_handle = Qnil; | ||
| 4983 | #endif | 4992 | #endif |
| 4984 | 4993 | ||
| 4985 | /* Add bar to its frame's list of scroll bars. */ | 4994 | /* Add bar to its frame's list of scroll bars. */ |
| @@ -5200,6 +5209,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5200 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5209 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5201 | bar->track_top = Qnil; | 5210 | bar->track_top = Qnil; |
| 5202 | bar->track_height = Qnil; | 5211 | bar->track_height = Qnil; |
| 5212 | bar->min_handle = Qnil; | ||
| 5203 | #endif | 5213 | #endif |
| 5204 | } | 5214 | } |
| 5205 | 5215 | ||
| @@ -5213,6 +5223,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5213 | { | 5223 | { |
| 5214 | XSETINT (bar->track_top, 0); | 5224 | XSETINT (bar->track_top, 0); |
| 5215 | XSETINT (bar->track_height, 0); | 5225 | XSETINT (bar->track_height, 0); |
| 5226 | XSETINT (bar->min_handle, 0); | ||
| 5216 | } | 5227 | } |
| 5217 | else | 5228 | else |
| 5218 | { | 5229 | { |
| @@ -5222,7 +5233,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5222 | BLOCK_INPUT; | 5233 | BLOCK_INPUT; |
| 5223 | 5234 | ||
| 5224 | SetControl32BitMinimum (ch, 0); | 5235 | SetControl32BitMinimum (ch, 0); |
| 5225 | SetControl32BitMaximum (ch, 1); | 5236 | SetControl32BitMaximum (ch, 1 << 30); |
| 5226 | SetControlViewSize (ch, 1); | 5237 | SetControlViewSize (ch, 1); |
| 5227 | 5238 | ||
| 5228 | /* Move the scroll bar thumb to the top. */ | 5239 | /* Move the scroll bar thumb to the top. */ |
| @@ -5230,12 +5241,13 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5230 | get_control_part_bounds (ch, kControlIndicatorPart, &r0); | 5241 | get_control_part_bounds (ch, kControlIndicatorPart, &r0); |
| 5231 | 5242 | ||
| 5232 | /* Move the scroll bar thumb to the bottom. */ | 5243 | /* Move the scroll bar thumb to the bottom. */ |
| 5233 | SetControl32BitValue (ch, 1); | 5244 | SetControl32BitValue (ch, 1 << 30); |
| 5234 | get_control_part_bounds (ch, kControlIndicatorPart, &r1); | 5245 | get_control_part_bounds (ch, kControlIndicatorPart, &r1); |
| 5235 | 5246 | ||
| 5236 | UnionRect (&r0, &r1, &r0); | 5247 | UnionRect (&r0, &r1, &r0); |
| 5237 | XSETINT (bar->track_top, r0.top); | 5248 | XSETINT (bar->track_top, r0.top); |
| 5238 | XSETINT (bar->track_height, r0.bottom - r0.top); | 5249 | XSETINT (bar->track_height, r0.bottom - r0.top); |
| 5250 | XSETINT (bar->min_handle, r1.bottom - r1.top); | ||
| 5239 | 5251 | ||
| 5240 | /* Don't show the scroll bar if its height is not enough to | 5252 | /* Don't show the scroll bar if its height is not enough to |
| 5241 | display the scroll bar thumb. */ | 5253 | display the scroll bar thumb. */ |
| @@ -8812,9 +8824,6 @@ mac_set_font_info_for_selection (f, face_id, c) | |||
| 8812 | #define M_APPLE 234 | 8824 | #define M_APPLE 234 |
| 8813 | #define I_ABOUT 1 | 8825 | #define I_ABOUT 1 |
| 8814 | 8826 | ||
| 8815 | #define WINDOW_RESOURCE 128 | ||
| 8816 | #define TERM_WINDOW_RESOURCE 129 | ||
| 8817 | |||
| 8818 | #define DEFAULT_NUM_COLS 80 | 8827 | #define DEFAULT_NUM_COLS 80 |
| 8819 | 8828 | ||
| 8820 | #define MIN_DOC_SIZE 64 | 8829 | #define MIN_DOC_SIZE 64 |
| @@ -10141,7 +10150,7 @@ mac_handle_text_input_event (next_handler, event, data) | |||
| 10141 | case kEventTextInputUnicodeForKeyEvent: | 10150 | case kEventTextInputUnicodeForKeyEvent: |
| 10142 | { | 10151 | { |
| 10143 | EventRef kbd_event; | 10152 | EventRef kbd_event; |
| 10144 | UInt32 actual_size, modifiers, mapped_modifiers; | 10153 | UInt32 actual_size, modifiers; |
| 10145 | 10154 | ||
| 10146 | err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent, | 10155 | err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent, |
| 10147 | typeEventRef, NULL, sizeof (EventRef), NULL, | 10156 | typeEventRef, NULL, sizeof (EventRef), NULL, |
| @@ -10754,12 +10763,12 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10754 | #ifdef USE_TOOLKIT_SCROLL_BARS | 10763 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 10755 | /* Make the "Ctrl-Mouse-2 splits window" work | 10764 | /* Make the "Ctrl-Mouse-2 splits window" work |
| 10756 | for toolkit scroll bars. */ | 10765 | for toolkit scroll bars. */ |
| 10757 | if (er.modifiers & controlKey) | 10766 | if (inev.modifiers & ctrl_modifier) |
| 10758 | x_scroll_bar_handle_click (bar, control_part_code, | 10767 | x_scroll_bar_handle_click (bar, control_part_code, |
| 10759 | &er, &inev); | 10768 | &er, &inev); |
| 10760 | else if (er.what == mouseDown) | 10769 | else if (er.what == mouseDown) |
| 10761 | x_scroll_bar_handle_press (bar, control_part_code, | 10770 | x_scroll_bar_handle_press (bar, control_part_code, |
| 10762 | &inev); | 10771 | mouse_loc, &inev); |
| 10763 | else | 10772 | else |
| 10764 | x_scroll_bar_handle_release (bar, &inev); | 10773 | x_scroll_bar_handle_release (bar, &inev); |
| 10765 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 10774 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| @@ -10822,7 +10831,9 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10822 | f->mouse_moved = 0; | 10831 | f->mouse_moved = 0; |
| 10823 | 10832 | ||
| 10824 | #ifdef USE_TOOLKIT_SCROLL_BARS | 10833 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 10825 | if (inev.kind == MOUSE_CLICK_EVENT) | 10834 | if (inev.kind == MOUSE_CLICK_EVENT |
| 10835 | || (inev.kind == SCROLL_BAR_CLICK_EVENT | ||
| 10836 | && (inev.modifiers & ctrl_modifier))) | ||
| 10826 | #endif | 10837 | #endif |
| 10827 | switch (er.what) | 10838 | switch (er.what) |
| 10828 | { | 10839 | { |
| @@ -11162,6 +11173,16 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11162 | /* translate the keycode back to determine the | 11173 | /* translate the keycode back to determine the |
| 11163 | original key */ | 11174 | original key */ |
| 11164 | #ifdef MAC_OSX | 11175 | #ifdef MAC_OSX |
| 11176 | UCKeyboardLayout *uchr_ptr = NULL; | ||
| 11177 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 | ||
| 11178 | OSStatus err; | ||
| 11179 | KeyboardLayoutRef layout; | ||
| 11180 | |||
| 11181 | err = KLGetCurrentKeyboardLayout (&layout); | ||
| 11182 | if (err == noErr) | ||
| 11183 | KLGetKeyboardLayoutProperty (layout, kKLuchrData, | ||
| 11184 | (const void **) &uchr_ptr); | ||
| 11185 | #else | ||
| 11165 | static SInt16 last_key_layout_id = 0; | 11186 | static SInt16 last_key_layout_id = 0; |
| 11166 | static Handle uchr_handle = (Handle)-1; | 11187 | static Handle uchr_handle = (Handle)-1; |
| 11167 | SInt16 current_key_layout_id = | 11188 | SInt16 current_key_layout_id = |
| @@ -11173,8 +11194,11 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11173 | uchr_handle = GetResource ('uchr', current_key_layout_id); | 11194 | uchr_handle = GetResource ('uchr', current_key_layout_id); |
| 11174 | last_key_layout_id = current_key_layout_id; | 11195 | last_key_layout_id = current_key_layout_id; |
| 11175 | } | 11196 | } |
| 11176 | |||
| 11177 | if (uchr_handle) | 11197 | if (uchr_handle) |
| 11198 | uchr_ptr = (UCKeyboardLayout *)*uchr_handle; | ||
| 11199 | #endif | ||
| 11200 | |||
| 11201 | if (uchr_ptr) | ||
| 11178 | { | 11202 | { |
| 11179 | OSStatus status; | 11203 | OSStatus status; |
| 11180 | UInt16 key_action = er.what - keyDown; | 11204 | UInt16 key_action = er.what - keyDown; |
| @@ -11185,7 +11209,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11185 | UniChar code; | 11209 | UniChar code; |
| 11186 | UniCharCount actual_length; | 11210 | UniCharCount actual_length; |
| 11187 | 11211 | ||
| 11188 | status = UCKeyTranslate ((UCKeyboardLayout *)*uchr_handle, | 11212 | status = UCKeyTranslate (uchr_ptr, |
| 11189 | keycode, key_action, | 11213 | keycode, key_action, |
| 11190 | modifier_key_state, | 11214 | modifier_key_state, |
| 11191 | keyboard_type, | 11215 | keyboard_type, |
| @@ -11701,7 +11725,11 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 11701 | x_update_window_end, | 11725 | x_update_window_end, |
| 11702 | x_cursor_to, | 11726 | x_cursor_to, |
| 11703 | x_flush, | 11727 | x_flush, |
| 11728 | #if USE_CG_DRAWING | ||
| 11729 | mac_flush_display_optional, | ||
| 11730 | #else | ||
| 11704 | 0, /* flush_display_optional */ | 11731 | 0, /* flush_display_optional */ |
| 11732 | #endif | ||
| 11705 | x_clear_window_mouse_face, | 11733 | x_clear_window_mouse_face, |
| 11706 | x_get_glyph_overhangs, | 11734 | x_get_glyph_overhangs, |
| 11707 | x_fix_overlapping_area, | 11735 | x_fix_overlapping_area, |
diff --git a/src/macterm.h b/src/macterm.h index 0447b41d908..3d0b41f6efe 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -204,7 +204,6 @@ extern struct mac_display_info one_mac_display_info; | |||
| 204 | FONT-LIST-CACHE records previous values returned by x-list-fonts. */ | 204 | FONT-LIST-CACHE records previous values returned by x-list-fonts. */ |
| 205 | extern Lisp_Object x_display_name_list; | 205 | extern Lisp_Object x_display_name_list; |
| 206 | 206 | ||
| 207 | extern struct x_display_info *x_display_info_for_display P_ ((Display *)); | ||
| 208 | extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); | 207 | extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); |
| 209 | 208 | ||
| 210 | extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *)); | 209 | extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *)); |
| @@ -404,8 +403,8 @@ struct scroll_bar { | |||
| 404 | /* The next and previous in the chain of scroll bars in this frame. */ | 403 | /* The next and previous in the chain of scroll bars in this frame. */ |
| 405 | Lisp_Object next, prev; | 404 | Lisp_Object next, prev; |
| 406 | 405 | ||
| 407 | /* The Mac control handle of this scroll bar. Since this is a full | 406 | /* The Mac control handle of this scroll bar. Since this is a |
| 408 | 32-bit quantity, we store it split into two 32-bit values. */ | 407 | pointer value, we store it split into two Lisp integers. */ |
| 409 | Lisp_Object control_handle_low, control_handle_high; | 408 | Lisp_Object control_handle_low, control_handle_high; |
| 410 | 409 | ||
| 411 | /* The position and size of the scroll bar in pixels, relative to the | 410 | /* The position and size of the scroll bar in pixels, relative to the |
| @@ -427,7 +426,9 @@ struct scroll_bar { | |||
| 427 | 426 | ||
| 428 | /* If the scroll bar handle is currently being dragged by the user, | 427 | /* If the scroll bar handle is currently being dragged by the user, |
| 429 | this is the number of pixels from the top of the handle to the | 428 | this is the number of pixels from the top of the handle to the |
| 430 | place where the user grabbed it. If the handle isn't currently | 429 | place where the user grabbed it. If the handle is pressed but |
| 430 | not dragged yet, this is a negative integer whose absolute value | ||
| 431 | is the number of pixels plus 1. If the handle isn't currently | ||
| 431 | being dragged, this is Qnil. */ | 432 | being dragged, this is Qnil. */ |
| 432 | Lisp_Object dragging; | 433 | Lisp_Object dragging; |
| 433 | 434 | ||
| @@ -435,6 +436,9 @@ struct scroll_bar { | |||
| 435 | /* The position and size of the scroll bar handle track area in | 436 | /* The position and size of the scroll bar handle track area in |
| 436 | pixels, relative to the frame. */ | 437 | pixels, relative to the frame. */ |
| 437 | Lisp_Object track_top, track_height; | 438 | Lisp_Object track_top, track_height; |
| 439 | |||
| 440 | /* Minimum length of the scroll bar handle, in pixels. */ | ||
| 441 | Lisp_Object min_handle; | ||
| 438 | #endif | 442 | #endif |
| 439 | }; | 443 | }; |
| 440 | 444 | ||
| @@ -448,13 +452,13 @@ struct scroll_bar { | |||
| 448 | #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) | 452 | #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) |
| 449 | 453 | ||
| 450 | 454 | ||
| 451 | /* Building a 32-bit C integer from two 16-bit lisp integers. */ | 455 | /* Building a C long integer from two lisp integers. */ |
| 452 | #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) | 456 | #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) |
| 453 | 457 | ||
| 454 | /* Setting two lisp integers to the low and high words of a 32-bit C int. */ | 458 | /* Setting two lisp integers to two parts of a C unsigned long. */ |
| 455 | #define SCROLL_BAR_UNPACK(low, high, int32) \ | 459 | #define SCROLL_BAR_UNPACK(low, high, ulong) \ |
| 456 | (XSETINT ((low), (int32) & 0xffff), \ | 460 | (XSETINT ((low), (ulong) & 0xffff), \ |
| 457 | XSETINT ((high), ((int32) >> 16) & 0xffff)) | 461 | XSETINT ((high), (ulong) >> 16)) |
| 458 | 462 | ||
| 459 | 463 | ||
| 460 | /* Extract the Mac control handle of the scroll bar from a struct | 464 | /* Extract the Mac control handle of the scroll bar from a struct |
| @@ -464,9 +468,9 @@ struct scroll_bar { | |||
| 464 | (ptr)->control_handle_high)) | 468 | (ptr)->control_handle_high)) |
| 465 | 469 | ||
| 466 | /* Store a Mac control handle in a struct scroll_bar. */ | 470 | /* Store a Mac control handle in a struct scroll_bar. */ |
| 467 | #define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \ | 471 | #define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \ |
| 468 | (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ | 472 | (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ |
| 469 | (ptr)->control_handle_high, (int) id)) | 473 | (ptr)->control_handle_high, (unsigned long) (handle))) |
| 470 | 474 | ||
| 471 | /* Return the inside width of a vertical scroll bar, given the outside | 475 | /* Return the inside width of a vertical scroll bar, given the outside |
| 472 | width. */ | 476 | width. */ |
diff --git a/src/minibuf.c b/src/minibuf.c index c92bb5e4616..14f5eac846a 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -2073,9 +2073,10 @@ do_completion () | |||
| 2073 | /* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ | 2073 | /* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ |
| 2074 | 2074 | ||
| 2075 | DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, | 2075 | DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, |
| 2076 | doc: /* Like `assoc' but specifically for strings. | 2076 | doc: /* Like `assoc' but specifically for strings (and symbols). |
| 2077 | Unibyte strings are converted to multibyte for comparison. | 2077 | Symbols are converted to strings, and unibyte strings are converted to |
| 2078 | And case is ignored if CASE-FOLD is non-nil. | 2078 | multibyte for comparison. |
| 2079 | Case is ignored if optional arg CASE-FOLD is non-nil. | ||
| 2079 | As opposed to `assoc', it will also match an entry consisting of a single | 2080 | As opposed to `assoc', it will also match an entry consisting of a single |
| 2080 | string rather than a cons cell whose car is a string. */) | 2081 | string rather than a cons cell whose car is a string. */) |
| 2081 | (key, list, case_fold) | 2082 | (key, list, case_fold) |
| @@ -2084,12 +2085,17 @@ string rather than a cons cell whose car is a string. */) | |||
| 2084 | { | 2085 | { |
| 2085 | register Lisp_Object tail; | 2086 | register Lisp_Object tail; |
| 2086 | 2087 | ||
| 2088 | if (SYMBOLP (key)) | ||
| 2089 | key = Fsymbol_name (key); | ||
| 2090 | |||
| 2087 | for (tail = list; !NILP (tail); tail = Fcdr (tail)) | 2091 | for (tail = list; !NILP (tail); tail = Fcdr (tail)) |
| 2088 | { | 2092 | { |
| 2089 | register Lisp_Object elt, tem, thiscar; | 2093 | register Lisp_Object elt, tem, thiscar; |
| 2090 | elt = Fcar (tail); | 2094 | elt = Fcar (tail); |
| 2091 | thiscar = CONSP (elt) ? XCAR (elt) : elt; | 2095 | thiscar = CONSP (elt) ? XCAR (elt) : elt; |
| 2092 | if (!STRINGP (thiscar)) | 2096 | if (SYMBOLP (thiscar)) |
| 2097 | thiscar = Fsymbol_name (thiscar); | ||
| 2098 | else if (!STRINGP (thiscar)) | ||
| 2093 | continue; | 2099 | continue; |
| 2094 | tem = Fcompare_strings (thiscar, make_number (0), Qnil, | 2100 | tem = Fcompare_strings (thiscar, make_number (0), Qnil, |
| 2095 | key, make_number (0), Qnil, | 2101 | key, make_number (0), Qnil, |
diff --git a/src/print.c b/src/print.c index 0fef9cb9880..709945494e3 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1292,7 +1292,8 @@ print (obj, printcharfun, escapeflag) | |||
| 1292 | the variable Vprint_continuous_numbering is nil. Otherwise, | 1292 | the variable Vprint_continuous_numbering is nil. Otherwise, |
| 1293 | the values of these variables will be kept between several | 1293 | the values of these variables will be kept between several |
| 1294 | print functions. */ | 1294 | print functions. */ |
| 1295 | if (NILP (Vprint_continuous_numbering)) | 1295 | if (NILP (Vprint_continuous_numbering) |
| 1296 | || NILP (Vprint_number_table)) | ||
| 1296 | { | 1297 | { |
| 1297 | print_number_index = 0; | 1298 | print_number_index = 0; |
| 1298 | Vprint_number_table = Qnil; | 1299 | Vprint_number_table = Qnil; |
diff --git a/src/process.c b/src/process.c index 4611ce2c05c..27dc9f19e56 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5641,6 +5641,83 @@ send_process (proc, buf, len, object) | |||
| 5641 | UNGCPRO; | 5641 | UNGCPRO; |
| 5642 | } | 5642 | } |
| 5643 | 5643 | ||
| 5644 | static Lisp_Object | ||
| 5645 | send_process_object_unwind (buf) | ||
| 5646 | Lisp_Object buf; | ||
| 5647 | { | ||
| 5648 | Lisp_Object tembuf; | ||
| 5649 | |||
| 5650 | if (XBUFFER (buf) == current_buffer) | ||
| 5651 | return Qnil; | ||
| 5652 | tembuf = Fcurrent_buffer (); | ||
| 5653 | Fset_buffer (buf); | ||
| 5654 | Fkill_buffer (tembuf); | ||
| 5655 | return Qnil; | ||
| 5656 | } | ||
| 5657 | |||
| 5658 | /* Send current contents of region between START and END to PROC. | ||
| 5659 | If START is a string, send it instead. | ||
| 5660 | This function can evaluate Lisp code and can garbage collect. */ | ||
| 5661 | |||
| 5662 | static void | ||
| 5663 | send_process_object (proc, start, end) | ||
| 5664 | Lisp_Object proc, start, end; | ||
| 5665 | { | ||
| 5666 | int count = SPECPDL_INDEX (); | ||
| 5667 | Lisp_Object object = STRINGP (start) ? start : Fcurrent_buffer (); | ||
| 5668 | struct buffer *given_buffer = current_buffer; | ||
| 5669 | unsigned char *buf; | ||
| 5670 | int len; | ||
| 5671 | |||
| 5672 | record_unwind_protect (send_process_object_unwind, Fcurrent_buffer ()); | ||
| 5673 | |||
| 5674 | if (STRINGP (object) ? STRING_MULTIBYTE (object) | ||
| 5675 | : ! NILP (XBUFFER (object)->enable_multibyte_characters)) | ||
| 5676 | { | ||
| 5677 | struct Lisp_Process *p = XPROCESS (proc); | ||
| 5678 | struct coding_system *coding = proc_encode_coding_system[XINT (p->outfd)]; | ||
| 5679 | |||
| 5680 | if (! EQ (coding->symbol, p->encode_coding_system)) | ||
| 5681 | /* The coding system for encoding was changed to raw-text | ||
| 5682 | because we sent a unibyte text previously. Now we are | ||
| 5683 | sending a multibyte text, thus we must encode it by the | ||
| 5684 | original coding system specified for the current process. */ | ||
| 5685 | setup_coding_system (p->encode_coding_system, coding); | ||
| 5686 | if (! NILP (coding->pre_write_conversion)) | ||
| 5687 | { | ||
| 5688 | struct gcpro gcpro1, gcpro2; | ||
| 5689 | |||
| 5690 | GCPRO2 (proc, object); | ||
| 5691 | call2 (coding->pre_write_conversion, start, end); | ||
| 5692 | UNGCPRO; | ||
| 5693 | if (given_buffer != current_buffer) | ||
| 5694 | { | ||
| 5695 | start = make_number (BEGV), end = make_number (ZV); | ||
| 5696 | object = Fcurrent_buffer (); | ||
| 5697 | } | ||
| 5698 | } | ||
| 5699 | } | ||
| 5700 | |||
| 5701 | if (BUFFERP (object)) | ||
| 5702 | { | ||
| 5703 | EMACS_INT start_byte; | ||
| 5704 | |||
| 5705 | if (XINT (start) < GPT && XINT (end) > GPT) | ||
| 5706 | move_gap (XINT (end)); | ||
| 5707 | start_byte = CHAR_TO_BYTE (XINT (start)); | ||
| 5708 | buf = BYTE_POS_ADDR (start_byte); | ||
| 5709 | len = CHAR_TO_BYTE (XINT (end)) - start_byte; | ||
| 5710 | } | ||
| 5711 | else | ||
| 5712 | { | ||
| 5713 | buf = SDATA (object); | ||
| 5714 | len = SBYTES (object); | ||
| 5715 | } | ||
| 5716 | send_process (proc, buf, len, object); | ||
| 5717 | |||
| 5718 | unbind_to (count, Qnil); | ||
| 5719 | } | ||
| 5720 | |||
| 5644 | DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region, | 5721 | DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region, |
| 5645 | 3, 3, 0, | 5722 | 3, 3, 0, |
| 5646 | doc: /* Send current contents of region as input to PROCESS. | 5723 | doc: /* Send current contents of region as input to PROCESS. |
| @@ -5654,19 +5731,10 @@ Output from processes can arrive in between bunches. */) | |||
| 5654 | Lisp_Object process, start, end; | 5731 | Lisp_Object process, start, end; |
| 5655 | { | 5732 | { |
| 5656 | Lisp_Object proc; | 5733 | Lisp_Object proc; |
| 5657 | int start1, end1; | ||
| 5658 | 5734 | ||
| 5659 | proc = get_process (process); | 5735 | proc = get_process (process); |
| 5660 | validate_region (&start, &end); | 5736 | validate_region (&start, &end); |
| 5661 | 5737 | send_process_object (proc, start, end); | |
| 5662 | if (XINT (start) < GPT && XINT (end) > GPT) | ||
| 5663 | move_gap (XINT (start)); | ||
| 5664 | |||
| 5665 | start1 = CHAR_TO_BYTE (XINT (start)); | ||
| 5666 | end1 = CHAR_TO_BYTE (XINT (end)); | ||
| 5667 | send_process (proc, BYTE_POS_ADDR (start1), end1 - start1, | ||
| 5668 | Fcurrent_buffer ()); | ||
| 5669 | |||
| 5670 | return Qnil; | 5738 | return Qnil; |
| 5671 | } | 5739 | } |
| 5672 | 5740 | ||
| @@ -5684,8 +5752,7 @@ Output from processes can arrive in between bunches. */) | |||
| 5684 | Lisp_Object proc; | 5752 | Lisp_Object proc; |
| 5685 | CHECK_STRING (string); | 5753 | CHECK_STRING (string); |
| 5686 | proc = get_process (process); | 5754 | proc = get_process (process); |
| 5687 | send_process (proc, SDATA (string), | 5755 | send_process_object (proc, string, Qnil); |
| 5688 | SBYTES (string), string); | ||
| 5689 | return Qnil; | 5756 | return Qnil; |
| 5690 | } | 5757 | } |
| 5691 | 5758 | ||
diff --git a/src/s/aix3-2.h b/src/s/aix3-2.h index 6dfbe5d751c..e745b8dc81b 100644 --- a/src/s/aix3-2.h +++ b/src/s/aix3-2.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s- file for building Emacs on AIX 3.2. */ | 1 | /* s- file for building Emacs on AIX 3.2. |
| 2 | |||
| 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, | ||
| 4 | 2005, 2006, 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "aix3-1.h" | 24 | #include "aix3-1.h" |
| 4 | 25 | ||
diff --git a/src/s/aix4-1.h b/src/s/aix4-1.h index 21d05cb154d..49d866a7d7b 100644 --- a/src/s/aix4-1.h +++ b/src/s/aix4-1.h | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 | ||
| 3 | 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 2, 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 | |||
| 1 | #define AIX4_1 | 23 | #define AIX4_1 |
| 2 | 24 | ||
| 3 | #include "aix4.h" | 25 | #include "aix4.h" |
diff --git a/src/s/bsd386.h b/src/s/bsd386.h index 30833b5ff9a..a3d0983ca25 100644 --- a/src/s/bsd386.h +++ b/src/s/bsd386.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s/ file for bsd386 system. */ | 1 | /* s/ file for bsd386 system. |
| 2 | |||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "bsd4-3.h" | 24 | #include "bsd4-3.h" |
| 4 | 25 | ||
diff --git a/src/s/hiuxmpp.h b/src/s/hiuxmpp.h index 04e0bd4f72c..7e05b2e8ca0 100644 --- a/src/s/hiuxmpp.h +++ b/src/s/hiuxmpp.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* System description file for HI-UX. */ | 1 | /* System description file for HI-UX. |
| 2 | |||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 | ||
| 4 | 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #define BSD 198911 /* system version (year & month) */ | 24 | #define BSD 198911 /* system version (year & month) */ |
| 4 | #define DBL_DIG 15 /* same as the definition of <float.h> */ | 25 | #define DBL_DIG 15 /* same as the definition of <float.h> */ |
diff --git a/src/s/hiuxwe2.h b/src/s/hiuxwe2.h index 004ddd95043..68973d19cd3 100644 --- a/src/s/hiuxwe2.h +++ b/src/s/hiuxwe2.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* System description file for HI-UX. */ | 1 | /* System description file for HI-UX. |
| 2 | |||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #define BSD 198911 /* system version (year & month) */ | 24 | #define BSD 198911 /* system version (year & month) */ |
| 4 | #define DBL_DIG 15 /* same as the definition of <float.h> */ | 25 | #define DBL_DIG 15 /* same as the definition of <float.h> */ |
diff --git a/src/s/hpux10.h b/src/s/hpux10.h index 3612cfe0027..8f9e87a67a1 100644 --- a/src/s/hpux10.h +++ b/src/s/hpux10.h | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 3 | 2007 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 2, 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 | |||
| 1 | #include "hpux9shr.h" | 23 | #include "hpux9shr.h" |
| 2 | 24 | ||
| 3 | #define HPUX10 | 25 | #define HPUX10 |
diff --git a/src/s/hpux8.h b/src/s/hpux8.h index e73c630e825..d8d1bd368bb 100644 --- a/src/s/hpux8.h +++ b/src/s/hpux8.h | |||
| @@ -1,8 +1,31 @@ | |||
| 1 | /* system description file for hpux version 8. | 1 | /* system description file for hpux version 8. |
| 2 | This contains changes that were suggested "for the hp700". | 2 | |
| 3 | They were not needed for the 800. | 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, |
| 4 | Our conjecture that they are needed for hpux version 8, | 4 | 2007 Free Software Foundation, Inc. |
| 5 | which is what runs on the 700. */ | 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 2, 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 | Commentary: | ||
| 24 | |||
| 25 | This contains changes that were suggested "for the hp700". | ||
| 26 | They were not needed for the 800. | ||
| 27 | Our conjecture that they are needed for hpux version 8, | ||
| 28 | which is what runs on the 700. */ | ||
| 6 | 29 | ||
| 7 | #define HPUX8 | 30 | #define HPUX8 |
| 8 | 31 | ||
diff --git a/src/s/hpux9.h b/src/s/hpux9.h index 7562c6ae7ef..d34c56c345b 100644 --- a/src/s/hpux9.h +++ b/src/s/hpux9.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* System description file for hpux version 9. */ | 1 | /* System description file for hpux version 9. |
| 2 | |||
| 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "hpux8.h" | 24 | #include "hpux8.h" |
| 4 | 25 | ||
diff --git a/src/s/irix4-0.h b/src/s/irix4-0.h index 215cbdc32de..6fbe2478966 100644 --- a/src/s/irix4-0.h +++ b/src/s/irix4-0.h | |||
| @@ -1,3 +1,26 @@ | |||
| 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 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 2, 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 | |||
| 1 | #include "irix3-3.h" | 24 | #include "irix3-3.h" |
| 2 | 25 | ||
| 3 | #define USG5_3 | 26 | #define USG5_3 |
diff --git a/src/s/irix5-0.h b/src/s/irix5-0.h index 91017fb56d2..a932e315784 100644 --- a/src/s/irix5-0.h +++ b/src/s/irix5-0.h | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Silicon Graphics Irix system 5.0. | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 1 | #include "usg5-4.h" | 24 | #include "usg5-4.h" |
| 2 | 25 | ||
| 3 | #define IRIX5 | 26 | #define IRIX5 |
diff --git a/src/s/irix6-0.h b/src/s/irix6-0.h index e60120d3f6a..bc24474ba73 100644 --- a/src/s/irix6-0.h +++ b/src/s/irix6-0.h | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Silicon Graphics Irix system 6.0. | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 1 | #include "irix5-0.h" | 24 | #include "irix5-0.h" |
| 2 | 25 | ||
| 3 | /* Irix 6 tries to do 64 bits, but doesn't do it fully, | 26 | /* Irix 6 tries to do 64 bits, but doesn't do it fully, |
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 9df3e0a2ef6..9a53e16257e 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Silicon Graphics Irix system 6.5. | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 1 | #define IRIX6_5 /* used in m/iris4d */ | 24 | #define IRIX6_5 /* used in m/iris4d */ |
| 2 | #include "irix5-0.h" | 25 | #include "irix5-0.h" |
| 3 | 26 | ||
diff --git a/src/s/isc2-2.h b/src/s/isc2-2.h index 88f216b77d8..3d456570709 100644 --- a/src/s/isc2-2.h +++ b/src/s/isc2-2.h | |||
| @@ -1,5 +1,25 @@ | |||
| 1 | /* system description file for Interactive (ISC) Unix version 2.2 on | 1 | /* system description file for Interactive (ISC) Unix version 2.2 on the 386. |
| 2 | the 386. */ | 2 | |
| 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 3 | 23 | ||
| 4 | #include "usg5-3.h" | 24 | #include "usg5-3.h" |
| 5 | 25 | ||
diff --git a/src/s/isc3-0.h b/src/s/isc3-0.h index bbd4e8609d1..6b7d20a37d0 100644 --- a/src/s/isc3-0.h +++ b/src/s/isc3-0.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s- file for Interactive (ISC) Unix version 3.0 on the 386. */ | 1 | /* s- file for Interactive (ISC) Unix version 3.0 on the 386. |
| 2 | |||
| 3 | Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "isc2-2.h" | 24 | #include "isc2-2.h" |
| 4 | 25 | ||
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index c4bfddfbe5b..5fab025ae2a 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s/ file for netbsd system. */ | 1 | /* s/ file for netbsd system. |
| 2 | |||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | /* Get most of the stuff from bsd4.3 */ | 24 | /* Get most of the stuff from bsd4.3 */ |
| 4 | #include "bsd4-3.h" | 25 | #include "bsd4-3.h" |
diff --git a/src/s/osf1.h b/src/s/osf1.h index 61ac04c5f1f..04670b3d9a5 100644 --- a/src/s/osf1.h +++ b/src/s/osf1.h | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on osf1. | ||
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 3 | 2007 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 2, 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 | |||
| 1 | #include "bsd4-3.h" | 23 | #include "bsd4-3.h" |
| 2 | 24 | ||
| 3 | /* Identify OSF1 for the m- files. */ | 25 | /* Identify OSF1 for the m- files. */ |
diff --git a/src/s/ptx4.h b/src/s/ptx4.h index 295cb27d1a3..af59d399664 100644 --- a/src/s/ptx4.h +++ b/src/s/ptx4.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s/ file for Sequent "ptx 4", which is a modified SVR5.4. */ | 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 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 2, 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 | |||
| 2 | 23 | ||
| 3 | /* Tell usg5-4.h not to include filio.h. */ | 24 | /* Tell usg5-4.h not to include filio.h. */ |
| 4 | #define NO_FILIO_H | 25 | #define NO_FILIO_H |
diff --git a/src/s/sol2-3.h b/src/s/sol2-3.h index b45ec57ef1f..08964d733e2 100644 --- a/src/s/sol2-3.h +++ b/src/s/sol2-3.h | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Solaris 2.3. | ||
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 1 | #include "sol2.h" | 24 | #include "sol2.h" |
| 2 | 25 | ||
| 3 | /* Solaris 2.3 has a bug in XListFontsWithInfo. */ | 26 | /* Solaris 2.3 has a bug in XListFontsWithInfo. */ |
diff --git a/src/s/sol2.h b/src/s/sol2.h index 5f7d781f3e3..711d12123a3 100644 --- a/src/s/sol2.h +++ b/src/s/sol2.h | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 3 | 2007 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 2, 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 | |||
| 1 | #include "usg5-4.h" | 23 | #include "usg5-4.h" |
| 2 | 24 | ||
| 3 | #define SOLARIS2 | 25 | #define SOLARIS2 |
diff --git a/src/s/sunos4-0.h b/src/s/sunos4-0.h index d108df68640..a107b609a0c 100644 --- a/src/s/sunos4-0.h +++ b/src/s/sunos4-0.h | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on sunos 4.0. | ||
| 2 | |||
| 3 | Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 1 | #include "bsd4-2.h" | 24 | #include "bsd4-2.h" |
| 2 | 25 | ||
| 3 | #ifndef SUNOS4 | 26 | #ifndef SUNOS4 |
diff --git a/src/s/sunos4shr.h b/src/s/sunos4shr.h index 8427201cda3..aac3340a029 100644 --- a/src/s/sunos4shr.h +++ b/src/s/sunos4shr.h | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | /* | ||
| 2 | Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 3 | 2007 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 2, 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 | |||
| 1 | /* This file permits building Emacs with a shared libc on Sunos 4. | 23 | /* This file permits building Emacs with a shared libc on Sunos 4. |
| 2 | To make this work, you must completely replace your C shared library | 24 | To make this work, you must completely replace your C shared library |
| 3 | using one of the SunOS 4.1.x jumbo replacement patches from Sun. | 25 | using one of the SunOS 4.1.x jumbo replacement patches from Sun. |
diff --git a/src/s/umips.h b/src/s/umips.h deleted file mode 100644 index 3d497892c4b..00000000000 --- a/src/s/umips.h +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on Mips operating system. | ||
| 2 | That system can emulate either BSD or Sys V, in either case with changes. | ||
| 3 | If BSD_SYSTEM is defined, we assume BSD is being emulated; otherwise, | ||
| 4 | Sys V. */ | ||
| 5 | |||
| 6 | #ifdef BSD_SYSTEM | ||
| 7 | #include "bsd4-3.h" | ||
| 8 | |||
| 9 | #define C_SWITCH_SYSTEM -systype bsd43 | ||
| 10 | #define LD_SWITCH_SYSTEM -systype bsd43 | ||
| 11 | #define LIBS_SYSTEM -lmld | ||
| 12 | #define LIBS_DEBUG | ||
| 13 | #define START_FILES pre-crt0.o /lib/crt1.o | ||
| 14 | #define LIB_STANDARD -lc /usr/lib/crtn.o | ||
| 15 | |||
| 16 | #define COFF | ||
| 17 | #define TERMINFO | ||
| 18 | #undef MAIL_USE_FLOCK /* Someone should check this. */ | ||
| 19 | #undef HAVE_UNION_WAIT | ||
| 20 | |||
| 21 | #else /* not BSD_SYSTEM */ | ||
| 22 | |||
| 23 | #include "usg5-2-2.h" | ||
| 24 | |||
| 25 | #define LIBS_SYSTEM -lmld | ||
| 26 | #define LIBS_DEBUG | ||
| 27 | #define START_FILES pre-crt0.o /usr/lib/crt1.o | ||
| 28 | #define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o | ||
| 29 | /* #define LIBS_TERMCAP -lcurses */ | ||
| 30 | |||
| 31 | #define C_SWITCH_SYSTEM -I/usr/include/bsd | ||
| 32 | |||
| 33 | /* Cancel certain parts of standard sysV support. */ | ||
| 34 | #undef NONSYSTEM_DIR_LIBRARY | ||
| 35 | #define SYSV_SYSTEM_DIR | ||
| 36 | #undef static | ||
| 37 | |||
| 38 | /* Don't try to use SIGIO or FIONREAD even though they are defined. */ | ||
| 39 | #define BROKEN_SIGIO | ||
| 40 | #define BROKEN_FIONREAD | ||
| 41 | |||
| 42 | /* Describe special kernel features. */ | ||
| 43 | |||
| 44 | #define HAVE_SYSVIPC | ||
| 45 | |||
| 46 | #if defined(emacs) | ||
| 47 | #include <bsd/sys/time.h> | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /* The `select' in the system won't work for pipes, | ||
| 51 | so don't use it. */ | ||
| 52 | #define BROKEN_SELECT | ||
| 53 | |||
| 54 | #define HAVE_DUP2 | ||
| 55 | |||
| 56 | #define HAVE_PTYS | ||
| 57 | #define HAVE_SOCKETS | ||
| 58 | /* #define BSTRING Supposedly removed. */ | ||
| 59 | |||
| 60 | #undef NOMULTIPLEJOBS | ||
| 61 | |||
| 62 | #define CLASH_DETECTION | ||
| 63 | |||
| 64 | #define utimes utime /* Someone should check this. */ | ||
| 65 | /* ??? */ | ||
| 66 | #define IRIS | ||
| 67 | |||
| 68 | #endif /* not BSD_SYSTEM */ | ||
| 69 | |||
| 70 | /* High order bit must be stripped off nlist return values */ | ||
| 71 | #define FIXUP_KERNEL_SYMBOL_ADDR(NL) (NL)[0].n_value &= 0x7fffffff; | ||
| 72 | |||
| 73 | /* arch-tag: 9b816c7d-6ee2-40d9-b6dc-42c0aeccfbec | ||
| 74 | (do not change this comment) */ | ||
diff --git a/src/s/usg5-4-2.h b/src/s/usg5-4-2.h index 8b11bc54eae..56b2a345814 100644 --- a/src/s/usg5-4-2.h +++ b/src/s/usg5-4-2.h | |||
| @@ -1,4 +1,25 @@ | |||
| 1 | /* s/ file for System V release 4.2. */ | 1 | /* s/ file for System V release 4.2. |
| 2 | |||
| 3 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 2007 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 2, 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 | |||
| 2 | 23 | ||
| 3 | #include "usg5-4.h" | 24 | #include "usg5-4.h" |
| 4 | 25 | ||
| @@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. | |||
| 32 | #include <sys/file.h> | 32 | #include <sys/file.h> |
| 33 | #include <sys/time.h> | 33 | #include <sys/time.h> |
| 34 | #include <sys/utime.h> | 34 | #include <sys/utime.h> |
| 35 | #include <mbstring.h> /* for _mbspbrk */ | ||
| 35 | 36 | ||
| 36 | /* must include CRT headers *before* config.h */ | 37 | /* must include CRT headers *before* config.h */ |
| 37 | 38 | ||
| @@ -739,7 +740,7 @@ get_long_basename (char * name, char * buf, int size) | |||
| 739 | int len = 0; | 740 | int len = 0; |
| 740 | 741 | ||
| 741 | /* must be valid filename, no wild cards or other invalid characters */ | 742 | /* must be valid filename, no wild cards or other invalid characters */ |
| 742 | if (strpbrk (name, "*?|<>\"")) | 743 | if (_mbspbrk (name, "*?|<>\"")) |
| 743 | return 0; | 744 | return 0; |
| 744 | 745 | ||
| 745 | dir_handle = FindFirstFile (name, &find_data); | 746 | dir_handle = FindFirstFile (name, &find_data); |
| @@ -814,7 +815,7 @@ is_unc_volume (const char *filename) | |||
| 814 | if (!IS_DIRECTORY_SEP (ptr[0]) || !IS_DIRECTORY_SEP (ptr[1]) || !ptr[2]) | 815 | if (!IS_DIRECTORY_SEP (ptr[0]) || !IS_DIRECTORY_SEP (ptr[1]) || !ptr[2]) |
| 815 | return 0; | 816 | return 0; |
| 816 | 817 | ||
| 817 | if (strpbrk (ptr + 2, "*?|<>\"\\/")) | 818 | if (_mbspbrk (ptr + 2, "*?|<>\"\\/")) |
| 818 | return 0; | 819 | return 0; |
| 819 | 820 | ||
| 820 | return 1; | 821 | return 1; |
| @@ -2386,8 +2387,12 @@ stat (const char * path, struct stat * buf) | |||
| 2386 | } | 2387 | } |
| 2387 | 2388 | ||
| 2388 | name = (char *) map_w32_filename (path, &path); | 2389 | name = (char *) map_w32_filename (path, &path); |
| 2389 | /* must be valid filename, no wild cards or other invalid characters */ | 2390 | /* Must be valid filename, no wild cards or other invalid |
| 2390 | if (strpbrk (name, "*?|<>\"")) | 2391 | characters. We use _mbspbrk to support multibyte strings that |
| 2392 | might look to strpbrk as if they included literal *, ?, and other | ||
| 2393 | characters mentioned below that are disallowed by Windows | ||
| 2394 | filesystems. */ | ||
| 2395 | if (_mbspbrk (name, "*?|<>\"")) | ||
| 2391 | { | 2396 | { |
| 2392 | errno = ENOENT; | 2397 | errno = ENOENT; |
| 2393 | return -1; | 2398 | return -1; |
diff --git a/src/w32fns.c b/src/w32fns.c index e7cafce29a6..5a938622383 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -298,6 +298,10 @@ extern int w32_use_visible_system_caret; | |||
| 298 | 298 | ||
| 299 | static HWND w32_visible_system_caret_hwnd; | 299 | static HWND w32_visible_system_caret_hwnd; |
| 300 | 300 | ||
| 301 | /* From w32menu.c */ | ||
| 302 | extern HMENU current_popup_menu; | ||
| 303 | static int menubar_in_use = 0; | ||
| 304 | |||
| 301 | 305 | ||
| 302 | /* Error if we are not connected to MS-Windows. */ | 306 | /* Error if we are not connected to MS-Windows. */ |
| 303 | void | 307 | void |
| @@ -3412,11 +3416,14 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3412 | KillTimer (hwnd, menu_free_timer); | 3416 | KillTimer (hwnd, menu_free_timer); |
| 3413 | menu_free_timer = 0; | 3417 | menu_free_timer = 0; |
| 3414 | f = x_window_to_frame (dpyinfo, hwnd); | 3418 | f = x_window_to_frame (dpyinfo, hwnd); |
| 3415 | if (!f->output_data.w32->menu_command_in_progress) | 3419 | /* If a popup menu is active, don't wipe its strings. */ |
| 3420 | if (menubar_in_use | ||
| 3421 | && current_popup_menu == NULL) | ||
| 3416 | { | 3422 | { |
| 3417 | /* Free memory used by owner-drawn and help-echo strings. */ | 3423 | /* Free memory used by owner-drawn and help-echo strings. */ |
| 3418 | w32_free_menu_strings (hwnd); | 3424 | w32_free_menu_strings (hwnd); |
| 3419 | f->output_data.w32->menubar_active = 0; | 3425 | f->output_data.w32->menubar_active = 0; |
| 3426 | menubar_in_use = 0; | ||
| 3420 | } | 3427 | } |
| 3421 | } | 3428 | } |
| 3422 | return 0; | 3429 | return 0; |
| @@ -3468,16 +3475,21 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3468 | if (find_deferred_msg (hwnd, msg) != NULL) | 3475 | if (find_deferred_msg (hwnd, msg) != NULL) |
| 3469 | abort (); | 3476 | abort (); |
| 3470 | 3477 | ||
| 3478 | menubar_in_use = 1; | ||
| 3479 | |||
| 3471 | return send_deferred_msg (&msg_buf, hwnd, msg, wParam, lParam); | 3480 | return send_deferred_msg (&msg_buf, hwnd, msg, wParam, lParam); |
| 3472 | } | 3481 | } |
| 3473 | 3482 | ||
| 3474 | case WM_EXITMENULOOP: | 3483 | case WM_EXITMENULOOP: |
| 3475 | f = x_window_to_frame (dpyinfo, hwnd); | 3484 | f = x_window_to_frame (dpyinfo, hwnd); |
| 3476 | 3485 | ||
| 3477 | /* If a menu command is not already in progress, check again | 3486 | /* If a menu is still active, check again after a short delay, |
| 3478 | after a short delay, since Windows often (always?) sends the | 3487 | since Windows often (always?) sends the WM_EXITMENULOOP |
| 3479 | WM_EXITMENULOOP before the corresponding WM_COMMAND message. */ | 3488 | before the corresponding WM_COMMAND message. |
| 3480 | if (f && !f->output_data.w32->menu_command_in_progress) | 3489 | Don't do this if a popup menu is active, since it is only |
| 3490 | menubar menus that require cleaning up in this way. | ||
| 3491 | */ | ||
| 3492 | if (f && menubar_in_use && current_popup_menu == NULL) | ||
| 3481 | menu_free_timer = SetTimer (hwnd, MENU_FREE_ID, MENU_FREE_DELAY, NULL); | 3493 | menu_free_timer = SetTimer (hwnd, MENU_FREE_ID, MENU_FREE_DELAY, NULL); |
| 3482 | goto dflt; | 3494 | goto dflt; |
| 3483 | 3495 | ||
| @@ -3632,10 +3644,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3632 | } | 3644 | } |
| 3633 | goto command; | 3645 | goto command; |
| 3634 | case WM_COMMAND: | 3646 | case WM_COMMAND: |
| 3647 | menubar_in_use = 0; | ||
| 3635 | f = x_window_to_frame (dpyinfo, hwnd); | 3648 | f = x_window_to_frame (dpyinfo, hwnd); |
| 3636 | if (f && HIWORD (wParam) == 0) | 3649 | if (f && HIWORD (wParam) == 0) |
| 3637 | { | 3650 | { |
| 3638 | f->output_data.w32->menu_command_in_progress = 1; | ||
| 3639 | if (menu_free_timer) | 3651 | if (menu_free_timer) |
| 3640 | { | 3652 | { |
| 3641 | KillTimer (hwnd, menu_free_timer); | 3653 | KillTimer (hwnd, menu_free_timer); |
diff --git a/src/w32menu.c b/src/w32menu.c index a3bd82a0d7d..ba29c6ae433 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -129,7 +129,7 @@ typedef struct _widget_value | |||
| 129 | #define FALSE 0 | 129 | #define FALSE 0 |
| 130 | #endif /* no TRUE */ | 130 | #endif /* no TRUE */ |
| 131 | 131 | ||
| 132 | static HMENU current_popup_menu; | 132 | HMENU current_popup_menu; |
| 133 | 133 | ||
| 134 | void syms_of_w32menu (); | 134 | void syms_of_w32menu (); |
| 135 | void globals_of_w32menu (); | 135 | void globals_of_w32menu (); |
| @@ -835,7 +835,6 @@ cached information about equivalent key sequences. */) | |||
| 835 | UNBLOCK_INPUT; | 835 | UNBLOCK_INPUT; |
| 836 | 836 | ||
| 837 | discard_menu_items (); | 837 | discard_menu_items (); |
| 838 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); | ||
| 839 | 838 | ||
| 840 | #endif /* HAVE_MENUS */ | 839 | #endif /* HAVE_MENUS */ |
| 841 | 840 | ||
| @@ -1067,11 +1066,10 @@ menubar_selection_callback (FRAME_PTR f, void * client_data) | |||
| 1067 | buf.kind = MENU_BAR_EVENT; | 1066 | buf.kind = MENU_BAR_EVENT; |
| 1068 | buf.frame_or_window = frame; | 1067 | buf.frame_or_window = frame; |
| 1069 | buf.arg = entry; | 1068 | buf.arg = entry; |
| 1070 | kbd_buffer_store_event (&buf); | ||
| 1071 | |||
| 1072 | /* Free memory used by owner-drawn and help-echo strings. */ | 1069 | /* Free memory used by owner-drawn and help-echo strings. */ |
| 1073 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); | 1070 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); |
| 1074 | f->output_data.w32->menu_command_in_progress = 0; | 1071 | kbd_buffer_store_event (&buf); |
| 1072 | |||
| 1075 | f->output_data.w32->menubar_active = 0; | 1073 | f->output_data.w32->menubar_active = 0; |
| 1076 | return; | 1074 | return; |
| 1077 | } | 1075 | } |
| @@ -1080,7 +1078,6 @@ menubar_selection_callback (FRAME_PTR f, void * client_data) | |||
| 1080 | } | 1078 | } |
| 1081 | /* Free memory used by owner-drawn and help-echo strings. */ | 1079 | /* Free memory used by owner-drawn and help-echo strings. */ |
| 1082 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); | 1080 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); |
| 1083 | f->output_data.w32->menu_command_in_progress = 0; | ||
| 1084 | f->output_data.w32->menubar_active = 0; | 1081 | f->output_data.w32->menubar_active = 0; |
| 1085 | } | 1082 | } |
| 1086 | 1083 | ||
| @@ -1938,6 +1935,10 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1938 | 1935 | ||
| 1939 | DestroyMenu (menu); | 1936 | DestroyMenu (menu); |
| 1940 | 1937 | ||
| 1938 | /* Free the owner-drawn and help-echo menu strings. */ | ||
| 1939 | w32_free_menu_strings (FRAME_W32_WINDOW (f)); | ||
| 1940 | f->output_data.w32->menubar_active = 0; | ||
| 1941 | |||
| 1941 | /* Find the selected item, and its pane, to return | 1942 | /* Find the selected item, and its pane, to return |
| 1942 | the proper value. */ | 1943 | the proper value. */ |
| 1943 | if (menu_item_selection != 0) | 1944 | if (menu_item_selection != 0) |
diff --git a/src/w32term.c b/src/w32term.c index e488e4eeebc..c886ca48b8a 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Implementation of GUI terminal on the Microsoft W32 API. | 1 | /* Implementation of GUI terminal on the Microsoft W32 API. |
| 2 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | 2 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
| 4 | 2006, 2007 Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -3624,25 +3625,51 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3624 | int portion, position, whole; | 3625 | int portion, position, whole; |
| 3625 | { | 3626 | { |
| 3626 | Window w = SCROLL_BAR_W32_WINDOW (bar); | 3627 | Window w = SCROLL_BAR_W32_WINDOW (bar); |
| 3627 | double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); | 3628 | /* We use the whole scroll-bar height in the calculations below, to |
| 3629 | avoid strange effects like scrolling backwards when just clicking | ||
| 3630 | on the handle (without moving it). */ | ||
| 3631 | double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)) | ||
| 3632 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; | ||
| 3628 | int sb_page, sb_pos; | 3633 | int sb_page, sb_pos; |
| 3629 | BOOL draggingp = !NILP (bar->dragging) ? TRUE : FALSE; | 3634 | BOOL draggingp = !NILP (bar->dragging) ? TRUE : FALSE; |
| 3630 | SCROLLINFO si; | 3635 | SCROLLINFO si; |
| 3631 | 3636 | ||
| 3637 | /* We used to change the nPage setting while dragging the handle, | ||
| 3638 | but that had very strange effects (such as scrolling backwards | ||
| 3639 | while dragging downwards). | ||
| 3640 | |||
| 3641 | Now, we don't change the nPage setting while dragging unless we | ||
| 3642 | get near to the end of the buffer, in which case we often have to | ||
| 3643 | resize the handle to "go all the way". */ | ||
| 3644 | |||
| 3645 | if (draggingp) | ||
| 3646 | { | ||
| 3647 | int near_bottom_p; | ||
| 3648 | BLOCK_INPUT; | ||
| 3649 | si.cbSize = sizeof (si); | ||
| 3650 | si.fMask = SIF_POS | SIF_PAGE; | ||
| 3651 | GetScrollInfo(w, SB_CTL, &si); | ||
| 3652 | near_bottom_p = si.nPos + si.nPage >= range; | ||
| 3653 | UNBLOCK_INPUT; | ||
| 3654 | if (!near_bottom_p) | ||
| 3655 | return; | ||
| 3656 | } | ||
| 3657 | |||
| 3632 | if (whole) | 3658 | if (whole) |
| 3633 | { | 3659 | { |
| 3634 | /* Position scroll bar at rock bottom if the bottom of the | 3660 | /* Position scroll bar at rock bottom if the bottom of the |
| 3635 | buffer is visible. This avoids shinking the thumb away | 3661 | buffer is visible. This avoids shinking the thumb away |
| 3636 | to nothing if it is held at the bottom of the buffer. */ | 3662 | to nothing if it is held at the bottom of the buffer. */ |
| 3637 | if (position + portion >= whole) | 3663 | if (position + portion >= whole && !draggingp) |
| 3638 | { | 3664 | { |
| 3639 | sb_page = range * (whole - position) / whole | 3665 | sb_page = range * (whole - position) / whole; |
| 3640 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; | 3666 | sb_pos = range; |
| 3641 | sb_pos = range; | 3667 | } |
| 3642 | } | 3668 | else |
| 3643 | 3669 | { | |
| 3644 | sb_page = portion * range / whole + VERTICAL_SCROLL_BAR_MIN_HANDLE; | 3670 | sb_pos = position * range / whole; |
| 3645 | sb_pos = position * range / whole; | 3671 | sb_page = (min (portion, (whole - position)) * range) / whole; |
| 3672 | } | ||
| 3646 | } | 3673 | } |
| 3647 | else | 3674 | else |
| 3648 | { | 3675 | { |
| @@ -3650,19 +3677,16 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3650 | sb_pos = 0; | 3677 | sb_pos = 0; |
| 3651 | } | 3678 | } |
| 3652 | 3679 | ||
| 3680 | sb_page = max (sb_page, VERTICAL_SCROLL_BAR_MIN_HANDLE); | ||
| 3681 | |||
| 3653 | BLOCK_INPUT; | 3682 | BLOCK_INPUT; |
| 3654 | 3683 | ||
| 3655 | si.cbSize = sizeof (si); | 3684 | si.cbSize = sizeof (si); |
| 3656 | /* Only update page size if currently dragging, to reduce | 3685 | si.fMask = SIF_PAGE | SIF_POS; |
| 3657 | flicker effects. */ | ||
| 3658 | if (draggingp) | ||
| 3659 | si.fMask = SIF_PAGE; | ||
| 3660 | else | ||
| 3661 | si.fMask = SIF_PAGE | SIF_POS; | ||
| 3662 | si.nPage = sb_page; | 3686 | si.nPage = sb_page; |
| 3663 | si.nPos = sb_pos; | 3687 | si.nPos = sb_pos; |
| 3664 | 3688 | ||
| 3665 | SetScrollInfo (w, SB_CTL, &si, !draggingp); | 3689 | SetScrollInfo (w, SB_CTL, &si, TRUE); |
| 3666 | 3690 | ||
| 3667 | UNBLOCK_INPUT; | 3691 | UNBLOCK_INPUT; |
| 3668 | } | 3692 | } |
diff --git a/src/w32term.h b/src/w32term.h index c1ad423ca67..6a3f7267e25 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -380,9 +380,6 @@ struct w32_output | |||
| 380 | /* Nonzero means menubar is currently active. */ | 380 | /* Nonzero means menubar is currently active. */ |
| 381 | char menubar_active; | 381 | char menubar_active; |
| 382 | 382 | ||
| 383 | /* Nonzero means a menu command is being processed. */ | ||
| 384 | char menu_command_in_progress; | ||
| 385 | |||
| 386 | /* Nonzero means menubar is about to become active, but should be | 383 | /* Nonzero means menubar is about to become active, but should be |
| 387 | brought up to date first. */ | 384 | brought up to date first. */ |
| 388 | volatile char pending_menu_activation; | 385 | volatile char pending_menu_activation; |
diff --git a/src/xfaces.c b/src/xfaces.c index d10dec235ac..384c299791c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5680,13 +5680,11 @@ If FRAME is unspecified or nil, the current frame is used. */) | |||
| 5680 | CHECK_LIVE_FRAME (frame); | 5680 | CHECK_LIVE_FRAME (frame); |
| 5681 | f = XFRAME (frame); | 5681 | f = XFRAME (frame); |
| 5682 | 5682 | ||
| 5683 | if ((CONSP (color1) && !parse_rgb_list (color1, &cdef1)) | 5683 | if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1)) |
| 5684 | || !STRINGP (color1) | 5684 | && !(STRINGP (color1) && defined_color (f, SDATA (color1), &cdef1, 0))) |
| 5685 | || !defined_color (f, SDATA (color1), &cdef1, 0)) | ||
| 5686 | signal_error ("Invalid color", color1); | 5685 | signal_error ("Invalid color", color1); |
| 5687 | if ((CONSP (color2) && !parse_rgb_list (color2, &cdef2)) | 5686 | if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2)) |
| 5688 | || !STRINGP (color2) | 5687 | && !(STRINGP (color2) && defined_color (f, SDATA (color2), &cdef2, 0))) |
| 5689 | || !defined_color (f, SDATA (color2), &cdef2, 0)) | ||
| 5690 | signal_error ("Invalid color", color2); | 5688 | signal_error ("Invalid color", color2); |
| 5691 | 5689 | ||
| 5692 | return make_number (color_distance (&cdef1, &cdef2)); | 5690 | return make_number (color_distance (&cdef1, &cdef2)); |
diff --git a/src/xterm.c b/src/xterm.c index 99f51d78f63..925b4e3bd1f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8725,6 +8725,11 @@ do_ewmh_fullscreen (f) | |||
| 8725 | { | 8725 | { |
| 8726 | int have_net_atom = wm_supports (f, "_NET_WM_STATE"); | 8726 | int have_net_atom = wm_supports (f, "_NET_WM_STATE"); |
| 8727 | 8727 | ||
| 8728 | /* Some window managers don't say they support _NET_WM_STATE, but they do say | ||
| 8729 | they support _NET_WM_STATE_FULLSCREEN. Try that also. */ | ||
| 8730 | if (!have_net_atom) | ||
| 8731 | have_net_atom = wm_supports (f, "_NET_WM_STATE_FULLSCREEN"); | ||
| 8732 | |||
| 8728 | if (have_net_atom) | 8733 | if (have_net_atom) |
| 8729 | { | 8734 | { |
| 8730 | Lisp_Object frame; | 8735 | Lisp_Object frame; |