From 8cd3947e7a7cc09de6299bbe82262bc123476218 Mon Sep 17 00:00:00 2001 From: Timo Savinen Date: Thu, 16 Mar 2006 12:53:53 +0000 Subject: 0.1.9 --- src/bbe.c | 13 ++++++++++--- src/execute.c | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/bbe.c b/src/bbe.c index e0e10da..39505a8 100644 --- a/src/bbe.c +++ b/src/bbe.c @@ -20,7 +20,7 @@ * */ -/* $Id: bbe.c,v 1.42 2005/11/15 13:59:15 timo Exp $ */ +/* $Id: bbe.c,v 1.43 2006-03-12 10:05:33 timo Exp $ */ #include "bbe.h" #ifdef HAVE_GETOPT_H @@ -490,8 +490,15 @@ parse_command(char *command_string) case 'd': if(i < 2 || i > 3 || strlen(token[0]) > 1) panic("Error in command",command_string,NULL); new->offset = parse_long(token[1]); - new->count = 1; - if(i == 3) new->count = parse_long(token[2]); + + if(token[2][0] == '*' && !token[2][1]) + { + new->count = 0; + } else + { + new->count = parse_long(token[2]); + if(new->count < 1) panic("Error in command",command_string,NULL); + } break; case 'c': if(i != 3 || strlen(token[1]) != 3 || strlen(token[2]) != 3 || strlen(token[0]) > 1) panic("Error in command",command_string,NULL); diff --git a/src/execute.c b/src/execute.c index bfc3b29..79891cd 100644 --- a/src/execute.c +++ b/src/execute.c @@ -20,7 +20,7 @@ * */ -/* $Id: execute.c,v 1.37 2005/11/15 13:59:15 timo Exp $ */ +/* $Id: execute.c,v 1.38 2006-03-12 10:05:33 timo Exp $ */ #include "bbe.h" #include @@ -144,7 +144,7 @@ execute_commands(struct command_list *c) case 'd': if(c->rpos || c->offset == in_buffer.block_offset) { - if(c->rpos < c->count) + if(c->rpos < c->count || c->count == 0) { if(inserting) { -- cgit v1.2.3