mirror of
https://github.com/tmux/tmux.git
synced 2025-04-14 07:18:49 +00:00
Wrap some long lines and apply some static.
This commit is contained in:
parent
0f73af876f
commit
68b1fd0cc6
@ -23,14 +23,17 @@
|
|||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
struct layout_cell *layout_find_bottomright(struct layout_cell *);
|
static struct layout_cell *layout_find_bottomright(struct layout_cell *);
|
||||||
u_short layout_checksum(const char *);
|
static u_short layout_checksum(const char *);
|
||||||
int layout_append(struct layout_cell *, char *, size_t);
|
static int layout_append(struct layout_cell *, char *,
|
||||||
struct layout_cell *layout_construct(struct layout_cell *, const char **);
|
size_t);
|
||||||
void layout_assign(struct window_pane **, struct layout_cell *);
|
static struct layout_cell *layout_construct(struct layout_cell *,
|
||||||
|
const char **);
|
||||||
|
static void layout_assign(struct window_pane **,
|
||||||
|
struct layout_cell *);
|
||||||
|
|
||||||
/* Find the bottom-right cell. */
|
/* Find the bottom-right cell. */
|
||||||
struct layout_cell *
|
static struct layout_cell *
|
||||||
layout_find_bottomright(struct layout_cell *lc)
|
layout_find_bottomright(struct layout_cell *lc)
|
||||||
{
|
{
|
||||||
if (lc->type == LAYOUT_WINDOWPANE)
|
if (lc->type == LAYOUT_WINDOWPANE)
|
||||||
@ -40,7 +43,7 @@ layout_find_bottomright(struct layout_cell *lc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate layout checksum. */
|
/* Calculate layout checksum. */
|
||||||
u_short
|
static u_short
|
||||||
layout_checksum(const char *layout)
|
layout_checksum(const char *layout)
|
||||||
{
|
{
|
||||||
u_short csum;
|
u_short csum;
|
||||||
@ -63,12 +66,12 @@ layout_dump(struct layout_cell *root)
|
|||||||
if (layout_append(root, layout, sizeof layout) != 0)
|
if (layout_append(root, layout, sizeof layout) != 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
xasprintf(&out, "%04x,%s", layout_checksum(layout), layout);
|
xasprintf(&out, "%04hx,%s", layout_checksum(layout), layout);
|
||||||
return (out);
|
return (out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Append information for a single cell. */
|
/* Append information for a single cell. */
|
||||||
int
|
static int
|
||||||
layout_append(struct layout_cell *lc, char *buf, size_t len)
|
layout_append(struct layout_cell *lc, char *buf, size_t len)
|
||||||
{
|
{
|
||||||
struct layout_cell *lcchild;
|
struct layout_cell *lcchild;
|
||||||
@ -182,7 +185,7 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Assign panes into cells. */
|
/* Assign panes into cells. */
|
||||||
void
|
static void
|
||||||
layout_assign(struct window_pane **wp, struct layout_cell *lc)
|
layout_assign(struct window_pane **wp, struct layout_cell *lc)
|
||||||
{
|
{
|
||||||
struct layout_cell *lcchild;
|
struct layout_cell *lcchild;
|
||||||
@ -201,7 +204,7 @@ layout_assign(struct window_pane **wp, struct layout_cell *lc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Construct a cell from all or part of a layout tree. */
|
/* Construct a cell from all or part of a layout tree. */
|
||||||
struct layout_cell *
|
static struct layout_cell *
|
||||||
layout_construct(struct layout_cell *lcparent, const char **layout)
|
layout_construct(struct layout_cell *lcparent, const char **layout)
|
||||||
{
|
{
|
||||||
struct layout_cell *lc, *lcchild;
|
struct layout_cell *lc, *lcchild;
|
||||||
|
9
names.c
9
names.c
@ -73,12 +73,15 @@ check_window_name(struct window *w)
|
|||||||
if (!event_initialized(&w->name_event))
|
if (!event_initialized(&w->name_event))
|
||||||
evtimer_set(&w->name_event, name_time_callback, w);
|
evtimer_set(&w->name_event, name_time_callback, w);
|
||||||
if (!evtimer_pending(&w->name_event, NULL)) {
|
if (!evtimer_pending(&w->name_event, NULL)) {
|
||||||
log_debug("@%u name timer queued (%d left)", w->id, left);
|
log_debug("@%u name timer queued (%d left)", w->id,
|
||||||
|
left);
|
||||||
timerclear(&next);
|
timerclear(&next);
|
||||||
next.tv_usec = left;
|
next.tv_usec = left;
|
||||||
event_add(&w->name_event, &next);
|
event_add(&w->name_event, &next);
|
||||||
} else
|
} else {
|
||||||
log_debug("@%u name timer already queued (%d left)", w->id, left);
|
log_debug("@%u name timer already queued (%d left)",
|
||||||
|
w->id, left);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(&w->name_time, &tv, sizeof w->name_time);
|
memcpy(&w->name_time, &tv, sizeof w->name_time);
|
||||||
|
Loading…
Reference in New Issue
Block a user