Fix up examples to run properly from the main source dir
diff --git a/examples/func_calls.py b/examples/func_calls.py
index f56f153..72c64d3 100644
--- a/examples/func_calls.py
+++ b/examples/func_calls.py
@@ -4,7 +4,7 @@
# Using pycparser for printing out all the calls of some function
# in a C file.
#
-# Copyright (C) 2008-2011, Eli Bendersky
+# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#-----------------------------------------------------------------
from __future__ import print_function
@@ -12,7 +12,6 @@
# This is not required if you've installed pycparser into
# your site-packages/ with setup.py
-#
sys.path.extend(['.', '..'])
from pycparser import c_parser, c_ast, parse_file
@@ -27,8 +26,7 @@
def visit_FuncCall(self, node):
if node.name.name == self.funcname:
- print('%s called at %s' % (
- self.funcname, node.name.coord))
+ print('%s called at %s' % (self.funcname, node.name.coord))
def show_func_calls(filename, funcname):
@@ -42,7 +40,7 @@
filename = sys.argv[1]
func = sys.argv[2]
else:
- filename = 'c_files/hash.c'
+ filename = 'examples/c_files/hash.c'
func = 'malloc'
show_func_calls(filename, func)