# tty_add

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L622
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-tty-c-tty_add/

```c
static void tty_add(struct tty *tty, const char *buf, size_t len)
```

## Parameters

- `tty` (`struct tty *`)
- `buf` (`const char *`)
- `len` (`size_t`)

## Called by

- [`tty_cmd_rawstring`](/en/tmux/latest/reference/c-function-tty_cmd_rawstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2166)
- [`tty_putc`](/en/tmux/latest/reference/c-function-tty_putc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L663)
- [`tty_putn`](/en/tmux/latest/reference/c-function-tty_putn/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L695)
- [`tty_puts`](/en/tmux/latest/reference/c-function-tty_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L646)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L632)

## Referenced declarations

- [`tty.client`](/en/tmux/latest/reference/c-struct-tty-client/) (attribute)
- [`tty.discarded`](/en/tmux/latest/reference/c-struct-tty-discarded/) (attribute)
- [`tty.event_out`](/en/tmux/latest/reference/c-struct-tty-event_out/) (attribute)
- [`tty.flags`](/en/tmux/latest/reference/c-struct-tty-flags/) (attribute)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`tty.out`](/en/tmux/latest/reference/c-struct-tty-out/) (attribute)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`TTY_BLOCK`](/en/tmux/latest/reference/c-define-tmux-h-tty_block/) (constant)
- [`tty_log_fd`](/en/tmux/latest/reference/c-variable-tty-c-tty_log_fd/) (attribute)
- [`TTY_STARTED`](/en/tmux/latest/reference/c-define-tmux-h-tty_started/) (constant)
- [`client.written`](/en/tmux/latest/reference/c-struct-client-written/) (attribute)
