void monitor_readline(const char *prompt, int is_password,

                      char *buf, int buf_size)

{

    int i;



    if (is_password) {

        for (i = 0; i < MAX_MON; i++)

            if (monitor_hd[i] && monitor_hd[i]->focus == 0)

                qemu_chr_send_event(monitor_hd[i], CHR_EVENT_FOCUS);

    }

    readline_start(prompt, is_password, monitor_readline_cb, NULL);

    monitor_readline_buf = buf;

    monitor_readline_buf_size = buf_size;

    monitor_readline_started = 1;

    while (monitor_readline_started) {

        main_loop_wait(10);

    }

}

void monitor_readline(const char *prompt, int is_password,

                      char *buf, int buf_size)

{

    int i;



    if (is_password) {

        for (i = 0; i < MAX_MON; i++)

            if (monitor_hd[i] && monitor_hd[i]->focus == 0)

                qemu_chr_send_event(monitor_hd[i], CHR_EVENT_FOCUS);

    }

    readline_start(prompt, is_password, monitor_readline_cb, NULL);

    monitor_readline_buf = buf;

    monitor_readline_buf_size = buf_size;

    monitor_readline_started = 1;

    while (monitor_readline_started) {

        main_loop_wait(10);

    }

}

void FUNC_0(const char *VAR_0, int VAR_1,

                      char *VAR_2, int VAR_3)

{

    int VAR_4;



    if (VAR_1) {

        for (VAR_4 = 0; VAR_4 < MAX_MON; VAR_4++)

            if (monitor_hd[VAR_4] && monitor_hd[VAR_4]->focus == 0)

                qemu_chr_send_event(monitor_hd[VAR_4], CHR_EVENT_FOCUS);

    }

    readline_start(VAR_0, VAR_1, monitor_readline_cb, NULL);

    monitor_readline_buf = VAR_2;

    monitor_readline_buf_size = VAR_3;

    monitor_readline_started = 1;

    while (monitor_readline_started) {

        main_loop_wait(10);

    }

}

void FUNC_0(const char *VAR_0, int VAR_1,
char *VAR_2, int VAR_3)
{ int VAR_4; if (VAR_1) { for (VAR_4 = 0; VAR_4 < MAX_MON; VAR_4++) if (monitor_hd[VAR_4] && monitor_hd[VAR_4]->focus == 0)
qemu_chr_send_event(monitor_hd[VAR_4], CHR_EVENT_FOCUS); } readline_start(VAR_0, VAR_1, monitor_readline_cb, NULL); monitor_readline_buf = VAR_2; monitor_readline_buf_size = VAR_3; monitor_readline_started = 1; while (monitor_readline_started) { main_loop_wait(10); } }