diff options
author | Paul Smith <psmith@gnu.org> | 2009-09-16 17:07:01 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2009-09-16 17:07:01 +0000 |
commit | 8f30b68871bde8687c7fcff8bac66e2b5765129e (patch) | |
tree | 78e7e64f0c47dff023bebe15ee57b85f8db6a826 /dep.h | |
parent | 5abe47762071f024409f7fd16c9cb76b31833379 (diff) | |
download | gunmake-8f30b68871bde8687c7fcff8bac66e2b5765129e.tar.gz |
- Add xcalloc() and call it
- Fix memory errors found by valgrind
- Remove multi_glob() and empower parse_file_seq() to do its job:
the goal here is to remove the confusing reverse/re-reverse we do on
the file lists: needed for future fixes.
- Add a prefix arg to parse_file_seq()
- Make concat() variadic so it can take arbitrary #'s of strings
Diffstat (limited to 'dep.h')
-rw-r--r-- | dep.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -55,22 +55,30 @@ struct nameseq }; -struct nameseq *multi_glob (struct nameseq *chain, unsigned int size, int exists_only); +#define PARSEFS_NONE (0x0000) +#define PARSEFS_NOSTRIP (0x0001) +#define PARSEFS_NOGLOB (0x0002) +#define PARSEFS_EXISTS (0x0004) +#define PARSEFS_NOCACHE (0x0008) + #ifdef VMS struct nameseq *parse_file_seq (); #else -struct nameseq *parse_file_seq (char **stringp, int stopchar, unsigned int size, int strip); +struct nameseq *parse_file_seq (char **stringp, unsigned int size, + int stopchar, const char *prefix, int flags); #endif + char *tilde_expand (const char *name); #ifndef NO_ARCHIVES struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size); #endif -#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name) +#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name) + +#define alloc_dep() (xcalloc (sizeof (struct dep))) +#define free_dep(_d) free (_d) -struct dep *alloc_dep (void); -void free_dep (struct dep *d); struct dep *copy_dep_chain (const struct dep *d); void free_dep_chain (struct dep *d); void free_ns_chain (struct nameseq *n); |