diff options
Diffstat (limited to 'src/wydawca.h')
-rw-r--r-- | src/wydawca.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/wydawca.h b/src/wydawca.h index 8d5dd34..ef1ff86 100644 --- a/src/wydawca.h +++ b/src/wydawca.h @@ -48,5 +48,2 @@ -#define obstack_chunk_alloc malloc -#define obstack_chunk_free free -#include "obstack.h" #include "error.h" @@ -174,3 +171,3 @@ struct file_triplet size_t tmpsize; /* Size of memory allocated in tmp */ - struct obstack obstk; /* Obstack for string allocation */ + struct txtacc *acc; /* Text accumulator for string allocation */ /* User data */ @@ -560 +557,14 @@ int pop_dir (void); char *getcwd_alloc (void); + +struct txtacc *txtacc_create (void); +void txtacc_free (struct txtacc *acc); +void txtacc_free_string (struct txtacc *acc, char *str); +void txtacc_grow (struct txtacc *acc, const char *buf, size_t size); +#define txtacc_1grow(acc, c) \ + do \ + { \ + char __ch = c; \ + txtacc_grow (acc, &__ch, 1); \ + } \ + while (0) +char *txtacc_finish (struct txtacc *acc); |