nestlevel count per file
This commit is contained in:
parent
b630da3424
commit
e5af61151e
4 changed files with 4 additions and 2 deletions
|
@ -31,7 +31,6 @@ IMPORT char *getwdir();
|
|||
PRIVATE char ifstack[IFDEPTH]; /* if-stack: the content of an entry is */
|
||||
/* 1 if a corresponding ELSE has been */
|
||||
/* encountered. */
|
||||
int nestlevel = -1; /* initially no nesting level. */
|
||||
|
||||
PRIVATE struct idf *
|
||||
GetIdentifier()
|
||||
|
@ -250,6 +249,7 @@ do_include()
|
|||
File_Inserted = 1;
|
||||
FileName = result;
|
||||
LineNumber = 0;
|
||||
nestlevel = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
|
||||
struct file_info {
|
||||
unsigned int fil_lino;
|
||||
int fil_nestlevel;
|
||||
char *fil_name;
|
||||
char *fil_wdir;
|
||||
};
|
||||
|
||||
#define nestlevel finfo.fil_nestlevel
|
||||
#define LineNumber finfo.fil_lino
|
||||
#define FileName finfo.fil_name
|
||||
#define WorkingDir finfo.fil_wdir
|
||||
|
|
|
@ -53,7 +53,6 @@ AtEoIT()
|
|||
AtEoIF()
|
||||
{
|
||||
#ifndef NOPP
|
||||
extern int nestlevel;
|
||||
|
||||
if (nestlevel != -1) lexwarning("missing #endif");
|
||||
else
|
||||
|
|
|
@ -171,6 +171,7 @@ compile(argc, argv)
|
|||
File_Inserted = 1;
|
||||
init();
|
||||
LineNumber = 0;
|
||||
nestlevel = -1;
|
||||
#ifndef NOPP
|
||||
WorkingDir = getwdir(source);
|
||||
#endif NOPP
|
||||
|
|
Loading…
Reference in a new issue