aboutsummaryrefslogtreecommitdiff
path: root/src/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.c')
-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
@@ -13,23 +13,22 @@
You should have received a copy of the GNU General Public License along
with wydawca. If not, see <http://www.gnu.org/licenses/>. */
#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
report_add (const char *fmt, ...)
{
va_list ap;
@@ -38,18 +37,18 @@ report_add (const char *fmt, ...)
va_start (ap, fmt);
grecs_vasprintf (&str, &size, fmt, ap);
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);
}
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.