Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
051bc69a
Parents:
6c39a907 (diff), 1317380 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/printf_core.c

    r6c39a907 r25a76ab8  
    260260        if (str == NULL)
    261261                return printf_putstr(nullstr, ps);
    262 
     262       
    263263        /* Print leading spaces. */
    264264        size_t strw = str_length(str);
    265265        if (precision == 0)
    266266                precision = strw;
    267 
     267       
    268268        /* Left padding */
    269269        size_t counter = 0;
     
    275275                }
    276276        }
    277 
     277       
    278278        /* Part of @a str fitting into the alloted space. */
    279279        int retval;
     
    390390         */
    391391        if (flags & __PRINTF_FLAG_PREFIX) {
    392                 switch(base) {
     392                switch (base) {
    393393                case 2:
    394394                        /* Binary formating is not standard, but usefull */
     
    454454        /* Print prefix */
    455455        if (flags & __PRINTF_FLAG_PREFIX) {
    456                 switch(base) {
     456                switch (base) {
    457457                case 2:
    458458                        /* Binary formating is not standard, but usefull */
     
    569569 *
    570570 *  - P, p Print value of a pointer. Void * value is expected and it is
    571  *         printed in hexadecimal notation with prefix (as with \%#X / \%#x
    572  *         for 32-bit or \%#X / \%#x for 64-bit long pointers).
     571 *         printed in hexadecimal notation with prefix (as with
     572 *         \%#0.8X / \%#0.8x for 32-bit or \%#0.16lX / \%#0.16lx for 64-bit
     573 *         long pointers).
    573574 *
    574575 *  - b Print value as unsigned binary number. Prefix is not printed by
     
    783784                        case 'p':
    784785                                flags |= __PRINTF_FLAG_PREFIX;
     786                                flags |= __PRINTF_FLAG_ZEROPADDED;
    785787                                base = 16;
    786788                                qualifier = PrintfQualifierPointer;
     
    845847                        case PrintfQualifierPointer:
    846848                                size = sizeof(void *);
    847                                 number = (uint64_t) (unsigned long) va_arg(ap, void *);
     849                                precision = size << 1;
     850                                number = (uint64_t) (uintptr_t) va_arg(ap, void *);
    848851                                break;
    849852                        default:
Note: See TracChangeset for help on using the changeset viewer.