aboutsummaryrefslogtreecommitdiff
path: root/src/report.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-18 18:34:54 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-18 18:34:54 +0300
commitf6657a46e2422d903d62565868f77c430a612a42 (patch)
treeb70b4f45003e067de55a8ac425792c98fd06035d /src/report.c
parent3a16bc5620b4c664248bc5b5c586ddd0103f7050 (diff)
downloadwydawca-f6657a46e2422d903d62565868f77c430a612a42.tar.gz
wydawca-f6657a46e2422d903d62565868f77c430a612a42.tar.bz2
Fix unnecessary code duplication
Use grecs_txtacc.
Diffstat (limited to 'src/report.c')
-rw-r--r--src/report.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/report.c b/src/report.c
index e1a108d..c24fe33 100644
--- a/src/report.c
+++ b/src/report.c
@@ -17,16 +17,16 @@
#include "wydawca.h"
-static struct txtacc *report_acc;
+static struct grecs_txtacc *report_acc;
char *report_string;
void
report_init()
{
if (!report_acc)
- report_acc = txtacc_create();
+ report_acc = grecs_txtacc_create();
else
- txtacc_free_string(report_acc, report_string);
+ grecs_txtacc_free_string(report_acc, report_string);
}
void
@@ -40,8 +40,8 @@ report_add(const char *fmt, ...)
grecs_vasprintf(&str, &size, fmt, ap);
va_end(ap);
if (str) {
- txtacc_grow(report_acc, str, strlen(str));
- txtacc_1grow(report_acc, '\n');
+ grecs_txtacc_grow_string(report_acc, str);
+ grecs_txtacc_grow_char(report_acc, '\n');
}
free(str);
}
@@ -49,6 +49,6 @@ report_add(const char *fmt, ...)
void
report_finish()
{
- txtacc_1grow(report_acc, 0);
- report_string = txtacc_finish(report_acc, 0);
+ grecs_txtacc_grow_char(report_acc, 0);
+ report_string = grecs_txtacc_finish(report_acc, 0);
}

Return to:

Send suggestions and report system problems to the System administrator.