Rizin
unix-like reverse engineering framework and cli tools
|
Checks filename suffix and creates the destination filename. More...
Go to the source code of this file.
Functions | |
char * | suffix_get_dest_name (const char *src_name) |
Get the name of the destination file. More... | |
void | suffix_set (const char *suffix) |
Set a custom filename suffix. More... | |
Checks filename suffix and creates the destination filename.
Definition in file suffix.h.
char* suffix_get_dest_name | ( | const char * | src_name | ) |
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.
Definition at line 373 of file suffix.c.
References assert(), compressed_name(), MODE_COMPRESS, NULL, opt_mode, and uncompressed_name().
Referenced by io_open_dest_real().
void suffix_set | ( | const char * | suffix | ) |
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.
Definition at line 388 of file suffix.c.
References _, custom_suffix, free(), has_dir_sep(), message_fatal(), suffix, and xstrdup().
Referenced by parse_real().