[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110557: * editfns.c (get_system_name
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110557: * editfns.c (get_system_name): Remove. |
Date: |
Tue, 16 Oct 2012 06:22:25 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110557
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-10-16 06:22:25 +0400
message:
* editfns.c (get_system_name): Remove.
* lisp.h (get_system_name): Remove prototype.
* xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
(get_environ_db): Use Vsystem_name. Avoid call to strlen.
modified:
src/ChangeLog
src/editfns.c
src/lisp.h
src/xrdb.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-10-15 16:49:57 +0000
+++ b/src/ChangeLog 2012-10-16 02:22:25 +0000
@@ -1,3 +1,10 @@
+2012-10-16 Dmitry Antipov <address@hidden>
+
+ * editfns.c (get_system_name): Remove.
+ * lisp.h (get_system_name): Remove prototype.
+ * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
+ (get_environ_db): Use Vsystem_name. Avoid call to strlen.
+
2012-10-15 Daniel Colascione <address@hidden>
* dbusbind.c: Add comment explaining reason for previous change.
=== modified file 'src/editfns.c'
--- a/src/editfns.c 2012-10-11 13:23:12 +0000
+++ b/src/editfns.c 2012-10-16 02:22:25 +0000
@@ -1339,15 +1339,6 @@
return Vsystem_name;
}
-const char *
-get_system_name (void)
-{
- if (STRINGP (Vsystem_name))
- return SSDATA (Vsystem_name);
- else
- return "";
-}
-
DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,
doc: /* Return the process ID of Emacs, as a number. */)
(void)
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2012-10-12 15:19:54 +0000
+++ b/src/lisp.h 2012-10-16 02:22:25 +0000
@@ -3127,7 +3127,6 @@
extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
ptrdiff_t, bool);
extern void init_editfns (void);
-const char *get_system_name (void);
extern void syms_of_editfns (void);
extern void set_time_zone_rule (const char *);
=== modified file 'src/xrdb.c'
--- a/src/xrdb.c 2012-09-15 07:06:56 +0000
+++ b/src/xrdb.c 2012-10-16 02:22:25 +0000
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <errno.h>
#include <epaths.h>
-
+#include <stdlib.h>
#include <stdio.h>
#include "lisp.h"
@@ -48,11 +48,6 @@
#include "keyboard.h"
#endif
-extern char *getenv (const char *);
-
-extern struct passwd *getpwuid (uid_t);
-extern struct passwd *getpwnam (const char *);
-
char *x_get_string_resource (XrmDatabase rdb, const char *name,
const char *class);
static int file_p (const char *filename);
@@ -429,8 +424,9 @@
{
static char const xdefaults[] = ".Xdefaults-";
char *home = gethomedir ();
- char const *host = get_system_name ();
- ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host);
+ char const *host = SSDATA (Vsystem_name);
+ ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults
+ + SBYTES (Vsystem_name));
path = xrealloc (home, pathsize);
strcat (strcat (path, xdefaults), host);
p = path;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110557: * editfns.c (get_system_name): Remove.,
Dmitry Antipov <=