Move some debugging code from targ.c to var.c where it actually belongs.
Patch: 7.192 Submitted by: Max Okumoto <okumoto@ucsd.edu>
This commit is contained in:
parent
59c2113e23
commit
aa97603f28
@ -480,11 +480,7 @@ Targ_PrintGraph(int pass)
|
||||
printf("#\t%s [%s]\n", gn->name,
|
||||
gn->path ? gn->path : gn->name);
|
||||
}
|
||||
|
||||
printf("#*** Global Variables:\n");
|
||||
Var_Dump(VAR_GLOBAL);
|
||||
printf("#*** Command-line Variables:\n");
|
||||
Var_Dump(VAR_CMD);
|
||||
Var_Dump();
|
||||
printf("\n");
|
||||
Dir_PrintDirectories();
|
||||
printf("\n");
|
||||
|
@ -182,8 +182,8 @@ VarCreate(const char name[], const char value[], int flags)
|
||||
* Destroy a Var object.
|
||||
*
|
||||
* Params:
|
||||
* v Object to destroy.
|
||||
* f True if internal buffer in Buffer object is to be removed.
|
||||
* v Object to destroy.
|
||||
* f True if internal buffer in Buffer object is to be removed.
|
||||
*/
|
||||
static void
|
||||
VarDestroy(Var *v, Boolean f)
|
||||
@ -2029,13 +2029,21 @@ Var_Init(char **env)
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
Var_Dump(const GNode *ctxt)
|
||||
Var_Dump(void)
|
||||
{
|
||||
const LstNode *ln;
|
||||
const Var *v;
|
||||
|
||||
LST_FOREACH(ln, &ctxt->context) {
|
||||
printf("#*** Global Variables:\n");
|
||||
LST_FOREACH(ln, &VAR_GLOBAL->context) {
|
||||
v = Lst_Datum(ln);
|
||||
printf("%-16s = %s\n", v->name, Buf_Data(v->val));
|
||||
}
|
||||
|
||||
printf("#*** Command-line Variables:\n");
|
||||
LST_FOREACH(ln, &VAR_CMD->context) {
|
||||
v = Lst_Datum(ln);
|
||||
printf("%-16s = %s\n", v->name, Buf_Data(v->val));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ typedef Boolean VarModifyProc(const char *, Boolean, struct Buffer *, void *);
|
||||
void VarREError(int, regex_t *, const char *);
|
||||
void Var_Append(const char *, const char *, struct GNode *);
|
||||
void Var_Delete(const char *, struct GNode *);
|
||||
void Var_Dump(const struct GNode *);
|
||||
void Var_Dump(void);
|
||||
Boolean Var_Exists(const char *, struct GNode *);
|
||||
void Var_Init(char **);
|
||||
size_t Var_Match(const char [], struct GNode *);
|
||||
|
Loading…
Reference in New Issue
Block a user