aboutsummaryrefslogtreecommitdiff
path: root/nonints.h
diff options
context:
space:
mode:
Diffstat (limited to 'nonints.h')
-rw-r--r--nonints.h58
1 files changed, 37 insertions, 21 deletions
diff --git a/nonints.h b/nonints.h
index 41194f104f13..38ac0c85518b 100644
--- a/nonints.h
+++ b/nonints.h
@@ -1,6 +1,6 @@
-/* $NetBSD: nonints.h,v 1.186 2020/12/28 00:46:24 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.202 2021/02/05 05:15:12 rillig Exp $ */
-/*-
+/*
* Copyright (c) 1988, 1989, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -34,7 +34,7 @@
* from: @(#)nonints.h 8.3 (Berkeley) 3/19/94
*/
-/*-
+/*
* Copyright (c) 1989 by Berkeley Softworks
* All rights reserved.
*
@@ -107,7 +107,11 @@ str_basename(const char *pathname)
MAKE_INLINE SearchPath *
SearchPath_New(void)
-{ return Lst_New(); }
+{
+ SearchPath *path = bmake_malloc(sizeof *path);
+ Lst_Init(&path->dirs);
+ return path;
+}
void SearchPath_Free(SearchPath *);
@@ -282,6 +286,7 @@ const char *Targ_FmtTime(time_t);
void Targ_PrintType(int);
void Targ_PrintGraph(int);
void Targ_Propagate(void);
+const char *GNodeMade_Name(GNodeMade);
/* var.c */
void Var_Init(void);
@@ -290,26 +295,28 @@ void Var_End(void);
typedef enum VarEvalFlags {
VARE_NONE = 0,
- /* Expand and evaluate variables during parsing.
+ /*
+ * Expand and evaluate variables during parsing.
*
* TODO: Document what Var_Parse and Var_Subst return when this flag
- * is not set. */
+ * is not set.
+ */
VARE_WANTRES = 1 << 0,
- /* Treat undefined variables as errors.
- * Must only be used in combination with VARE_WANTRES. */
+ /*
+ * Treat undefined variables as errors.
+ * Must only be used in combination with VARE_WANTRES.
+ */
VARE_UNDEFERR = 1 << 1,
- /* Keep '$$' as '$$' instead of reducing it to a single '$'.
+ /*
+ * Keep '$$' as '$$' instead of reducing it to a single '$'.
*
* Used in variable assignments using the ':=' operator. It allows
* multiple such assignments to be chained without accidentally
* expanding '$$file' to '$file' in the first assignment and
* interpreting it as '${f}' followed by 'ile' in the next assignment.
- *
- * See also preserveUndefined, which preserves subexpressions that are
- * based on undefined variables; maybe that can be converted to a flag
- * as well. */
+ */
VARE_KEEP_DOLLAR = 1 << 2,
/*
@@ -369,15 +376,19 @@ typedef enum VarExportMode {
VEM_LITERAL
} VarExportMode;
-void Var_DeleteVar(const char *, GNode *);
-void Var_Delete(const char *, GNode *);
+void Var_Delete(GNode *, const char *);
+void Var_DeleteExpand(GNode *, const char *);
void Var_Undef(const char *);
-void Var_Set(const char *, const char *, GNode *);
-void Var_SetWithFlags(const char *, const char *, GNode *, VarSetFlags);
-void Var_Append(const char *, const char *, GNode *);
-Boolean Var_Exists(const char *, GNode *);
-FStr Var_Value(const char *, GNode *);
-const char *Var_ValueDirect(const char *, GNode *);
+void Var_Set(GNode *, const char *, const char *);
+void Var_SetExpand(GNode *, const char *, const char *);
+void Var_SetWithFlags(GNode *, const char *, const char *, VarSetFlags);
+void Var_SetExpandWithFlags(GNode *, const char *, const char *, VarSetFlags);
+void Var_Append(GNode *, const char *, const char *);
+void Var_AppendExpand(GNode *, const char *, const char *);
+Boolean Var_Exists(GNode *, const char *);
+Boolean Var_ExistsExpand(GNode *, const char *);
+FStr Var_Value(GNode *, const char *);
+const char *GNode_ValueDirect(GNode *, const char *);
VarParseResult Var_Parse(const char **, GNode *, VarEvalFlags, FStr *);
VarParseResult Var_Subst(const char *, GNode *, VarEvalFlags, char **);
void Var_Stats(void);
@@ -387,6 +398,11 @@ void Var_Export(VarExportMode, const char *);
void Var_ExportVars(const char *);
void Var_UnExport(Boolean, const char *);
+void Global_Set(const char *, const char *);
+void Global_SetExpand(const char *, const char *);
+void Global_Append(const char *, const char *);
+void Global_Delete(const char *);
+
/* util.c */
typedef void (*SignalProc)(int);
SignalProc bmake_signal(int, SignalProc);