summaryrefslogtreecommitdiff
path: root/src/lib/string/scanf.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-22 09:23:30 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-22 09:49:13 -0400
commit1abadee3fd1c15f3720003c411ec6043c29d7c09 (patch)
tree64cb47b2d5352219fc71f36505d9c0bdcc93bb0a /src/lib/string/scanf.h
parent1e07b4031e2613826cf7ff2838a2f0c8f03e81c2 (diff)
downloadtor-1abadee3fd1c15f3720003c411ec6043c29d7c09.tar.gz
tor-1abadee3fd1c15f3720003c411ec6043c29d7c09.zip
Extract key string manipulation functions into a new library.
Diffstat (limited to 'src/lib/string/scanf.h')
-rw-r--r--src/lib/string/scanf.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/string/scanf.h b/src/lib/string/scanf.h
new file mode 100644
index 0000000000..9cfa9cc6c1
--- /dev/null
+++ b/src/lib/string/scanf.h
@@ -0,0 +1,19 @@
+/* Copyright (c) 2003-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_UTIL_SCANF_H
+#define TOR_UTIL_SCANF_H
+
+#include "orconfig.h"
+#include "lib/cc/compat_compiler.h"
+
+#include <stdarg.h>
+
+int tor_vsscanf(const char *buf, const char *pattern, va_list ap) \
+ CHECK_SCANF(2, 0);
+int tor_sscanf(const char *buf, const char *pattern, ...)
+ CHECK_SCANF(2, 3);
+
+#endif /* !defined(TOR_UTIL_STRING_H) */