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:
authorCampbell Barton <ideasman42@gmail.com>2012-12-29 06:57:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-29 06:57:52 +0400
commitc157f815a84b039a59d80fa5ece89c11b59274c9 (patch)
tree3654609cd446c1e25adeabd7e26d030084210da0 /source/blender/editors/space_text/text_format.c
parent6b05c887d3395e6377a24e0fdac6500a61d594c7 (diff)
code cleanup
Diffstat (limited to 'source/blender/editors/space_text/text_format.c')
-rw-r--r--source/blender/editors/space_text/text_format.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_text/text_format.c b/source/blender/editors/space_text/text_format.c
index 0b3856f4414..f7940fc7894 100644
--- a/source/blender/editors/space_text/text_format.c
+++ b/source/blender/editors/space_text/text_format.c
@@ -113,6 +113,14 @@ void flatten_string_free(FlattenString *fs)
MEM_freeN(fs->accum);
}
+/* takes a string within fs->buf and returns its length */
+int flatten_string_strlen(FlattenString *fs, const char *str)
+{
+ const int len = (fs->pos - (int)(str - fs->buf)) - 1;
+ BLI_assert(strlen(str) == len);
+ return len;
+}
+
/* Ensures the format string for the given line is long enough, reallocating
* as needed. Allocation is done here, alone, to ensure consistency. */
int text_check_format_len(TextLine *line, unsigned int len)