aboutsummaryrefslogtreecommitdiffstats
path: root/ctimeline.c
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-05-19 08:11:29 +0000
committerJoursoir <chat@joursoir.net>2021-05-19 08:11:29 +0000
commitf93b7523121ef42f5133001ec7ce2347e3bbfecf (patch)
tree199f00c722331a3856e940929a97c338d0d961ac /ctimeline.c
parentf2dd637e6ea2ba2ea0c4f48a5f7def23ac38173b (diff)
downloadctimeline-f93b7523121ef42f5133001ec7ce2347e3bbfecf.tar.gz
ctimeline-f93b7523121ef42f5133001ec7ce2347e3bbfecf.tar.bz2
ctimeline-f93b7523121ef42f5133001ec7ce2347e3bbfecf.zip
ctimeline: change (char *) to (string *) for context information
Diffstat (limited to 'ctimeline.c')
-rw-r--r--ctimeline.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ctimeline.c b/ctimeline.c
index 4bbb7bf..d27fca5 100644
--- a/ctimeline.c
+++ b/ctimeline.c
@@ -14,10 +14,10 @@ struct ctimeline_context ctx; // from ctimeline.h
static void prepare_context()
{
memset(&ctx, 0, sizeof(ctx));
- ctx.head_title = "Timeline browser";
- ctx.css = "static/ctimeline.css";
- ctx.header_title = "CTimeline";
- ctx.header_desc = "Web frontend for timelines written in C";
+ ctx.head_title = string_alloc(NULL, "Timeline browser");
+ ctx.css = string_alloc(NULL, "static/ctimeline.css");
+ ctx.header_title = string_alloc(NULL, "CTimeline");
+ ctx.header_desc = string_alloc(NULL, "Web frontend for timelines written in C");
ctx.branches.list = NULL;
ctx.branches.count = 0;
@@ -31,6 +31,10 @@ static void prepare_context()
*/
static void forget_context()
{
+ string_release(ctx.head_title);
+ string_release(ctx.css);
+ string_release(ctx.header_title);
+ string_release(ctx.header_desc);
free(ctx.branches.list);
}