* Create help for explaining how encrypted password file support
[alpine.git] / pith / strlst.c
blob52b28bca65a7690cb2421189da95f1f7a3664c1e
1 #if !defined(lint) && !defined(DOS)
2 static char rcsid[] = "$Id: strlst.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
3 #endif
5 /*
6 * ========================================================================
7 * Copyright 2006 University of Washington
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * ========================================================================
18 /*======================================================================
20 strlst.c
21 Implements STRINGLIST creation destruction routines
23 ====*/
26 #include "../pith/headers.h"
27 #include "../pith/strlst.h"
30 STRINGLIST *
31 new_strlst(char **l)
33 STRINGLIST *sl = mail_newstringlist();
35 sl->text.data = (unsigned char *) (*l);
36 sl->text.size = strlen(*l);
37 sl->next = (*++l) ? new_strlst(l) : NULL;
38 return(sl);
42 void
43 free_strlst(struct string_list **sl)
45 if(*sl){
46 if((*sl)->next)
47 free_strlst(&(*sl)->next);
49 fs_give((void **) sl);