3 typedef struct host_callback_struct host_callback
;
5 #define MAX_CALLBACK_FDS 10
7 struct host_callback_struct
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));
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
*));
29 /* Talk to the user on a console. */
30 void (*printf_filtered
) PARAMS ((host_callback
*, const char *, ...));
32 int last_errno
; /* host format */
34 int fdmap
[MAX_CALLBACK_FDS
];
35 char fdopen
[MAX_CALLBACK_FDS
];
36 char alwaysopen
[MAX_CALLBACK_FDS
];
41 extern host_callback default_callback
;