diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:17:13 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:17:13 -0800 |
commit | 374312cde4d44f8849d602cc5c9ea634798b9c50 (patch) | |
tree | 613d618b52059c61b6dcbaa9f8863ecd0086c0d8 /include | |
parent | c5593142f750bc440b2d6a0952deaeb769bc6c57 (diff) | |
download | nasm-374312cde4d44f8849d602cc5c9ea634798b9c50.tar.gz nasm-374312cde4d44f8849d602cc5c9ea634798b9c50.tar.xz nasm-374312cde4d44f8849d602cc5c9ea634798b9c50.zip |
strlist, warnings: improve strlist, buffer warnings until error
Make strlist_free() take a pointer to a pointer, so we can set it to
NULL.
Buffer warnings on a strlist until we either get an error or we are in
pass 2. Hopefully this should let us get rid of a lot of the ERR_PASS*
bullshit, which far too often causes messages to get lost.
asm/labels.c contains one example of a warning that cannot be made
correct with a specific pass number.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/strlist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/strlist.h b/include/strlist.h index b0e2919b..610aad4d 100644 --- a/include/strlist.h +++ b/include/strlist.h @@ -71,7 +71,6 @@ static inline size_t strlist_size(const struct strlist *list) } struct strlist safe_alloc *strlist_alloc(bool uniq); -void strlist_free(struct strlist *list); const struct strlist_entry * never_null strlist_add(struct strlist *list, const char *str); const struct strlist_entry * printf_func(2, 3) never_null strlist_printf(struct strlist *list, const char *fmt, ...); @@ -80,7 +79,8 @@ const struct strlist_entry * never_null const struct strlist_entry * strlist_find(const struct strlist *list, const char *str); void * safe_alloc strlist_linearize(const struct strlist *list, char sep); -void strlist_free(struct strlist *list); +void strlist_write(const struct strlist *list, const char *sep, FILE *f); +void strlist_free(struct strlist **listp); #define strlist_for_each(p,h) list_for_each((p), strlist_head(h)) #endif /* NASM_STRLIST_H */ |