Function report |
Source Code:lib\vsprintf.c |
Create Date:2022-07-28 06:12:32 |
| Last Modify:2022-05-21 09:47:42 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:vsscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: format of buffer*@args: arguments
Proto:int vsscanf(const char *buf, const char *fmt, va_list args)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const char * | buf | |
| const char * | fmt | |
| va_list | args |
| 3193 | num = 0 |
| 3208 | If Note: isspace() must return false for %NUL-terminator ( * fmt) Then |
| 3220 | If Not fmt Then Break |
| 3222 | ++fmt |
| 3227 | If fmt == '*' Then |
| 3228 | If Not str Then Break |
| 3230 | When Not Note: isspace() must return false for %NUL-terminator ( * fmt) && fmt != '%' && fmt cycle |
| 3236 | When Not Note: isspace() must return false for %NUL-terminator ( * str) && str cycle |
| 3237 | str++ |
| 3238 | Continue |
| 3242 | field_width = -1 |
| 3245 | If field_width <= 0 Then Break |
| 3250 | qualifier = -1 |
| 3251 | If fmt == 'h' || Fast implementation of tolower() for internal usage. Do not use in your* code. == 'l' || fmt == 'z' Then |
| 3254 | If Value for the false possibility is greater at compile time(qualifier == * fmt) Then |
| 3265 | If Not fmt Then Break |
| 3268 | If fmt == 'n' Then |
| 3275 | If Not str Then Break |
| 3278 | base = 10 |
| 3279 | is_sign = false |
| 3282 | Case ++ == 'c' |
| 3285 | If field_width == -1 Then field_width = 1 |
| 3287 | Do |
| 3289 | When --field_width > 0 && str cycle |
| 3290 | num++ |
| 3292 | Continue |
| 3293 | Case ++ == 's' |
| 3296 | If field_width == -1 Then field_width = SHRT_MAX |
| 3299 | str = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 3302 | When str && Not Note: isspace() must return false for %NUL-terminator ( * str) && field_width-- cycle |
| 3304 | s = '\0' |
| 3305 | num++ |
| 3307 | Continue |
| 3323 | Case ++ == '[' |
| 3326 | DECLARE_BITMAP(set, 256) = {0} |
| 3327 | len = 0 |
| 3331 | If field_width == -1 Then Return num |
| 3343 | ++fmt |
| 3345 | If negate Then |
| 3346 | bitmap_complement(set, set, 256) |
| 3352 | If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Return num |
| 3355 | When st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from && field_width-- cycle |
| 3357 | s = '\0' |
| 3358 | ++num |
| 3360 | Continue |
| 3361 | Case ++ == 'o' |
| 3362 | base = 8 |
| 3363 | Break |
| 3364 | Case ++ == 'x' |
| 3365 | Case ++ == 'X' |
| 3366 | base = 16 |
| 3367 | Break |
| 3368 | Case ++ == 'i' |
| 3369 | base = 0 |
| 3371 | Case ++ == 'd' |
| 3372 | is_sign = true |
| 3374 | Case ++ == 'u' |
| 3375 | Break |
| 3376 | Case ++ == '%' |
| 3381 | Default |
| 3383 | Return num |
| 3389 | str = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 3395 | If Not digit || base == 16 && Not isxdigit(digit) || base == 10 && Not isdigit(digit) || base == 8 && ( Not isdigit(digit) || digit > '7' ) || base == 0 && Not isdigit(digit) Then Break |
| 3411 | If field_width > 0 && next - str > field_width Then |
| 3412 | If base == 0 Then _parse_integer_fixup_radix(str, & base) |
| 3414 | When next - str > field_width cycle |
| 3415 | If is_sign Then s = div_s64 - signed 64bit divide with 32bit divisor*@dividend: signed 64bit dividend*@divisor: signed 32bit divisor |
| 3419 | --next |
| 3424 | Case qualifier == 'H' |
| 3429 | Break |
| 3430 | Case qualifier == 'h' |
| 3435 | Break |
| 3436 | Case qualifier == 'l' |
| 3441 | Break |
| 3442 | Case qualifier == 'L' |
| 3447 | Break |
| 3448 | Case qualifier == 'z' |
| 3451 | Default |
| 3458 | num++ |
| 3460 | If Not next Then Break |
| 3465 | Return num |
| Name | Describe |
|---|---|
| sscanf | sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |