Commit 4728efa329df7c14883956ffa66dc60bc138181a
1 parent
49ecc3fa
fixed QEMU_TOOL tests
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3545 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
61 additions
and
60 deletions
vl.h
... | ... | @@ -72,8 +72,8 @@ static inline char *realpath(const char *path, char *resolved_path) |
72 | 72 | |
73 | 73 | #ifdef QEMU_TOOL |
74 | 74 | |
75 | -/* we use QEMU_TOOL in the command line tools which do not depend on | |
76 | - the target CPU type */ | |
75 | +/* we use QEMU_TOOL on code which does not depend on the target CPU | |
76 | + type */ | |
77 | 77 | #include "config-host.h" |
78 | 78 | #include <setjmp.h> |
79 | 79 | #include "osdep.h" |
... | ... | @@ -81,7 +81,6 @@ static inline char *realpath(const char *path, char *resolved_path) |
81 | 81 | |
82 | 82 | #else |
83 | 83 | |
84 | -#include "audio/audio.h" | |
85 | 84 | #include "cpu.h" |
86 | 85 | |
87 | 86 | #endif /* !defined(QEMU_TOOL) */ |
... | ... | @@ -117,6 +116,8 @@ static inline char *realpath(const char *path, char *resolved_path) |
117 | 116 | #endif |
118 | 117 | #endif |
119 | 118 | |
119 | +#include "audio/audio.h" | |
120 | + | |
120 | 121 | /* cutils.c */ |
121 | 122 | void pstrcpy(char *buf, int buf_size, const char *str); |
122 | 123 | char *pstrcat(char *buf, int buf_size, const char *s); |
... | ... | @@ -360,6 +361,38 @@ void qemu_chr_read(CharDriverState *s, uint8_t *buf, int len); |
360 | 361 | typedef struct DisplayState DisplayState; |
361 | 362 | typedef struct TextConsole TextConsole; |
362 | 363 | |
364 | +struct DisplayState { | |
365 | + uint8_t *data; | |
366 | + int linesize; | |
367 | + int depth; | |
368 | + int bgr; /* BGR color order instead of RGB. Only valid for depth == 32 */ | |
369 | + int width; | |
370 | + int height; | |
371 | + void *opaque; | |
372 | + struct QEMUTimer *gui_timer; | |
373 | + | |
374 | + void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); | |
375 | + void (*dpy_resize)(struct DisplayState *s, int w, int h); | |
376 | + void (*dpy_refresh)(struct DisplayState *s); | |
377 | + void (*dpy_copy)(struct DisplayState *s, int src_x, int src_y, | |
378 | + int dst_x, int dst_y, int w, int h); | |
379 | + void (*dpy_fill)(struct DisplayState *s, int x, int y, | |
380 | + int w, int h, uint32_t c); | |
381 | + void (*mouse_set)(int x, int y, int on); | |
382 | + void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y, | |
383 | + uint8_t *image, uint8_t *mask); | |
384 | +}; | |
385 | + | |
386 | +static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) | |
387 | +{ | |
388 | + s->dpy_update(s, x, y, w, h); | |
389 | +} | |
390 | + | |
391 | +static inline void dpy_resize(DisplayState *s, int w, int h) | |
392 | +{ | |
393 | + s->dpy_resize(s, w, h); | |
394 | +} | |
395 | + | |
363 | 396 | typedef void (*vga_hw_update_ptr)(void *); |
364 | 397 | typedef void (*vga_hw_invalidate_ptr)(void *); |
365 | 398 | typedef void (*vga_hw_screen_dump_ptr)(void *, const char *); |
... | ... | @@ -729,6 +762,31 @@ void path_combine(char *dest, int dest_size, |
729 | 762 | const char *base_path, |
730 | 763 | const char *filename); |
731 | 764 | |
765 | + | |
766 | +/* monitor.c */ | |
767 | +void monitor_init(CharDriverState *hd, int show_banner); | |
768 | +void term_puts(const char *str); | |
769 | +void term_vprintf(const char *fmt, va_list ap); | |
770 | +void term_printf(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
771 | +void term_print_filename(const char *filename); | |
772 | +void term_flush(void); | |
773 | +void term_print_help(void); | |
774 | +void monitor_readline(const char *prompt, int is_password, | |
775 | + char *buf, int buf_size); | |
776 | + | |
777 | +/* readline.c */ | |
778 | +typedef void ReadLineFunc(void *opaque, const char *str); | |
779 | + | |
780 | +extern int completion_index; | |
781 | +void add_completion(const char *str); | |
782 | +void readline_handle_byte(int ch); | |
783 | +void readline_find_completion(const char *cmdline); | |
784 | +const char *readline_get_history(unsigned int index); | |
785 | +void readline_start(const char *prompt, int is_password, | |
786 | + ReadLineFunc *readline_func, void *opaque); | |
787 | + | |
788 | +void kqemu_record_dump(void); | |
789 | + | |
732 | 790 | #ifndef QEMU_TOOL |
733 | 791 | |
734 | 792 | typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size, |
... | ... | @@ -916,38 +974,6 @@ extern struct soundhw soundhw[]; |
916 | 974 | #define VGA_RAM_SIZE (9 * 1024 * 1024) |
917 | 975 | #endif |
918 | 976 | |
919 | -struct DisplayState { | |
920 | - uint8_t *data; | |
921 | - int linesize; | |
922 | - int depth; | |
923 | - int bgr; /* BGR color order instead of RGB. Only valid for depth == 32 */ | |
924 | - int width; | |
925 | - int height; | |
926 | - void *opaque; | |
927 | - QEMUTimer *gui_timer; | |
928 | - | |
929 | - void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); | |
930 | - void (*dpy_resize)(struct DisplayState *s, int w, int h); | |
931 | - void (*dpy_refresh)(struct DisplayState *s); | |
932 | - void (*dpy_copy)(struct DisplayState *s, int src_x, int src_y, | |
933 | - int dst_x, int dst_y, int w, int h); | |
934 | - void (*dpy_fill)(struct DisplayState *s, int x, int y, | |
935 | - int w, int h, uint32_t c); | |
936 | - void (*mouse_set)(int x, int y, int on); | |
937 | - void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y, | |
938 | - uint8_t *image, uint8_t *mask); | |
939 | -}; | |
940 | - | |
941 | -static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) | |
942 | -{ | |
943 | - s->dpy_update(s, x, y, w, h); | |
944 | -} | |
945 | - | |
946 | -static inline void dpy_resize(DisplayState *s, int w, int h) | |
947 | -{ | |
948 | - s->dpy_resize(s, w, h); | |
949 | -} | |
950 | - | |
951 | 977 | int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base, |
952 | 978 | unsigned long vga_ram_offset, int vga_ram_size); |
953 | 979 | int pci_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, |
... | ... | @@ -1696,29 +1722,4 @@ extern QEMUMachine mcf5208evb_machine; |
1696 | 1722 | #include "gdbstub.h" |
1697 | 1723 | |
1698 | 1724 | #endif /* defined(QEMU_TOOL) */ |
1699 | - | |
1700 | -/* monitor.c */ | |
1701 | -void monitor_init(CharDriverState *hd, int show_banner); | |
1702 | -void term_puts(const char *str); | |
1703 | -void term_vprintf(const char *fmt, va_list ap); | |
1704 | -void term_printf(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
1705 | -void term_print_filename(const char *filename); | |
1706 | -void term_flush(void); | |
1707 | -void term_print_help(void); | |
1708 | -void monitor_readline(const char *prompt, int is_password, | |
1709 | - char *buf, int buf_size); | |
1710 | - | |
1711 | -/* readline.c */ | |
1712 | -typedef void ReadLineFunc(void *opaque, const char *str); | |
1713 | - | |
1714 | -extern int completion_index; | |
1715 | -void add_completion(const char *str); | |
1716 | -void readline_handle_byte(int ch); | |
1717 | -void readline_find_completion(const char *cmdline); | |
1718 | -const char *readline_get_history(unsigned int index); | |
1719 | -void readline_start(const char *prompt, int is_password, | |
1720 | - ReadLineFunc *readline_func, void *opaque); | |
1721 | - | |
1722 | -void kqemu_record_dump(void); | |
1723 | - | |
1724 | 1725 | #endif /* VL_H */ | ... | ... |