1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Checks filename suffix and creates the destination filename
6 // Copyright (C) 2007 Lasse Collin
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.
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.
18 ///////////////////////////////////////////////////////////////////////////////
23 /// \brief Get the name of the destination file
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
29 extern char *suffix_get_dest_name(const char *src_name);
32 /// \brief Set a custom filename suffix
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
38 extern void suffix_set(const char *suffix);