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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines