diff options
| author | Timo Savinen <tjsa@iki.fi> | 2006-03-16 12:53:53 +0000 |
|---|---|---|
| committer | Hadrien Dorio <hadrien.dorio@gmail.com> | 2017-12-16 00:24:06 +0100 |
| commit | 8cd3947e7a7cc09de6299bbe82262bc123476218 (patch) | |
| tree | 0ffc2ba3f5a03768c46f45c4cc87b8eb101208be /src | |
| parent | dcefa7a144fb35b23d1ca339d58f3b9e58e7faa3 (diff) | |
| download | binary-block-editor-8cd3947e7a7cc09de6299bbe82262bc123476218.tar.gz binary-block-editor-8cd3947e7a7cc09de6299bbe82262bc123476218.zip | |
0.1.9
Diffstat (limited to 'src')
| -rw-r--r-- | src/bbe.c | 13 | ||||
| -rw-r--r-- | src/execute.c | 4 |
2 files changed, 12 insertions, 5 deletions
@@ -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 <stdlib.h> @@ -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) { |

