]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/xz/src/xz/suffix.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / xz / src / xz / suffix.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       suffix.h
4 /// \brief      Checks filename suffix and creates the destination filename
5 //
6 //  Author:     Lasse Collin
7 //
8 //  This file has been put into the public domain.
9 //  You can do whatever you want with this file.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12
13 /// \brief      Get the name of the destination file
14 ///
15 /// Depending on the global variable opt_mode, this tries to find a matching
16 /// counterpart for src_name. If the name can be constructed, it is allocated
17 /// and returned (caller must free it). On error, a message is printed and
18 /// NULL is returned.
19 extern char *suffix_get_dest_name(const char *src_name);
20
21
22 /// \brief      Set a custom filename suffix
23 ///
24 /// This function calls xstrdup() for the given suffix, thus the caller
25 /// doesn't need to keep the memory allocated. There can be only one custom
26 /// suffix, thus if this is called multiple times, the old suffixes are freed
27 /// and forgotten.
28 extern void suffix_set(const char *suffix);