216 |
props[props_idx]->type = SmARRAY8; |
props[props_idx]->type = SmARRAY8; |
217 |
props[props_idx]->num_vals = 1; |
props[props_idx]->num_vals = 1; |
218 |
props[props_idx]->vals = &values[val_idx++]; |
props[props_idx]->vals = &values[val_idx++]; |
219 |
props[props_idx]->vals[0].length = strlen (XSTRING (Vinvocation_name)->data); |
props[props_idx]->vals[0].length = strlen (SDATA (Vinvocation_name)); |
220 |
props[props_idx]->vals[0].value = XSTRING (Vinvocation_name)->data; |
props[props_idx]->vals[0].value = SDATA (Vinvocation_name); |
221 |
++props_idx; |
++props_idx; |
222 |
|
|
223 |
/* How to restart Emacs (i.e.: /path/to/emacs --smid=xxxx). */ |
/* How to restart Emacs (i.e.: /path/to/emacs --smid=xxxx). */ |
244 |
props[props_idx]->type = SmARRAY8; |
props[props_idx]->type = SmARRAY8; |
245 |
props[props_idx]->num_vals = 1; |
props[props_idx]->num_vals = 1; |
246 |
props[props_idx]->vals = &values[val_idx++]; |
props[props_idx]->vals = &values[val_idx++]; |
247 |
props[props_idx]->vals[0].length = strlen (XSTRING (Vuser_login_name)->data); |
props[props_idx]->vals[0].length = strlen (SDATA (Vuser_login_name)); |
248 |
props[props_idx]->vals[0].value = XSTRING (Vuser_login_name)->data; |
props[props_idx]->vals[0].value = SDATA (Vuser_login_name); |
249 |
++props_idx; |
++props_idx; |
250 |
|
|
251 |
/* The current directory property, not mandatory */ |
/* The current directory property, not mandatory */ |
407 |
/* Check if we where started by the session manager. If so, we will |
/* Check if we where started by the session manager. If so, we will |
408 |
have a previous id. */ |
have a previous id. */ |
409 |
if (! EQ (Vx_session_previous_id, Qnil) && STRINGP (Vx_session_previous_id)) |
if (! EQ (Vx_session_previous_id, Qnil) && STRINGP (Vx_session_previous_id)) |
410 |
previous_id = XSTRING (Vx_session_previous_id)->data; |
previous_id = SDATA (Vx_session_previous_id); |
411 |
|
|
412 |
/* Construct the path to the Emacs program. */ |
/* Construct the path to the Emacs program. */ |
413 |
if (! EQ (Vinvocation_directory, Qnil)) |
if (! EQ (Vinvocation_directory, Qnil)) |
414 |
name_len += strlen (XSTRING (Vinvocation_directory)->data); |
name_len += strlen (SDATA (Vinvocation_directory)); |
415 |
name_len += strlen (XSTRING (Vinvocation_name)->data); |
name_len += strlen (SDATA (Vinvocation_name)); |
416 |
|
|
417 |
/* This malloc will not be freed, but it is only done once, and hopefully |
/* This malloc will not be freed, but it is only done once, and hopefully |
418 |
not very large */ |
not very large */ |
420 |
emacs_program[0] = '\0'; |
emacs_program[0] = '\0'; |
421 |
|
|
422 |
if (! EQ (Vinvocation_directory, Qnil)) |
if (! EQ (Vinvocation_directory, Qnil)) |
423 |
strcpy (emacs_program, XSTRING (Vinvocation_directory)->data); |
strcpy (emacs_program, SDATA (Vinvocation_directory)); |
424 |
strcat (emacs_program, XSTRING (Vinvocation_name)->data); |
strcat (emacs_program, SDATA (Vinvocation_name)); |
425 |
|
|
426 |
/* The SM protocol says all callbacks are mandatory, so set up all |
/* The SM protocol says all callbacks are mandatory, so set up all |
427 |
here and in the mask passed to SmcOpenConnection */ |
here and in the mask passed to SmcOpenConnection */ |