… | … | ||
---|---|---|---|
66 | memcpy (alloc (len), p, len); | 66 | memcpy (alloc (len), p, len); |
67 | } | 67 | } |
68 | 68 | ||
69 | void add (char c) | 69 | void add (char c) |
70 | { | 70 | { |
71 | if (room < 1) | 71 | alloc (1)[0] = c; |
72 | _reserve (1); | ||
73 | |||
74 | room--; | ||
75 | *ptr++ = c; | ||
76 | } | 72 | } |
77 | 73 | ||
78 | void add (const char *s) | 74 | void add (const char *s) |
79 | { | 75 | { |
80 | add (s, strlen (s)); | 76 | add (s, strlen (s)); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |