summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-25 06:40:46 +0200
committerdefault <nobody@localhost>2023-04-25 06:40:46 +0200
commitb8eace33c9079a025f96130e81a2cc73a1933cd3 (patch)
treec76de4b8fd2bfe75932b1c95e04a529841785393
parent3fb91ea25ae5b90493602427efc51fbe2440c3bf (diff)
Store the what-is-snac URL as a CPP constant.
-rw-r--r--html.c6
-rw-r--r--mastoapi.c2
-rw-r--r--snac.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/html.c b/html.c
index c9cf9e3..5f57262 100644
--- a/html.c
+++ b/html.c
@@ -988,9 +988,11 @@ d_char *html_user_footer(snac *snac, d_char *s)
xs *s1 = xs_fmt(
"<div class=\"snac-footer\">\n"
"<a href=\"%s\">%s</a> - "
- "powered by <abbr title=\"Social Networks Are Crap\">snac</abbr></div>\n",
+ "powered by <a href=\"%s\""
+ "<abbr title=\"Social Networks Are Crap\">snac</abbr></div></a>\n",
srv_baseurl,
- L("about this site")
+ L("about this site"),
+ WHAT_IS_SNAC_URL
);
return xs_str_cat(s, s1);
diff --git a/mastoapi.c b/mastoapi.c
index 61a12cd..5d508a2 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1221,7 +1221,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
ins = xs_dict_append(ins, "domain", host);
ins = xs_dict_append(ins, "title", host);
ins = xs_dict_append(ins, "version", "4.0.0 (not true; really " USER_AGENT ")");
- ins = xs_dict_append(ins, "source_url", "https:/" "/comam.es/what-is-snac");
+ ins = xs_dict_append(ins, "source_url", WHAT_IS_SNAC_URL);
ins = xs_dict_append(ins, "description", host);
ins = xs_dict_append(ins, "short_description", host);
diff --git a/snac.h b/snac.h
index d38494b..eeedca7 100644
--- a/snac.h
+++ b/snac.h
@@ -5,6 +5,8 @@
#define USER_AGENT "snac/" VERSION
+#define WHAT_IS_SNAC_URL "https:/" "/comam.es/what-is-snac"
+
#define DIR_PERM 02770
extern double disk_layout;