OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [ppc64/] [xmon/] [subr_prf.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * Written by Cort Dougan to replace the version originally used
3
 * by Paul Mackerras, which came from NetBSD and thus had copyright
4
 * conflicts with Linux.
5
 *
6
 * This file makes liberal use of the standard linux utility
7
 * routines to reduce the size of the binary.  We assume we can
8
 * trust some parts of Linux inside the debugger.
9
 *   -- Cort (cort@cs.nmt.edu)
10
 *
11
 * Copyright (C) 1999 Cort Dougan.
12
 *
13
 *      This program is free software; you can redistribute it and/or
14
 *      modify it under the terms of the GNU General Public License
15
 *      as published by the Free Software Foundation; either version
16
 *      2 of the License, or (at your option) any later version.
17
 */
18
 
19
#include <linux/kernel.h>
20
#include <linux/string.h>
21
#include <stdarg.h>
22
#include "nonstdio.h"
23
 
24
extern int xmon_write(void *, void *, int);
25
 
26
void
27
xmon_vfprintf(void *f, const char *fmt, va_list ap)
28
{
29
        static char xmon_buf[2048];
30
        int n;
31
 
32
        n = vsprintf(xmon_buf, fmt, ap);
33
        xmon_write(f, xmon_buf, n);
34
}
35
 
36
void
37
xmon_printf(const char *fmt, ...)
38
{
39
        va_list ap;
40
 
41
        va_start(ap, fmt);
42
        xmon_vfprintf(stdout, fmt, ap);
43
        va_end(ap);
44
}
45
 
46
void
47
xmon_fprintf(void *f, const char *fmt, ...)
48
{
49
        va_list ap;
50
 
51
        va_start(ap, fmt);
52
        xmon_vfprintf(f, fmt, ap);
53
        va_end(ap);
54
}
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.