From ba06c2bdff1848475cad6f6ccc8bea43397ac839 Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 18 Sep 2001 07:31:31 +0000 Subject: * src/actions.c(cmd_defwinpos): abort if data is NULL (cmd_deftranspos): likewise (cmd_defmaxsizepos): likewise (cmd_defmaxsizepos): Use the correct command name in call to message. (cmd_deftranspos): likewise (cmd_defwinpos): likewise --- src/actions.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index 5efcd10..80b1e98 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1385,13 +1385,14 @@ cmd_pos (int interactive, void *data) int pos; rp_window *win; - if (current_window() == NULL) return NULL; if (data == NULL) { message (" pos: Two arguments needed "); return NULL; } + if (current_window() == NULL) return NULL; + win = current_window(); if ((pos = parse_winpos (data)) < 0) @@ -1412,9 +1413,15 @@ cmd_defwinpos (int interactive, void *data) { int pos; + if (data == NULL) + { + message (" defwinpos: Two arguments needed "); + return NULL; + } + if ((pos = parse_winpos (data)) < 0) { - message (" pos: Unknown position "); + message (" defwinpos: Unknown position "); } else { @@ -1429,6 +1436,12 @@ cmd_deftranspos (int interactive, void *data) { int pos; + if (data == NULL) + { + message (" deftranspos: Two arguments needed "); + return NULL; + } + if ((pos = parse_winpos (data)) < 0) { message (" pos: Unknown position "); @@ -1446,9 +1459,15 @@ cmd_defmaxsizepos (int interactive, void *data) { int pos; + if (data == NULL) + { + message (" defmaxsizepos: Two arguments needed "); + return NULL; + } + if ((pos = parse_winpos (data)) < 0) { - message (" pos: Unknown position "); + message (" defmaxsizepos: Unknown position "); } else { -- cgit v1.2.3