Add more debug code into swig internals
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
023d597862
commit
1ca411b423
4 changed files with 30 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ static List *directories = 0; /* List of include directories */
|
|||
static String *lastpath = 0; /* Last file that was included */
|
||||
static List *pdirectories = 0; /* List of pushed directories */
|
||||
static int dopush = 1; /* Whether to push directories */
|
||||
static int file_debug = 1;
|
||||
|
||||
/* This functions determine whether to push/pop dirs in the preprocessor */
|
||||
void Swig_set_push_dir(int push) {
|
||||
|
|
@ -173,6 +174,9 @@ static FILE *Swig_open_file(const_String_or_char_ptr name, int sysfile, int use_
|
|||
cname = Char(name);
|
||||
filename = NewString(cname);
|
||||
assert(filename);
|
||||
if (file_debug) {
|
||||
Printf(stdout, " Open: %s\n", filename);
|
||||
}
|
||||
f = fopen(Char(filename), "r");
|
||||
if (!f && use_include_path) {
|
||||
spath = Swig_search_path_any(sysfile);
|
||||
|
|
@ -386,3 +390,10 @@ char *Swig_file_dirname(const_String_or_char_ptr filename) {
|
|||
*(++c) = 0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Swig_file_debug()
|
||||
*/
|
||||
void Swig_file_debug_set() {
|
||||
file_debug = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue