Changeset 040e4e9 in mainline
- Timestamp:
- 2006-04-27T18:27:01Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 11928d5
- Parents:
- 9179d0a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/debug/print.c
r9179d0a r040e4e9 81 81 } 82 82 83 /** Print one string without appending '\n'to the end.83 /** Print one string without appending newline to the end. 84 84 * 85 85 * Do not use this function directly - printflock is not locked here. … … 356 356 /** Print formatted string. 357 357 * 358 * Print string formatted according to the @fmt parameter358 * Print string formatted according to the fmt parameter 359 359 * and variadic arguments. Each formatting directive 360 360 * must have the following form: 361 * % [ flags ] [ width ] [ .precision ] [ type ] conversion 362 * 363 * FLAGS: 364 * # Force to print prefix. 365 * For conversion %o the prefix is 0, for %x and %X prefixes are 0x and 0X and for conversion %b the prefix is 0b. 366 * - Align to left. 367 * + Print positive sign just as negative. 368 * (space) If the printed number is positive and '+' flag is not set, print space in place of sign. 369 * 0 Print 0 as padding instead of spaces. Zeroes are placed between sign and the rest of the number. 370 * This flag is ignored if '-' flag is specified. 371 * 372 * WIDTH: 361 * 362 * \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION 363 * 364 * FLAGS:@n 365 * "#" Force to print prefix. 366 * For conversion \%o the prefix is 0, for %x and \%X prefixes are 0x and 0X 367 * and for conversion \%b the prefix is 0b. 368 * 369 * "-" Align to left. 370 * 371 * "+" Print positive sign just as negative. 372 * 373 * " " If the printed number is positive and "+" flag is not set, print space in 374 * place of sign. 375 * 376 * "0" Print 0 as padding instead of spaces. Zeroes are placed between sign and the 377 * rest of the number. This flag is ignored if "-" flag is specified. 378 * 379 * WIDTH:@n 373 380 * Specify minimal width of printed argument. If it is bigger, width is ignored. 374 * If width is specified with a '*' character instead of number, width is taken from parameter list. 375 * And integer parameter is expected before parameter for processed conversion specification. 376 * If this value is negative its absolute value is taken and the '-' flag is set. 377 * 378 * PRECISION: 381 * If width is specified with a "*" character instead of number, width is taken from 382 * parameter list. And integer parameter is expected before parameter for processed 383 * conversion specification. If this value is negative its absolute value is taken 384 * and the "-" flag is set. 385 * 386 * PRECISION:@n 379 387 * Value precision. For numbers it specifies minimum valid numbers. 380 388 * Smaller numbers are printed with leading zeroes. Bigger numbers are not affected. 381 389 * Strings with more than precision characters are cut off. 382 * Just as with width, an '*'can be used used instead of a number.383 * An integer value is then expected in parameters. When both width and precision are specified using '*',384 * first parameter is used for width and second one for precision.385 * 386 * TYPE:387 * hh signed or unsigned char388 * h signed or usigned short389 * signed or usigned int (default value)390 * l signed or usigned long int391 * ll signed or usigned long long int392 * z __native (non-standard extension)393 * 394 * 395 * CONVERSIONS:396 * 397 * % Print percent age character itself.390 * Just as with width, an "*" can be used used instead of a number. 391 * An integer value is then expected in parameters. When both width and precision 392 * are specified using "*", the first parameter is used for width and the second one 393 * for precision. 394 * 395 * TYPE:@n 396 * "hh" Signed or unsigned char.@n 397 * "h" Signed or usigned short.@n 398 * "" Signed or usigned int (default value).@n 399 * "l" Signed or usigned long int.@n 400 * "ll" Signed or usigned long long int.@n 401 * "z" __native (non-standard extension).@n 402 * 403 * 404 * CONVERSION:@n 405 * % Print percentile character itself. 398 406 * 399 407 * c Print single character. … … 402 410 * 403 411 * P, p Print value of a pointer. Void * value is expected and it is printed in hexadecimal notation with prefix 404 * (as with %#X or %#x for 32bit or %#X /%#x for 64bit long pointers).412 * (as with \%#X or \%#x for 32bit or \%#X / \%#x for 64bit long pointers). 405 413 * 406 414 * b Print value as unsigned binary number. Prefix is not printed by default. (Nonstandard extension.) … … 414 422 * X, x Print hexadecimal number with upper- or lower-case. Prefix is not printed by default. 415 423 * 416 * All other characters from @fmt except the formatting directives424 * All other characters from fmt except the formatting directives 417 425 * are printed in verbatim. 418 426 *
Note:
See TracChangeset
for help on using the changeset viewer.