Fix up examples to run properly from the main source dir
diff --git a/examples/using_cpp_libc.py b/examples/using_cpp_libc.py
index e9b8a8b..89ca68c 100644
--- a/examples/using_cpp_libc.py
+++ b/examples/using_cpp_libc.py
@@ -5,7 +5,7 @@
# the 'real' cpp if you're on Linux/Unix) and "fake" libc includes
# to parse a file that includes standard C headers.
#
-# Copyright (C) 2008-2014, Eli Bendersky
+# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#-----------------------------------------------------------------
import sys
@@ -16,7 +16,7 @@
sys.path.extend(['.', '..'])
# Portable cpp path for Windows and Linux/Unix
-CPPPATH = '../utils/cpp.exe' if sys.platform == 'win32' else 'cpp'
+CPPPATH = 'utils/cpp.exe' if sys.platform == 'win32' else 'cpp'
from pycparser import parse_file
@@ -25,10 +25,10 @@
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
- filename = 'c_files/year.c'
+ filename = 'examples/c_files/year.c'
ast = parse_file(filename, use_cpp=True,
cpp_path=CPPPATH,
- cpp_args=r'-I../utils/fake_libc_include')
+ cpp_args=r'-Iutils/fake_libc_include')
ast.show()