/[emacs]/emacs/src/xsmfns.c
ViewVC logotype

Diff of /emacs/src/xsmfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by ttn, Sun Aug 7 12:33:19 2005 UTC revision 1.16 by eliz, Sat Sep 10 11:30:55 2005 UTC
# Line 52  Boston, MA 02110-1301, USA.  */ Line 52  Boston, MA 02110-1301, USA.  */
52  #include "termopts.h"  #include "termopts.h"
53  #include "xterm.h"  #include "xterm.h"
54    
55  #ifndef MAXPATHLEN  extern char * get_current_dir_name ();
 #define MAXPATHLEN 1024  
 #endif /* not MAXPATHLEN */  
   
56    
57  /* The user login name.  */  /* The user login name.  */
58    
# Line 205  smc_save_yourself_CB (smcConn, Line 202  smc_save_yourself_CB (smcConn,
202    int val_idx = 0;    int val_idx = 0;
203    int props_idx = 0;    int props_idx = 0;
204    
205    char cwd[MAXPATHLEN+1];    char *cwd = NULL;
206    char *smid_opt;    char *smid_opt;
207    
208    /* How to start a new instance of Emacs.  */    /* How to start a new instance of Emacs.  */
# Line 259  smc_save_yourself_CB (smcConn, Line 256  smc_save_yourself_CB (smcConn,
256    props[props_idx]->vals[0].value = SDATA (Vuser_login_name);    props[props_idx]->vals[0].value = SDATA (Vuser_login_name);
257    ++props_idx;    ++props_idx;
258    
259    /* The current directory property, not mandatory.  */    cwd = get_current_dir_name ();
260  #ifdef HAVE_GETCWD  
261    if (getcwd (cwd, MAXPATHLEN+1) != 0)    if (cwd)
 #else  
   if (getwd (cwd) != 0)  
 #endif  
262      {      {
263        props[props_idx] = &prop_ptr[props_idx];        props[props_idx] = &prop_ptr[props_idx];
264        props[props_idx]->name = SmCurrentDirectory;        props[props_idx]->name = SmCurrentDirectory;
# Line 281  smc_save_yourself_CB (smcConn, Line 275  smc_save_yourself_CB (smcConn,
275    
276    xfree (smid_opt);    xfree (smid_opt);
277    
278      if (cwd)
279        free (cwd);
280    
281    /* See if we maybe shall interact with the user.  */    /* See if we maybe shall interact with the user.  */
282    if (interactStyle != SmInteractStyleAny    if (interactStyle != SmInteractStyleAny
283        || ! shutdown        || ! shutdown

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26