Lines Matching defs:suffix

3 /// \file       suffix.c
4 /// \brief Checks filename suffix and creates the destination filename
19 // For case-insensitive filename suffix on case-insensitive systems
53 /// \brief Test for special suffix used for 8.3 short filenames (SFN)
79 /// \param suffix Filename suffix to look for
83 /// \return If src_name has the suffix, src_len - strlen(suffix) is
87 test_suffix(const char *suffix, const char *src_name, size_t src_len)
89 const size_t suffix_len = strlen(suffix);
92 // the suffix. src_name may contain path to the filename, so we
98 if (strcmp(suffix, src_name + src_len - suffix_len) == 0)
105 /// \brief Removes the filename suffix of the compressed file
108 /// suffix.
134 "--suffix=.SUF is required unless "
164 message_warning(_("%s: Filename has an unknown suffix, "
183 msg_suffix(const char *src_name, const char *suffix)
185 message_warning(_("%s: File already has `%s' suffix, skipping"),
186 src_name, suffix);
191 /// \brief Appends suffix to src_name
218 // --format=raw requires specifying the suffix
239 // Recognize also the special suffix that is used when long
240 // filename (LFN) support isn't available. This suffix is
256 // since the suffix handling when decoding is weird now.
259 "--suffix=.SUF is required unless "
264 const char *suffix = custom_suffix != NULL
266 size_t suffix_len = strlen(suffix);
273 // Look for suffix separator from the filename, and make sure
291 && suffix[0] == '.')
306 suffix = tar_suffixes[format];
312 // Instead of the .xz suffix, use a single
323 suffix = "-";
327 if (suffix[0] == '.') {
328 // The first character of the suffix is a dot.
330 // and replace it with the new suffix.
338 // The first character of the suffix is not
349 // Truncate the suffix to three chars:
365 memcpy(dest_name + src_len, suffix, suffix_len);
378 // the string to compare the suffix, so calculate the length here.
388 suffix_set(const char *suffix)
390 // Empty suffix and suffixes having a directory separator are
392 if (suffix[0] == '\0' || has_dir_sep(suffix))
393 message_fatal(_("%s: Invalid filename suffix"), suffix);
395 // Replace the old custom_suffix (if any) with the new suffix.
397 custom_suffix = xstrdup(suffix);