summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-01 16:50:53 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-11-01 16:50:53 (EDT)
commitf5e8c373a15375c9bb7bdca756479bad8720671f (patch)
tree35eb202af473540b38445ed3b0ce309f2d292e24 /src
parentbe2b8524ce031be2befc08f4f42f19c92ad85db4 (diff)
downloadmarquee-f5e8c373a15375c9bb7bdca756479bad8720671f.zip
marquee-f5e8c373a15375c9bb7bdca756479bad8720671f.tar.gz
marquee-f5e8c373a15375c9bb7bdca756479bad8720671f.tar.bz2
about:marquee: Convert static const document var to macro
Fixes: CC src/schemes/about/marquee-marquee.o src/schemes/about/marquee.c: In function ‘mq_about_marquee_response’: src/schemes/about/marquee.c:72:5: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] "DANGER", "DO NOT PRESS")); ^
Diffstat (limited to 'src')
-rw-r--r--src/schemes/about/marquee.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/schemes/about/marquee.c b/src/schemes/about/marquee.c
index 4ab101f..8045291 100644
--- a/src/schemes/about/marquee.c
+++ b/src/schemes/about/marquee.c
@@ -26,33 +26,33 @@
#include "../about.h"
#include "paths.h"
-static const gchar *document =
- "<!doctype html>"
- "<html dir=\"%s\">"
- "<head>"
- "<meta charset=\"utf-8\">"
- "<title>%s</title>"
- "<style>"
- "form {"
- "text-align: center;"
- "}"
- "form > input[type=submit] {"
- "margin: 32px;"
- "padding: 16px;"
- "background-color: #FF0000;"
- "color: #FFFFFF;"
- "font-weight: bold;"
- "font-size: 64px;"
- "}"
- "</style>"
- "</head>"
- "<body>"
- "<form>"
- "<input type=\"submit\" name=\"toggle\""
- "value=\"%s\">"
- "</form>"
- "</body>"
- "</html>";
+#define DOCUMENT \
+ "<!doctype html>" \
+ "<html dir=\"%s\">" \
+ "<head>" \
+ "<meta charset=\"utf-8\">" \
+ "<title>%s</title>" \
+ "<style>" \
+ "form {" \
+ "text-align: center;" \
+ "}" \
+ "form > input[type=submit] {" \
+ "margin: 32px;" \
+ "padding: 16px;" \
+ "background-color: #FF0000;" \
+ "color: #FFFFFF;" \
+ "font-weight: bold;" \
+ "font-size: 64px;" \
+ "}" \
+ "</style>" \
+ "</head>" \
+ "<body>" \
+ "<form>" \
+ "<input type=\"submit\" name=\"toggle\"" \
+ "value=\"%s\">" \
+ "</form>" \
+ "</body>" \
+ "</html>"
void
mq_about_marquee_response(MqApplication *application, GHashTable *query,
@@ -66,7 +66,7 @@ mq_about_marquee_response(MqApplication *application, GHashTable *query,
}
mq_about_redirect(request, "mq-about:marquee");
} else {
- mq_about_response(request, g_strdup_printf(document,
+ mq_about_response(request, g_strdup_printf(DOCUMENT,
gtk_widget_get_default_direction() ==
GTK_TEXT_DIR_RTL ? "rtl" : "ltr",
"DANGER", "DO NOT PRESS"));