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.1 by pcg, Mon Nov 24 17:28:08 2003 UTC vs.
Revision 1.2 by pcg, Mon Nov 24 19:52:16 2003 UTC

23void rxvt_connection::send (const char *data) 23void rxvt_connection::send (const char *data)
24{ 24{
25 send (data, strlen (data)); 25 send (data, strlen (data));
26} 26}
27 27
28bool rxvt_connection::recv (char *&data, int *len) 28bool rxvt_connection::recv (auto_str &data, int *len)
29{ 29{
30 uint8_t s[2]; 30 uint8_t s[2];
31 int l; 31 int l;
32 32
33 if (read (fd, s, 2) != 2) 33 if (read (fd, s, 2) != 2)
51 data[l] = 0; 51 data[l] = 0;
52 52
53 return true; 53 return true;
54} 54}
55 55
56bool rxvt_connection::recv (token &data)
57{
58 char *d;
59 int l;
60
61 if (!recv (d, &l))
62 return false;
63
64 if (l < sizeof (token) - 1)
65 strcpy (data, d);
66
67 delete [] d;
68
69 return l < sizeof (token) - 1;
70}
71
72void rxvt_connection::send (int data) 56void rxvt_connection::send (int data)
73{ 57{
74 uint8_t s[4]; 58 uint8_t s[4];
75 59
76 s[0] = data >> 24; s[1] = data >> 16; s[0] = data >> 8; s[1] = data; 60 s[0] = data >> 24; s[1] = data >> 16; s[0] = data >> 8; s[1] = data;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines