mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-02 15:25:48 +00:00
Add tlname variable to store pointer to name of file being parsed
This commit is contained in:
@@ -53,6 +53,7 @@ static int line;
|
|||||||
static int lpos;
|
static int lpos;
|
||||||
int tlpos;
|
int tlpos;
|
||||||
int tline;
|
int tline;
|
||||||
|
char *tlname;
|
||||||
static int token;
|
static int token;
|
||||||
static int ugflag;
|
static int ugflag;
|
||||||
static char *tval;
|
static char *tval;
|
||||||
|
@@ -183,15 +183,14 @@ int parse_warn (ANSI_DECL (char *) fmt, VA_DOTDOTDOT)
|
|||||||
KandR (char *fmt;)
|
KandR (char *fmt;)
|
||||||
va_dcl
|
va_dcl
|
||||||
{
|
{
|
||||||
extern int tline, tlpos;
|
|
||||||
va_list list;
|
va_list list;
|
||||||
|
|
||||||
do_percentm (mbuf, fmt);
|
do_percentm (mbuf, fmt);
|
||||||
#ifndef NO_SNPRINTF
|
#ifndef NO_SNPRINTF
|
||||||
snprintf (fbuf, sizeof fbuf, "dhcpd.conf line %d char %d: %s",
|
snprintf (fbuf, sizeof fbuf, "%s line %d char %d: %s",
|
||||||
tline, tlpos, mbuf);
|
tlname, tline, tlpos, mbuf);
|
||||||
#else
|
#else
|
||||||
sprintf (fbuf, "dhcpd.conf line %d char %d: %s", tline, tlpos, mbuf);
|
sprintf (fbuf, "%s line %d char %d: %s", tlname, tline, tlpos, mbuf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VA_start (list, fmt);
|
VA_start (list, fmt);
|
||||||
|
@@ -53,6 +53,7 @@ static int line;
|
|||||||
static int lpos;
|
static int lpos;
|
||||||
int tlpos;
|
int tlpos;
|
||||||
int tline;
|
int tline;
|
||||||
|
char *tlname;
|
||||||
static int token;
|
static int token;
|
||||||
static int ugflag;
|
static int ugflag;
|
||||||
static char *tval;
|
static char *tval;
|
||||||
|
2
dhcpd.h
2
dhcpd.h
@@ -266,6 +266,8 @@ int main PROTO ((int, char **, char **));
|
|||||||
void cleanup PROTO ((void));
|
void cleanup PROTO ((void));
|
||||||
|
|
||||||
/* conflex.c */
|
/* conflex.c */
|
||||||
|
extern int tline, tlpos;
|
||||||
|
extern char *tlname;
|
||||||
int next_token PROTO ((char **, FILE *));
|
int next_token PROTO ((char **, FILE *));
|
||||||
int peek_token PROTO ((char **, FILE *));
|
int peek_token PROTO ((char **, FILE *));
|
||||||
|
|
||||||
|
@@ -183,15 +183,14 @@ int parse_warn (ANSI_DECL (char *) fmt, VA_DOTDOTDOT)
|
|||||||
KandR (char *fmt;)
|
KandR (char *fmt;)
|
||||||
va_dcl
|
va_dcl
|
||||||
{
|
{
|
||||||
extern int tline, tlpos;
|
|
||||||
va_list list;
|
va_list list;
|
||||||
|
|
||||||
do_percentm (mbuf, fmt);
|
do_percentm (mbuf, fmt);
|
||||||
#ifndef NO_SNPRINTF
|
#ifndef NO_SNPRINTF
|
||||||
snprintf (fbuf, sizeof fbuf, "dhcpd.conf line %d char %d: %s",
|
snprintf (fbuf, sizeof fbuf, "%s line %d char %d: %s",
|
||||||
tline, tlpos, mbuf);
|
tlname, tline, tlpos, mbuf);
|
||||||
#else
|
#else
|
||||||
sprintf (fbuf, "dhcpd.conf line %d char %d: %s", tline, tlpos, mbuf);
|
sprintf (fbuf, "%s line %d char %d: %s", tlname, tline, tlpos, mbuf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VA_start (list, fmt);
|
VA_start (list, fmt);
|
||||||
|
@@ -266,6 +266,8 @@ int main PROTO ((int, char **, char **));
|
|||||||
void cleanup PROTO ((void));
|
void cleanup PROTO ((void));
|
||||||
|
|
||||||
/* conflex.c */
|
/* conflex.c */
|
||||||
|
extern int tline, tlpos;
|
||||||
|
extern char *tlname;
|
||||||
int next_token PROTO ((char **, FILE *));
|
int next_token PROTO ((char **, FILE *));
|
||||||
int peek_token PROTO ((char **, FILE *));
|
int peek_token PROTO ((char **, FILE *));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user