libssh  0.9.4
The SSH library
token.h
1 /*
2  * token.h - Tokens list handling
3  *
4  * This file is part of the SSH Library
5  *
6  * Copyright (c) 2019 by Red Hat, Inc.
7  *
8  * Author: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
9  *
10  * The SSH Library is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation; either version 2.1 of the License, or (at your
13  * option) any later version.
14  *
15  * The SSH Library is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with the SSH Library; see the file COPYING. If not, write to
22  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23  * MA 02111-1307, USA.
24  */
25 
26 #ifndef TOKEN_H_
27 #define TOKEN_H_
28 
29 struct ssh_tokens_st {
30  char *buffer;
31  char **tokens;
32 };
33 
34 struct ssh_tokens_st *ssh_tokenize(const char *chain, char separator);
35 
36 void ssh_tokens_free(struct ssh_tokens_st *tokens);
37 
38 char *ssh_find_matching(const char *available_d,
39  const char *preferred_d);
40 
41 char *ssh_find_all_matching(const char *available_d,
42  const char *preferred_d);
43 
44 char *ssh_remove_duplicates(const char *list);
45 
46 char *ssh_append_without_duplicates(const char *list,
47  const char *appended_list);
48 #endif /* TOKEN_H_ */
Definition: token.h:29