ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/dynbuf.h
(Generate patch)

Comparing deliantra/server/include/dynbuf.h (file contents):
Revision 1.1 by root, Thu Aug 31 17:54:14 2006 UTC vs.
Revision 1.2 by root, Tue Sep 19 10:35:21 2006 UTC

30 void clear (); 30 void clear ();
31 void finish (); 31 void finish ();
32 32
33public: 33public:
34 34
35 dynbuf (int initial = 128, int extend = 128); 35 dynbuf (int initial = 4096, int extend = 16384);
36 ~dynbuf (); 36 ~dynbuf ();
37 37
38 int size () { return _size + (ptr - last->data); } 38 int size () { return _size + (ptr - last->data); }
39 39
40 void linearise (void *data); 40 void linearise (void *data);
57 57
58 return res; 58 return res;
59 } 59 }
60 60
61 void fadd (char c) { --room; *ptr++ = c; } 61 void fadd (char c) { --room; *ptr++ = c; }
62 void fadd (unsigned char c) { fadd (char (c));; } 62 void fadd (unsigned char c) { fadd (char (c)); }
63 63
64 void add (const void *p, int len) 64 void add (const void *p, int len)
65 { 65 {
66 memcpy (alloc (len), p, len); 66 memcpy (alloc (len), p, len);
67 } 67 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines