summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/str.h')
-rw-r--r--usr.bin/make/str.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/usr.bin/make/str.h b/usr.bin/make/str.h
index b50ed6c..8f74f76 100644
--- a/usr.bin/make/str.h
+++ b/usr.bin/make/str.h
@@ -45,6 +45,18 @@
struct Buffer;
+/**
+ * An array of c-strings. The pointers stored in argv, point to
+ * strings stored in buffer.
+ */
+typedef struct ArgArray {
+ int size; /* size of argv array */
+ int argc; /* strings referenced in argv */
+ char **argv; /* array of string pointers */
+ size_t len; /* size of buffer */
+ char *buffer; /* data buffer */
+} ArgArray;
+
/*
* These constants are all used by the Str_Concat function to decide how the
* final string should look. If STR_ADDSPACE is given, a space will be
@@ -55,11 +67,12 @@ struct Buffer;
#define STR_ADDSPACE 0x01 /* add a space when Str_Concat'ing */
#define STR_ADDSLASH 0x04 /* add a slash when Str_Concat'ing */
-void str_init(void);
+void ArgArray_Done(ArgArray *);
+
char *str_concat(const char *, const char *, int);
-char **brk_string(const char *, int *, Boolean);
+void brk_string(ArgArray *, const char [], Boolean);
char *MAKEFLAGS_quote(const char *);
-char **MAKEFLAGS_break(const char *, int *);
+void MAKEFLAGS_break(ArgArray *, const char []);
int Str_Match(const char *, const char *);
const char *Str_SYSVMatch(const char *, const char *, int *);
void Str_SYSVSubst(struct Buffer *, const char *, const char *, int);
OpenPOWER on IntegriCloud