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. 19extern 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. 28extern void suffix_set(const char *suffix); 29