diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-16 07:18:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-16 07:18:22 +0400 |
commit | a6d9bcd36d6e703b515e4d68dacdc9a0050b3719 (patch) | |
tree | 6b88d141fcc86f0e4d53764b10563e608d26506d /source/blender/editors/space_text/text_format.h | |
parent | e6e8bd5db42c8bc58aa5f439e2dbe479cb7e9834 (diff) |
text syntax highlighting, add utility function 'text_format_fill()' which fills in the line with a formatting value.
this fixes a mistake in OSL lexer which would comment all lines after '//'
Diffstat (limited to 'source/blender/editors/space_text/text_format.h')
-rw-r--r-- | source/blender/editors/space_text/text_format.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h index e593e41d42c..f19616a9947 100644 --- a/source/blender/editors/space_text/text_format.h +++ b/source/blender/editors/space_text/text_format.h @@ -49,18 +49,17 @@ enum { FMT_CONT_TRIPLE = (1 << 2), /* triplets of quotes: """ or ''' */ FMT_CONT_QUOTESINGLE_TRIPLE = (FMT_CONT_TRIPLE | FMT_CONT_QUOTESINGLE), FMT_CONT_QUOTEDOUBLE_TRIPLE = (FMT_CONT_TRIPLE | FMT_CONT_QUOTEDOUBLE), - FMT_CONT_COMMENT_C = (1 << 3), /* multi-line comments, OSL only (C style) */ - FMT_CONT_COMMENT_CXX = (1 << 4), /* single-line comments, OSL only (C++ style) */ + FMT_CONT_COMMENT_C = (1 << 3) /* multi-line comments, OSL only (C style) */ }; #define FMT_CONT_ALL \ - (FMT_CONT_QUOTESINGLE | FMT_CONT_QUOTEDOUBLE | FMT_CONT_TRIPLE | FMT_CONT_COMMENT_C | FMT_CONT_COMMENT_CXX) + (FMT_CONT_QUOTESINGLE | FMT_CONT_QUOTEDOUBLE | FMT_CONT_TRIPLE | FMT_CONT_COMMENT_C) int flatten_string(struct SpaceText *st, FlattenString *fs, const char *in); void flatten_string_free(FlattenString *fs); int flatten_string_strlen(FlattenString *fs, const char *str); int text_check_format_len(TextLine *line, unsigned int len); - +void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len); /* *** Generalize Formatting *** */ typedef struct TextFormatType { |