diff options
| author | Timo Savinen <tjsa@iki.fi> | 2005-11-08 18:31:40 +0000 |
|---|---|---|
| committer | Hadrien Dorio <hadrien.dorio@gmail.com> | 2017-12-16 00:24:06 +0100 |
| commit | 63ae206f2970076a9d09e90d7fbcb17ec1fa26e4 (patch) | |
| tree | 4bd49dbd6b9fadd98716eb9c84107926886128e8 | |
| parent | 9ed0cccb2c28d503169afe15f123007526a50535 (diff) | |
| download | binary-block-editor-63ae206f2970076a9d09e90d7fbcb17ec1fa26e4.tar.gz binary-block-editor-63ae206f2970076a9d09e90d7fbcb17ec1fa26e4.zip | |
0.1.7
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | configure | 20 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | doc/bbe.1 | 2 | ||||
| -rw-r--r-- | doc/bbe.texi | 2 | ||||
| -rw-r--r-- | src/bbe.c | 4 | ||||
| -rw-r--r-- | src/execute.c | 52 |
7 files changed, 64 insertions, 23 deletions
@@ -1,3 +1,8 @@ +2005-11-08 Timo Savinen <tjsa@iki.fi> + + * Version 0.1.7 + * More sane results when byte ranges of d and i commands overlap + 2005-10-28 Timo Savinen <tjsa@iki.fi> * Version 0.1.6 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for bbe 0.1.6. +# Generated by GNU Autoconf 2.59 for bbe 0.1.7. # # Report bugs to <tjsa@iki.fi>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='bbe' PACKAGE_TARNAME='bbe' -PACKAGE_VERSION='0.1.6' -PACKAGE_STRING='bbe 0.1.6' +PACKAGE_VERSION='0.1.7' +PACKAGE_STRING='bbe 0.1.7' PACKAGE_BUGREPORT='tjsa@iki.fi' ac_unique_file="src/bbe.c" @@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bbe 0.1.6 to adapt to many kinds of systems. +\`configure' configures bbe 0.1.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -846,7 +846,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bbe 0.1.6:";; + short | recursive ) echo "Configuration of bbe 0.1.7:";; esac cat <<\_ACEOF @@ -965,7 +965,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -bbe configure 0.1.6 +bbe configure 0.1.7 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -979,7 +979,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bbe $as_me 0.1.6, which was +It was created by bbe $as_me 0.1.7, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1623,7 +1623,7 @@ fi # Define the identity of the package. PACKAGE='bbe' - VERSION='0.1.6' + VERSION='0.1.7' cat >>confdefs.h <<_ACEOF @@ -4660,7 +4660,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by bbe $as_me 0.1.6, which was +This file was extended by bbe $as_me 0.1.7, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4723,7 +4723,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -bbe config.status 0.1.6 +bbe config.status 0.1.7 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 3e89cf2..886c6bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(bbe, 0.1.6, tjsa@iki.fi) +AC_INIT(bbe, 0.1.7, tjsa@iki.fi) AC_CONFIG_SRCDIR(src/bbe.c) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE @@ -203,4 +203,4 @@ Blocks between strings "\\x2f\\x34\\x6a" and "\\xff\\xff" are written to file /t .BR sed (1). .SH "AUTHOR" -Timo Savinen <tjsa@iki.fi >. +Timo Savinen <tjsa@iki.fi>. diff --git a/doc/bbe.texi b/doc/bbe.texi index 1224b9a..a56d989 100644 --- a/doc/bbe.texi +++ b/doc/bbe.texi @@ -6,7 +6,7 @@ @finalout @c %**end of header -@set VERSION 0.1.6 +@set VERSION 0.1.7 @copying This file documents the @command{bbe} - binary block editor @@ -20,7 +20,7 @@ * */ -/* $Id: bbe.c,v 1.39 2005/10/20 08:02:56 timo Exp $ */ +/* $Id: bbe.c,v 1.40 2005/11/01 19:01:16 timo Exp $ */ #include "bbe.h" #ifdef HAVE_GETOPT_H @@ -43,7 +43,7 @@ static char *program = "bbe"; #ifdef VERSION static char *version = VERSION; #else -static char *version = "0.1.3"; +static char *version = "0.1.7"; #endif #ifdef PACKAGE_BUGREPORT diff --git a/src/execute.c b/src/execute.c index 008cad0..53ac02b 100644 --- a/src/execute.c +++ b/src/execute.c @@ -20,7 +20,7 @@ * */ -/* $Id: execute.c,v 1.32 2005/10/27 16:37:14 timo Exp $ */ +/* $Id: execute.c,v 1.33 2005/11/01 19:01:16 timo Exp $ */ #include "bbe.h" #include <stdlib.h> @@ -96,7 +96,7 @@ byte_to_string(unsigned char byte,char format) char * off_t_to_string(off_t number,char format) { - static char string[16]; + static char string[128]; switch(format) { @@ -142,7 +142,13 @@ execute_commands(struct command_list *c) { if(c->rpos < c->count) { - delete_this_byte = 1; + if(inserting) + { + inserting = 0; + } else + { + delete_this_byte = 1; + } c->rpos++; } else { @@ -165,7 +171,13 @@ execute_commands(struct command_list *c) if(c->rpos <= c->s1_len) { put_byte(c->s1[c->rpos - 1]); - if(c->rpos < c->s1_len) inserting = 1; + if(delete_this_byte) + { + delete_this_byte = 0; + } else + { + if(c->rpos < c->s1_len) inserting = 1; + } } c->rpos++; } @@ -185,7 +197,13 @@ execute_commands(struct command_list *c) put_byte(c->s2[c->rpos]); } else if (c->rpos < c->s1_len && c->rpos >= c->s2_len) { - delete_this_byte = 1; + if(inserting) + { + inserting = 0; + } else + { + delete_this_byte = 1; + } } else if(c->rpos >= c->s1_len && c->rpos < c->s2_len) { put_byte(c->s2[c->rpos]); @@ -193,7 +211,13 @@ execute_commands(struct command_list *c) if(c->rpos >= c->s1_len - 1 && c->rpos < c->s2_len - 1) { - inserting = 1; + if(delete_this_byte) + { + delete_this_byte = 0; + } else + { + inserting = 1; + } } c->rpos++; @@ -221,10 +245,22 @@ execute_commands(struct command_list *c) if(c->s2_len) { put_byte(c->s2[0]); - if(c->s1_len == 1 && c->s2_len > 1) inserting = 1; + if(delete_this_byte) + { + delete_this_byte = 0; + } else + { + if(c->s1_len == 1 && c->s2_len > 1) inserting = 1; + } } else { - delete_this_byte = 1; + if(inserting) + { + inserting = 0; + } else + { + delete_this_byte = 1; + } } } break; |

