aboutsummaryrefslogtreecommitdiff
path: root/layout-custom.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-07-15 12:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2016-07-15 12:01:10 +0100
commita24260bb23cd0a51ebd5f123d477520f8f953c5c (patch)
treeb5c175c9f960e9cf37f38aaf85d1726c9d606da0 /layout-custom.c
parentd4eeeb5498822d4330f19534f5b25b70589aec1f (diff)
parent9436a316038d1d1c9bc161d282564ed67e2f8ce2 (diff)
downloadrtmux-a24260bb23cd0a51ebd5f123d477520f8f953c5c.tar.gz
rtmux-a24260bb23cd0a51ebd5f123d477520f8f953c5c.tar.bz2
rtmux-a24260bb23cd0a51ebd5f123d477520f8f953c5c.zip
Merge branch 'obsd-master'
Diffstat (limited to 'layout-custom.c')
-rw-r--r--layout-custom.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/layout-custom.c b/layout-custom.c
index 99c6c3ce..c93e39c0 100644
--- a/layout-custom.c
+++ b/layout-custom.c
@@ -23,14 +23,17 @@
#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)
@@ -40,7 +43,7 @@ layout_find_bottomright(struct layout_cell *lc)
}
/* Calculate layout checksum. */
-u_short
+static u_short
layout_checksum(const char *layout)
{
u_short csum;
@@ -63,12 +66,12 @@ layout_dump(struct layout_cell *root)
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;
@@ -182,7 +185,7 @@ fail:
}
/* Assign panes into cells. */
-void
+static void
layout_assign(struct window_pane **wp, struct layout_cell *lc)
{
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. */
-struct layout_cell *
+static struct layout_cell *
layout_construct(struct layout_cell *lcparent, const char **layout)
{
struct layout_cell *lc, *lcchild;