* bcache.c, bcache.h: New files to implement a byte cache.
[deliverable/binutils-gdb.git] / gdb / callback.h
1 #ifndef CALLBACK_H
2 #define CALLBACK_H
3 typedef struct host_callback_struct host_callback;
4
5 #define MAX_CALLBACK_FDS 10
6
7 struct host_callback_struct
8 {
9 int (*close) PARAMS ((host_callback *,int));
10 int (*get_errno) PARAMS ((host_callback *));
11 int (*isatty) PARAMS ((host_callback *, int));
12 int (*lseek) PARAMS ((host_callback *, int, long , int));
13 int (*open) PARAMS ((host_callback *, const char*, int mode));
14 int (*read) PARAMS ((host_callback *,int, char *, int));
15 int (*read_stdin) PARAMS (( host_callback *, char *, int));
16 int (*rename) PARAMS ((host_callback *, const char *, const char *));
17 int (*system) PARAMS ((host_callback *, const char *));
18 long (*time) PARAMS ((host_callback *, long *));
19 int (*unlink) PARAMS ((host_callback *, const char *));
20 int (*write) PARAMS ((host_callback *,int, const char *, int));
21 int (*write_stdout) PARAMS ((host_callback *, const char *, int));
22
23
24 /* Used when the target has gone away, so we can close open
25 handles and free memory etc etc. */
26 int (*shutdown) PARAMS ((host_callback *));
27 int (*init) PARAMS ((host_callback *));
28
29 /* Talk to the user on a console. */
30 void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
31
32 int last_errno; /* host format */
33
34 int fdmap[MAX_CALLBACK_FDS];
35 char fdopen[MAX_CALLBACK_FDS];
36 char alwaysopen[MAX_CALLBACK_FDS];
37 };
38 #endif
39
40
41 extern host_callback default_callback;
This page took 0.030755 seconds and 4 git commands to generate.