summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/print_fprintf.c
blob: 43ff4780d797ca5e683c6d5b3082f2eb18dea8c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 *  @file
 *
 *  @brief RTEMS Print Support
 *  @ingroup libcsupport
 */

/*
 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
 * All rights reserved.
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifdef HAVE_CONFIG_H
  #include "config.h"
#endif

#include <rtems/printer.h>

static int rtems_fprintf_plugin(void *context, const char *fmt, va_list ap)
{
  return vfprintf(context, fmt, ap);
}

void rtems_print_printer_fprintf(rtems_printer *printer, FILE *file)
{
  printer->context = file;
  printer->printer = rtems_fprintf_plugin;
}