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

Comparing rxvt-unicode/src/rxvtc.C (file contents):
Revision 1.11 by pcg, Thu Apr 8 20:31:45 2004 UTC vs.
Revision 1.13 by root, Sun Aug 22 01:40:31 2004 UTC

25 25
26#include "rxvt.h" 26#include "rxvt.h"
27 27
28#include <cstdio> 28#include <cstdio>
29#include <cstdlib> 29#include <cstdlib>
30#include <cstring>
30 31
31#include <unistd.h> 32#include <unistd.h>
32#include <signal.h> 33#include <signal.h>
33#include <sys/socket.h> 34#include <sys/socket.h>
34#include <sys/un.h> 35#include <sys/un.h>
51 strcpy (sa.sun_path, sockname); 52 strcpy (sa.sun_path, sockname);
52 free (sockname); 53 free (sockname);
53 54
54 if (connect (fd, (sockaddr *)&sa, sizeof (sa))) 55 if (connect (fd, (sockaddr *)&sa, sizeof (sa)))
55 { 56 {
56 perror ("unable to connect to rxvtd"); 57 perror ("unable to connect to the rxvt-unicode daemon");
57 exit (EXIT_FAILURE); 58 exit (EXIT_FAILURE);
58 } 59 }
59} 60}
60 61
61extern char **environ; 62extern char **environ;
79 c.send ("CWD"), c.send (getcwd (buf, sizeof (buf))); 80 c.send ("CWD"), c.send (getcwd (buf, sizeof (buf)));
80 81
81 for (char **var = environ; *environ; environ++) 82 for (char **var = environ; *environ; environ++)
82 c.send ("ENV"), c.send (*environ); 83 c.send ("ENV"), c.send (*environ);
83 84
85 const char *base = strrchr (argv[0], '/');
86 base = base ? base + 1 : argv[0];
87 c.send ("ARG"), c.send (strcmp (base, RXVTNAME "c") ? base : RXVTNAME);
88
84 for (int i = 0; i < argc; i++) 89 for (int i = 1; i < argc; i++)
85 c.send ("ARG"), c.send (argv[i]); 90 c.send ("ARG"), c.send (argv[i]);
86 91
87 c.send ("END"); 92 c.send ("END");
88 93
89 auto_str tok; 94 auto_str tok;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines