1 /* EINA - EFL data type library
2 * Copyright (C) 2015 Vincent Torri
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 2.1 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 Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef EINA_FILE_INLINE_H_
20 #define EINA_FILE_INLINE_H_
21
22 static inline size_t
eina_file_path_join_len(char * dst,size_t size,const char * a,size_t a_len,const char * b,size_t b_len)23 eina_file_path_join_len(char *dst,
24 size_t size,
25 const char *a,
26 size_t a_len,
27 const char *b,
28 size_t b_len)
29 {
30 return eina_str_join_len(dst, size, EINA_PATH_SEP_C, a, a_len, b, b_len);
31 }
32
33 static inline size_t
eina_file_path_join(char * dst,size_t size,const char * a,const char * b)34 eina_file_path_join(char *dst, size_t size, const char *a, const char *b)
35 {
36 return eina_file_path_join_len(dst, size, a, strlen(a), b, strlen(b));
37 }
38
39 /**
40 * @}
41 */
42
43 #endif /* EINA_FILE_INLINE_H_ */
44