diff options
Diffstat (limited to 'src/report.c')
-rw-r--r-- | src/report.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/report.c b/src/report.c index b09c7c7..929bfff 100644 --- a/src/report.c +++ b/src/report.c @@ -18,4 +18,3 @@ -static struct obstack report_stk; -static int report_stk_inited; +static struct txtacc *report_acc; char *report_string; @@ -25,6 +24,6 @@ report_init () { - if (!report_stk_inited) - obstack_init (&report_stk); + if (!report_acc) + report_acc = txtacc_create (); else - obstack_free (&report_stk, report_string); + txtacc_free_string (report_acc, report_string); } @@ -43,4 +42,4 @@ report_add (const char *fmt, ...) { - obstack_grow (&report_stk, str, strlen (str)); - obstack_1grow (&report_stk, '\n'); + txtacc_grow (report_acc, str, strlen (str)); + txtacc_1grow (report_acc, '\n'); } @@ -52,4 +51,4 @@ report_finish () { - obstack_1grow (&report_stk, 0); - report_string = obstack_finish (&report_stk); + txtacc_1grow (report_acc, 0); + report_string = txtacc_finish (report_acc); } |