6195f2b398
coccigrep is a semantic grep for the C language based on coccinelle. It can be used to find where a given structure is used in code files. coccigrep depends on the spatch program which comes with coccinelle. quick contrived example to find lines referencing m_len of a struct mbuf, regardless of actual variable name: $ coccigrep -t "struct mbuf" -a m_len /sys/netinet/ip_*.c
13 lines
489 B
Plaintext
13 lines
489 B
Plaintext
$OpenBSD: patch-src_coccigrep_py,v 1.1.1.1 2011/09/15 20:20:06 sthen Exp $
|
|
--- src/coccigrep.py.orig Sun Sep 4 22:34:12 2011
|
|
+++ src/coccigrep.py Wed Sep 7 01:09:50 2011
|
|
@@ -77,7 +77,7 @@ class CocciRunException(CocciException):
|
|
_CONF_FILES = tuple((path.join(dirname, name_format % 'coccigrep')
|
|
for dirname, name_format in
|
|
((path.dirname(__file__), '%s.cfg'),
|
|
- ('/etc', '%s'),
|
|
+ ('${SYSCONFDIR}', '%s'),
|
|
(path.expanduser('~'), '.%s'),
|
|
(getcwd(), '.%s'))))
|
|
|