aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2012-09-20 07:55:52 +0200
committerJoakim Verona2012-09-20 07:55:52 +0200
commita461dd78ac7ce24cf64025ba7096187f6c58201b (patch)
treee03df8c68ae9a5092ca5f94b2fd6bea089fc8b8f /src
parent99def29614db90aa00e3334c062a81d2d5dc9495 (diff)
parente4bce92acb1567a6377995d8d688b95358ec29cf (diff)
downloademacs-a461dd78ac7ce24cf64025ba7096187f6c58201b.tar.gz
emacs-a461dd78ac7ce24cf64025ba7096187f6c58201b.zip
stil not compiling
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog321
-rw-r--r--src/frame.c97
-rw-r--r--src/nsfns.m13
-rw-r--r--src/w32inevt.c10
-rw-r--r--src/w32xfns.c132
5 files changed, 405 insertions, 168 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8b47c52c23f..e8827c2de18 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,294 @@
12012-09-19 Paul Eggert <eggert@cs.ucla.edu>
2
3 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
4 Ignore 'expected'. See Eli Zaretskii in
5 <http://bugs.gnu.org/12471#8> (last line).
6
7 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
8 (XParseGeometry): Now static. Substitute extremal values for
9 values that are out of range.
10
112012-09-19 Jan Djärv <jan.h.d@swipnet.se>
12
13 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
14
15 * nsfns.m (XParseGeometry): Remove.
16 (Fx_create_frame): Call x_set_offset to correctly interpret
17 top_pos in geometry.
18
19 * frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
20 (Fx_parse_geometry): If there is a space in string, call
21 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
22
232012-09-17 Eli Zaretskii <eliz@gnu.org>
24
25 * search.c (scan_buffer): Use character positions in calls to
26 region_cache_forward and region_cache_backward, not byte
27 positions. (Bug#12196)
28
29 * w32term.c (w32_read_socket): Set pending_signals to 1, like
30 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
31
32 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
33 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
34 emacs_blocked_malloc, now deleted.
35
362012-09-17 Paul Eggert <eggert@cs.ucla.edu>
37
38 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
39 The workaround was for improving performance on Solaris 2.4, but
40 is getting in the way now. Emacs will still work if someone is
41 still running Solaris 2.4 in a museum somewhere; Sun dropped
42 support for Solaris 2.4 in 2003.
43 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
44 * process.c (create_process) [HAVE_WORKING_VFORK]:
45 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
46 since Emacs no longer uses vfork on that platform.
47
482012-09-17 Glenn Morris <rgm@gnu.org>
49
50 * emacs.c: Use COPYRIGHT.
51
522012-09-16 Paul Eggert <eggert@cs.ucla.edu>
53
54 Remove configure's --without-sync-input option (Bug#12450).
55 When auditing signal-handling in preparation for cleaning it up,
56 I found that SYNC_INPUT has race conditions and would be a real
57 pain to fix. Since it's an undocumented and deprecated
58 configure-time option, now seems like a good time to remove it.
59 Also see <http://bugs.gnu.org/11080#16>.
60 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
61 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
62 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
63 (malloc_hysteresis):
64 (check_depth) [XMALLOC_OVERRUN_CHECK]:
65 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
66 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
67 (dont_register_blocks, bytes_used_when_reconsidered)
68 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
69 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
70 [!SYSTEM_MALLOC && !SYNC_INPUT]:
71 Remove. All uses removed.
72 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
73 implementation, one that depends on whether the new macro
74 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
75 is defined.
76 * atimer.c (run_timers, handle_alarm_signal):
77 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
78 (handle_async_input, process_pending_signals)
79 (handle_input_available_signal, init_keyboard):
80 * nsterm.m (ns_read_socket):
81 * process.c (wait_reading_process_output):
82 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
83 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
84 (emacs_write):
85 * xterm.c (XTread_socket):
86 Assume SYNC_INPUT.
87 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
88 * eval.c (handling_signal): Remove. All uses removed.
89 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
90 All uses replaced with the SYNC_INPUT version.
91 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
92 Remove decls.
93 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
94 Now static.
95
96 * font.c (Ffont_shape_gstring): Remove unused local.
97
982012-09-16 Glenn Morris <rgm@gnu.org>
99
100 * Makefile.in (clean): No longer run nextstep's clean.
101
102 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
103 (ns_frag): Remove.
104 (ns-app): Move here from ns.mk, and simplify.
105 (clean): Simplify nextstep entry.
106 * ns.mk: Remove file.
107
1082012-09-16 Kenichi Handa <handa@gnu.org>
109
110 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
111 not covert the last few charactes.
112
1132012-09-16 Kenichi Handa <handa@gnu.org>
114
115 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
116 here, but just check the validity of glyphs in the glyph-string.
117
1182012-09-16 Martin Rudalics <rudalics@gmx.at>
119
120 * window.c (Fwindow_parameter, Fset_window_parameter): Accept
121 any window as argument (Bug#12452).
122
1232012-09-16 Jan Djärv <jan.h.d@swipnet.se>
124
125 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
126 to ns_term_init to avoid memory leak.
127
128 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
129 explicit retain/release.
130 (ns_term_init): Only allow one display. Initialize outerpool and
131 ns_*_types.
132
1332012-09-15 Paul Eggert <eggert@cs.ucla.edu>
134
135 Port _setjmp fix to POSIXish hosts as well as Microsoft.
136 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
137 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
138 the Microsoft problem in a different way, by altering ../nt/config.nt.
139
1402012-09-15 Eli Zaretskii <eliz@gnu.org>
141
142 * w32xfns.c:
143 * w32uniscribe.c:
144 * w32term.c:
145 * w32select.c:
146 * w32reg.c:
147 * w32proc.c:
148 * w32menu.c:
149 * w32inevt.c:
150 * w32heap.c:
151 * w32font.c:
152 * w32fns.c:
153 * w32console.c:
154 * w32.c:
155 * w16select.c: Remove inclusion of setjmp.h, as it is now included
156 by lisp.h. This completes removal of setjmp.h inclusion
157 erroneously announced in the previous commit. (Bug#12446)
158
159 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
160 more accurate.
161
162 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
163 not defined as a macro. The latter happens on MS-Windows.
164 (Bug#12446)
165
1662012-09-15 Paul Eggert <eggert@cs.ucla.edu>
167
168 Port better to POSIX hosts lacking _setjmp (Bug#12446).
169 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
170 Some instances of '#include <setjmp.h>' removed, if the
171 only reason for the instance was because "lisp.h" was included.
172 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
173 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
174 and _longjmp with the new symbols. Emacs already uses _setjmp if
175 available, so this change affects only POSIXish hosts that have
176 sigsetjmp but not _setjmp, such as some versions of Solaris and
177 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
178 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
179 (png_load_body) [HAVE_PNG]:
180 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
181 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
182 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
183 since PNG requires jmp_buf. This is the only exception to the
184 general rule that we now use sys_setjmp and sys_longjmp.
185 This exception is OK since this code does not change the signal
186 mask or longjmp out of a signal handler.
187
1882012-09-14 Paul Eggert <eggert@cs.ucla.edu>
189
190 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
191 Include "syssignal.h", for 'main_thread'.
192
1932012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
194
195 Avoid out-of-range marker position (Bug#12426).
196 * insdel.c (replace_range, replace_range_2): Adjust
197 markers before overlays, as suggested by comments.
198 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
199 Remove redundant check before calling offset_intervals.
200
2012012-09-14 Martin Rudalics <rudalics@gmx.at>
202
203 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
204 current buffer (Bug#12387).
205
2062012-09-14 Juanma Barranquero <lekktu@gmail.com>
207
208 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
209
2102012-09-13 Paul Eggert <eggert@cs.ucla.edu>
211
212 Use a more backwards-compatible timer format (Bug#12430).
213 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
214 vector element, not from the 4th, since PSECS is now at the end.
215 (Fcurrent_idle_time): Doc fix.
216
2172012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
218
219 Function to mark objects and remove killed buffers at once.
220 * alloc.c (discard_killed_buffers): Rename to ...
221 (mark_discard_killed buffers) ... new name. Add marking
222 of remaining objects. Fix comment. Adjust users.
223 (mark_object): Do not touch frame buffer lists here.
224 * frame.c (delete_frame): Reset frame buffer lists here.
225
2262012-09-13 Paul Eggert <eggert@cs.ucla.edu>
227
228 Better workaround for GNOME bug when --enable-gcc-warnings.
229 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
230 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
231 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
232
233 Simplify SIGIO usage (Bug#12408).
234 The code that dealt with SIGIO was crufty and confusing, e.g., it
235 played tricks like "#undef SIGIO" but these tricks were not used
236 consistently. Simplify mostly by not #undeffing standard symbols,
237 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
238 or not as we please) rather than "defined SIGIO" (standard symbol
239 that we probably shouldn't #undef).
240 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
241 Modules that need it can include it.
242 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
243 * dispextern.h (ignore_sigio): New decl.
244 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
245 unconditionally, since it's now a no-op if !USABLE_SIGIO.
246 * emacs.c (shut_down_emacs):
247 * keyboard.c (kbd_buffer_store_event_hold):
248 Use ignore_sigio rather than invoking 'signal' directly.
249 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
250 for FIONREAD.
251 (FIONREAD, SIGIO): Do not #undef.
252 (tty_read_avail_input): Use #error rather than a syntax error.
253 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
254 for I_PIPE, used by SETUP_SLAVE_PTY.
255 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
256 * sysdep.c (croak): Remove; no longer needed. This bit of
257 temporary code, with Fred N. Fish's comment that it's temporary,
258 has been in Emacs since at least 1992!
259 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
260 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
261 * syssignal.h (croak): Remove decl.
262 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
263 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
264 now that we're termios-only.
265 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
266 * term.c (dissociate_if_controlling_tty): Use #error rather than
267 a run-time error.
268
269 Work around GCC and GNOME bugs when --enable-gcc-warnings.
270 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
271 to work around GNOME bug 683906.
272 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
273 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
274 This works around GCC bug 54561.
275
2762012-09-12 Paul Eggert <eggert@cs.ucla.edu>
277
278 More fixes for 'volatile' and setjmp/longjmp.
279 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
280 * image.c (struct png_load_context) [HAVE_PNG]: New type.
281 (png_load_body) [HAVE_PNG]:
282 (jpeg_load_body) [HAVE_JPEG]:
283 New function, with most of the old parent function's body.
284 (png_load) [HAVE_PNG]:
285 (jpeg_load) [HAVE_JPEG]:
286 Invoke the new function, to avoid longjmp munging our locals.
287 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
288 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
289 longjmp is passed 2, as the C standard doesn't guarantee this.
290 Instead, store the failure code into mgr->failure_code.
291
12012-09-12 Stefan Monnier <monnier@iro.umontreal.ca> 2922012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 293
3 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) 294 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
@@ -212,7 +503,7 @@
212 (ns_maybe_dumpglyphs_background): Remove fringe/internal border 503 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
213 adjustment. 504 adjustment.
214 (ns_dumpglyphs_image): Ditto. 505 (ns_dumpglyphs_image): Ditto.
215 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal 506 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
216 border adjustment. 507 border adjustment.
217 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and 508 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
218 their usage. Add fringe_extended_p and its use as in other terms. 509 their usage. Add fringe_extended_p and its use as in other terms.
@@ -293,7 +584,7 @@
293 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>; 584 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
294 no longer needed here. 585 no longer needed here.
295 * emacs.c (main): Inspect existing signal handler with sigaction, 586 * emacs.c (main): Inspect existing signal handler with sigaction,
296 so that there's no need to block and unblock SIGHUP. 587 so that there's no need to block and unblock SIGHUP.
297 * sysdep.c (struct save_signal): New member 'action', replacing 588 * sysdep.c (struct save_signal): New member 'action', replacing
298 old member 'handler'. 589 old member 'handler'.
299 (save_signal_handlers, restore_signal_handlers): 590 (save_signal_handlers, restore_signal_handlers):
@@ -820,18 +1111,18 @@
8202012-08-28 Jan Djärv <jan.h.d@swipnet.se> 11112012-08-28 Jan Djärv <jan.h.d@swipnet.se>
821 1112
822 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize 1113 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
823 button_values to NULL. Call setStykeMask so dialogs get a close button. 1114 button_values to NULL. Call setStykeMask so dialogs get a close button.
824 (windowShouldClose:): Set window_closed. 1115 (windowShouldClose:): Set window_closed.
825 (dealloc): New member, free button_values. 1116 (dealloc): New member, free button_values.
826 (process_dialog:): Make member function. Remove window argument, 1117 (process_dialog:): Make member function. Remove window argument,
827 replace window with self. Count buttons and allocate and store values 1118 replace window with self. Count buttons and allocate and store values
828 in button_values. 1119 in button_values.
829 (addButton:value:row:): value is int with the name tag. Call setTag 1120 (addButton:value:row:): value is int with the name tag. Call setTag
830 with tag. Remove return self, declare return value as void. 1121 with tag. Remove return self, declare return value as void.
831 (addString:row:): Remove return self, declare return value as void. 1122 (addString:row:): Remove return self, declare return value as void.
832 (addSplit): Remove return self, declare return value as void. 1123 (addSplit): Remove return self, declare return value as void.
833 (clicked:): Remove return self, declare return value as void. 1124 (clicked:): Remove return self, declare return value as void.
834 Set dialog_return to button_values[seltag]. Code formatting change. 1125 Set dialog_return to button_values[seltag]. Code formatting change.
835 (initFromContents:isQuestion:): Adjust call to process_dialog. 1126 (initFromContents:isQuestion:): Adjust call to process_dialog.
836 Code formatting change. 1127 Code formatting change.
837 (timeout_handler:): Set timer_fired to YES. 1128 (timeout_handler:): Set timer_fired to YES.
@@ -1166,7 +1457,7 @@
1166 1457
1167 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. 1458 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
1168 Otherwise, the compiler complains about (A?B:C) where B is void 1459 Otherwise, the compiler complains about (A?B:C) where B is void
1169 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. 1460 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
1170 (fontset_add): Return void, for FONTSET_ADD. 1461 (fontset_add): Return void, for FONTSET_ADD.
1171 1462
11722012-08-21 Paul Eggert <eggert@cs.ucla.edu> 14632012-08-21 Paul Eggert <eggert@cs.ucla.edu>
@@ -1682,7 +1973,7 @@
1682 Start main loop and wait for application defined event. 1973 Start main loop and wait for application defined event.
1683 Inform select thread to stop selecting after main loop is exited. 1974 Inform select thread to stop selecting after main loop is exited.
1684 (ns_term_init): Create selfds pipe and set non-blocking. 1975 (ns_term_init): Create selfds pipe and set non-blocking.
1685 Initialize select_mutex. Start the select thread (fd_handler). 1976 Initialize select_mutex. Start the select thread (fd_handler).
1686 (fd_handler:): Loop forever, wait for info from the main thread 1977 (fd_handler:): Loop forever, wait for info from the main thread
1687 to either start or stop selecting. When select returns, send 1978 to either start or stop selecting. When select returns, send
1688 and appdefined event. 1979 and appdefined event.
@@ -1814,7 +2105,7 @@
1814 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info 2105 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
1815 if not present. 2106 if not present.
1816 (update_frame_tool_bar): Return early if data in xg_frame_tb_info 2107 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
1817 is up to date. Otherwise store new data. 2108 is up to date. Otherwise store new data.
1818 (free_frame_tool_bar): Free xg_frame_tb_info if present. 2109 (free_frame_tool_bar): Free xg_frame_tb_info if present.
1819 2110
18202012-08-13 Dmitry Antipov <dmantipov@yandex.ru> 21112012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
@@ -1841,7 +2132,7 @@
18412012-08-11 Jan Djärv <jan.h.d@swipnet.se> 21322012-08-11 Jan Djärv <jan.h.d@swipnet.se>
1842 2133
1843 * nsterm.m (not_in_argv): New function. 2134 * nsterm.m (not_in_argv): New function.
1844 (application:openFile, application:openTempFile:): 2135 (application:openFile, application:openTempFile:):
1845 (application:openFileWithoutUI:, application:openFiles:): Open file 2136 (application:openFileWithoutUI:, application:openFiles:): Open file
1846 if not_in_argv returns non-zero (bug#12171). 2137 if not_in_argv returns non-zero (bug#12171).
1847 2138
@@ -3028,7 +3319,7 @@
3028 3319
30292012-07-21 Jan Djärv <jan.h.d@swipnet.se> 33202012-07-21 Jan Djärv <jan.h.d@swipnet.se>
3030 3321
3031 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). 3322 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
3032 (conversationIdentifier): Return value is NSInteger. 3323 (conversationIdentifier): Return value is NSInteger.
3033 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA. 3324 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
3034 3325
@@ -5538,7 +5829,7 @@
5538 * lisp.h (struct vectorlike_header): New field `nbytes', 5829 * lisp.h (struct vectorlike_header): New field `nbytes',
5539 adjust comment accordingly. 5830 adjust comment accordingly.
5540 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK' 5831 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
5541 to denote vector blocks. Adjust users (live_vector_p, 5832 to denote vector blocks. Adjust users (live_vector_p,
5542 mark_maybe_pointer, valid_lisp_object_p) accordingly. 5833 mark_maybe_pointer, valid_lisp_object_p) accordingly.
5543 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. 5834 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
5544 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), 5835 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
@@ -5552,7 +5843,7 @@
5552 (allocate_vector_from_block, init_vectors, allocate_vector_from_block) 5843 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
5553 (sweep_vectors): New functions. 5844 (sweep_vectors): New functions.
5554 (allocate_vectorlike): Return `zero_vector' as the only vector of 5845 (allocate_vectorlike): Return `zero_vector' as the only vector of
5555 0 items. Allocate new vector from block if vector size is less than 5846 0 items. Allocate new vector from block if vector size is less than
5556 or equal to VBLOCK_BYTES_MAX. 5847 or equal to VBLOCK_BYTES_MAX.
5557 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors. 5848 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
5558 (init_alloc_once): Add call to init_vectors. 5849 (init_alloc_once): Add call to init_vectors.
@@ -5642,7 +5933,7 @@
5642 change it's type from Lisp_Object to bitfield. 5933 change it's type from Lisp_Object to bitfield.
5643 Change type of 'force_start', 'optional_new_start', 5934 Change type of 'force_start', 'optional_new_start',
5644 'last_had_star', 'update_mode_line' and 'start_at_line_beg' 5935 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
5645 fields from Lisp_Object to bitfield. Adjust users accordingly. 5936 fields from Lisp_Object to bitfield. Adjust users accordingly.
5646 5937
56472012-05-31 Paul Eggert <eggert@cs.ucla.edu> 59382012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5648 5939
diff --git a/src/frame.c b/src/frame.c
index 6930dac3ce8..f3d16171516 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3897,6 +3897,95 @@ x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop,
3897} 3897}
3898 3898
3899 3899
3900#if !defined (HAVE_X_WINDOWS) && defined (NoValue)
3901
3902/*
3903 * XParseGeometry parses strings of the form
3904 * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
3905 * width, height, xoffset, and yoffset are unsigned integers.
3906 * Example: "=80x24+300-49"
3907 * The equal sign is optional.
3908 * It returns a bitmask that indicates which of the four values
3909 * were actually found in the string. For each value found,
3910 * the corresponding argument is updated; for each value
3911 * not found, the corresponding argument is left unchanged.
3912 */
3913
3914static int
3915XParseGeometry (char *string,
3916 int *x, int *y,
3917 unsigned int *width, unsigned int *height)
3918{
3919 int mask = NoValue;
3920 char *strind;
3921 unsigned long int tempWidth, tempHeight;
3922 long int tempX, tempY;
3923 char *nextCharacter;
3924
3925 if (string == NULL || *string == '\0')
3926 return mask;
3927 if (*string == '=')
3928 string++; /* ignore possible '=' at beg of geometry spec */
3929
3930 strind = string;
3931 if (*strind != '+' && *strind != '-' && *strind != 'x')
3932 {
3933 tempWidth = strtoul (strind, &nextCharacter, 10);
3934 if (strind == nextCharacter)
3935 return 0;
3936 strind = nextCharacter;
3937 mask |= WidthValue;
3938 }
3939
3940 if (*strind == 'x' || *strind == 'X')
3941 {
3942 strind++;
3943 tempHeight = strtoul (strind, &nextCharacter, 10);
3944 if (strind == nextCharacter)
3945 return 0;
3946 strind = nextCharacter;
3947 mask |= HeightValue;
3948 }
3949
3950 if (*strind == '+' || *strind == '-')
3951 {
3952 if (*strind == '-')
3953 mask |= XNegative;
3954 tempX = strtol (strind, &nextCharacter, 10);
3955 if (strind == nextCharacter)
3956 return 0;
3957 strind = nextCharacter;
3958 mask |= XValue;
3959 if (*strind == '+' || *strind == '-')
3960 {
3961 if (*strind == '-')
3962 mask |= YNegative;
3963 tempY = strtol (strind, &nextCharacter, 10);
3964 if (strind == nextCharacter)
3965 return 0;
3966 strind = nextCharacter;
3967 mask |= YValue;
3968 }
3969 }
3970
3971 /* If strind isn't at the end of the string then it's an invalid
3972 geometry specification. */
3973
3974 if (*strind != '\0')
3975 return 0;
3976
3977 if (mask & XValue)
3978 *x = clip_to_bounds (INT_MIN, tempX, INT_MAX);
3979 if (mask & YValue)
3980 *y = clip_to_bounds (INT_MIN, tempY, INT_MAX);
3981 if (mask & WidthValue)
3982 *width = min (tempWidth, UINT_MAX);
3983 if (mask & HeightValue)
3984 *height = min (tempHeight, UINT_MAX);
3985 return mask;
3986}
3987
3988#endif /* !defined (HAVE_X_WINDOWS) && defined (NoValue) */
3900 3989
3901 3990
3902/* NS used to define x-parse-geometry in ns-win.el, but that confused 3991/* NS used to define x-parse-geometry in ns-win.el, but that confused
@@ -3917,15 +4006,16 @@ or a list (- N) meaning -N pixels relative to bottom/right corner.
3917On Nextstep, this just calls `ns-parse-geometry'. */) 4006On Nextstep, this just calls `ns-parse-geometry'. */)
3918 (Lisp_Object string) 4007 (Lisp_Object string)
3919{ 4008{
3920#ifdef HAVE_NS
3921 return call1 (Qns_parse_geometry, string);
3922#else
3923 int geometry, x, y; 4009 int geometry, x, y;
3924 unsigned int width, height; 4010 unsigned int width, height;
3925 Lisp_Object result; 4011 Lisp_Object result;
3926 4012
3927 CHECK_STRING (string); 4013 CHECK_STRING (string);
3928 4014
4015#ifdef HAVE_NS
4016 if (strchr (SSDATA (string), ' ') != NULL)
4017 return call1 (Qns_parse_geometry, string);
4018#endif
3929 geometry = XParseGeometry (SSDATA (string), 4019 geometry = XParseGeometry (SSDATA (string),
3930 &x, &y, &width, &height); 4020 &x, &y, &width, &height);
3931 result = Qnil; 4021 result = Qnil;
@@ -3961,7 +4051,6 @@ On Nextstep, this just calls `ns-parse-geometry'. */)
3961 result = Fcons (Fcons (Qheight, make_number (height)), result); 4051 result = Fcons (Fcons (Qheight, make_number (height)), result);
3962 4052
3963 return result; 4053 return result;
3964#endif /* HAVE_NS */
3965} 4054}
3966 4055
3967 4056
diff --git a/src/nsfns.m b/src/nsfns.m
index 072005d2d3d..e2c8c3722c0 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -870,16 +870,6 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
870} 870}
871 871
872 872
873/* Xism; we stub out (we do implement this in ns-win.el) */
874int
875XParseGeometry (char *string, int *x, int *y,
876 unsigned int *width, unsigned int *height)
877{
878 message1 ("Warning: XParseGeometry not supported under NS.\n");
879 return 0;
880}
881
882
883/* TODO: move to nsterm? */ 873/* TODO: move to nsterm? */
884int 874int
885ns_lisp_to_cursor_type (Lisp_Object arg) 875ns_lisp_to_cursor_type (Lisp_Object arg)
@@ -1399,6 +1389,9 @@ This function is an internal primitive--use `make-frame' instead. */)
1399 1389
1400 UNGCPRO; 1390 UNGCPRO;
1401 1391
1392 if (window_prompting & USPosition)
1393 x_set_offset (f, f->left_pos, f->top_pos, 1);
1394
1402 /* Make sure windows on this frame appear in calls to next-window 1395 /* Make sure windows on this frame appear in calls to next-window
1403 and similar functions. */ 1396 and similar functions. */
1404 Vwindow_list = Qnil; 1397 Vwindow_list = Qnil;
diff --git a/src/w32inevt.c b/src/w32inevt.c
index ee07db5335b..d4cc620335c 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -747,7 +747,7 @@ w32_console_read_socket (struct terminal *terminal,
747 int expected, 747 int expected,
748 struct input_event *hold_quit) 748 struct input_event *hold_quit)
749{ 749{
750 int nev, ret = 0, add; 750 int nev, add;
751 int isdead; 751 int isdead;
752 752
753 if (interrupt_input_blocked) 753 if (interrupt_input_blocked)
@@ -767,8 +767,7 @@ w32_console_read_socket (struct terminal *terminal,
767 /* If nev == -1, there was some kind of error 767 /* If nev == -1, there was some kind of error
768 If nev == 0 then waitp must be zero and no events were available 768 If nev == 0 then waitp must be zero and no events were available
769 so return. */ 769 so return. */
770 UNBLOCK_INPUT; 770 break;
771 return nev;
772 } 771 }
773 772
774 while (nev > 0) 773 while (nev > 0)
@@ -812,9 +811,6 @@ w32_console_read_socket (struct terminal *terminal,
812 queue_ptr++; 811 queue_ptr++;
813 nev--; 812 nev--;
814 } 813 }
815
816 if (ret > 0 || expected == 0)
817 break;
818 } 814 }
819 815
820 /* We don't get told about changes in the window size (only the buffer 816 /* We don't get told about changes in the window size (only the buffer
@@ -824,5 +820,5 @@ w32_console_read_socket (struct terminal *terminal,
824 maybe_generate_resize_event (); 820 maybe_generate_resize_event ();
825 821
826 UNBLOCK_INPUT; 822 UNBLOCK_INPUT;
827 return ret; 823 return nev;
828} 824}
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 33f40fc7c01..018dd14cb80 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -303,138 +303,6 @@ drain_message_queue (void)
303 } 303 }
304} 304}
305 305
306
307/*
308 * XParseGeometry parses strings of the form
309 * "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
310 * width, height, xoffset, and yoffset are unsigned integers.
311 * Example: "=80x24+300-49"
312 * The equal sign is optional.
313 * It returns a bitmask that indicates which of the four values
314 * were actually found in the string. For each value found,
315 * the corresponding argument is updated; for each value
316 * not found, the corresponding argument is left unchanged.
317 */
318
319static int
320read_integer (register char *string, char **NextString)
321{
322 register int Result = 0;
323 int Sign = 1;
324
325 if (*string == '+')
326 string++;
327 else if (*string == '-')
328 {
329 string++;
330 Sign = -1;
331 }
332 for (; (*string >= '0') && (*string <= '9'); string++)
333 {
334 Result = (Result * 10) + (*string - '0');
335 }
336 *NextString = string;
337 if (Sign >= 0)
338 return (Result);
339 else
340 return (-Result);
341}
342
343int
344XParseGeometry (char *string,
345 int *x, int *y,
346 unsigned int *width, unsigned int *height)
347{
348 int mask = NoValue;
349 register char *strind;
350 unsigned int tempWidth, tempHeight;
351 int tempX, tempY;
352 char *nextCharacter;
353
354 if ((string == NULL) || (*string == '\0')) return (mask);
355 if (*string == '=')
356 string++; /* ignore possible '=' at beg of geometry spec */
357
358 strind = (char *)string;
359 if (*strind != '+' && *strind != '-' && *strind != 'x')
360 {
361 tempWidth = read_integer (strind, &nextCharacter);
362 if (strind == nextCharacter)
363 return (0);
364 strind = nextCharacter;
365 mask |= WidthValue;
366 }
367
368 if (*strind == 'x' || *strind == 'X')
369 {
370 strind++;
371 tempHeight = read_integer (strind, &nextCharacter);
372 if (strind == nextCharacter)
373 return (0);
374 strind = nextCharacter;
375 mask |= HeightValue;
376 }
377
378 if ((*strind == '+') || (*strind == '-'))
379 {
380 if (*strind == '-')
381 {
382 strind++;
383 tempX = -read_integer (strind, &nextCharacter);
384 if (strind == nextCharacter)
385 return (0);
386 strind = nextCharacter;
387 mask |= XNegative;
388
389 }
390 else
391 {
392 strind++;
393 tempX = read_integer (strind, &nextCharacter);
394 if (strind == nextCharacter)
395 return (0);
396 strind = nextCharacter;
397 }
398 mask |= XValue;
399 if ((*strind == '+') || (*strind == '-'))
400 {
401 if (*strind == '-')
402 {
403 strind++;
404 tempY = -read_integer (strind, &nextCharacter);
405 if (strind == nextCharacter)
406 return (0);
407 strind = nextCharacter;
408 mask |= YNegative;
409 }
410 else
411 {
412 strind++;
413 tempY = read_integer (strind, &nextCharacter);
414 if (strind == nextCharacter)
415 return (0);
416 strind = nextCharacter;
417 }
418 mask |= YValue;
419 }
420 }
421
422 /* If strind isn't at the end of the string then it's an invalid
423 geometry specification. */
424
425 if (*strind != '\0') return (0);
426
427 if (mask & XValue)
428 *x = tempX;
429 if (mask & YValue)
430 *y = tempY;
431 if (mask & WidthValue)
432 *width = tempWidth;
433 if (mask & HeightValue)
434 *height = tempHeight;
435 return (mask);
436}
437
438/* x_sync is a no-op on W32. */ 306/* x_sync is a no-op on W32. */
439void 307void
440x_sync (struct frame *f) 308x_sync (struct frame *f)