aboutsummaryrefslogtreecommitdiffstats
path: root/src/xsmfns.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/xsmfns.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/xsmfns.c')
-rw-r--r--src/xsmfns.c43
1 files changed, 13 insertions, 30 deletions
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 78d7d9f6523..214d5ff5407 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -95,7 +95,7 @@ Lisp_Object Vx_session_previous_id;
95#define CHDIR_OPT "--chdir=" 95#define CHDIR_OPT "--chdir="
96 96
97static void 97static void
98ice_connection_closed () 98ice_connection_closed (void)
99{ 99{
100 if (ice_fd >= 0) 100 if (ice_fd >= 0)
101 delete_keyboard_wait_descriptor (ice_fd); 101 delete_keyboard_wait_descriptor (ice_fd);
@@ -108,8 +108,7 @@ ice_connection_closed ()
108 Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */ 108 Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */
109 109
110int 110int
111x_session_check_input (bufp) 111x_session_check_input (struct input_event *bufp)
112 struct input_event *bufp;
113{ 112{
114 SELECT_TYPE read_fds; 113 SELECT_TYPE read_fds;
115 EMACS_TIME tmout; 114 EMACS_TIME tmout;
@@ -160,7 +159,7 @@ x_session_check_input (bufp)
160/* Return non-zero if we have a connection to a session manager. */ 159/* Return non-zero if we have a connection to a session manager. */
161 160
162int 161int
163x_session_have_connection () 162x_session_have_connection (void)
164{ 163{
165 return ice_fd != -1; 164 return ice_fd != -1;
166} 165}
@@ -170,9 +169,7 @@ x_session_have_connection ()
170 Then lisp code can interact with the user. */ 169 Then lisp code can interact with the user. */
171 170
172static void 171static void
173smc_interact_CB (smcConn, clientData) 172smc_interact_CB (SmcConn smcConn, SmPointer clientData)
174 SmcConn smcConn;
175 SmPointer clientData;
176{ 173{
177 doing_interact = True; 174 doing_interact = True;
178 emacs_event.kind = SAVE_SESSION_EVENT; 175 emacs_event.kind = SAVE_SESSION_EVENT;
@@ -311,9 +308,7 @@ smc_save_yourself_CB (smcConn,
311/* According to the SM specification, this shall close the connection. */ 308/* According to the SM specification, this shall close the connection. */
312 309
313static void 310static void
314smc_die_CB (smcConn, clientData) 311smc_die_CB (SmcConn smcConn, SmPointer clientData)
315 SmcConn smcConn;
316 SmPointer clientData;
317{ 312{
318 SmcCloseConnection (smcConn, 0, 0); 313 SmcCloseConnection (smcConn, 0, 0);
319 ice_connection_closed (); 314 ice_connection_closed ();
@@ -326,17 +321,13 @@ smc_die_CB (smcConn, clientData)
326 even seem necessary. */ 321 even seem necessary. */
327 322
328static void 323static void
329smc_save_complete_CB (smcConn, clientData) 324smc_save_complete_CB (SmcConn smcConn, SmPointer clientData)
330 SmcConn smcConn;
331 SmPointer clientData;
332{ 325{
333 /* Empty */ 326 /* Empty */
334} 327}
335 328
336static void 329static void
337smc_shutdown_cancelled_CB (smcConn, clientData) 330smc_shutdown_cancelled_CB (SmcConn smcConn, SmPointer clientData)
338 SmcConn smcConn;
339 SmPointer clientData;
340{ 331{
341 /* Empty */ 332 /* Empty */
342} 333}
@@ -384,8 +375,7 @@ ice_error_handler (iceConn,
384 375
385 376
386static void 377static void
387ice_io_error_handler (iceConn) 378ice_io_error_handler (IceConn iceConn)
388 IceConn iceConn;
389{ 379{
390 /* Connection probably gone. */ 380 /* Connection probably gone. */
391 ice_connection_closed (); 381 ice_connection_closed ();
@@ -395,11 +385,7 @@ ice_io_error_handler (iceConn)
395 uses ICE as it transport protocol. */ 385 uses ICE as it transport protocol. */
396 386
397static void 387static void
398ice_conn_watch_CB (iceConn, clientData, opening, watchData) 388ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, int opening, IcePointer *watchData)
399 IceConn iceConn;
400 IcePointer clientData;
401 Bool opening;
402 IcePointer *watchData;
403{ 389{
404 if (! opening) 390 if (! opening)
405 { 391 {
@@ -423,9 +409,7 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData)
423/* Create the client leader window. */ 409/* Create the client leader window. */
424 410
425static void 411static void
426create_client_leader_window (dpyinfo, client_id) 412create_client_leader_window (struct x_display_info *dpyinfo, char *client_id)
427 struct x_display_info *dpyinfo;
428 char *client_id;
429{ 413{
430 Window w; 414 Window w;
431 XClassHint class_hints; 415 XClassHint class_hints;
@@ -451,8 +435,7 @@ create_client_leader_window (dpyinfo, client_id)
451/* Try to open a connection to the session manager. */ 435/* Try to open a connection to the session manager. */
452 436
453void 437void
454x_session_initialize (dpyinfo) 438x_session_initialize (struct x_display_info *dpyinfo)
455 struct x_display_info *dpyinfo;
456{ 439{
457#define SM_ERRORSTRING_LEN 512 440#define SM_ERRORSTRING_LEN 512
458 char errorstring[SM_ERRORSTRING_LEN]; 441 char errorstring[SM_ERRORSTRING_LEN];
@@ -532,7 +515,7 @@ x_session_initialize (dpyinfo)
532/* Ensure that the session manager is not contacted again. */ 515/* Ensure that the session manager is not contacted again. */
533 516
534void 517void
535x_session_close () 518x_session_close (void)
536{ 519{
537 ice_connection_closed (); 520 ice_connection_closed ();
538} 521}
@@ -575,7 +558,7 @@ Do not call this function yourself. */)
575 Initialization 558 Initialization
576 ***********************************************************************/ 559 ***********************************************************************/
577void 560void
578syms_of_xsmfns () 561syms_of_xsmfns (void)
579{ 562{
580 DEFVAR_LISP ("x-session-id", &Vx_session_id, 563 DEFVAR_LISP ("x-session-id", &Vx_session_id,
581 doc: /* The session id Emacs got from the session manager for this session. 564 doc: /* The session id Emacs got from the session manager for this session.