Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r--source/blender/blenlib/intern/path_util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index dff1f77c1ab..cd1a0e2c328 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -157,6 +157,20 @@ void BLI_stringenc(
sprintf(string, "%s%.*d%s", head, numlen, MAX2(0, pic), tail);
}
+/**
+ * Returns in area pointed to by string a string of the form "<dir><head><pic><tail>", where pic
+ * is formatted as numlen digits with leading zeroes.
+ */
+void BLI_stringenc_path(char *string,
+ const char *dir,
+ const char *head,
+ const char *tail,
+ unsigned short numlen,
+ int pic)
+{
+ sprintf(string, "%s%s%.*d%s", dir, head, numlen, MAX2(0, pic), tail);
+}
+
static int BLI_path_unc_prefix_len(const char *path); /* defined below in same file */
/* ******************** string encoding ***************** */