summaryrefslogtreecommitdiffabout
path: root/src/wydawca.h
Side-by-side diff
Diffstat (limited to 'src/wydawca.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/wydawca.h18
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
@@ -46,9 +46,6 @@
#include <mailutils/url.h>
#include <mailutils/errno.h>
-#define obstack_chunk_alloc malloc
-#define obstack_chunk_free free
-#include "obstack.h"
#include "error.h"
#include "xalloc.h"
#include "backupfile.h"
@@ -172,7 +169,7 @@ struct file_triplet
char *blurb; /* Block of directives: directive[i] points here */
char *tmp; /* Temporary storage */
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 */
size_t uploader_count;
struct uploader_info *uploader_list;
@@ -558,3 +555,16 @@ int wydawca_userprivs (uid_t uid, gid_t gid, gid_t *grplist, size_t ngrp);
int push_dir (const char *dirname);
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);

Return to:

Send suggestions and report system problems to the System administrator.