Mercurial > emacs
diff src/xsmfns.c @ 83376:de684325b343
Merged in changes from CVS trunk.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-6
Update from CVS
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-7
Sync with miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-539.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--version-0
Branch closed. Use miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 instead.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-475
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-476
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-477
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-478
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-479
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-480
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-481
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-482
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-483
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-484
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-485
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-486
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-487
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-488
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-489
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-490
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-491
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-492
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-493
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-494
Update from CVS: lisp/startup.el (command-line): Fix typo.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-496
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-497
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-499
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-500
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-501
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-502
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-503
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-504
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-505
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-506
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-507
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-508
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-509
Update from CVS: .cvsignore: Add `lock'.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-510
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-511
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-513
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-514
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-515
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-516
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-517
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-518
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-519
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-520
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-521
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-522
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-523
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-524
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-525
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-526
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-527
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-528
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-529
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-530
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-531
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-532
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-533
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-534
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-535
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-536
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-537
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-538
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-539
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-88
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-89
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-90
Update FSF's address in GPL notices
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-91
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-92
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-93
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-94
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-95
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-96
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-97
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-98
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-99
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-100
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-101
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-102
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-103
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-104
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-105
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-106
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-107
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-108
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-109
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-110
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-111
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-112
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-113
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-114
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-416
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 11 Sep 2005 08:23:50 +0000 |
parents | 532e0a9335a9 8763a59d5982 |
children | 2a679c81f552 |
line wrap: on
line diff
--- a/src/xsmfns.c Sun Sep 11 07:23:22 2005 +0000 +++ b/src/xsmfns.c Sun Sep 11 08:23:50 2005 +0000 @@ -53,11 +53,6 @@ #include "termopts.h" #include "xterm.h" -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif /* not MAXPATHLEN */ - - /* The user login name. */ extern Lisp_Object Vuser_login_name; @@ -206,7 +201,7 @@ int val_idx = 0; int props_idx = 0; - char cwd[MAXPATHLEN+1]; + char *cwd = NULL; char *smid_opt; /* How to start a new instance of Emacs. */ @@ -260,12 +255,9 @@ props[props_idx]->vals[0].value = SDATA (Vuser_login_name); ++props_idx; - /* The current directory property, not mandatory. */ -#ifdef HAVE_GETCWD - if (getcwd (cwd, MAXPATHLEN+1) != 0) -#else - if (getwd (cwd) != 0) -#endif + cwd = get_current_dir_name (); + + if (cwd) { props[props_idx] = &prop_ptr[props_idx]; props[props_idx]->name = SmCurrentDirectory; @@ -282,6 +274,9 @@ xfree (smid_opt); + if (cwd) + free (cwd); + /* See if we maybe shall interact with the user. */ if (interactStyle != SmInteractStyleAny || ! shutdown