diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-12-04 22:14:47 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-12-04 22:14:47 +0000 |
commit | cc094fdfe6276b93683113f395edbc004837d362 (patch) | |
tree | c685b2f63461b2026d0677c4b8974e3004e114ff /cmd-show-buffer.c | |
parent | 1caa73afb4da381425160cbff68284a4dab1470b (diff) | |
download | rtmux-cc094fdfe6276b93683113f395edbc004837d362.tar.gz rtmux-cc094fdfe6276b93683113f395edbc004837d362.tar.bz2 rtmux-cc094fdfe6276b93683113f395edbc004837d362.zip |
Sync OpenBSD patchset 581:
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...
Diffstat (limited to 'cmd-show-buffer.c')
-rw-r--r-- | cmd-show-buffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd-show-buffer.c b/cmd-show-buffer.c index a7b88d81..d7e3e394 100644 --- a/cmd-show-buffer.c +++ b/cmd-show-buffer.c @@ -1,4 +1,4 @@ -/* $Id: cmd-show-buffer.c,v 1.11 2009-11-14 17:56:39 tcunha Exp $ */ +/* $Id: cmd-show-buffer.c,v 1.12 2009-12-04 22:14:47 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -71,24 +71,24 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) width = s->sx; if (ctx->cmdclient != NULL) width = ctx->cmdclient->tty.sx; - + buf = xmalloc(width + 1); len = 0; - + ptr = in; do { buf[len++] = *ptr++; - + if (len == width || buf[len - 1] == '\n') { if (buf[len - 1] == '\n') len--; buf[len] = '\0'; - ctx->print(ctx, "%s", buf); + ctx->print(ctx, "%s", buf); len = 0; } } while (*ptr != '\0'); - + if (len != 0) { buf[len] = '\0'; ctx->print(ctx, "%s", buf); |