diff options
Diffstat (limited to 'src/builtin.c')
-rw-r--r-- | src/builtin.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/builtin.c b/src/builtin.c index 412a2e7..0a76738 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -149,7 +149,7 @@ parse_cmp_type (const char *pat, strcmp_fn *cmpfn, int *rf) struct builtin_data_storage { - struct obstack stk; + struct txtacc *acc; char **wp; }; @@ -164,7 +164,7 @@ builtin_lookup (struct dictionary *dict, void *handle, const char *req) int i; int rc; size_t count = 0; - struct obstack stk; + struct txtacc *acc; int flags = 0; strcmp_fn cmpfn = cmp_exact; struct builtin_data_storage *bds; @@ -176,7 +176,7 @@ builtin_lookup (struct dictionary *dict, void *handle, const char *req) return 0; } - obstack_init (&stk); + acc = txtacc_create (); for (i = 0; i < dict->parmc; i++) { @@ -198,7 +198,7 @@ builtin_lookup (struct dictionary *dict, void *handle, const char *req) for (j = 1; j <= ncol; j++) { char *val = dict->parmv[i + j]; - obstack_grow (&stk, val, strlen (val) + 1); + txtacc_grow (acc, val, strlen (val) + 1); } count++; } @@ -211,7 +211,7 @@ builtin_lookup (struct dictionary *dict, void *handle, const char *req) if (count == 0) { - obstack_free (&stk, NULL); + txtacc_free (acc); bds = NULL; rc = 1; } @@ -223,8 +223,8 @@ builtin_lookup (struct dictionary *dict, void *handle, const char *req) bds = xmalloc (sizeof (*bds)); count *= ncol; bds->wp = xcalloc (count, sizeof (bds->wp[0])); - bds->stk = stk; - p = obstack_finish (&stk); + bds->acc = acc; + p = txtacc_finish (acc); for (i = 0; i < count; i++) { @@ -245,7 +245,7 @@ builtin_free_result (struct dictionary *dict, void *handle) if (dict->storage) { struct builtin_data_storage *bds = dict->storage; - obstack_free (&bds->stk, NULL); + txtacc_free (bds->acc); free (bds->wp); free (bds); dict->storage = NULL; |