version 1.23, 1999/11/11 11:40:09 |
version 1.24, 1999/11/11 11:42:19 |
|
|
* Definitions for handling #include specifications |
* Definitions for handling #include specifications |
*/ |
*/ |
typedef struct IFile { |
typedef struct IFile { |
char *fname; /* name of previous file */ |
char *fname; /* name of previous file */ |
unsigned long lineno; /* saved line number */ |
unsigned long lineno; /* saved line number */ |
FILE *F; /* the open stream */ |
FILE *F; /* the open stream */ |
PTR *p; /* the char pointer */ |
PTR *p; /* the char pointer */ |
} IFile; |
} IFile; |
|
|
static Lst includes; /* stack of IFiles generated by |
static Lst includes; /* stack of IFiles generated by |
|
|
*--------------------------------------------------------------------- |
*--------------------------------------------------------------------- |
*/ |
*/ |
void |
void |
Parse_FromString(str) |
Parse_FromString(str, newlineno) |
char *str; |
char *str; |
|
unsigned long newlineno; |
{ |
{ |
IFile *oldFile; /* state associated with this file */ |
IFile *oldFile; /* state associated with this file */ |
|
|
|
|
curFILE = NULL; |
curFILE = NULL; |
curPTR = (PTR *) emalloc (sizeof (PTR)); |
curPTR = (PTR *) emalloc (sizeof (PTR)); |
curPTR->str = curPTR->ptr = str; |
curPTR->str = curPTR->ptr = str; |
lineno = 0; |
lineno = newlineno; |
fname = estrdup(fname); |
fname = estrdup(fname); |
} |
} |
|
|
|
|
(void) Lst_AtEnd (listmain, (ClientData)mainNode); |
(void) Lst_AtEnd (listmain, (ClientData)mainNode); |
return (listmain); |
return (listmain); |
} |
} |
|
|
|
unsigned long |
|
Parse_Getlineno() |
|
{ |
|
return lineno; |
|
} |
|
|