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 ///////////////////////////////////////////////////////////////////////////////
20 /// \brief Get the name of the destination file
22 /// Depending on the global variable opt_mode, this tries to find a matching
23 /// counterpart for src_name. If the name can be constructed, it is allocated
24 /// and returned (caller must free it). On error, a message is printed and
26 extern char *suffix_get_dest_name(const char *src_name);
29 /// \brief Set a custom filename suffix
31 /// This function calls xstrdup() for the given suffix, thus the caller
32 /// doesn't need to keep the memory allocated. There can be only one custom
33 /// suffix, thus if this is called multiple times, the old suffixes are freed
35 extern void suffix_set(const char *suffix);