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>2021-12-08 16:55:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-08 17:14:10 +0300
commit61776befc3f88c373e47ccbdf8c75e2ca0f4e987 (patch)
tree0214b7c5146300d41b7bcbe99f87c92599608e7f /source/blender/editors/space_text/text_format.h
parent8f1997975dc60bc1c18992458603ecd58dfded6d (diff)
Cleanup: move public doc-strings into headers for 'editors'
Ref T92709
Diffstat (limited to 'source/blender/editors/space_text/text_format.h')
-rw-r--r--source/blender/editors/space_text/text_format.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h
index fe7b3328030..01c40b4ed22 100644
--- a/source/blender/editors/space_text/text_format.h
+++ b/source/blender/editors/space_text/text_format.h
@@ -33,7 +33,9 @@ typedef struct FlattenString {
int pos, len;
} FlattenString;
-/* format continuation flags (stored just after the NULL terminator) */
+/**
+ * Format continuation flags (stored just after the NULL terminator).
+ */
enum {
FMT_CONT_NOP = 0, /* no continuation */
FMT_CONT_QUOTESINGLE = (1 << 0), /* single quotes */
@@ -48,10 +50,27 @@ enum {
int flatten_string(const struct SpaceText *st, FlattenString *fs, const char *in);
void flatten_string_free(FlattenString *fs);
+/**
+ * Takes a string within `fs->buf` and returns its length.
+ */
int flatten_string_strlen(FlattenString *fs, const char *str);
+/**
+ * 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);
+/**
+ * Fill the string with formatting constant,
+ * advancing \a str_p and \a fmt_p
+ *
+ * \param len: length in bytes of \a fmt_p to fill.
+ */
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len);
+/**
+ * ASCII version of #text_format_fill,
+ * use when we no the text being stepped over is ascii (as is the case for most keywords)
+ */
void text_format_fill_ascii(const char **str_p, char **fmt_p, const char type, const int len);
/* *** Generalize Formatting *** */