# format_each

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3877
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-format_each/

```c
void format_each(struct format_tree *ft, void(*cb)(const char *, const char *, void *), void *arg)
```

## Parameters

- `ft` (`struct format_tree *`)
- `cb` (`void(*)(const char *, const char *, void *)`)
- `arg` (`void *`)

## Called by

- [`cmd_display_message_exec`](/en/tmux/3.7c/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-message.c#L133)
- [`format_log_debug`](/en/tmux/3.7c/reference/c-function-format_log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3872)

## Calls

- [`xsnprintf`](/en/tmux/3.7c/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3895)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3910)

## Referenced declarations

- [`format_entry.cb`](/en/tmux/3.7c/reference/c-struct-format_entry-cb/) (attribute)
- [`format_table_entry.cb`](/en/tmux/3.7c/reference/c-struct-format_table_entry-cb/) (attribute)
- [`format_table`](/en/tmux/3.7c/reference/c-variable-format-c-format_table/) (attribute)
- [`FORMAT_TABLE_TIME`](/en/tmux/3.7c/reference/c-enum-format_table_type-format_table_time/) (constant)
- [`format_tree`](/en/tmux/3.7c/reference/c-struct-format_tree/) (struct)
- [`format_entry.key`](/en/tmux/3.7c/reference/c-struct-format_entry-key/) (attribute)
- [`format_table_entry.key`](/en/tmux/3.7c/reference/c-struct-format_table_entry-key/) (attribute)
- [`nitems`](/en/tmux/3.7c/reference/c-define-tmux-h-nitems/) (constant)
- [`format_entry.time`](/en/tmux/3.7c/reference/c-struct-format_entry-time/) (attribute)
- [`format_tree.tree`](/en/tmux/3.7c/reference/c-struct-format_tree-tree/) (attribute)
- [`format_table_entry.type`](/en/tmux/3.7c/reference/c-struct-format_table_entry-type/) (attribute)
- [`format_entry.value`](/en/tmux/3.7c/reference/c-struct-format_entry-value/) (attribute)
