Lines Matching refs:format_chars
105 format_chars - orig_format_chars,
106 where format_chars has already been incremented, so that
1639 const char *format_chars;
1776 format_chars = TREE_STRING_POINTER (format_tree);
1799 format_chars += offset;
1802 if (format_length < 1 || format_chars[--format_length] != 0)
1826 check_format_info_main (res, info, format_chars, fmt_param_loc, format_tree,
1843 const char * const format_chars,
1888 argument_parser (function_format_info *info, const char *&format_chars,
1956 const char *&format_chars;
2007 const char * const format_chars,
2032 format_chars - orig_format_chars,
2066 format_chars - orig_format_chars - 1,
2079 format_chars - orig_format_chars,
2130 format_chars (format_chars_),
2161 opnum = maybe_read_dollar_number (&format_chars, 0,
2174 if (avoid_dollar_number (format_chars))
2189 while (*format_chars != 0
2190 && strchr (fki->flag_chars, *format_chars) != 0)
2193 *format_chars, NULL);
2194 if (flag_chars.has_char_p (*format_chars))
2197 format_chars + 1 - orig_format_chars,
2202 flag_chars.add_char (*format_chars);
2206 ++format_chars;
2207 if (*format_chars == 0)
2214 ++format_chars;
2232 if (fki->width_type != NULL && *format_chars == '*')
2237 ++format_chars;
2241 opnum = maybe_read_dollar_number (&format_chars,
2257 if (avoid_dollar_number (format_chars))
2282 width_wanted_type.format_start = format_chars - 1;
2287 format_chars - orig_format_chars;
2302 while (ISDIGIT (*format_chars))
2305 if (*format_chars != '0')
2307 ++format_chars;
2326 if (*format_chars != '#')
2329 ++format_chars;
2331 if (!ISDIGIT (*format_chars))
2333 format_chars - orig_format_chars,
2336 while (ISDIGIT (*format_chars))
2337 ++format_chars;
2351 if (*format_chars != '.')
2354 ++format_chars;
2356 if (fki->precision_type != NULL && *format_chars == '*')
2360 ++format_chars;
2364 opnum = maybe_read_dollar_number (&format_chars,
2380 if (avoid_dollar_number (format_chars))
2406 precision_wanted_type.format_start = format_chars - 2;
2410 format_chars - orig_format_chars;
2422 && !ISDIGIT (*format_chars))
2424 format_chars - orig_format_chars,
2427 while (ISDIGIT (*format_chars))
2428 ++format_chars;
2443 if (fki->alloc_char && fki->alloc_char == *format_chars)
2446 format_chars++;
2452 if (*format_chars == 'a' && !flag_isoc99)
2454 if (format_chars[1] == 's' || format_chars[1] == 'S'
2455 || format_chars[1] == '[')
2459 format_chars++;
2481 && strncmp (fli->name, format_chars, strlen (fli->name)))
2485 format_chars += strlen (fli->name);
2486 if (fli->double_name != 0 && fli->name[0] == *format_chars)
2488 format_chars++;
2520 while (*format_chars != 0
2521 && strchr (fki->modifier_chars, *format_chars) != 0)
2523 if (flag_chars.has_char_p (*format_chars))
2526 *format_chars, NULL);
2528 format_chars - orig_format_chars,
2533 flag_chars.add_char (*format_chars);
2534 ++format_chars;
2552 while (fci->format_chars != 0
2553 && strchr (fci->format_chars, format_char) == 0)
2555 if (fci->format_chars == 0)
2558 format_chars - orig_format_chars,
2570 format_chars - orig_format_chars,
2666 if (*format_chars == '^')
2667 ++format_chars;
2670 if (*format_chars == ']')
2671 ++format_chars;
2672 while (*format_chars && *format_chars != ']')
2673 ++format_chars;
2674 if (*format_chars != ']')
2677 format_chars - orig_format_chars,
2706 format_chars - orig_format_chars,
2728 format_chars - orig_format_chars,
2834 wanted_type_ptr->format_length = format_chars - format_start;
2835 wanted_type_ptr->offset_loc = format_chars - orig_format_chars;
2857 ptrdiff_t offset_to_format_end = (format_chars - 1) - orig_format_chars;
3040 a tree), ORIG_FORMAT_CHARS and FORMAT_CHARS are pointers to
3050 const char *orig_format_chars, const char *format_chars,
3056 int fmtchrpos = format_chars - orig_format_chars;
3064 if (format_chars[0] == '_' || ISALPHA (format_chars[0]))
3066 while (format_chars[wlen] == '_' || ISALNUM (format_chars[wlen]))
3068 underscore |= format_chars[wlen] == '_';
3080 || strncmp (format_chars, tokens[i].name, toklen))
3084 && format_chars - orig_format_chars > 0
3085 && (TOUPPER (format_chars[-1]) == 'C'
3086 || TOUPPER (format_chars[-1]) == 'G'))
3087 return format_chars + toklen - 1; /* Reference to C++ or G++. */
3089 if (ISPUNCT (format_chars[toklen - 1]))
3091 if (format_chars[toklen - 1] == format_chars[toklen])
3094 else if (ISALNUM (format_chars[toklen]))
3098 && format_chars[0] == '-'
3099 && format_chars[1] == '-'
3100 && ISALNUM (format_chars[2]))
3105 && format_chars - orig_format_chars > 6
3106 && startswith (format_chars - 7, " count >= width of "))
3107 return format_chars + 10;
3126 toklen, format_chars)
3130 return format_chars + toklen - 1;
3136 if (startswith (format_chars, "__attribute"))
3139 while ('_' == format_chars[nchars])
3142 for (int i = nchars; format_chars[i]; ++i)
3143 if (' ' != format_chars[i])
3149 if (format_chars[nchars] == '(')
3151 baltoks.parens.safe_push (format_chars + nchars);
3155 if (format_chars[nchars] == '(')
3157 baltoks.parens.safe_push (format_chars + nchars);
3161 for (int i = nchars; format_chars[i]; ++i)
3162 if (')' == format_chars[i])
3170 if (close && format_chars[nchars] == ')')
3181 return format_chars + nchars - 1;
3185 if (format_chars[0] == '_'
3186 && format_chars[1] == '_'
3187 && (startswith (format_chars + 2, "atomic")
3188 || startswith (format_chars + 2, "builtin")
3189 || startswith (format_chars + 2, "sync")))
3195 wlen, format_chars);
3196 return format_chars + wlen - 1;
3204 format_chars - orig_format_chars,
3205 format_chars + wlen - orig_format_chars,
3208 wlen, format_chars);
3218 && TOUPPER (format_chars[wlen - 1]) == 'S'))
3219 && !strncasecmp (format_chars, badwords[i].name, badwords[i].len))
3226 if (TOUPPER (format_chars[badwlen]) == 'S')
3235 && startswith (format_chars, "decl-specifier"))
3243 badwlen, format_chars,
3246 return format_chars + badwords[i].len - 1;
3251 if (!strncasecmp (format_chars, "c++", 3)
3252 || !strncasecmp (format_chars, "g++", 3))
3253 return format_chars + 2;
3256 return wlen ? format_chars + wlen - 1 : NULL;
3263 string itself (as a tree), ORIG_FORMAT_CHARS and FORMAT_CHARS are
3271 const char *orig_format_chars, const char *format_chars,
3277 int fmtchrpos = format_chars - orig_format_chars;
3279 if (*format_chars == '%')
3282 if (startswith (format_chars, "%<%s%>"))
3287 else if (format_chars - orig_format_chars > 2
3288 && !strncasecmp (format_chars - 3, "can%'t", 6))
3294 6, format_chars - 3, "cannot");
3296 return format_chars;
3303 while (*format_chars && '%' != *format_chars)
3304 ++format_chars;
3306 return format_chars;
3317 while (ISSPACE (format_chars[nchars]))
3319 if (format_chars[nchars] != ' ' && !other_than_space)
3320 other_than_space = format_chars + nchars;
3334 return format_chars + nchars - 1;
3339 return format_chars + nchars - 1;
3341 if (!format_chars[nchars])
3346 return format_chars + nchars - 1;
3352 && orig_format_chars < format_chars
3353 && format_chars[-1] == '.'
3354 && format_chars[0] == ' '
3355 && format_chars[1] == ' ')
3363 if (ISLOWER (format_chars[2]))
3375 return format_chars + nchars - 1;
3378 format_chars += nchars;
3382 fmtchrpos = format_chars - orig_format_chars;
3386 while (format_chars[nchars] && ISCNTRL (format_chars[nchars]))
3394 return format_chars + nchars - 1;
3401 *format_chars);
3402 return format_chars + nchars - 1;
3405 if (ISPUNCT (format_chars[0]))
3410 orig_format_chars, format_chars,
3417 orig_format_chars, format_chars,
3422 if (ISALPHA (format_chars[0]))
3427 orig_format_chars, format_chars,
3434 orig_format_chars, format_chars,
3442 if ((format_chars == orig_format_chars
3443 || format_chars[-1] == ' ')
3444 && format_chars[0] == '-'
3445 && ((format_chars[1] == '-'
3446 && ISALPHA (format_chars[2]))
3447 || ISALPHA (format_chars[1])))
3450 while (ISALNUM (format_chars[nchars])
3451 || '_' == format_chars[nchars]
3452 || '-' == format_chars[nchars]
3453 || '+' == format_chars[nchars])
3459 nchars, format_chars);
3460 return format_chars + nchars - 1;
3466 while ('%' != format_chars[nchars]
3467 && ISPUNCT (format_chars[nchars])
3470 switch (format_chars[nchars])
3473 baltoks.brackets.safe_push (format_chars + nchars);
3476 baltoks.curly.safe_push (format_chars + nchars);
3479 baltoks.parens.safe_push (format_chars + nchars);
3482 baltoks.pointy.safe_push (format_chars + nchars);
3489 unbalanced = format_chars + nchars;
3495 unbalanced = format_chars + nchars;
3501 unbalanced = format_chars + nchars;
3507 unbalanced = format_chars + nchars;
3520 return format_chars + nchars - 1;
3528 && format_chars[0] == '#'
3529 && ISALPHA (format_chars[1]))
3531 while (ISALNUM (format_chars[nchars])
3532 || format_chars[nchars] == '_')
3538 "in format", nchars, format_chars);
3539 return format_chars + nchars - 1;
3544 && format_chars[0] == '\''
3545 && format_chars - orig_format_chars
3546 && ISALPHA (format_chars[-1])
3547 && ISALPHA (format_chars[1]))
3556 if (format_chars - orig_format_chars >= off
3557 && !strncmp (format_chars - off,
3567 return format_chars + nchars - 1;
3578 return format_chars + nchars - 1;
3583 && format_chars[0] == '`')
3590 return format_chars + nchars - 1;
3595 && format_chars - orig_format_chars
3596 && format_chars[-1] == ' '
3597 && strspn (format_chars, "!?:;.,") == 1)
3602 "%<%c%>", format_chars[0]);
3603 return format_chars;
3608 if (startswith (format_chars, "\"%s\""))
3618 if (format_chars[0] == '"')
3620 baltoks.doublequote = baltoks.doublequote ? NULL : format_chars;
3621 return format_chars + nchars - 1;
3623 if (format_chars[0] == '\'')
3625 baltoks.singlequote = baltoks.singlequote ? NULL : format_chars;
3626 return format_chars + nchars - 1;
3633 && format_chars[0] == '(')
3636 && startswith (format_chars, "...")
3637 && format_chars[3])
3645 nchars, format_chars);
3646 return format_chars + nchars - 1;
3649 else if (!format_chars[nchars])
3652 && (format_chars[nchars - 1] == ':'
3653 || format_chars[nchars - 1] == ')'))
3657 && format_chars[nchars - 1] == '.')
3658 || strspn (format_chars + nchars - 1, "?])") == 1))
3663 && format_chars[0] == '?'
3664 && format_chars[1] == ')')
3667 && format_chars[0] == ')'
3668 && (format_chars[1] == '?'
3669 || format_chars[1] == ';'
3670 || format_chars[1] == ':'
3672 && format_chars[1] == '.')))
3677 && format_chars - orig_format_chars > 0
3678 && startswith (format_chars, "..."))
3685 nchars, format_chars);
3687 return format_chars + nchars - 1;
3690 && format_chars[0] == ')'
3691 && (format_chars[1] == ':'
3692 || format_chars[1] == ';'
3693 || format_chars[1] == ',')
3694 && format_chars[2] == ' ')
3702 nchars, nchars, format_chars);
3703 return format_chars + nchars - 1;
3710 while (format_chars[nchars]
3711 && '%' != format_chars[nchars]
3712 && !ISPUNCT (format_chars[nchars])
3713 && !ISGRAPH (format_chars[nchars]))
3721 return format_chars + nchars - 1;
3728 *format_chars);
3729 return format_chars + nchars - 1;
3732 return format_chars;
3779 /* Do the main part of checking a call to a format function. FORMAT_CHARS
3788 function_format_info *info, const char *format_chars,
3795 const char * const orig_format_chars = format_chars;
3829 while (*format_chars != 0)
3832 format_chars = check_plain (format_string_loc,
3834 orig_format_chars, format_chars,
3837 if (*format_chars == 0 || *format_chars++ != '%')
3840 if (*format_chars == 0)
3843 format_chars - orig_format_chars,
3848 if (*format_chars == '%')
3850 ++format_chars;
3854 /* ARGUMENT_PARSER ctor takes FORMAT_CHARS by reference and calls
3857 argument_parser arg_parser (info, format_chars, format_string_cst,
3879 const char *format_start = format_chars;
3888 const char *type_start = format_chars;
3897 char format_char = *format_chars;
3903 format_chars - orig_format_chars,
3916 format_chars++;
3923 flag_chars.validate (fki, fci, flag_specs, format_chars,
3940 format_chars - orig_format_chars,
3943 baltoks.quotdirs.safe_push (format_chars);
3951 format_chars - orig_format_chars,
3959 color_begin = format_chars;
3966 format_chars - orig_format_chars,
3972 format_chars - orig_format_chars,
3975 color_end = format_chars;
3984 format_chars - orig_format_chars,
4022 if (format_chars - orig_format_chars != format_length)
4024 format_chars + 1 - orig_format_chars,
4403 spec->format_chars;
4407 if (!strchr (spec->format_chars, conversion_char))
4438 return xasprintf ("%s%c", len_modifier, spec->format_chars[0]);
4795 for (i = 0; fci->format_chars; i++, fci++)
4796 if (strchr (fci->format_chars, c))