1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00
Commit graph

56 commits

Author SHA1 Message Date
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Stefan Monnier
e3eb1dae0d (xd_remove_watch): Avoid trying to convert a void* to
Lisp_Object, preferring to convert a lisp_Object to a void* instead.
(Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
2010-01-04 12:38:20 -05:00
Michael Albinus
777013f2bf * dbusbind.c (xd_add_watch): Improve debug message.
(xd_remove_watch): Improve debug message.  If DATA is the session
bus, unset D-Bus session environment.
(Fdbus_init_bus): Pass the bus as argument to
dbus_connection_set_watch_functions.  (Bug#5283)
2010-01-03 20:27:17 +01:00
Michael Albinus
fa8e045a8a * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to
avoid compiler warnings.  (Bug #5217).
2009-12-15 05:59:39 +00:00
Michael Albinus
f04bb9b2d8 * dbusbind.c (Vdbus_registered_objects_table): Renamed from
Vdbus_registered_functions_table, because it contains also
properties.  Fix docstring.
(Fdbus_call_method, Fdbus_call_method_asynchronously): Fix
docstring.
2009-11-13 16:12:08 +00:00
Dan Nicolaescu
d67b4f80db * xterm.c (syms_of_xterm):
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string.  Use pure_cons instead of Fcons.

* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Andreas Schwab
1cae01f715 (xd_retrieve_arg): Handle DBUS_TYPE_INTnn and
DBUS_TYPE_UINTnn separately to get proper sign extension.
2009-10-24 16:45:25 +00:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.

* image.c: Move png.h #include earlier to avoid warnings.

* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h.  (Bug#4643)

* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Adrian Robert
603f0bf0d9 (dbus-method-return-internal, dbus-method-error-internal): Use long format in printf, and cast argument. 2009-10-13 01:03:29 +00:00
Michael Albinus
1574224c89 * dbusbind.c (Fdbus_call_method)
(Fdbus_call_method_asynchronously): Use English numeric format for
timeout values in doc string.
2009-08-25 10:31:38 +00:00
Michael Albinus
eb4c6ace23 * dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): Remove. It was
intended as hotfix only.
(xd_add_watch, xd_remove_watch): Use HAVE_DBUS_WATCH_GET_UNIX_FD.
2009-08-22 08:57:34 +00:00
Michael Albinus
3f56d3c665 * dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): New macro.
(xd_add_watch, xd_remove_watch): Use it.  Print debug messages.
(xd_initialize, xd_pending_messages): Check, whether
$DBUS_SESSION_BUS_ADDRESS is set.
2009-08-20 12:54:57 +00:00
Michael Albinus
058ed8610c * dbusbind.c (xd_add_watch, xd_remove_watch, Fdbus_init_bus): New
functions.
(xd_initialize): Revert change from 2009-08-16.
2009-08-18 15:17:02 +00:00
Ken Raeburn
f601cdf35d * lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.
(XFLOAT_INIT): New macro for storing a float value.
* alloc.c (make_float, make_pure_float): Use XFLOAT_INIT.
* fns.c (sxhash): Copy out the value of a float in order to examine its bytes.
* dbusbind.c (xd_append_arg): Likewise.
2009-08-17 01:25:54 +00:00
Michael Albinus
ca4f31ea15 * dbusbind.c (Fdbus_call_method_asynchronously): Allow nil HANDLER. 2009-08-16 17:35:44 +00:00
Michael Albinus
a0645cddf0 * dbusbind.c (xd_initialize): Add connection file descriptor to
input_wait_mask, in order to let select() detect, whether a new
message has been arrived.
2009-08-16 12:23:23 +00:00
Michael Albinus
f573d5886c * dbusbind.c (xd_get_dispatch_status, xd_pending_messages): New functions. 2009-08-15 18:27:58 +00:00
Michael Albinus
c1d5ce9488 * dbusbind.c (xd_initialize, Fdbus_call_method, xd_read_message)
(Fdbus_register_signal, Fdbus_register_method): Cleanup memory of
error flag.
2009-07-08 12:59:47 +00:00
Michael Albinus
78c383195c * dbusbind.c (XD_SYMBOL_TO_DBUS_TYPE): Convert macro into function
xd_symbol_to_dbus_type.  With Solaris 2.11, it was said to compile
for hours, when optimzation is enabled.
(xd_signature, xd_append_arg, xd_retrieve_arg, xd_initialize)
(xd_read_message): Make them static.
2009-06-28 15:22:37 +00:00
Juanma Barranquero
fff4e45990 * dbusbind.c (Fdbus_register_signal):
* process.c (conv_sockaddr_to_lisp):
* w32fns.c (Fw32_battery_status): Use empty_unibyte_string.
2009-01-18 03:58:09 +00:00
Glenn Morris
76b6f70759 Add 2009 to copyright years. 2009-01-08 03:15:17 +00:00
Michael Albinus
1dae919792 * dbusbind.c (xd_in_read_queued_messages): New variable.
(XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros.  Throw
Qdbus_error.
(xd_read_queued_messages): Catch Qdbus_error from the macros.
(all): Replace xsignal1, xsignal2, xsignal3 by the respective
macro.  (Bug#1186).
2008-10-24 04:21:15 +00:00
Michael Albinus
07a4cb035f * dbusbind.c (XD_OBJECT_TO_DBUS_TYPE): Handle simple type symbols
in arrays.
2008-10-19 18:51:19 +00:00
Magnus Henoch
edd9ab1eb6 * dbusbind.c (Fdbus_call_method): Unbreak usage line.
(Fdbus_call_method_asynchronously): Ditto.
This change makes C-h f display the argument list.
2008-10-16 19:51:50 +00:00
Michael Albinus
0ef5099349 * dbusbind.c (xd_signature): Use strcat instead of sprintf. 2008-09-30 21:05:16 +00:00
Michael Albinus
4baa2377ae * dbusbind.c (XD_ERROR, XD_DEBUG_MESSAGE): Use strncpy and
snprintf, respectively.
(xd_append_arg): Convert strings with Fstring_make_unibyte.
2008-08-28 20:28:12 +00:00
Michael Albinus
367ea1732a * dbusbind.c (xd_read_message): Handle D-Bus error messages. 2008-08-01 18:35:49 +00:00
Michael Albinus
13ecc6dc53 * dbusbind.c (Fdbus_call_method_asynchronously)
(Fdbus_method_error_internal): New defuns.
(xd_read_message): Handle also reply messages.
(Vdbus_registered_functions_table): Extend docstring.
2008-07-31 18:56:51 +00:00
Michael Albinus
c0894fb9cb * dbusbind.c (Fdbus_register_signal): Use sprintf + strcat instead
only sprintf.
2008-07-21 04:28:50 +00:00
Michael Albinus
944cc4a883 * dbusbind.c (Fdbus_register_signal): Allow also signal arguments
for filtering.
2008-07-13 15:07:10 +00:00
Glenn Morris
9ec0b715e2 Switch to recommended form of GPLv3 permissions notice. 2008-05-14 07:50:26 +00:00
Michael Albinus
48f7d2134f * dbusbind.c (dbus-get-unique-name): Remove extra copying of name string. 2008-04-13 16:29:55 +00:00
Michael Albinus
90b3fc8415 * dbusbind.c (QCdbus_timeout): New D-Bus internal symbol.
(Fdbus_call_method): New parameter TIMEOUT.
(dbus-send-signal): Optimize UNGCPRO call.
2008-03-30 12:38:49 +00:00
Michael Albinus
a8e72f4f9b * dbusbind.c (xd_read_message): Removed extra copying of message
strings.  Check for NULL `interface' or `member'.
2008-03-23 16:46:08 +00:00
Michael Albinus
b35c64e48f * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux. 2008-01-25 18:56:46 +00:00
Michael Albinus
8c7a4ac525 * dbusbind.el (Fdbus_method_return_internal): Renamed from
Fdbus_method_return.
(Fdbus_unregister_object): Moved to dbus.el.
(Fdbus_call_method, Fdbus_method_return_internal)
(Fdbus_send_signal): Debug messages improved.
2008-01-21 20:19:16 +00:00
Michael Albinus
abe136eecd * dbusbind.c (Fdbus_method_return): New function.
(xd_read_message): Add the serial number to the event.
(Fdbus_register_method): Activate the function.
2008-01-04 21:39:47 +00:00
Michael Albinus
5125905efd * dbusbind.c (all): Replace XCAR by CAR_SAFE and XCDR by CDR_SAFE.
(xd_signature, xd_append_arg): Handle element type detection for
empty arrays.
(Fdbus_call_method, Fdbus_send_signal): Undo type casting for
SDATA () calls; this must be solved more general.
(Fdbus_register_signal): Use SBYTES instead of strlen.
2008-01-03 21:27:25 +00:00
Magnus Henoch
2c3a8b2787 * dbusbind.c (Fdbus_call_method): Handle the case of no returned
arguments.
2008-01-03 16:35:44 +00:00
Magnus Henoch
8bba1b5cbb * dbusbind.c (xd_append_arg): Use unsigned char instead of
unsigned int for byte values (necessary for big-endian platform).
2008-01-03 16:34:07 +00:00
Michael Albinus
15f16c1ba7 * dbusbind.c (xd_read_message): Use non-static input_event struct. 2007-12-31 10:22:52 +00:00
Magnus Henoch
a271e124f4 * dbusbind.c (xd_signature): Signature of variant is just "v". 2007-12-31 00:57:51 +00:00
Michael Albinus
80f9d13bff *** empty log message *** 2007-12-30 15:55:29 +00:00
Michael Albinus
17bc8f9494 * dbusbind.c: Fix several errors and compiler warnings. Reported
by Tom Tromey <tromey@redhat.com>
(XD_ERROR, XD_DEBUG_MESSAGE)
(XD_DEBUG_VALID_LISP_OBJECT_P): Wrap code with "do ... while (0)".
(xd_append_arg): Part for basic D-Bus types rewitten.
(xd_retrieve_arg): Split implementation of DBUS_TYPE_BYTE and
DBUS_TYPE_(U)INT16.  Don't call XD_DEBUG_MESSAGE with "%f" if not
appropriate.
(xd_read_message): Return Qnil.  Don't signal an error; it is not
useful during event reading.
(Fdbus_register_signal): Signal an error if the check for
FUNCTIONP fails.
(Fdbus_register_method): New function.  The implementation is not
complete, the call of the function signals an error therefore.
(Fdbus_unregister_object): New function, renamed from
Fdbus_unregister_signal.  The initial check signals an error, if
it the objct is not well formed.
2007-12-30 15:41:47 +00:00
Michael Albinus
b17f4b438f *** empty log message *** 2007-12-22 14:55:43 +00:00
Michael Albinus
9af5078b39 * dbusbind.c (xd_retrieve_arg): Handle DBUS_TYPE_BYTE,
DBUS_TYPE_INT16, DBUS_TYPE_UINT16, DBUS_TYPE_INT64,
DBUS_TYPE_UINT64, DBUS_TYPE_DOUBLE and DBUS_TYPE_SIGNATURE.
Return float when DBUS_TYPE_INT32 or DBUS_TYPE_UINT32 do not fit
as number.
(Fdbus_call_method): Fix docstring.
2007-12-22 14:54:23 +00:00
Michael Albinus
87cf1a39ef * dbusbind.c (XD_BASIC_DBUS_TYPE, XD_DBUS_TYPE_P, XD_NEXT_VALUE):
New macros.
(XD_SYMBOL_TO_DBUS_TYPE): Renamed from
XD_LISP_SYMBOL_TO_DBUS_TYPE.
(XD_OBJECT_TO_DBUS_TYPE): Renamed from
XD_LISP_OBJECT_TO_DBUS_TYPE. Simplify.
(xd_signature): New function.
(xd_append_arg): Compute also signatures.  Major rewrite.
(xd_retrieve_arg): Make debug messages friendly.
(Fdbus_call_method, Fdbus_send_signal): Extend docstring.  Check
for signatures of arguments.
2007-12-21 22:01:43 +00:00
Michael Albinus
54371585f7 * dbusbind.c (QCdbus_type_byte, QCdbus_type_boolean)
(QCdbus_type_int16, QCdbus_type_uint16, QCdbus_type_int32)
(QCdbus_type_uint32, QCdbus_type_int64, QCdbus_type_uint64)
(QCdbus_type_double, QCdbus_type_string, QCdbus_type_object_path)
(QCdbus_type_signature, QCdbus_type_array, QCdbus_type_variant)
(QCdbus_type_struct, QCdbus_type_dict_entry): New D-Bus type
symbols.
(XD_LISP_SYMBOL_TO_DBUS_TYPE): New macro.
(XD_LISP_OBJECT_TO_DBUS_TYPE): Add compound types.
(xd_retrieve_value): Removed. Functionality included in ...
(xd_append_arg): New function.
(Fdbus_call_method, Fdbus_send_signal): Apply it.
2007-12-19 22:50:22 +00:00
Michael Albinus
f5306ca30f * dbusbind.c (top): Include <stdio.h>.
(Fdbus_call_method, Fdbus_send_signal): Apply type cast in
dbus_message_new_method_call and dbus_message_new_signal.
(Fdbus_register_signal): Rename unique_name to uname.  Check
handler for FUNCTIONP instead of CHECK_SYMBOL.  Handle case of
non-existing unique name.  Fix typos in matching rule.  Return an
object which is useful in Fdbus_unregister_signal.
(Fdbus_unregister_signal): Reimplementation, in order to remove
only the corresponding entry.
(Vdbus_registered_functions_table): Change the order of entries.
Apply these changes in xd_read_message and Fdbus_register_signal.
2007-12-16 22:36:47 +00:00
Michael Albinus
eb7c7bf54e * dbusbind.c (xd_retrieve_value, xd_retrieve_arg)
(Fdbus_call_method, Fdbus_send_signal, xd_read_message): Use
`unsigned int' instead of `uint'.
(xd_read_message, Fdbus_register_signal): Split expressions into
multiple lines before operators "&&" and "||", according to the
GNU Coding Standards.
2007-12-14 21:49:52 +00:00