From 7159edf9090e0a0e4c7d02e80b81bc00083884cc Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 26 Jun 2018 20:51:17 -0400 Subject: Move the escape-for-log code into src/lib/log It doesn't need anything higher-level, and everything that needs the logs potentially needs this. --- src/lib/log/escape.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/lib/log/escape.h (limited to 'src/lib/log/escape.h') diff --git a/src/lib/log/escape.h b/src/lib/log/escape.h new file mode 100644 index 0000000000..5d2e79d6c2 --- /dev/null +++ b/src/lib/log/escape.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2001, Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef TOR_ESCAPE_H +#define TOR_ESCAPE_H + +#include "orconfig.h" +#include "lib/cc/compat_compiler.h" +#include + +char *esc_for_log(const char *string) ATTR_MALLOC; +char *esc_for_log_len(const char *chars, size_t n) ATTR_MALLOC; +const char *escaped(const char *string); + +#endif /* !defined(TOR_TORLOG_H) */ -- cgit v1.2.3-54-g00ecf