diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/xsmfns.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-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.c | 43 |
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 | ||
| 97 | static void | 97 | static void |
| 98 | ice_connection_closed () | 98 | ice_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 | ||
| 110 | int | 110 | int |
| 111 | x_session_check_input (bufp) | 111 | x_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 | ||
| 162 | int | 161 | int |
| 163 | x_session_have_connection () | 162 | x_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 | ||
| 172 | static void | 171 | static void |
| 173 | smc_interact_CB (smcConn, clientData) | 172 | smc_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 | ||
| 313 | static void | 310 | static void |
| 314 | smc_die_CB (smcConn, clientData) | 311 | smc_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 | ||
| 328 | static void | 323 | static void |
| 329 | smc_save_complete_CB (smcConn, clientData) | 324 | smc_save_complete_CB (SmcConn smcConn, SmPointer clientData) |
| 330 | SmcConn smcConn; | ||
| 331 | SmPointer clientData; | ||
| 332 | { | 325 | { |
| 333 | /* Empty */ | 326 | /* Empty */ |
| 334 | } | 327 | } |
| 335 | 328 | ||
| 336 | static void | 329 | static void |
| 337 | smc_shutdown_cancelled_CB (smcConn, clientData) | 330 | smc_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 | ||
| 386 | static void | 377 | static void |
| 387 | ice_io_error_handler (iceConn) | 378 | ice_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 | ||
| 397 | static void | 387 | static void |
| 398 | ice_conn_watch_CB (iceConn, clientData, opening, watchData) | 388 | ice_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 | ||
| 425 | static void | 411 | static void |
| 426 | create_client_leader_window (dpyinfo, client_id) | 412 | create_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 | ||
| 453 | void | 437 | void |
| 454 | x_session_initialize (dpyinfo) | 438 | x_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 | ||
| 534 | void | 517 | void |
| 535 | x_session_close () | 518 | x_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 | ***********************************************************************/ |
| 577 | void | 560 | void |
| 578 | syms_of_xsmfns () | 561 | syms_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. |