aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-09 09:23:49 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-09 09:23:49 -0400
commit4ab85f4928be7ed096643bd5f7d8d5f2b42859fe (patch)
treebd8ed65d339ca26732c76d6983bd3470548556d6 /scripts/coccinelle
parenta2bd93456f2282da0f18824b04db750f9af0826c (diff)
downloadtor-4ab85f4928be7ed096643bd5f7d8d5f2b42859fe.tar.gz
tor-4ab85f4928be7ed096643bd5f7d8d5f2b42859fe.zip
Document tor-coccinelle.h
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r--scripts/coccinelle/tor-coccinelle.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/coccinelle/tor-coccinelle.h b/scripts/coccinelle/tor-coccinelle.h
index a94c3ef679..f597e912b4 100644
--- a/scripts/coccinelle/tor-coccinelle.h
+++ b/scripts/coccinelle/tor-coccinelle.h
@@ -1,3 +1,22 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2019, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/*
+ * This file looks like a C header, but its purpose is a bit different.
+ *
+ * We never include it from our real C files; we only tell Coccinelle
+ * about it in apply.sh.
+ *
+ * It tells the Coccinelle semantic patching tool how to understand
+ * things that would otherwise not be good C syntax, or which would
+ * otherwise not make sense to it as C. It doesn't need to produce
+ * semantically equivalent C, or even correct C: it only has to produce
+ * syntactically valid C.
+ */
+
#define MOCK_IMPL(a, b, c) a b c
#define CHECK_PRINTF(a, b)
#define STATIC static