]> icculus.org git repositories - icculus/xz.git/blob - src/xz/suffix.h
Renamed lzma to xz and lzmadec to xzdec. We create symlinks
[icculus/xz.git] / src / xz / suffix.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       suffix.h
4 /// \brief      Checks filename suffix and creates the destination filename
5 //
6 //  Copyright (C) 2007 Lasse Collin
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Lesser General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2.1 of the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Lesser General Public License for more details.
17 //
18 ///////////////////////////////////////////////////////////////////////////////
19
20 #ifndef SUFFIX_H
21 #define SUFFIX_H
22
23 /// \brief      Get the name of the destination file
24 ///
25 /// Depending on the global variable opt_mode, this tries to find a matching
26 /// counterpart for src_name. If the name can be constructed, it is allocated
27 /// and returned (caller must free it). On error, a message is printed and
28 /// NULL is returned.
29 extern char *suffix_get_dest_name(const char *src_name);
30
31
32 /// \brief      Set a custom filename suffix
33 ///
34 /// This function calls xstrdup() for the given suffix, thus the caller
35 /// doesn't need to keep the memory allocated. There can be only one custom
36 /// suffix, thus if this is called multiple times, the old suffixes are freed
37 /// and forgotten.
38 extern void suffix_set(const char *suffix);
39
40 #endif