]> git.ozlabs.org Git - yaboot.git/blob - lib/nonstd.c
warnings: Add explict prototype for prom_vfprintf()
[yaboot.git] / lib / nonstd.c
1 /*
2  *  nonstd.c - A collection of trivial wrappers to allow typical libraries
3  *             to work within the yaboot environment.
4  *
5  *  Copyright 2011 Tony Breeds, IBM Corporation
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20  */
21
22 #include "ctype.h"
23 #include "types.h"
24 #include "stddef.h"
25 #include "stdlib.h"
26 #include "ctype.h"
27 #include "prom.h"
28 #include "nonstd.h"
29
30 FILE *stdout;
31
32 int printf(const char *format, ...)
33 {
34         va_list ap;
35         va_start (ap, format);
36         prom_vfprintf (prom_stdout, format, ap);
37         va_end (ap);
38
39         return 0;
40 }
41
42 int fprintf(FILE *stream, const char *format, ...)
43 {
44         va_list ap;
45         va_start (ap, format);
46         prom_vfprintf (prom_stdout, format, ap);
47         va_end (ap);
48
49         return 0;
50 }
51
52 int fputs(const char *s, FILE *stream)
53 {
54         prom_printf("%s", s);
55
56         return 0;
57 }
58
59 int fflush(FILE *stream)
60 {
61         return 0;
62 }
63
64 char *getenv(const char *name)
65 {
66         return NULL;
67 }