diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-14 11:48:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-14 11:48:42 +0300 |
commit | eff8cc9cccdaa7248d9d869473704e9db69c2f41 (patch) | |
tree | 95c67fbd688b1f63dfef77372a7eaeb40aa15ec5 /source/blender/editors/space_text | |
parent | b7e5433890debe629a0677473ba920f743de3342 (diff) |
Cleanup: doxy comments
Use doxy references to function and enums,
also correct some names which became out of sync.
Diffstat (limited to 'source/blender/editors/space_text')
5 files changed, 30 insertions, 24 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 87bbefdd365..1b49e637350 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -154,14 +154,19 @@ static void format_draw_color(const TextDrawContext *tdc, char formatchar) /************************** draw text *****************************/ -/* Notes on word-wrap +/** + * Notes on word-wrap * -- - * All word-wrap functions follow the algorithm below to maintain consistency. - * line The line to wrap (tabs converted to spaces) - * view_width The maximum number of characters displayable in the region - * This equals region_width/font_width for the region - * wrap_chars Characters that allow wrapping. This equals [' ', '\t', '-'] + * All word-wrap functions follow the algorithm below to maintain consistency: + * - line: + * The line to wrap (tabs converted to spaces) + * - view_width: + * The maximum number of characters displayable in the region + * This equals region_width/font_width for the region + * - wrap_chars: + * Characters that allow wrapping. This equals [' ', '\t', '-'] * + * \code{.py} * def wrap(line, view_width, wrap_chars): * draw_start = 0 * draw_end = view_width @@ -175,6 +180,7 @@ static void format_draw_color(const TextDrawContext *tdc, char formatchar) * draw_end = pos+1 * pos += 1 * print line[draw_start:] + * \encode */ int wrap_width(const SpaceText *st, ARegion *ar) diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c index 7118b8b748a..4b25c5d39a7 100644 --- a/source/blender/editors/space_text/text_format_lua.c +++ b/source/blender/editors/space_text/text_format_lua.c @@ -30,9 +30,10 @@ /* *** Lua Keywords (for format_line) *** */ -/* Checks the specified source string for a Lua keyword (minus boolean & 'nil'). +/** + * Checks the specified source string for a Lua keyword (minus boolean & 'nil'). * This name must start at the beginning of the source string and must be - * followed by a non-identifier (see text_check_identifier(char)) or null char. + * followed by a non-identifier (see #text_check_identifier(char)) or null char. * * If a keyword is found, the length of the matching word is returned. * Otherwise, -1 is returned. @@ -40,7 +41,6 @@ * See: * http://www.lua.org/manual/5.1/manual.html#2.1 */ - static int txtfmt_lua_find_keyword(const char *string) { int i, len; @@ -71,9 +71,10 @@ static int txtfmt_lua_find_keyword(const char *string) return i; } -/* Checks the specified source string for a Lua special name/function. This +/** + * Checks the specified source string for a Lua special name/function. This * name must start at the beginning of the source string and must be followed - * by a non-identifier (see text_check_identifier(char)) or null character. + * by a non-identifier (see *text_check_identifier(char)) or null character. * * If a special name is found, the length of the matching name is returned. * Otherwise, -1 is returned. @@ -81,7 +82,6 @@ static int txtfmt_lua_find_keyword(const char *string) * See: * http://www.lua.org/manual/5.1/manual.html#5.1 */ - static int txtfmt_lua_find_specialvar(const char *string) { int i, len; diff --git a/source/blender/editors/space_text/text_format_pov.c b/source/blender/editors/space_text/text_format_pov.c index da10c8626b5..2435d2f21da 100644 --- a/source/blender/editors/space_text/text_format_pov.c +++ b/source/blender/editors/space_text/text_format_pov.c @@ -30,9 +30,10 @@ /* *** POV Keywords (for format_line) *** */ -/* Checks the specified source string for a POV keyword (minus boolean & 'nil'). +/** + * Checks the specified source string for a POV keyword (minus boolean & 'nil'). * This name must start at the beginning of the source string and must be - * followed by a non-identifier (see text_check_identifier(char)) or null char. + * followed by a non-identifier (see #text_check_identifier(char)) or null char. * * If a keyword is found, the length of the matching word is returned. * Otherwise, -1 is returned. @@ -40,7 +41,6 @@ * See: * http://www.povray.org/documentation/view/3.7.0/212/ */ - static int txtfmt_pov_find_keyword(const char *string) { int i, len; @@ -467,9 +467,10 @@ static int txtfmt_pov_find_reserved_builtins(const char *string) } -/* Checks the specified source string for a POV modifiers. This +/** + * Checks the specified source string for a POV modifiers. This * name must start at the beginning of the source string and must be followed - * by a non-identifier (see text_check_identifier(char)) or null character. + * by a non-identifier (see #text_check_identifier(char)) or null character. * * If a special name is found, the length of the matching name is returned. * Otherwise, -1 is returned. @@ -477,7 +478,6 @@ static int txtfmt_pov_find_reserved_builtins(const char *string) * See: * http://www.povray.org/documentation/view/3.7.0/212/ */ - static int txtfmt_pov_find_specialvar(const char *string) { int i, len; diff --git a/source/blender/editors/space_text/text_format_pov_ini.c b/source/blender/editors/space_text/text_format_pov_ini.c index e41fd94ef49..da69a35f0b0 100644 --- a/source/blender/editors/space_text/text_format_pov_ini.c +++ b/source/blender/editors/space_text/text_format_pov_ini.c @@ -30,9 +30,10 @@ /* *** POV INI Keywords (for format_line) *** */ -/* Checks the specified source string for a POV INI keyword (minus boolean & 'nil'). +/** + * Checks the specified source string for a POV INI keyword (minus boolean & 'nil'). * This name must start at the beginning of the source string and must be - * followed by a non-identifier (see text_check_identifier(char)) or null char. + * followed by a non-identifier (see #text_check_identifier(char)) or null char. * * If a keyword is found, the length of the matching word is returned. * Otherwise, -1 is returned. @@ -40,7 +41,6 @@ * See: * http://www.povray.org/documentation/view/3.7.0/212/ */ - static int txtfmt_ini_find_keyword(const char *string) { int i, len; diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 85c3c4220c0..87b3835ce1e 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -30,9 +30,10 @@ /* *** Local Functions (for format_line) *** */ -/* Checks the specified source string for a Python built-in function name. This +/** + * Checks the specified source string for a Python built-in function name. This * name must start at the beginning of the source string and must be followed by - * a non-identifier (see text_check_identifier(char)) or null character. + * a non-identifier (see #text_check_identifier(char)) or null character. * * If a built-in function is found, the length of the matching name is returned. * Otherwise, -1 is returned. @@ -40,7 +41,6 @@ * See: * http://docs.python.org/py3k/reference/lexical_analysis.html#keywords */ - static int txtfmt_py_find_builtinfunc(const char *string) { int i, len; |