171 if (
string[0] ==
'#') {
209 char cont_orig, cont, find, prev =
' ';
215 cont = fmt[strlen(fmt) + 1];
225 cont_orig = fmt[strlen(fmt) + 1];
258 if (*
str ==
'*' && *(
str + 1) ==
'/') {
283 if (*
str ==
'/' && *(
str + 1) ==
'/') {
288 else if (*
str ==
'/' && *(
str + 1) ==
'*') {
295 else if (
ELEM(*
str,
'"',
'\'')) {
302 else if (*
str ==
' ') {
359 if (cont != cont_orig && do_next && line->
next) {
369 static const char *ext[] = {
"osl",
NULL};
bool text_check_identifier(const char ch)
bool text_check_digit(const char ch)
bool text_check_delim(const char ch)
bool text_check_whitespace(const char ch)
int BLI_str_utf8_size_safe(const char *p) ATTR_NONNULL()
void(* format_line)(SpaceText *st, TextLine *line, const bool do_next)
char(* format_identifier)(const char *string)
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len)
void flatten_string_free(FlattenString *fs)
void text_format_fill_ascii(const char **str_p, char **fmt_p, const char type, const int len)
void ED_text_format_register(TextFormatType *tft)
int text_check_format_len(TextLine *line, uint len)
#define STR_LITERAL_STARTSWITH(str, str_literal, len_var)
static char txtfmt_osl_format_identifier(const char *str)
static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next)
void ED_text_format_register_osl(void)
static int txtfmt_osl_find_builtinfunc(const char *string)
static int txtfmt_osl_find_preprocessor(const char *string)
static int txtfmt_osl_find_specialvar(const char *string)
static int txtfmt_osl_find_reserved(const char *string)