codeview: Look up %include path when determining files to hash.
commit86d8756f0cd255e91c8ef8a4de1ebae3c18d30f3
authorFabian Giesen <fabiang@radgametools.com>
Thu, 28 Apr 2016 20:48:14 +0000 (28 13:48 -0700)
committerCyrill Gorcunov <gorcunov@gmail.com>
Tue, 10 May 2016 09:01:08 +0000 (10 12:01 +0300)
tree8924c617c754220356a0196c2554fe477a67deeb
parent31c97fb89e2cdf5638b863f8dc05c1041a7ddd1d
codeview: Look up %include path when determining files to hash.

The hash calculation in calc_md5 tries to open the source file via
"filename" again. For %includes, this is the file name that was
specified in the %include directive, not the actual name of the file
that was opened by the preprocessor. In other words, this fails if the
include file is not in the current working directory.

Add pp_input_fopen that uses the preprocessor include path lookup
code to resolve a file name and open it, and use that in codeview.c.

Signed-off-by: Fabian Giesen <fabiang@radgametools.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
output/codeview.c
preproc.c
preproc.h