=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.1048 retrieving revision 1.1049 diff -c -r1.1048 -r1.1049 *** src/usr.bin/tmux/tmux.h 2020/05/16 16:50:55 1.1048 --- src/usr.bin/tmux/tmux.h 2020/05/21 07:24:13 1.1049 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.1048 2020/05/16 16:50:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.1049 2020/05/21 07:24:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 896,901 **** --- 896,907 ---- TAILQ_ENTRY (window_mode_entry) entry; }; + /* Offsets into pane buffer. */ + struct window_pane_offset { + size_t used; + size_t acknowledged; + }; + /* Child window structure. */ struct window_pane { u_int id; *************** *** 946,951 **** --- 952,959 ---- int fd; struct bufferevent *event; + struct window_pane_offset offset; + size_t base_offset; struct event resize_timer; *************** *** 957,963 **** int pipe_fd; struct bufferevent *pipe_event; ! size_t pipe_off; struct screen *screen; struct screen base; --- 965,971 ---- int pipe_fd; struct bufferevent *pipe_event; ! struct window_pane_offset pipe_offset; struct screen *screen; struct screen base; *************** *** 1541,1546 **** --- 1549,1566 ---- }; RB_HEAD(client_windows, client_window); + /* Client offsets. */ + struct client_offset { + u_int pane; + + struct window_pane_offset offset; + int flags; + #define CLIENT_OFFSET_OFF 0x1 + + RB_ENTRY(client_offset) entry; + }; + RB_HEAD(client_offsets, client_offset); + /* Client connection. */ typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); typedef void (*prompt_free_cb)(void *); *************** *** 1555,1560 **** --- 1575,1581 ---- struct cmdq_list *queue; struct client_windows windows; + struct client_offsets offsets; pid_t pid; int fd; *************** *** 1927,1933 **** /* notify.c */ void notify_hook(struct cmdq_item *, const char *); - void notify_input(struct window_pane *, const u_char *, size_t); void notify_client(const char *, struct client *); void notify_session(const char *, struct session *); void notify_winlink(const char *, struct winlink *); --- 1948,1953 ---- *************** *** 2339,2344 **** --- 2359,2369 ---- /* server-client.c */ RB_PROTOTYPE(client_windows, client_window, entry, server_client_window_cmp); + RB_PROTOTYPE(client_offsets, client_offset, entry, server_client_offset_cmp); + struct client_offset *server_client_get_pane_offset(struct client *, + struct window_pane *); + struct client_offset *server_client_add_pane_offset(struct client *, + struct window_pane *); u_int server_client_how_many(void); void server_client_set_overlay(struct client *, u_int, overlay_check_cb, overlay_mode_cb, overlay_draw_cb, overlay_key_cb, *************** *** 2684,2689 **** --- 2709,2720 ---- int winlink_shuffle_up(struct session *, struct winlink *); int window_pane_start_input(struct window_pane *, struct cmdq_item *, char **); + void *window_pane_get_new_data(struct window_pane *, + struct window_pane_offset *, size_t *); + void window_pane_update_used_data(struct window_pane *, + struct window_pane_offset *, size_t, int); + void window_pane_acknowledge_data(struct window_pane *, + struct window_pane_offset *, size_t); /* layout.c */ u_int layout_count_cells(struct layout_cell *); *************** *** 2800,2805 **** --- 2831,2837 ---- /* control.c */ void control_start(struct client *); void printflike(2, 3) control_write(struct client *, const char *, ...); + void control_write_output(struct client *, struct window_pane *); /* control-notify.c */ void control_notify_input(struct client *, struct window_pane *,