diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-28 08:53:37 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-28 08:53:37 -0400 |
commit | f78541dcec327b0c46b150ee7d727f3db80275c4 (patch) | |
tree | 9336801742d93ffa0c84c76e2b3cdc5b50c7125b /arch/powerpc/xmon/nonstdio.h | |
parent | c032524f0ddea5fcc3a2cece0d4a61f37e5ca9cd (diff) |
powerpc: Merge xmon
The merged version follows the ppc64 version pretty closely mostly,
and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version.
The main difference for ppc64 is that the 'p' command to call
show_state (which was always pretty dodgy) has been replaced by
the ppc32 'p' command, which calls a given procedure (so in fact
the old 'p' command behaviour can be achieved with 'p $show_state').
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon/nonstdio.h')
-rw-r--r-- | arch/powerpc/xmon/nonstdio.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/nonstdio.h b/arch/powerpc/xmon/nonstdio.h new file mode 100644 index 000000000000..84211a21c6f4 --- /dev/null +++ b/arch/powerpc/xmon/nonstdio.h | |||
@@ -0,0 +1,22 @@ | |||
1 | typedef int FILE; | ||
2 | extern FILE *xmon_stdin, *xmon_stdout; | ||
3 | #define EOF (-1) | ||
4 | #define stdin xmon_stdin | ||
5 | #define stdout xmon_stdout | ||
6 | #define printf xmon_printf | ||
7 | #define fprintf xmon_fprintf | ||
8 | #define fputs xmon_fputs | ||
9 | #define fgets xmon_fgets | ||
10 | #define putchar xmon_putchar | ||
11 | #define getchar xmon_getchar | ||
12 | #define putc xmon_putc | ||
13 | #define getc xmon_getc | ||
14 | #define fopen(n, m) NULL | ||
15 | #define fflush(f) do {} while (0) | ||
16 | #define fclose(f) do {} while (0) | ||
17 | extern char *fgets(char *, int, void *); | ||
18 | extern void xmon_printf(const char *, ...); | ||
19 | extern void xmon_fprintf(void *, const char *, ...); | ||
20 | extern void xmon_sprintf(char *, const char *, ...); | ||
21 | |||
22 | #define perror(s) printf("%s: no files!\n", (s)) | ||