version 1.360, 2020/04/20 13:38:48 |
version 1.361, 2020/04/20 14:59:31 |
|
|
void |
void |
tty_sync_start(struct tty *tty) |
tty_sync_start(struct tty *tty) |
{ |
{ |
if ((~tty->flags & TTY_SYNCING) && tty_term_has(tty->term, TTYC_SYNC)) { |
if (tty->flags & TTY_BLOCK) |
|
return; |
|
if (tty->flags & TTY_SYNCING) |
|
return; |
|
tty->flags |= TTY_SYNCING; |
|
|
|
if (tty_term_has(tty->term, TTYC_SYNC)) { |
|
log_debug("%s sync start", tty->client->name); |
tty_putcode1(tty, TTYC_SYNC, 1); |
tty_putcode1(tty, TTYC_SYNC, 1); |
tty->flags |= TTY_SYNCING; |
|
} |
} |
} |
} |
|
|
void |
void |
tty_sync_end(struct tty *tty) |
tty_sync_end(struct tty *tty) |
{ |
{ |
if ((tty->flags & TTY_SYNCING) && tty_term_has(tty->term, TTYC_SYNC)) { |
if (tty->flags & TTY_BLOCK) |
|
return; |
|
if (~tty->flags & TTY_SYNCING) |
|
return; |
|
tty->flags &= ~TTY_SYNCING; |
|
|
|
if (tty_term_has(tty->term, TTYC_SYNC)) { |
|
log_debug("%s sync end", tty->client->name); |
tty_putcode1(tty, TTYC_SYNC, 2); |
tty_putcode1(tty, TTYC_SYNC, 2); |
tty->flags &= ~TTY_SYNCING; |
|
} |
} |
} |
} |
|
|
|
|
tty_cmd_syncstart(struct tty *tty, __unused const struct tty_ctx *ctx) |
tty_cmd_syncstart(struct tty *tty, __unused const struct tty_ctx *ctx) |
{ |
{ |
tty_sync_start(tty); |
tty_sync_start(tty); |
} |
|
|
|
void |
|
tty_cmd_syncend(struct tty *tty, __unused const struct tty_ctx *ctx) |
|
{ |
|
tty_sync_end(tty); |
|
} |
} |
|
|
static void |
static void |