]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/wordlist.cc
f508bb5a09cd62f3a4f814b76eb9223411a251ad
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 03 Configuration File Parsing */
16 wordlistDestroy(wordlist
** list
)
18 while (*list
!= nullptr) {
19 const char *k
= wordlistChopHead(list
);
25 wordlistAdd(wordlist
** list
, const char *key
)
28 list
= &(*list
)->next
;
30 *list
= new wordlist(key
);
35 wordlistJoin(wordlist
** list
, wordlist
** wl
)
38 list
= &(*list
)->next
;
46 wordlistAddWl(wordlist
** list
, wordlist
* wl
)
49 list
= &(*list
)->next
;
51 for (; wl
; wl
= wl
->next
, list
= &(*list
)->next
) {
52 *list
= new wordlist(wl
->key
);
57 wordlistCat(const wordlist
* w
, MemBuf
* mb
)
60 mb
->appendf("%s\n", w
->key
);
66 ToSBufList(wordlist
*wl
)
70 rv
.push_back(SBuf(wl
->key
));
77 wordlistChopHead(wordlist
**wl
)