summaryrefslogtreecommitdiff
path: root/src/xgselect.c
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix drag-and-drop of files with multibyte filenamesPo Lu2022-06-051-0/+23
| | | | | | | | | | | | | | | | | | | * lisp/dired.el (dired-mouse-drag): Fix re-signalling of errors. * lisp/select.el (xselect-convert-to-filename): (xselect-convert-to-text-uri-list): (xselect-convert-to-dt-netfile): Encode in raw-text-unix. * src/xgselect.c (suppress_xg_select, release_xg_select): New functions. (xg_select): Respect xg_select suppression by delegating to pselect. * src/xgselect.h: Update prototypes. * src/xterm.c (x_dnd_begin_drag_and_drop): Suppress xg_select during the nested event loop. (handle_one_xevent): Handle cases where hold_quit is nil inside a selection event handler during DND.
* Apply fix for bug#52761 to GTK native input as wellPo Lu2022-01-271-12/+20
| | | | | * src/xgselect.c (xg_select): Apply said fix on regular GTK builds when native input is being used.
* Handle internal events specially on PGTKYuuki Harano2022-01-071-0/+38
| | | | | * src/xgselect.c (xg_select): If there are pending events already, don't sleep.
* Fix xwidgets setting their own signal handlersPo Lu2022-01-051-2/+20
| | | | | | | | | * src/xgselect.c (release_select_lock): (acquire_select_lock): Fix coding style. (xg_select): Call `catch_child_signal' if xwidgets are enabled. * src/xwidget.c (kill_xwidget): (kill_buffer_xwidgets): Call `catch_child_signal'. (bug#53013)
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Fix race conditions between Lisp threads in GTK buildsEli Zaretskii2021-06-251-0/+16
| | | | | | | * src/xgselect.c (release_select_lock, acquire_select_lock) [GCC >= 4.7.0]: Use '__atomic' builtins to prevent races between threads in accessing 'threads_holding_glib_lock'. Reported by <dick.r.chiang@gmail.com>. (Bug#36609)
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix lock failures in xg_selectPip Cet2020-08-211-14/+28
| | | | | | | | | * src/xgselect.c (release_select_lock, acquire_select_lock): Introduce. (xg_select): Use `acquire_select_lock', `release_select_lock'. * src/thread.c (release_select_lock): Introduce for non-GLib builds. (really_call_select): Call `release_select_lock'. Simplify by ensuring acquisition of the lock always succeeds (bug#36609).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Attempt to fix crashes with threads in GTK buildsEli Zaretskii2016-12-301-5/+6
| | | | | | | | | | | | | | | | | | | | * src/xgselect.c (xg_select): Call pselect via thread_select, not directly, to avoid running Lisp (via unblock_input) when more than one thread could be running. (Bug#25247) * src/process.c (wait_reading_process_output) [HAVE_GLIB]: Call xg_select directly instead of through thread_select. * src/xgselect.h (xg_select): Last 2 arguments are no longer 'const', for consistency with thread_select.
* | Prevent crashes in xg_select due to concurrencyEli Zaretskii2016-12-151-1/+1
| | | | | | | | | | | | | | | | * src/xgselect.c (xg_select): Don't call Glib functions that use 'context' if we failed to acquire it. This means some other thread owns the context, in which case both using the context and calling block_input/unblock_input will step on that thread's toes and eventually lead to crashes. (Bug#25172)
* | Documentation and commentary improvementsEli Zaretskii2016-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h: * src/regex.c: * src/xgselect.c (xg_select): Improve commentary and formatting. * doc/lispref/objects.texi (Thread Type, Mutex Type) (Condition Variable Type): New subsections. (Type Predicates): Add thread-related predicates. * doc/lispref/objects.texi (Editing Types): * doc/lispref/elisp.texi (Top): Update higher-level menus.
* | Merge branch 'concurrency'Eli Zaretskii2016-12-041-4/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts (resolved): configure.ac src/Makefile.in src/alloc.c src/bytecode.c src/emacs.c src/eval.c src/lisp.h src/process.c src/regex.c src/regex.h
| * \ merge from trunkKen Raeburn2015-11-011-35/+64
| |\ \
| * | | avoid SAFE_ALLOCATom Tromey2013-07-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid SAFE_ALLOCA in xgselect.c. in this code it is just as easy to always use malloc; and it avoids thread-switching problems, as the safe-alloca stuff implicitly refers to the current thread
* | | | Limit <config.h>’s includesPaul Eggert2016-09-301-1/+0
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up on recent problems with the fact that config.h includes stdlib.h etc.; some files need to include stdlib.h later. config.h generally should limit itself to includes that are universally safe; outside of MS-Windows, only stdbool.h makes the cut among the files currently included. So, move the other includes to just the files that need them (Bug#24506). * configure.ac (config_opsysfile): Remove, as this generic hook is no longer needed. * lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c: * src/w32proc.c (_GNU_SOURCE): Remove, as it’s OK for config.h to do this now. * src/conf_post.h: Include <ms-w32.h>, instead of the generic config_opsysfile, for simplicity as this old way of configuring is now done only for the MS-Windows port. Do not include <ms-w32.h> if DEFER_MS_W32_H, for the benefit of the few files that want its effects later. Do not include <alloca.h>, <string.h>, or <stdlib.h>. Other files modified to include these headers as needed, or to not include headers that are no longer needed. * src/lisp.h: Include <alloca.h> and <string.h> here, since some of the inline functions need them. * src/regex.c: Include <alloca.h> if not emacs. (If emacs, we can rely on SAFE_ALLOCA.) There is no longer any need to worry about HAVE_ALLOCA_H. * src/unexmacosx.c: Rely on config.h not including stdlib.h. * src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H): Define before including <config.h> first, and include <ms-w32.h> after the troublesome headers.
* | | Rework C source files to avoid ^(Paul Eggert2016-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* | | Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| |/ |/| | | | | Run admin/update-copyright.
* | Include-file cleanup for src directoryPaul Eggert2015-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707). In a few cases, add ‘#include "foo.h"’ if the file needs foo.h but does not include it directly. As a general rule, a source file should include foo.h if it needs the interfaces that foo.h defines. * src/alloc.c: Don’t include process.h. Include dispextern.h, systime.h. * src/atimer.c: Don’t include blockinput.h. * src/buffer.c: Include coding.h, systime.h. Don’t include keyboard.h, coding.h. * src/callint.c: Don’t include commands.h, keymap.h. * src/callproc.c: Don’t include character.h, ccl.h, composite.h, systty.h, termhooks.h. * src/casetab.c: Don’t include character.h. * src/category.c: Don’t include charset.h, keymap.h. * src/ccl.h: Don’t include character.h. * src/character.c: Don’t include charset.h. * src/charset.c: Don’t include disptab.h. * src/chartab.c: Don’t include ccl.h. * src/cm.c: Don’t include frame.h, termhooks.h. * src/cmds.c: Don’t include window.h, dispextern.h. * src/coding.c: Don’t include window.h, frame.h. * src/composite.c: Include composite.h. Don’t include window.h, font.h. * src/data.c: Don’t include syssignal.h, termhooks.h, font.h. * src/dbusbind.c: Don’t include frame.h. * src/decompress.c: Don’t include character.h. * src/dired.c: Don’t include character.h, commands.h, charset.h. * src/dispnew.c: Don’t include character.h, indent.h, intervals.h, process.h, timespec.h. Include systime.h. * src/doc.c: Include coding.h. Don’t include keyboard.h. * src/editfns.c: Include composite.h. Don’t include frame.h. * src/emacs.c: Include fcntl.h, coding.h. Don’t include commands.h, systty.h.. * src/fileio.c: Don’t include intervals.h, dispextern.h. Include composite.h. * src/filelock.c: Don’t include character.h, systime.h. * src/fns.c: Don’t include time.h, commands.h, keyboard.h, keymap.h, frame.h, blockinput.h, xterm.h. Include composite.h. * src/font.c: Include termhooks.h. * src/font.h: Don’t include ccl.h, frame.h. Add forward decls of struct composition_it, struct face, struct glyph_string. * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h, intervals.h, window.h, termhooks.h. * src/frame.c: Don’t include character.h, commands.h, font.h. * src/frame.h: Don’t include dispextern.h. * src/fringe.c: Don’t include character.h. * src/ftcrfont.c: Don’t include dispextern.h, frame.h, character.h, charset.h, fontset.h. * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h, fontset.h. * src/ftxfont.c: Don’t include dispextern.h, character.h, charset.h, fontset.h. * src/gfilenotify.c: Don’t include frame.h, process.h. * src/gtkutil.c: Include dispextern.h, frame.h, systime.h. Don’t include syssignal.h, buffer.h, charset.h, font.h. * src/gtkutil.h: Don’t include frame.h. * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h. Don’t include character.h. * src/indent.c: Don’t include keyboard.h, termchar.h. * src/inotify.c: Don’t include character.h, frame.h. * src/insdel.c: Include composite.h. Don’t include blockinput.h. * src/intervals.c: Don’t include character.h, keyboard.h. * src/intervals.h: Don’t include dispextern.h, composite.h. * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h. Include coding.h. * src/keyboard.h: Don’t incldue systime.h. * src/keymap.c: Don’t include charset.h, frame.h. * src/lread.c: Include dispextern.h and systime.h. Don’t include frame.h. Include systime.h. * src/macros.c: Don’t include commands.h, character.h, buffer.h. * src/menu.c: Include character.h, coding.h. Don’t include dispextern.h. * src/menu.h: Don’t include systime.h. * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h, intervals.h, termhooks.h. * src/print.c: Include coding.h. Don’t include keyboard.h, window.h, dispextern.h, termchar.h, termhooks.h, font.h. Add forward decl of struct terminal. * src/process.c: Don’t include termhooks.h, commands.h, dispextern.h, composite.h. * src/region-cache.c: Don’t include character.h. * src/scroll.c: Don’t include keyboard.h, window.h. * src/search.c: Don’t include category.h, commands.h. * src/sound.c: Don’t include dispextern.h. * src/syntax.c: Don’t include command.h, keymap.h. * src/sysdep.c: Don’t include window.h, dispextern.h. * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’, * src/term.c: Don’t include systty.h, intervals.h, xterm.h. * src/terminal.c: Include character.h. Don’t include charset.h, coding.h. * src/textprop.c: Don’t include character.h. * src/undo.c: Don’t include character.h, commands.h, window.h. * src/unexsol.c: Don’t include character.h, charset.h. * src/widget.c: Include widget.h. Don’t include keyboard.h, window.h, dispextern.h, blockinput.h, character.h, font.h. * src/widgetprv.h: Don’t include widget.h. * src/window.c: Don’t include character.h, menu.h, intervals.h. * src/xdisp.c: Include composite.h, systime.h. Don’t include macros.h, process.h. * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h, intervals.h. * src/xfns.c: Don’t include menu.h, character.h, intervals.h, epaths.h, fontset.h, systime.h, atimer.h, termchar.h. * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h. * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h. * src/xgselect.c: Don’t include timespec.h, frame.h. Include systime.h. * src/xgselect.h: Don’t include time.h. Use a forward decl to struct timespec instead. * src/xmenu.c: Don’t include keymap.h, character.h, charset.h, dispextern.h. Include systime.h. * src/xml.c: Don’t include character.h. * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h. * src/xselect.c: Don’t include dispextern.h, character.h, buffer.h, process.h. * src/xsmfns.c: Don’t include systime.h, sysselect.h. * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h, intervals.h process.h, keymap.h, xgselect.h. Include composite.h.
* | Use bool for boolean in xfont.c, xftfont.c, xgselect.cPaul Eggert2015-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | * xfont.c (xfont_driver, xfont_chars_supported) (xfont_text_extents): * xftfont.c (xftfont_get_colors, xftfont_open) (xftfont_prepare_face, xftfont_done_face) (xftfont_cached_font_ok): * xgselect.c (xg_select): Use bool for boolean.
* | Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | * xgselect.c (xg_select): Don't assume n_gfds is nonnegativePaul Eggert2014-11-081-2/+2
| | | | | | | | | | merely because tmo_in_millisec is nonnegative. The 1st call to g_main_context_query could succeed while the 2nd one fails.
* | Merge from emacs-24; up to 117687Glenn Morris2014-11-081-3/+15
|\ \
| * | * src/xgselect.c (xg_select): Use g_main_context_acquire.Dima Kogan2014-11-051-3/+15
| | | | | | | | | | | | Fixes: debbugs:18861
* | | Merge from emacs-24; up to 2014-04-22T20:19:17Z!eggert@cs.ucla.eduPaul Eggert2014-04-221-7/+18
|\| |
| * | Fix freezing with scroll bars of GTK3 Toolkit.Jarek Czekalski2014-04-211-7/+18
| | | | | | | | | | | | | | | | | | | | | * src/keyboard.c (unblock_input): Add comment. * src/xgselect.c (xg_select): Prevent Glib main loop recursion. Fixes: debbugs:15801
| * | Revert previous change.Paul Eggert2014-04-151-44/+39
| | |
| * | Fix some xgselect-vs-pselect bugs.Paul Eggert2014-04-151-39/+44
| | | | | | | | | | | | | | | | | | | | | | | | This may not fix Bug#17172, but it fixes some bugs discovering while auditing xgselect.c for that bug. when one of glib's file descriptors is greater than FDS_LIM. Treat rfds, wfds, efds consistently, and test G_IO_PRI too. Clear input masks when pselect returns zero.
* | | Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.Paul Eggert2014-04-051-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (memory_full): * charset.c (syms_of_charset): * doc.c (Fsnarf_documentation): * emacs.c (main): * font.c (BUILD_STYLE_TABLE): * keyboard.c (make_lispy_event): * profiler.c (setup_cpu_timer): * xgselect.c (xg_select): * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): Use ARRAYELTS. * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. Replace the only use with ARRAYELTS (font_property_table). * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
* | Fix "resource temporarily unavailable" with xgselect.Paul Eggert2014-03-041-3/+12
| | | | | | | | | | | | | | * xgselect.c: Include <stdbool.h>. (xg_select) [!USE_GTK]: Don't lose track of errno. Fixes: debbugs:16925
* | * keyboard.c (kbd_buffer_get_event): Read file notification eventsMichael Albinus2014-02-041-14/+10
| | | | | | | | | | | | | | also in batch mode. * xgselect.c (xg_select): Read glib events in any case, even if there are no file descriptors to watch for. (Bug#16519)
* | Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
| |
* | Simplify SELECT_TYPE-related code.Paul Eggert2013-08-271-2/+2
| | | | | | | | | | | | | | | | Like EMACS_TIME, this portability layer is no longer needed, since Emacs has been using fd_set as a portability layer for some time. * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed. (SELECT_TYPE): Remove. All uses changed to fd_set. (fd_set) [!FD_SET]: New typedef.
* | Simplify EMACS_TIME-related code.Paul Eggert2013-08-271-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This portability layer is no longer needed, since Emacs has been using struct timespec as a portability layer for some time. Merge from gnulib, incorporating: 2013-08-27 timespec: new convenience constants and function * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h: Include <time.h> rather than "systime.h"; that's all that's needed now. * src/dispnew.c: Include <timespec.h> rather than "systime.h"; that's all that's needed now. * src/systime.h (EMACS_TIME): Remove. All uses changed to struct timespec. (EMACS_TIME_RESOLUTION): Remove. All uses changed to TIMESPEC_RESOLUTION. (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to LOG10_TIMESPEC_RESOLUTION. (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec. (EMACS_NSECS): Remove. All uses changed to tv_nsec. (make_emacs_time): Remove. All used changed to make_timespec. (invalid_timespec): Rename from invalid_emacs_time. All uses changed. (current_timespec): Rename from current_emacs_time. All uses changed. (add_emacs_time): Remove. All uses changed to timespec_add. (sub_emacs_time): Remove. All uses change dot timespec_sub. (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign. (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed. (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec. (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod. (current_timespec): Rename from current_emacs_time. All uses changed. (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses changed to timespec_cmp. * src/xgselect.c: Include <timespec.h>, since our .h files don't.
* | Fix minor problems found by static checking.Paul Eggert2013-08-261-2/+3
|/ | | | | | | | | | | | | | | * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static. (expect): Avoid nested-if warning. (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning. * nsmenu.m (fillWithWidgetValue:): Avoid type warning. * nsterm.h, nsterm.m (ns_select): * xgselect.c, xgselect.h (xg_select): Adjust signature to better match pselect's. * nsterm.m (ns_select): Don't set *TIMEOUT, since pselect doesn't. * regex.c (whitespace_regexp): Now const_re_char *, to avoid diagnostic about assigning const char * to it. * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
* Fix compilation issues for GNUStep and GLIB conflicts.Jan Djärv2013-06-081-1/+0
| | | | | | | | | | | | | | * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no. (with_file_notification): Don't set to gfile if with_ns = yes. * src/process.c (wait_reading_process_output): Check for NS before GLIB. GLIB may be linked in due to rsvg, but ns_select must be called. * src/xgselect.c (xg_select): Remove call to window_system_available and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw. * src/xgselect.c: Remove unneeded include xterm.h
* * xgselect.c (xg_select): Remove call to window_system_availableJan Djärv2013-06-081-3/+7
| | | | | and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw.
* Add HAVE_GLIB check instead of checking individual libraries that use GLib.Jan Djärv2013-06-031-2/+2
| | | | | | | | | | | * configure.ac (HAVE_GLIB): Add GLib check. Set XGSELOBJ if GLib is used. Remove xgselect.o from XOBJ. * src/Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty. * src/process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB. * src/xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
* Get rid of some platform-specific functions examining windowDmitry Antipov2013-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system and its capabilities. This is a partial rework of the 2013-04-05 change. * lisp.h (have_menus_p): Remove prototype. This function is replaced with platform-independent window_system_available. (check_window_system): Move to... * frame.h (decode_window_system_frame, window_system_available): ...here, add new prototypes. * frame.c (window_system_available, decode_window_system_frame): New functions. (check_window_system): Platform-independent now. * xterm.h (x_in_use): Remove declaration. (check_x_frame): * w32term.h (check_x_frame): * nsterm.h (check_x_frame): Remove prototypes. This function is replaced with platform-independent decode_window_system_frame. * msdos.c (have_menus_p): Remove. * nsfns.m (check_window_system, have_menus_p, check_ns_frame): Remove platform-specific functions. Use check_window_system, decode_window_system_frame and check_ns_display_info where appropriate. Minor style and comment tweaks. * w32fns.c (w32_in_use, check_window_system, have_menus_p) (check_x_frame): Likewise. * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame): Likewise. * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m: * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c: * xmenu.c, xselect.c: All related users changed.
* Remove stray character from license URL.Paul Eggert2013-03-041-1/+1
|
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Port better to POSIX hosts lacking _setjmp.Paul Eggert2012-09-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. (_setjmp, _longjmp): Remove. * src/lisp.h: Include <setjmp.h> here, since we use its symbols here. All instances of '#include <setjmp.h>' removed, if the only reason for the instance was because "lisp.h" was included. (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. Unless otherwise specified, replace all uses of jmp_buf, _setjmp, and _longjmp with the new symbols. Emacs already uses _setjmp if available, so this change affects only POSIXish hosts that have sigsetjmp but not _setjmp, such as some versions of Solaris and Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.) * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros. (png_load_body) [HAVE_PNG]: (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]: (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]: Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp, since PNG requires jmp_buf. This is the only exception to the general rule that we now use sys_setjmp and sys_longjmp. This exception is OK since this code does not change the signal mask or longjmp out of a signal handler. Fixes: debbugs:12446
* Prefer assignment to memcpy when either will do.Paul Eggert2012-09-111-2/+2
| | | | | | | | | | | | | * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: * src/bidi.c (bidi_push_it, bidi_pop_it): * src/fns.c (copy_hash_table): * src/image.c (define_image_type): * src/keyboard.c (kbd_buffer_store_event_hold): * src/process.c (Fprocess_send_eof): * src/xfaces.c (x_create_gc) [HAVE_NS]: * src/xgselect.c (xg_select): Use assignment, not memcpy, as either will do here, and assignment is more likely to catch type errors.