commit b8eace3

default  ·  2023-04-25 04:40:46 +0000 UTC
parent 3fb91ea
Store the what-is-snac URL as a CPP constant.
3 files changed,  +7, -3
M html.c
M snac.h
M html.c
+4, -2
 1@@ -988,9 +988,11 @@ d_char *html_user_footer(snac *snac, d_char *s)
 2     xs *s1 = xs_fmt(
 3         "<div class=\"snac-footer\">\n"
 4         "<a href=\"%s\">%s</a> - "
 5-        "powered by <abbr title=\"Social Networks Are Crap\">snac</abbr></div>\n",
 6+        "powered by <a href=\"%s\""
 7+        "<abbr title=\"Social Networks Are Crap\">snac</abbr></div></a>\n",
 8         srv_baseurl,
 9-        L("about this site")
10+        L("about this site"),
11+        WHAT_IS_SNAC_URL
12     );
13 
14     return xs_str_cat(s, s1);
+1, -1
1@@ -1221,7 +1221,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2         ins = xs_dict_append(ins, "domain",      host);
3         ins = xs_dict_append(ins, "title",       host);
4         ins = xs_dict_append(ins, "version",     "4.0.0 (not true; really " USER_AGENT ")");
5-        ins = xs_dict_append(ins, "source_url",  "https:/" "/comam.es/what-is-snac");
6+        ins = xs_dict_append(ins, "source_url",  WHAT_IS_SNAC_URL);
7         ins = xs_dict_append(ins, "description", host);
8 
9         ins = xs_dict_append(ins, "short_description", host);
M snac.h
+2, -0
1@@ -5,6 +5,8 @@
2 
3 #define USER_AGENT "snac/" VERSION
4 
5+#define WHAT_IS_SNAC_URL "https:/" "/comam.es/what-is-snac"
6+
7 #define DIR_PERM 02770
8 
9 extern double disk_layout;