summaryrefslogtreecommitdiffabout
path: root/src/report.c
Side-by-side diff
Diffstat (limited to 'src/report.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/report.c17
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
@@ -16,17 +16,16 @@
#include "wydawca.h"
-static struct obstack report_stk;
-static int report_stk_inited;
+static struct txtacc *report_acc;
char *report_string;
void
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);
}
void
@@ -41,8 +40,8 @@ report_add (const char *fmt, ...)
va_end (ap);
if (str)
{
- obstack_grow (&report_stk, str, strlen (str));
- obstack_1grow (&report_stk, '\n');
+ txtacc_grow (report_acc, str, strlen (str));
+ txtacc_1grow (report_acc, '\n');
}
free (str);
}
@@ -50,6 +49,6 @@ report_add (const char *fmt, ...)
void
report_finish ()
{
- obstack_1grow (&report_stk, 0);
- report_string = obstack_finish (&report_stk);
+ txtacc_1grow (report_acc, 0);
+ report_string = txtacc_finish (report_acc);
}

Return to:

Send suggestions and report system problems to the System administrator.