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

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.286 by sf-exg, Tue Dec 14 08:01:51 2010 UTC vs.
Revision 1.289 by root, Mon Jan 3 03:05:47 2011 UTC

60#ifdef DISPLAY_IS_IP 60#ifdef DISPLAY_IS_IP
61/* On Solaris link with -lsocket and -lnsl */ 61/* On Solaris link with -lsocket and -lnsl */
62#include <sys/types.h> 62#include <sys/types.h>
63#include <sys/socket.h> 63#include <sys/socket.h>
64 64
65/* these next two are probably only on Sun (not Solaris) */ 65/* these next is probably only on Sun (not Solaris) */
66#ifdef HAVE_SYS_SOCKIO_H 66#ifdef HAVE_SYS_SOCKIO_H
67#include <sys/sockio.h> 67#include <sys/sockio.h>
68#endif
69#ifdef HAVE_SYS_BYTEORDER_H
70#include <sys/byteorder.h>
71#endif 68#endif
72 69
73#include <netinet/in.h> 70#include <netinet/in.h>
74#include <arpa/inet.h> 71#include <arpa/inet.h>
75#include <net/if.h> 72#include <net/if.h>
890 887
891/*----------------------------------------------------------------------*/ 888/*----------------------------------------------------------------------*/
892void 889void
893rxvt_term::init_env () 890rxvt_term::init_env ()
894{ 891{
895 int i;
896 char *val; 892 char *val;
897 893
898#ifdef DISPLAY_IS_IP 894#ifdef DISPLAY_IS_IP
899 /* Fixup display_name for export over pty to any interested terminal 895 /* Fixup display_name for export over pty to any interested terminal
900 * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number 896 * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number
914 val = XDisplayString (dpy); 910 val = XDisplayString (dpy);
915 911
916 if (rs[Rs_display_name] == NULL) 912 if (rs[Rs_display_name] == NULL)
917 rs[Rs_display_name] = val; /* use broken `:0' value */ 913 rs[Rs_display_name] = val; /* use broken `:0' value */
918 914
919 i = strlen (val);
920 env_display = (char *)rxvt_malloc (i + 9); 915 env_display = (char *)rxvt_malloc (strlen (val) + 9);
921 916
922 sprintf (env_display, "DISPLAY=%s", val); 917 sprintf (env_display, "DISPLAY=%s", val);
923 918
924 sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]); 919 sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]);
925 920
1507#if ENABLE_EWMH 1502#if ENABLE_EWMH
1508 xa[XA_NET_WM_PING], 1503 xa[XA_NET_WM_PING],
1509#endif 1504#endif
1510 }; 1505 };
1511 1506
1512 XSetWMProtocols (dpy, top, protocols, sizeof (protocols) / sizeof (protocols[0])); 1507 XSetWMProtocols (dpy, top, protocols, ARRAY_LENGTH(protocols));
1513 1508
1514#if ENABLE_FRILLS 1509#if ENABLE_FRILLS
1515 if (rs[Rs_transient_for]) 1510 if (rs[Rs_transient_for])
1516 XSetTransientForHint (dpy, top, (Window)strtol (rs[Rs_transient_for], 0, 0)); 1511 XSetTransientForHint (dpy, top, (Window)strtol (rs[Rs_transient_for], 0, 0));
1517#endif 1512#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines