Changeset 2595dab in mainline for uspace/lib/libc/generic/io/printf.c


Ignore:
Timestamp:
2009-06-03T19:26:28Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d00ae4c
Parents:
ca3ba3a
Message:

I/O subsystem overhaul:

  • add more POSIX-like file and stream functions (with real functionality of stdin, stdout, stderr)
  • cleanup console access methods (now generic to any console-like device)
  • remove unsafe stream functions
  • add special open_node(), fd_node(), fd_phone() (file) and fopen_node(), fnode(), fphone() (stream) functions for HelenOS-specific I/O operations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/io/printf.c

    rca3ba3a r2595dab  
    3535#include <io/printf_core.h>
    3636#include <stdio.h>
    37 #include <stdio.h>
    3837
    3938/** Print formatted text.
    40  * @param fmt   format string
     39 *
     40 * @param stream Output stream
     41 * @param fmt    Format string
     42 *
    4143 * \see For more details about format string see printf_core.
     44 *
     45 */
     46int fprintf(FILE *stream, const char *fmt, ...)
     47{
     48        va_list args;
     49        va_start(args, fmt);
     50       
     51        int ret = vfprintf(stream, fmt, args);
     52       
     53        va_end(args);
     54       
     55        return ret;
     56}
     57
     58/** Print formatted text to stdout.
     59 *
     60 * @param fmt Format string
     61 *
     62 * \see For more details about format string see printf_core.
     63 *
    4264 */
    4365int printf(const char *fmt, ...)
    4466{
    45         int ret;
    4667        va_list args;
    47 
    4868        va_start(args, fmt);
    49 
    50         ret = vprintf(fmt, args);
     69       
     70        int ret = vprintf(fmt, args);
    5171       
    5272        va_end(args);
    53 
     73       
    5474        return ret;
    5575}
Note: See TracChangeset for help on using the changeset viewer.