aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.c
diff options
context:
space:
mode:
authorLibravatar M Stoeckl <code@mstoeckl.com>2019-01-20 13:51:12 -0500
committerLibravatar emersion <contact@emersion.fr>2019-01-21 12:59:42 +0100
commit1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 (patch)
tree5c3f60e0219cb8b4a1b7cafb760a871661866e32 /common/util.c
parentLog libinput_config_status errors (diff)
downloadsway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.tar.gz
sway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.tar.zst
sway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.zip
Replace wlr_log with sway_log
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
Diffstat (limited to 'common/util.c')
-rw-r--r--common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/util.c b/common/util.c
index d66058a6..27039dcb 100644
--- a/common/util.c
+++ b/common/util.c
@@ -116,7 +116,7 @@ uint32_t parse_color(const char *color) {
116 116
117 int len = strlen(color); 117 int len = strlen(color);
118 if (len != 6 && len != 8) { 118 if (len != 6 && len != 8) {
119 wlr_log(WLR_DEBUG, "Invalid color %s, defaulting to color 0xFFFFFFFF", color); 119 sway_log(SWAY_DEBUG, "Invalid color %s, defaulting to color 0xFFFFFFFF", color);
120 return 0xFFFFFFFF; 120 return 0xFFFFFFFF;
121 } 121 }
122 uint32_t res = (uint32_t)strtoul(color, NULL, 16); 122 uint32_t res = (uint32_t)strtoul(color, NULL, 16);
@@ -147,7 +147,7 @@ float parse_float(const char *value) {
147 char *end; 147 char *end;
148 float flt = strtof(value, &end); 148 float flt = strtof(value, &end);
149 if (*end || errno) { 149 if (*end || errno) {
150 wlr_log(WLR_DEBUG, "Invalid float value '%s', defaulting to NAN", value); 150 sway_log(SWAY_DEBUG, "Invalid float value '%s', defaulting to NAN", value);
151 return NAN; 151 return NAN;
152 } 152 }
153 return flt; 153 return flt;