11195Srgrimes///////////////////////////////////////////////////////////////////////////////
250472Speter//
337Srgrimes/// \file       suffix.h
4265420Simp/// \brief      Checks filename suffix and creates the destination filename
5156813Sru//
6298107Sgjb//  Author:     Lasse Collin
7298107Sgjb//
8296695Sbdrewery//  This file has been put into the public domain.
9296695Sbdrewery//  You can do whatever you want with this file.
10277541Sngie//
11277541Sngie///////////////////////////////////////////////////////////////////////////////
12277541Sngie
13156813Sru/// \brief      Get the name of the destination file
14277541Sngie///
1573251Sgshapiro/// Depending on the global variable opt_mode, this tries to find a matching
1638103Speter/// counterpart for src_name. If the name can be constructed, it is allocated
17277728Sngie/// and returned (caller must free it). On error, a message is printed and
18231849Seadler/// NULL is returned.
19231849Seadlerextern char *suffix_get_dest_name(const char *src_name);
20231849Seadler
21231849Seadler
22231849Seadler/// \brief      Set a custom filename suffix
23231849Seadler///
24231849Seadler/// This function calls xstrdup() for the given suffix, thus the caller
25231849Seadler/// doesn't need to keep the memory allocated. There can be only one custom
26231849Seadler/// suffix, thus if this is called multiple times, the old suffixes are freed
27231849Seadler/// and forgotten.
28231849Seadlerextern void suffix_set(const char *suffix);
29231849Seadler