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

Comparing rxvt-unicode/src/rxvtutil.C (file contents):
Revision 1.1 by root, Sun Aug 15 00:37:04 2004 UTC vs.
Revision 1.3 by root, Wed Jan 25 00:42:21 2006 UTC

3#include <inttypes.h> 3#include <inttypes.h>
4 4
5#include "rxvtutil.h" 5#include "rxvtutil.h"
6 6
7class byteorder byteorder; 7class byteorder byteorder;
8
9unsigned int byteorder::e;
8 10
9byteorder::byteorder () 11byteorder::byteorder ()
10{ 12{
11 union { 13 union {
12 uint32_t u; 14 uint32_t u;
19 w.b[3] = 0x44; 21 w.b[3] = 0x44;
20 22
21 e = w.u; 23 e = w.u;
22} 24}
23 25
26void *
27zero_initialized::operator new (size_t s)
28{
29 void *p = malloc (s);
30
31 memset (p, 0, s);
32 return p;
33}
34
35void
36zero_initialized::operator delete (void *p, size_t s)
37{
38 free (p);
39}
40
41static void *temp_buf;
42static uint32_t temp_len;
43
44void *
45rxvt_temp_buf (int len)
46{
47 if (len > temp_len)
48 {
49 free (temp_buf);
50 temp_buf = malloc (len);
51 temp_len = len;
52 }
53
54 return temp_buf;
55}
24 56
25 57

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines