-/* $OpenBSD: layout-custom.c,v 1.8 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: layout-custom.c,v 1.9 2016/07/15 09:27:35 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
#include "tmux.h"
-struct layout_cell *layout_find_bottomright(struct layout_cell *);
-u_short layout_checksum(const char *);
-int layout_append(struct layout_cell *, char *, size_t);
-struct layout_cell *layout_construct(struct layout_cell *, const char **);
-void layout_assign(struct window_pane **, struct layout_cell *);
+static struct layout_cell *layout_find_bottomright(struct layout_cell *);
+static u_short layout_checksum(const char *);
+static int layout_append(struct layout_cell *, char *,
+ size_t);
+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. */
-struct layout_cell *
+static struct layout_cell *
layout_find_bottomright(struct layout_cell *lc)
{
if (lc->type == LAYOUT_WINDOWPANE)
}
/* Calculate layout checksum. */
-u_short
+static u_short
layout_checksum(const char *layout)
{
u_short csum;
if (layout_append(root, layout, sizeof layout) != 0)
return (NULL);
- xasprintf(&out, "%04x,%s", layout_checksum(layout), layout);
+ xasprintf(&out, "%04hx,%s", layout_checksum(layout), layout);
return (out);
}
/* Append information for a single cell. */
-int
+static int
layout_append(struct layout_cell *lc, char *buf, size_t len)
{
struct layout_cell *lcchild;
}
/* Assign panes into cells. */
-void
+static void
layout_assign(struct window_pane **wp, struct layout_cell *lc)
{
struct layout_cell *lcchild;
}
/* 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)
{
struct layout_cell *lc, *lcchild;
-/* $OpenBSD: names.c,v 1.34 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.35 2016/07/15 09:27:35 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
if (!event_initialized(&w->name_event))
evtimer_set(&w->name_event, name_time_callback, w);
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);
next.tv_usec = left;
event_add(&w->name_event, &next);
- } else
- log_debug("@%u name timer already queued (%d left)", w->id, left);
+ } else {
+ log_debug("@%u name timer already queued (%d left)",
+ w->id, left);
+ }
return;
}
memcpy(&w->name_time, &tv, sizeof w->name_time);