2007-12-08 17:42:33 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
/// \file suffix.h
|
|
|
|
/// \brief Checks filename suffix and creates the destination filename
|
|
|
|
//
|
2009-04-13 04:27:40 -04:00
|
|
|
// Author: Lasse Collin
|
2007-12-08 17:42:33 -05:00
|
|
|
//
|
2009-04-13 04:27:40 -04:00
|
|
|
// This file has been put into the public domain.
|
|
|
|
// You can do whatever you want with this file.
|
2007-12-08 17:42:33 -05:00
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-11-19 13:46:52 -05:00
|
|
|
/// \brief Get the name of the destination file
|
|
|
|
///
|
|
|
|
/// Depending on the global variable opt_mode, this tries to find a matching
|
|
|
|
/// counterpart for src_name. If the name can be constructed, it is allocated
|
|
|
|
/// and returned (caller must free it). On error, a message is printed and
|
|
|
|
/// NULL is returned.
|
|
|
|
extern char *suffix_get_dest_name(const char *src_name);
|
|
|
|
|
|
|
|
|
|
|
|
/// \brief Set a custom filename suffix
|
|
|
|
///
|
|
|
|
/// This function calls xstrdup() for the given suffix, thus the caller
|
|
|
|
/// doesn't need to keep the memory allocated. There can be only one custom
|
|
|
|
/// suffix, thus if this is called multiple times, the old suffixes are freed
|
|
|
|
/// and forgotten.
|
|
|
|
extern void suffix_set(const char *suffix);
|