Changeset 0c2d9bb in mainline for uspace/lib/c/generic/io/asprintf.c


Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (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/asprintf.c

    rf7a33de r0c2d9bb  
    5050}
    5151
     52int vprintf_size(const char *fmt, va_list args)
     53{
     54        printf_spec_t ps = {
     55                asprintf_str_write,
     56                asprintf_wstr_write,
     57                NULL
     58        };
     59       
     60        return printf_core(fmt, &ps, args);
     61}
     62
     63int printf_size(const char *fmt, ...)
     64{
     65        va_list args;
     66        va_start(args, fmt);
     67        int ret = vprintf_size(fmt, args);
     68        va_end(args);
     69       
     70        return ret;
     71}
     72
    5273/** Allocate and print to string.
    5374 *
     
    6182int asprintf(char **strp, const char *fmt, ...)
    6283{
    63         printf_spec_t ps = {
    64                 asprintf_str_write,
    65                 asprintf_wstr_write,
    66                 NULL
    67         };
    68        
    6984        va_list args;
    7085        va_start(args, fmt);
    71        
    72         int ret = printf_core(fmt, &ps, args);
     86        int ret = vprintf_size(fmt, args);
    7387        va_end(args);
    7488       
Note: See TracChangeset for help on using the changeset viewer.