aboutsummaryrefslogtreecommitdiffstats
path: root/common/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/log.c')
-rw-r--r--common/log.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/common/log.c b/common/log.c
index 669fd360..17648e44 100644
--- a/common/log.c
+++ b/common/log.c
@@ -93,20 +93,3 @@ void _sway_log(sway_log_importance_t verbosity, const char *fmt, ...) {
93 sway_log_stderr(verbosity, fmt, args); 93 sway_log_stderr(verbosity, fmt, args);
94 va_end(args); 94 va_end(args);
95} 95}
96
97// strips the path prefix from filepath
98// will try to strip SWAY_SRC_DIR as well as a relative src dir
99// e.g. '/src/build/sway/util/log.c' and
100// '../util/log.c' will both be stripped to
101// 'util/log.c'
102const char *_sway_strip_path(const char *filepath) {
103 static int srclen = sizeof(SWAY_SRC_DIR);
104 if (strstr(filepath, SWAY_SRC_DIR) == filepath) {
105 filepath += srclen;
106 } else if (*filepath == '.') {
107 while (*filepath == '.' || *filepath == '/') {
108 ++filepath;
109 }
110 }
111 return filepath;
112}