aboutsummaryrefslogtreecommitdiff
path: root/src/meta.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-11 12:13:09 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-11 12:13:09 +0300
commit590e208c40797206fd6a93651fc59e0b68eeb545 (patch)
treed7abd0ca33b3355b1a27760bf9850e445fafd607 /src/meta.c
parentdb81e378576dcc5510032c72060e48e562f208c9 (diff)
downloadwydawca-590e208c40797206fd6a93651fc59e0b68eeb545.tar.gz
wydawca-590e208c40797206fd6a93651fc59e0b68eeb545.tar.bz2
Remove obstack.
* src/txtacc.c: New file. * gnulib.modules: Remove obstack. * src/wydawca.h (txtacc_create, txtacc_free) (txtacc_free_string, txtacc_grow) (txtacc_finish): New functions. (txtacc_1grow): New macro.
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
@@ -56,3 +56,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
char *res;
- struct obstack stk;
+ struct txtacc *acc;
@@ -61,3 +61,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
- obstack_init (&stk);
+ acc = txtacc_create ();
@@ -68,3 +68,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
- obstack_grow (&stk, p, len);
+ txtacc_grow (acc, p, len);
p += len;
@@ -75,3 +75,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
case '$':
- obstack_grow (&stk, p, 1);
+ txtacc_grow (acc, p, 1);
p++;
@@ -94,3 +94,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
dictionary_quote_string (dict, handle, s, &newval, &len);
- obstack_grow (&stk, newval, len);
+ txtacc_grow (acc, newval, len);
free (newval);
@@ -98,3 +98,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
else
- obstack_grow (&stk, s, strlen (s));
+ txtacc_grow (acc, s, strlen (s));
p = e + 1;
@@ -103,3 +103,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
{
- obstack_grow (&stk, p - 1, 2);
+ txtacc_grow (acc, p - 1, 2);
p++;
@@ -123,3 +123,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
dictionary_quote_string (dict, handle, s, &newval, &len);
- obstack_grow (&stk, newval, len);
+ txtacc_grow (acc, newval, len);
free (newval);
@@ -127,3 +127,3 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
else
- obstack_grow (&stk, s, len);
+ txtacc_grow (acc, s, len);
p++;
@@ -132,7 +132,7 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
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.