1 /* GNU Mailutils -- a suite of utilities for electronic mail
2    Copyright (C) 1999-2021 Free Software Foundation, Inc.
3 
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 3 of the License, or (at your option) any later version.
8 
9    This library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13 
14    You should have received a copy of the GNU Lesser General
15    Public License along with this library.  If not, see
16    <http://www.gnu.org/licenses/>. */
17 
18 #ifndef _ARGCV_H
19 #define _ARGCV_H 1
20 
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 
26 #include <mailutils/types.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 void mu_argcv_free (size_t argc, char **argv);
33 void mu_argv_free (char **argv);
34 
35 enum mu_argcv_escape
36   {
37     mu_argcv_escape_no,
38     mu_argcv_escape_c
39     /*    mu_argcv_escape_sh */
40   };
41 
42 int mu_argcv_join (int argc, char **argv, char *delim,
43 		   enum mu_argcv_escape esc,
44 		   char **pstring);
45 void mu_argcv_remove (int *pargc, char ***pargv,
46 		      int (*sel) (const char *, void *), void *);
47 int mu_argcv_string (int argc, char **argv, char **string);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif /* _ARGCV_H */
54