1/* Construct a full filename from a directory and a relative filename.
2 Copyright (C) 2001-2004, 2007-2019 Free Software Foundation, Inc.
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program 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
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16
17#ifndef _CONCAT_FILENAME_H
18#define _CONCAT_FILENAME_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24
25/* Concatenate a directory filename, a relative filename and an optional
26 suffix. Return a freshly allocated filename. Return NULL and set errno
27 upon memory allocation failure. */
28extern char *concatenated_filename (const char *directory,
29 const char *filename, const char *suffix);
30
31/* Concatenate a directory filename, a relative filename and an optional
32 suffix. Return a freshly allocated filename. */
33extern char *xconcatenated_filename (const char *directory,
34 const char *filename, const char *suffix);
35
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif /* _CONCAT_FILENAME_H */
42