]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/wordlist.cc
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
)
20 while ((w
= *list
) != NULL
) {
30 wordlistAdd(wordlist
** list
, const char *key
)
33 list
= &(*list
)->next
;
37 (*list
)->key
= xstrdup(key
);
45 wordlistJoin(wordlist
** list
, wordlist
** wl
)
48 list
= &(*list
)->next
;
56 wordlistAddWl(wordlist
** list
, wordlist
* wl
)
59 list
= &(*list
)->next
;
61 for (; wl
; wl
= wl
->next
, list
= &(*list
)->next
) {
62 *list
= new wordlist();
63 (*list
)->key
= xstrdup(wl
->key
);
69 wordlistCat(const wordlist
* w
, MemBuf
* mb
)
72 mb
->Printf("%s\n", w
->key
);
78 wordlistDup(const wordlist
* w
)
83 wordlistAdd(&D
, w
->key
);
91 ToSBufList(wordlist
*wl
)
95 rv
.push_back(SBuf(wl
->key
));