summaryrefslogtreecommitdiffstats
path: root/cmd-server-info.c
authornicm <nicm>2009-04-29 22:25:20 (GMT)
committer nicm <nicm>2009-04-29 22:25:20 (GMT)
commit6f8a41cef7c4d30cdf4ff49dbb4c6598a317c6d0 (patch) (side-by-side diff)
treef2d4d936a49af1723e100f99d65f3af55bff22b5 /cmd-server-info.c
parentecbceff8ca182551d347271d7269c0ed73294754 (diff)
downloadtmux-old-6f8a41cef7c4d30cdf4ff49dbb4c6598a317c6d0.zip
tmux-old-6f8a41cef7c4d30cdf4ff49dbb4c6598a317c6d0.tar.gz
tmux-old-6f8a41cef7c4d30cdf4ff49dbb4c6598a317c6d0.tar.bz2
Some tweaks for Solaris.
Get rid of vis.* in favour of a small replacement function.
Diffstat (limited to 'cmd-server-info.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-server-info.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c
index 32e4bdd..8ec7b12 100644
--- a/cmd-server-info.c
+++ b/cmd-server-info.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include <vis.h>
#include "tmux.h"
@@ -60,7 +59,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
struct utsname un;
struct grid *gd;
u_int i, j, k;
- char out[BUFSIZ];
+ char out[80];
char *tim;
time_t t;
u_int lines, ulines;
@@ -115,8 +114,9 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
RB_FOREACH(wl, winlinks, &s->windows) {
w = wl->window;
ctx->print(ctx, "%4u: %p/%p %s [%ux%u] [flags=0x%x, "
- "references=%u, layout=%u]", wl->idx, wl, w, w->name,
- w->sx, w->sy, w->flags, w->references, w->layout);
+ "references=%u, layout=%u]", wl->idx, wl, w,
+ w->name, w->sx, w->sy, w->flags, w->references,
+ w->layout);
j = 0;
TAILQ_FOREACH(wp, &w->panes, entry) {
lines = ulines = size = usize = 0;
@@ -157,10 +157,8 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
ent->code, ent->name);
break;
case TTYCODE_STRING:
- strnvis(out, code->value.string,
- sizeof out, VIS_OCTAL|VIS_WHITE);
- out[(sizeof out) - 1] = '\0';
-
+ clean_string(
+ code->value.string, out, sizeof out);
ctx->print(ctx, "%2u: %s: (string) %s",
ent->code, ent->name, out);
break;