/* Session management module for systems which understand the X Session
management protocol.
-Copyright (C) 2002-2013 Free Software Foundation, Inc.
+Copyright (C) 2002-2014 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* The descriptor that we use to check for data from the session manager. */
-static int ice_fd;
+static int ice_fd = -1;
/* A flag that says if we are in shutdown interactions or not. */
will be called. */
emacs_event.kind = NO_EVENT;
- ret = IceProcessMessages (SmcGetIceConnection (smc_conn),
- (IceReplyWaitInfo *)0, (Bool *)0);
+ ret = IceProcessMessages (SmcGetIceConnection (smc_conn), 0, 0);
if (ret != IceProcessMessagesSuccess)
{
/* Either IO error or Connection closed. */
{
#define SM_ERRORSTRING_LEN 512
char errorstring[SM_ERRORSTRING_LEN];
- char* previous_id = NULL;
+ char *previous_id = NULL;
SmcCallbacks callbacks;
ptrdiff_t name_len = 0;
/* This malloc will not be freed, but it is only done once, and hopefully
not very large */
emacs_program = xmalloc (name_len + 1);
- emacs_program[0] = '\0';
+ char *z = emacs_program;
if (! EQ (Vinvocation_directory, Qnil))
- strcpy (emacs_program, SSDATA (Vinvocation_directory));
- strcat (emacs_program, SSDATA (Vinvocation_name));
+ z = lispstpcpy (z, Vinvocation_directory);
+ lispstpcpy (z, Vinvocation_name);
/* The SM protocol says all callbacks are mandatory, so set up all
here and in the mask passed to SmcOpenConnection. */