summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-09-26 06:45:28 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-09-26 06:45:28 +0000
commit62457bce0b6d23c1b6a8206582ac3dd206d4225d (patch)
tree42428d54daf3273242003827d16ae37d81e50230
parentdf2b3bcf44299d7060b3bc6c17c6e80a1f358692 (diff)
Trim.
-rw-r--r--CHANGES34
-rw-r--r--GNUmakefile6
-rw-r--r--cmd-command-prompt.c4
-rw-r--r--cmd-delete-buffer.c4
-rw-r--r--cmd-list-buffers.c4
-rw-r--r--cmd-list-commands.c6
-rw-r--r--cmd-list-windows.c4
-rw-r--r--cmd-send-prefix.c4
-rw-r--r--cmd-set-buffer.c4
-rw-r--r--cmd-set-option.c24
-rw-r--r--cmd-show-buffer.c6
-rw-r--r--cmd-string.c18
-rw-r--r--cmd.c6
-rw-r--r--compat/asprintf.c58
-rw-r--r--compat/forkpty-irix.c4
-rw-r--r--grid-view.c8
-rw-r--r--grid.c6
-rw-r--r--input.c16
-rw-r--r--log.c4
-rw-r--r--screen-redraw.c4
-rw-r--r--screen-write.c90
-rw-r--r--screen.c10
-rw-r--r--server-msg.c4
-rw-r--r--server.c4
-rw-r--r--session.c4
-rw-r--r--status.c32
-rw-r--r--tmux.c6
-rw-r--r--tmux.h10
-rw-r--r--tty-keys.c6
-rw-r--r--tty.c28
-rw-r--r--window-copy.c24
-rw-r--r--window-more.c4
-rw-r--r--window.c4
33 files changed, 225 insertions, 225 deletions
diff --git a/CHANGES b/CHANGES
index c6f2dff6..81f152d5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -90,7 +90,7 @@
A window may be restarted with the respawn-window command:
respawn-window [-k] [command]
-
+
If -k is given, any existing process running in the window is killed;
if command is omitted, the same command as when the window was first
created is used.
@@ -149,7 +149,7 @@
* buffer-limit option to set maximum size of buffer stack. Default is 9.
* Initial buffer improvements. Each session has a stack of buffers and each
buffer command takes a -b option to manipulate items on the stack. If -b
- is omitted, the top entry is used. The following commands are currently
+ is omitted, the top entry is used. The following commands are currently
available:
set-buffer [-b index] [-t target-session] string
@@ -174,10 +174,10 @@
18 June 2008
* New option, set-titles. On by default, this attempts to set the window title
- using the \e]2;...\007 xterm code.
-
+ using the \e]2;...\007 xterm code.
+
Note that elinks requires the STY environment variable (used by screen) to be
- set before it will set the window title. So, if you want window titles set by
+ set before it will set the window title. So, if you want window titles set by
elinks, set STY before running it (any value will do). I can't do this for all
windows since setting it to an invalid value breaks screen.
* Show arrows at either end of status line when scrolled if more windows
@@ -236,8 +236,8 @@
* Completely reorganise command parsing. Much more common code in cmd-generic.c
and a new way of specifying windows, clients or sessions. Now, most commands
- take a -t argument, which specifies a client, a session, or a window target.
- Clients and sessions are given alone (sessions are fnmatch(3)d and
+ take a -t argument, which specifies a client, a session, or a window target.
+ Clients and sessions are given alone (sessions are fnmatch(3)d and
clients currently not), windows are give by (client|session):index. For
example, if a user is in session "1" window 0 on /dev/ttypi, these should all
be equivalent:
@@ -261,7 +261,7 @@
is annoying. But then using non-flagged arguments would mean renaming the
current window would need to be something like:
-
+
tmux renamew : newname
It might be better not to try and be so consistent; comments to the usual
@@ -300,7 +300,7 @@
accepts -c as well.
* -s to specify session name now supports fnmatch(3) wildcards; if multiple
sessions are found, or if no -s is specified, the most newly created is used.
-* If no command is specified, assume new-session. As a byproduct, clean up
+* If no command is specified, assume new-session. As a byproduct, clean up
command default values into seperate init functions.
* kill-server command.
@@ -459,7 +459,7 @@
$ tmux bind q switch 0
$ tmux bind w switch 1
- Then you can switch between sessions 0 and 1 with a key :-).
+ Then you can switch between sessions 0 and 1 with a key :-).
* (nicm) Accept "-c client-tty" on command line to allow client manipulation
commands, and change detach-/refresh-session to detach-/refresh-client (this
loses the -a behaviour, but at some point -session versions may return, and
@@ -468,7 +468,7 @@
12 November 2007
-* (nicm) If the terminal supports default colours (AX present), force black
+* (nicm) If the terminal supports default colours (AX present), force black
background and white foreground to default. This is useful on transparent
*terms for programs which don't do it themselves (like most(1)).
* (nicm) Fill in the rest of the man page.
@@ -600,7 +600,7 @@
* (nicm) Deleting/inserting lines should follow scrolling region. Fix.
* (nicm) Allow creation of detached sessions: "tmux new-session -d".
-* (nicm) Permit error messages to be passed back for transient clients like
+* (nicm) Permit error messages to be passed back for transient clients like
rename. Also make rename -i work.
* (nicm) Pass through bell in any window to current.
@@ -612,11 +612,11 @@
- Split key parsing off into a separate file.
This is step one towards hopefully allowing a status line. It requires
that we output data as if the terminal had one line less than it really does -
- a serious problem when it comes to things like scrolling. This change
+ a serious problem when it comes to things like scrolling. This change
consolidates all the range checking and limiting together which should make
it easier.
* (mxey) Added window remaming, like "tmux rename [-s session] [-i index] name"
-
+
27 September 2007
* Split "tmux list" into "tmux list-sessions" (ls) and "list-windows" (lsw).
@@ -636,7 +636,7 @@
tmux -s/socket -nabc new
Becomes:
-
+
tmux -S/socket new -sabc
* Major tidy and split of client/server code.
@@ -666,7 +666,7 @@
09 July 2007
-* Initial import to CVS. Basic functions are working, albeit with a couple of
+* Initial import to CVS. Basic functions are working, albeit with a couple of
showstopper memory bugs and many missing features. Detaching, reattaching,
creating new sessions, listing sessions work acceptably for using with shells.
Simple curses programs (top, systat, tetris) and more complicated ones (mutt,
@@ -674,4 +674,4 @@
(including mutt, emacs). No status bar yet and no key remapping or other
customisation.
-$Id: CHANGES,v 1.161 2008-09-25 20:08:51 nicm Exp $
+$Id: CHANGES,v 1.162 2008-09-26 06:45:25 nicm Exp $
diff --git a/GNUmakefile b/GNUmakefile
index d478fdbe..ee69a306 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,4 +1,4 @@
-# $Id: GNUmakefile,v 1.41 2008-09-25 23:28:12 nicm Exp $
+# $Id: GNUmakefile,v 1.42 2008-09-26 06:45:25 nicm Exp $
.PHONY: clean
@@ -66,7 +66,7 @@ CFLAGS+= -DNO_STRLCPY -DNO_STRTONUM -DNO_TREE_H -DNO_SETPROCTITLE \
-DBROKEN_VSNPRINTF -D_SGI_SOURCE -std=c99
LDFLAGS+= -L/usr/local/lib
LIBS+= -lgen
-endif
+endif
ifeq ($(shell uname),SunOS)
INCDIRS+= -Icompat -I/usr/local/include/ncurses
@@ -76,7 +76,7 @@ CFLAGS+= -DNO_STRTONUM -DNO_TREE_H -DNO_PATHS_H -DNO_SETPROCTITLE \
-DNO_DAEMON -DNO_FORKPTY -DNO_PROGNAME -DNO_ASPRINTF -DNO_FGETLN
LDFLAGS+= -L/usr/local/lib
LIBS+= -lsocket -lnsl
-endif
+endif
ifeq ($(shell uname),Darwin)
INCDIRS+= -Icompat
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index d0bc5d9e..752ec7e8 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-command-prompt.c,v 1.5 2008-07-25 17:20:40 nicm Exp $ */
+/* $Id: cmd-command-prompt.c,v 1.6 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -82,7 +82,7 @@ cmd_command_prompt_callback(void *data, char *s)
}
if (cmd == NULL)
return;
-
+
ctx.msgdata = NULL;
ctx.cursession = c->session;
ctx.curclient = c;
diff --git a/cmd-delete-buffer.c b/cmd-delete-buffer.c
index 286f9817..e0a67559 100644
--- a/cmd-delete-buffer.c
+++ b/cmd-delete-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-delete-buffer.c,v 1.1 2008-06-20 17:31:48 nicm Exp $ */
+/* $Id: cmd-delete-buffer.c,v 1.2 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -57,7 +57,7 @@ cmd_delete_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
if (paste_free_index(&s->buffers, data->buffer) != 0)
ctx->error(ctx, "no buffer %d", data->buffer);
}
-
+
if (ctx->cmdclient != NULL)
server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
}
diff --git a/cmd-list-buffers.c b/cmd-list-buffers.c
index c279e2ef..fc47ff07 100644
--- a/cmd-list-buffers.c
+++ b/cmd-list-buffers.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-buffers.c,v 1.3 2008-06-20 19:03:45 nicm Exp $ */
+/* $Id: cmd-list-buffers.c,v 1.4 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -61,7 +61,7 @@ cmd_list_buffers_exec(struct cmd *self, struct cmd_ctx *ctx)
size = 0;
tmp = NULL;
}
-
+
idx = 0;
while ((pb = paste_walk_stack(&s->buffers, &idx)) != NULL) {
if (tmp != NULL) {
diff --git a/cmd-list-commands.c b/cmd-list-commands.c
index 8f1699a8..91862c0b 100644
--- a/cmd-list-commands.c
+++ b/cmd-list-commands.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-commands.c,v 1.1 2008-06-23 22:24:16 nicm Exp $ */
+/* $Id: cmd-list-commands.c,v 1.2 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -43,9 +43,9 @@ void
cmd_list_commands_exec(unused struct cmd *self, struct cmd_ctx *ctx)
{
const struct cmd_entry **entryp;
-
+
for (entryp = cmd_table; *entryp != NULL; entryp++)
- ctx->print(ctx, "%s %s", (*entryp)->name, (*entryp)->usage);
+ ctx->print(ctx, "%s %s", (*entryp)->name, (*entryp)->usage);
if (ctx->cmdclient != NULL)
server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
diff --git a/cmd-list-windows.c b/cmd-list-windows.c
index d5ae16e2..efc9d47e 100644
--- a/cmd-list-windows.c
+++ b/cmd-list-windows.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-windows.c,v 1.24 2008-09-25 20:08:52 nicm Exp $ */
+/* $Id: cmd-list-windows.c,v 1.25 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -65,7 +65,7 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_ctx *ctx)
size += gd->size[i] * sizeof **gd->data;
size += gd->hsize * (sizeof *gd->data);
size += gd->hsize * (sizeof *gd->size);
-
+
if (w->fd != -1)
name = ttyname(w->fd);
else
diff --git a/cmd-send-prefix.c b/cmd-send-prefix.c
index bcc82c3c..78cd4afa 100644
--- a/cmd-send-prefix.c
+++ b/cmd-send-prefix.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-send-prefix.c,v 1.18 2008-06-23 07:41:21 nicm Exp $ */
+/* $Id: cmd-send-prefix.c,v 1.19 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -49,7 +49,7 @@ cmd_send_prefix_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL)
return;
-
+
key = options_get_number(&s->options, "prefix");
window_key(wl->window, ctx->curclient, key);
diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c
index db972f8b..6fe81ce7 100644
--- a/cmd-set-buffer.c
+++ b/cmd-set-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-buffer.c,v 1.2 2008-06-20 18:45:35 nicm Exp $ */
+/* $Id: cmd-set-buffer.c,v 1.3 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -59,7 +59,7 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
if (paste_replace(&s->buffers, data->buffer, data->arg) != 0)
ctx->error(ctx, "no buffer %d", data->buffer);
}
-
+
if (ctx->cmdclient != NULL)
server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
}
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 44438d8f..e3711b3f 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-option.c,v 1.42 2008-09-25 23:28:12 nicm Exp $ */
+/* $Id: cmd-set-option.c,v 1.43 2008-09-26 06:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -59,7 +59,7 @@ const char *set_option_bell_action_list[] = {
"none", "any", "current", NULL
};
const char *set_option_mode_keys_list[] = {
- "emacs", "vi", NULL
+ "emacs", "vi", NULL
};
const struct set_option_entry set_option_table[NSETOPTION] = {
{ "bell-action", SET_OPTION_CHOICE, 0, 0, set_option_bell_action_list },
@@ -79,7 +79,7 @@ const struct set_option_entry set_option_table[NSETOPTION] = {
{ "status-right", SET_OPTION_STRING, 0, 0, NULL },
};
-void set_option_string(struct cmd_ctx *,
+void set_option_string(struct cmd_ctx *,
struct options *, const struct set_option_entry *, char *);
void set_option_number(struct cmd_ctx *,
struct options *, const struct set_option_entry *, char *);
@@ -240,7 +240,7 @@ set_option_number(struct cmd_ctx *ctx, struct options *oo,
}
options_set_number(oo, entry->name, number);
}
-
+
void
set_option_key(struct cmd_ctx *ctx, struct options *oo,
const struct set_option_entry *entry, char *value)
@@ -257,9 +257,9 @@ set_option_key(struct cmd_ctx *ctx, struct options *oo,
return;
}
options_set_number(oo, entry->name, key);
-
+
}
-
+
void
set_option_colour(struct cmd_ctx *ctx, struct options *oo,
const struct set_option_entry *entry, char *value)
@@ -270,21 +270,21 @@ set_option_colour(struct cmd_ctx *ctx, struct options *oo,
ctx->error(ctx, "empty value");
return;
}
-
+
if ((colour = colour_fromstring(value)) > 8) {
ctx->error(ctx, "bad colour: %s", value);
return;
}
-
- options_set_number(oo, entry->name, colour);
+
+ options_set_number(oo, entry->name, colour);
}
-
+
void
set_option_flag(struct cmd_ctx *ctx, struct options *oo,
const struct set_option_entry *entry, char *value)
{
int flag;
-
+
if (value == NULL || *value == '\0')
flag = !options_get_number(oo, entry->name);
else {
@@ -304,7 +304,7 @@ set_option_flag(struct cmd_ctx *ctx, struct options *oo,
options_set_number(oo, entry->name, flag);
}
-
+
void
set_option_choice(struct cmd_ctx *ctx, struct options *oo,
const struct set_option_entry *entry, char *value)
diff --git a/cmd-show-buffer.c b/cmd-show-buffer.c
index a964bc06..226dbc78 100644
--- a/cmd-show-buffer.c
+++ b/cmd-show-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-show-buffer.c,v 1.1 2008-06-20 08:36:20 nicm Exp $ */
+/* $Id: cmd-show-buffer.c,v 1.2 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,7 +68,7 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
buf = xmalloc(size + 1);
len = 0;
-
+
ptr = pb->data;
do {
buf[len++] = *ptr++;
@@ -83,7 +83,7 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
buf[len] = '\0';
ctx->print(ctx, buf);
}
-
+
if (ctx->cmdclient != NULL)
server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
}
diff --git a/cmd-string.c b/cmd-string.c
index 0baa15d0..b896701e 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-string.c,v 1.6 2008-08-01 20:25:13 nicm Exp $ */
+/* $Id: cmd-string.c,v 1.7 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -48,10 +48,10 @@ cmd_string_ungetc(unused const char *s, size_t *p)
(*p)--;
}
-/*
+/*
* Parse command string. Returns -1 on error. If returning -1, cause is error
* string, or NULL for empty command.
- */
+ */
int
cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
{
@@ -81,7 +81,7 @@ cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
*cmd = NULL;
rval = -1;
-
+
p = 0;
for (;;) {
ch = cmd_string_getc(s, &p);
@@ -130,7 +130,7 @@ cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
break;
if (argc == 0)
goto out;
-
+
*cmd = cmd_parse(argc, argv, cause);
rval = 0;
goto out;
@@ -143,10 +143,10 @@ cmd_string_parse(const char *s, struct cmd **cmd, char **cause)
break;
}
}
-
+
error:
xasprintf(cause, "bad command: %s", s);
-
+
out:
if (buf != NULL)
xfree(buf);
@@ -252,7 +252,7 @@ cmd_string_variable(const char *s, size_t *p)
buf = xrealloc(buf, 1, len + 1);
buf[len++] = ch;
-
+
for(;;) {
ch = cmd_string_getc(s, p);
if (ch == EOF || !cmd_string_other(ch))
@@ -284,5 +284,5 @@ cmd_string_variable(const char *s, size_t *p)
error:
if (buf != NULL)
xfree(buf);
- return (NULL);
+ return (NULL);
}
diff --git a/cmd.c b/cmd.c
index fbbd0112..525df0bf 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.64 2008-09-25 23:28:15 nicm Exp $ */
+/* $Id: cmd.c,v 1.65 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -93,13 +93,13 @@ cmd_complete(const char *s)
continue;
ARRAY_ADD(&list, (*entryp)->name);
}
-
+
/* If none, bail now with the original string. */
if (ARRAY_LENGTH(&list) == 0) {
ARRAY_FREE(&list);
return (xstrdup(s));
}
-
+
/* If an exact match, return it, with a trailing space. */
if (ARRAY_LENGTH(&list) == 1) {
xasprintf(&s2, "%s ", ARRAY_FIRST(&list));
diff --git a/compat/asprintf.c b/compat/asprintf.c
index 05e8dd24..41ae64a7 100644
--- a/compat/asprintf.c
+++ b/compat/asprintf.c
@@ -1,4 +1,4 @@
-/* $Id: asprintf.c,v 1.3 2008-06-23 21:54:48 nicm Exp $ */
+/* $Id: asprintf.c,v 1.4 2008-09-26 06:45:28 nicm Exp $ */
/*
* Copyright (c) 2006 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -58,32 +58,32 @@ error:
return (-1);
}
#else
-int
-vasprintf(char **ret, const char *fmt, va_list ap)
-{
- va_list aq;
- size_t len;
- char *buf;
- int n;
-
- len = 64;
- buf = xmalloc(len);
-
- for (;;) {
- va_copy(aq, ap);
- n = vsnprintf(buf, len, fmt, aq);
- va_end(aq);
-
- if (n != -1) {
- *ret = buf;
- return (n);
- }
-
- if (len > SIZE_MAX / 2) {
- xfree(buf);
- return (-1);
- }
- len *= 2;
- }
-}
+int
+vasprintf(char **ret, const char *fmt, va_list ap)
+{
+ va_list aq;
+ size_t len;
+ char *buf;
+ int n;
+
+ len = 64;
+ buf = xmalloc(len);
+
+ for (;;) {
+ va_copy(aq, ap);
+ n = vsnprintf(buf, len, fmt, aq);
+ va_end(aq);
+
+ if (n != -1) {
+ *ret = buf;
+ return (n);
+ }
+
+ if (len > SIZE_MAX / 2) {
+ xfree(buf);
+ return (-1);
+ }
+ len *= 2;
+ }
+}
#endif
diff --git a/compat/forkpty-irix.c b/compat/forkpty-irix.c
index 1e0f689e..c7809b68 100644
--- a/compat/forkpty-irix.c
+++ b/compat/forkpty-irix.c
@@ -1,4 +1,4 @@
-/* $Id: forkpty-irix.c,v 1.1 2008-06-23 21:54:48 nicm Exp $ */
+/* $Id: forkpty-irix.c,v 1.2 2008-09-26 06:45:28 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -50,7 +50,7 @@ forkpty(int *master,
close(*master);
setsid();
-
+
old = signal(SIGHUP, SIG_IGN);
vhangup();
signal(SIGHUP, old);
diff --git a/grid-view.c b/grid-view.c
index 434a2d06..cb532110 100644
--- a/grid-view.c
+++ b/grid-view.c
@@ -1,4 +1,4 @@
-/* $Id: grid-view.c,v 1.1 2008-09-25 20:08:52 nicm Exp $ */
+/* $Id: grid-view.c,v 1.2 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -133,7 +133,7 @@ grid_view_insert_lines_region(
rlower = grid_view_y(gd, rlower);
py = grid_view_y(gd, py);
-
+
grid_move_lines(gd, py + ny, py, (rlower + 1) - py - ny);
}
@@ -178,7 +178,7 @@ grid_view_insert_cells(struct grid_data *gd, u_int px, u_int py, u_int nx)
px = grid_view_x(gd, px);
- sx = grid_view_x(gd, gd->sx);
+ sx = grid_view_x(gd, gd->sx);
grid_move_cells(gd, px + nx, px, py, (sx - 1) - (px + nx));
}
@@ -193,7 +193,7 @@ grid_view_delete_cells(struct grid_data *gd, u_int px, u_int py, u_int nx)
px = grid_view_x(gd, px);
- sx = grid_view_x(gd, gd->sx);
+ sx = grid_view_x(gd, gd->sx);
grid_move_cells(gd, px, px + nx, py, (sx - 1) - (px + nx));
}
diff --git a/grid.c b/grid.c
index 29e39a16..941ec919 100644
--- a/grid.c
+++ b/grid.c
@@ -1,4 +1,4 @@
-/* $Id: grid.c,v 1.1 2008-09-25 20:08:52 nicm Exp $ */
+/* $Id: grid.c,v 1.2 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -214,14 +214,14 @@ grid_clear(struct grid_data *gd, u_int px, u_int py, u_int nx, u_int ny)
void
grid_fill(struct grid_data *gd,
const struct grid_cell *gc, u_int px, u_int py, u_int nx, u_int ny)
-{
+{
u_int xx, yy;
GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny);
if (nx == 0 || ny == 0)
return;
-
+
grid_check_x(gd, px);
grid_check_x(gd, px + nx - 1);
grid_check_y(gd, py);
diff --git a/input.c b/input.c
index ada32df1..72a74b6f 100644
--- a/input.c
+++ b/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.59 2008-09-25 20:08:52 nicm Exp $ */
+/* $Id: input.c,v 1.60 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -518,7 +518,7 @@ void
input_handle_character(u_char ch, struct input_ctx *ictx)
{
if (ch > 0x7f) {
- /*
+ /*
* UTF-8 sequence.
*
* 11000010-11011111 C2-DF start of 2-byte sequence
@@ -528,7 +528,7 @@ input_handle_character(u_char ch, struct input_ctx *ictx)
memset(ictx->utf8_buf, 0xff, sizeof ictx->utf8_buf);
ictx->utf8_buf[0] = ch;
ictx->utf8_off = 1;
-
+
if (ch >= 0xc2 && ch <= 0xdf) {
log_debug2("-- u2 %zu: %hhu (%c)", ictx->off, ch, ch);
input_state(ictx, input_state_utf8);
@@ -541,7 +541,7 @@ input_handle_character(u_char ch, struct input_ctx *ictx)
ictx->utf8_len = 2;
return;
}
- if (ch >= 0xf0 && ch <= 0xf4) {
+ if (ch >= 0xf0 && ch <= 0xf4) {
log_debug2("-- u4 %zu: %hhu (%c)", ictx->off, ch, ch);
input_state(ictx, input_state_utf8);
ictx->utf8_len = 3;
@@ -663,7 +663,7 @@ input_handle_standard_two(u_char ch, struct input_ctx *ictx)
screen_write_mousemode(&ictx->ctx, 0);
screen_write_clearscreen(&ictx->ctx);
- screen_write_cursormove(&ictx->ctx, 0, 0);
+ screen_write_cursormove(&ictx->ctx, 0, 0);
break;
case 'k':
input_start_string(ictx, STRING_NAME);
@@ -1145,7 +1145,7 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
return;
if (o != 5)
continue;
-
+
i++;
if (input_get_argument(ictx, i, &o, 0) != 0)
return;
@@ -1158,7 +1158,7 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
}
continue;
}
-
+
switch (m) {
case 0:
case 10:
@@ -1213,7 +1213,7 @@ input_handle_sequence_sgr(struct input_ctx *ictx)
case 44:
case 45:
case 46:
- case 47:
+ case 47:
gc->flags &= ~GRID_FLAG_BG256;
gc->bg = m - 40;
break;
diff --git a/log.c b/log.c
index 1c8c32c8..16c7f503 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $Id: log.c,v 1.7 2008-09-25 20:31:19 nicm Exp $ */
+/* $Id: log.c,v 1.8 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -72,7 +72,7 @@ log_open_file(int level, const char *path)
log_file = fopen(path, "w");
if (log_file == NULL)
return;
-
+
log_type = LOG_TYPE_FILE;
log_level = level;
diff --git a/screen-redraw.c b/screen-redraw.c
index 7542d14e..1b6b5b47 100644
--- a/screen-redraw.c
+++ b/screen-redraw.c
@@ -1,4 +1,4 @@
-/* $Id: screen-redraw.c,v 1.12 2008-09-25 20:08:54 nicm Exp $ */
+/* $Id: screen-redraw.c,v 1.13 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -132,7 +132,7 @@ screen_redraw_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py)
ctx->write(ctx->data, TTY_CURSORMOVE, ctx->s->cx, ctx->s->cy);
}
- gc = grid_view_peek_cell(ctx->s->grid, px, py);
+ gc = grid_view_peek_cell(ctx->s->grid, px, py);
if (screen_check_selection(ctx->s, px, py)) {
memcpy(&hc, gc, sizeof hc);
hc.attr |= GRID_ATTR_REVERSE;
diff --git a/screen-write.c b/screen-write.c
index fa64f2a1..41d81967 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1,4 +1,4 @@
-/* $Id: screen-write.c,v 1.14 2008-09-25 20:08:54 nicm Exp $ */
+/* $Id: screen-write.c,v 1.15 2008-09-26 06:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -152,7 +152,7 @@ screen_write_cursordown(struct screen_write_ctx *ctx, u_int ny)
ny = screen_size_y(s) - 1 - s->cy;
if (ny == 0)
ny = 1;
-
+
s->cy += ny;
if (ctx->write != NULL)
@@ -171,7 +171,7 @@ screen_write_cursorright(struct screen_write_ctx *ctx, u_int nx)
nx = 1;
s->cx += nx;
-
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_CURSORRIGHT, nx);
}
@@ -181,14 +181,14 @@ void
screen_write_cursorleft(struct screen_write_ctx *ctx, u_int nx)
{
struct screen *s = ctx->s;
-
+
if (nx > s->cx)
nx = s->cx;
if (nx == 0)
nx = 1;
s->cx -= nx;
-
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_CURSORLEFT, nx);
}
@@ -198,14 +198,14 @@ void
screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx)
{
struct screen *s = ctx->s;
-
+
if (nx > screen_size_x(s) - 1 - s->cx)
nx = screen_size_x(s) - 1 - s->cx;
if (nx == 0)
nx = 1;
grid_view_insert_cells(s->grid, s->cx, s->cy, nx);
-
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_INSERTCHARACTER, nx);
}
@@ -215,14 +215,14 @@ void
screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx)
{
struct screen *s = ctx->s;
-
+
if (nx > screen_size_x(s) - 1 - s->cx)
nx = screen_size_x(s) - 1 - s->cx;
if (nx == 0)
nx = 1;
grid_view_delete_cells(s->grid, s->cx, s->cy, nx);
-
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_DELETECHARACTER, nx);
}
@@ -243,8 +243,8 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny)
else {
grid_view_insert_lines_region(
s->grid, s->rupper, s->rlower, s->cy, ny);
- }
-
+ }
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_INSERTLINE, ny);
}
@@ -276,9 +276,9 @@ void
screen_write_clearline(struct screen_write_ctx *ctx)
{
struct screen *s = ctx->s;
-
+
grid_view_clear(s->grid, 0, s->cy, screen_size_x(s), 1);
-
+
if (ctx->write != NULL)
ctx->write(ctx->data, TTY_CLEARLINE);
}
@@ -288,9 +288,9 @@ void
screen_write_clearendofline(struct screen_write_ctx *ctx)
{