aboutsummaryrefslogtreecommitdiff
path: root/src/meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/meta.c')
-rw-r--r--src/meta.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/meta.c b/src/meta.c
index 30d3041..61dc334 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -54,26 +54,26 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
{
const char *p, *s;
char *res;
- struct obstack stk;
+ struct txtacc *acc;
if (!string)
return NULL;
- obstack_init (&stk);
+ acc = txtacc_create ();
for (p = string; *p;)
{
char *e;
size_t len = strcspn (p, "$");
- obstack_grow (&stk, p, len);
+ txtacc_grow (acc, p, len);
p += len;
if (*p == '$')
{
switch (*++p)
{
case '$':
- obstack_grow (&stk, p, 1);
+ txtacc_grow (acc, p, 1);
p++;
break;
@@ -92,16 +92,16 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
size_t len;
/* FIXME: Return value? */
dictionary_quote_string (dict, handle, s, &newval, &len);
- obstack_grow (&stk, newval, len);
+ txtacc_grow (acc, newval, len);
free (newval);
}
else
- obstack_grow (&stk, s, strlen (s));
+ txtacc_grow (acc, s, strlen (s));
p = e + 1;
}
else
{
- obstack_grow (&stk, p - 1, 2);
+ txtacc_grow (acc, p - 1, 2);
p++;
}
break;
@@ -121,20 +121,20 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
size_t len;
/* FIXME: Return value? */
dictionary_quote_string (dict, handle, s, &newval, &len);
- obstack_grow (&stk, newval, len);
+ txtacc_grow (acc, newval, len);
free (newval);
}
else
- obstack_grow (&stk, s, len);
+ txtacc_grow (acc, s, len);
p++;
}
}
else
- obstack_grow (&stk, p, 1);
+ txtacc_grow (acc, p, 1);
}
- obstack_1grow (&stk, 0);
- res = xstrdup (obstack_finish (&stk));
- obstack_free (&stk, NULL);
+ txtacc_1grow (acc, 0);
+ res = xstrdup (txtacc_finish (acc));
+ txtacc_free (acc);
return res;
}

Return to:

Send suggestions and report system problems to the System administrator.