ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtdaemon.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtdaemon.C (file contents):
Revision 1.2 by pcg, Mon Nov 24 19:52:16 2003 UTC vs.
Revision 1.3 by pcg, Thu Nov 27 10:12:10 2003 UTC

1#include <unistd.h>
2#include <stdint.h> 1#include <stdint.h>
3#include <cstdlib> 2#include <cstdlib>
4#include <cstring> 3#include <cstring>
5 4
5#include <unistd.h>
6#include <sys/utsname.h>
7#include <limits.h>
8
6#include "rxvtdaemon.h" 9#include "rxvtdaemon.h"
7 10
8const char *rxvt_connection::unix_sockname () 11char *rxvt_connection::unix_sockname ()
9{ 12{
10 return "/tmp/rxvtd~"; 13 char name[PATH_MAX];
14 char *path = getenv ("RXVT_SOCKET");
15
16 if (!path)
17 {
18 struct utsname u;
19 uname (&u);
20
21 path = getenv ("HOME");
22 snprintf (name, PATH_MAX, "%s/.rxvt-%s",
23 path ? path : "/tmp",
24 u.nodename);
25
26 path = name;
27 }
28
29 return strdup (path);
11} 30}
12 31
13void rxvt_connection::send (const char *data, int len) 32void rxvt_connection::send (const char *data, int len)
14{ 33{
15 uint8_t s[2]; 34 uint8_t s[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines