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 --- ChangeLog | 6 ++++++ src/actions.c | 25 ++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b739d5..aee8c18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2001-09-18 shawn * src/actions.c(user_commands)[0]: remove "lastmsg" from the list. + (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.h (cmd_info): new prototype (cmd_lastmsg): likewise 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