diff options
| author | Timo Savinen <tjsa@iki.fi> | 2006-11-05 12:05:17 +0000 |
|---|---|---|
| committer | Hadrien Dorio <hadrien.dorio@gmail.com> | 2017-12-16 00:24:06 +0100 |
| commit | 6c76ee16e1d4f1057ce37166001e95a87c5acb39 (patch) | |
| tree | fb3e7ab45bc0543b22118dbb58bc7d64948a7cba | |
| parent | 37db3f05301f54804d7b86b3aa9edaaf0e3e7d23 (diff) | |
| download | binary-block-editor-master.tar.gz binary-block-editor-master.zip | |
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rwxr-xr-x | configure | 20 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | doc/bbe.1 | 5 | ||||
| -rw-r--r-- | doc/bbe.html | 10 | ||||
| -rw-r--r-- | doc/bbe.info | 34 | ||||
| -rw-r--r-- | doc/bbe.texi | 14 | ||||
| -rw-r--r-- | src/bbe.c | 3 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/execute.c | 3 |
10 files changed, 64 insertions, 33 deletions
@@ -1,3 +1,7 @@ +2006-11-xx Timo Savinen <tjsa@iki.fi> + + * Version 0.2.2 + 2006-10-29 Timo Savinen <tjsa@iki.fi> * Version 0.2.1 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for bbe 0.2.1. +# Generated by GNU Autoconf 2.60 for bbe 0.2.2. # # Report bugs to <tjsa@iki.fi>. # @@ -559,8 +559,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='bbe' PACKAGE_TARNAME='bbe' -PACKAGE_VERSION='0.2.1' -PACKAGE_STRING='bbe 0.2.1' +PACKAGE_VERSION='0.2.2' +PACKAGE_STRING='bbe 0.2.2' PACKAGE_BUGREPORT='tjsa@iki.fi' ac_unique_file="src/bbe.c" @@ -1199,7 +1199,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.2.1 to adapt to many kinds of systems. +\`configure' configures bbe 0.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1269,7 +1269,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bbe 0.2.1:";; + short | recursive ) echo "Configuration of bbe 0.2.2:";; esac cat <<\_ACEOF @@ -1353,7 +1353,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bbe configure 0.2.1 +bbe configure 0.2.2 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1367,7 +1367,7 @@ cat >config.log <<_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.2.1, which was +It was created by bbe $as_me 0.2.2, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -2038,7 +2038,7 @@ fi # Define the identity of the package. PACKAGE='bbe' - VERSION='0.2.1' + VERSION='0.2.2' cat >>confdefs.h <<_ACEOF @@ -5658,7 +5658,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bbe $as_me 0.2.1, which was +This file was extended by bbe $as_me 0.2.2, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5711,7 +5711,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -bbe config.status 0.2.1 +bbe config.status 0.2.2 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 31d5f3a..324e0ee 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.2.1, tjsa@iki.fi) +AC_INIT(bbe, 0.2.2, tjsa@iki.fi) AC_CONFIG_SRCDIR(src/bbe.c) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE @@ -25,7 +25,7 @@ .\" .br insert line break .\" .sp <n> insert n+1 empty lines .\" for manpage-specific macros, see man(7) -.TH "BBE" "1" "2006-03-14" "" "" +.TH "BBE" "1" "2006-11-02" "" "" .SH "NAME" bbe \- binary block editor .SH "SYNOPSIS" @@ -190,6 +190,9 @@ All bytes from start of the block to offset \fIn\fR are replaced by \fIc\fR. .TP f \fIn\fR \fIc\fR All bytes starting from offset \fIn\fR to end of the block are replaced by \fIc\fR. +.TP +x +Exchange the contents of nibbles (half an octet) of bytes. .PP Nonvisible characters in strings can be escaped same way as in block definition strings. Character '/' in s and y commands can be any visible character. .PP diff --git a/doc/bbe.html b/doc/bbe.html index 8543a2d..354ef9a 100644 --- a/doc/bbe.html +++ b/doc/bbe.html @@ -7,7 +7,7 @@ <link title="Top" rel="top" href="#Top"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- -This file documents version 0.2.1 of `bbe', a binary block editor. +This file documents version 0.2.2 of `bbe', a binary block editor. Copyright (C) 2005 Timo Savinen @@ -50,7 +50,7 @@ Up: <a rel="up" accesskey="u" href="#dir">(dir)</a> <h2 class="unnumbered">bbe</h2> -<p>This file documents version 0.2.1 of <samp><span class="command">bbe</span></samp>, a binary block editor. +<p>This file documents version 0.2.2 of <samp><span class="command">bbe</span></samp>, a binary block editor. <p>Copyright © 2005 Timo Savinen @@ -383,7 +383,9 @@ Separator <code>/</code> can be replaced by any character not present in <var>so <br><dt><code>^ </code><var>c</var><dd>Performs exclusive or with <var>c</var> on block contents. - <br><dt><code>~</code><dd>Performs binary negation on block contents. + <br><dt><code>~</code><dd>Performs binary negation on block contents. + + <br><dt><code>x</code><dd>Exchange the contents of nibbles (half an octet) of bytes. </dl> <div class="node"> @@ -486,7 +488,7 @@ Example output: </pre> <p><br> - <br><dt>`<samp><span class="samp">bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq</span></samp>'<dd>Print the files names of those programs in /bin directory which contains word `<samp><span class="samp">Linux</span></samp>'. + <br><dt>`<samp><span class="samp">bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq</span></samp>'<dd>Print the file names of those programs in /bin directory which contains word `<samp><span class="samp">Linux</span></samp>'. Example output: <pre class="example"> /bin/loadkeys: /bin/mkbimage: diff --git a/doc/bbe.info b/doc/bbe.info index fcbfdf8..e6b75fa 100644 --- a/doc/bbe.info +++ b/doc/bbe.info @@ -1,6 +1,11 @@ This is bbe.info, produced by makeinfo version 4.8 from bbe.texi. - This file documents version 0.2.1 of `bbe', a binary block editor. +INFO-DIR-SECTION Utilities +START-INFO-DIR-ENTRY +* bbe: (bbe). Binary Block Editor. +END-INFO-DIR-ENTRY + + This file documents version 0.2.2 of `bbe', a binary block editor. Copyright (C) 2005 Timo Savinen @@ -23,7 +28,7 @@ File: bbe.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) bbe *** -This file documents version 0.2.1 of `bbe', a binary block editor. +This file documents version 0.2.2 of `bbe', a binary block editor. Copyright (C) 2005 Timo Savinen @@ -407,6 +412,9 @@ block, first byte is number zero. `~' Performs binary negation on block contents. +`x' + Exchange the contents of nibbles (half an octet) of bytes. + File: bbe.info, Node: Limits, Prev: Commands, Up: Invoking bbe @@ -503,7 +511,7 @@ Few examples: 69194:x5f x28 x02 x42 x36 x5f x81 x64 x41 x05 `bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq' - Print the files names of those programs in /bin directory which + Print the file names of those programs in /bin directory which contains word `Linux'. Example output: /bin/loadkeys: /bin/mkbimage: @@ -546,15 +554,15 @@ problems. Tag Table: -Node: Top781 -Node: Overview1841 -Node: Samples2328 -Node: Invoking bbe3726 -Node: Invocation4260 -Node: Block5275 -Node: Commands7321 -Node: Limits12090 -Node: bbe programs12468 -Node: Problems16854 +Node: Top900 +Node: Overview1960 +Node: Samples2447 +Node: Invoking bbe3845 +Node: Invocation4379 +Node: Block5394 +Node: Commands7440 +Node: Limits12278 +Node: bbe programs12656 +Node: Problems17041 End Tag Table diff --git a/doc/bbe.texi b/doc/bbe.texi index a204650..c1c8247 100644 --- a/doc/bbe.texi +++ b/doc/bbe.texi @@ -6,7 +6,14 @@ @finalout @c %**end of header -@set VERSION 0.2.1 +@set VERSION 0.2.2 + +@ifinfo +@dircategory Utilities +@direntry +* bbe: (bbe). Binary Block Editor. +@end direntry +@end ifinfo @copying This file documents version @value{VERSION} of @command{bbe}, a binary block editor. @@ -404,6 +411,9 @@ Performs exclusive or with @var{c} on block contents. @item ~ Performs binary negation on block contents. + +@item x +Exchange the contents of nibbles (half an octet) of bytes. @end table @node Limits, , Commands, Invoking bbe @@ -514,7 +524,7 @@ Example output: @* @item bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq -Print the files names of those programs in /bin directory which contains word @samp{Linux}. +Print the file names of those programs in /bin directory which contains word @samp{Linux}. Example output: @example /bin/loadkeys: @@ -75,7 +75,7 @@ char *convert_strings[] = { #define BLOCK_START_COMMANDS "DIJLFBN>" /* commands to be executed for each byte */ -#define BYTE_COMMANDS "acdirsywjpl&|^~uf" +#define BYTE_COMMANDS "acdirsywjpl&|^~ufx" /* commands to be executed at end of buffer */ #define BLOCK_END_COMMANDS "A<" @@ -575,6 +575,7 @@ parse_command(char *command_string) if(new->s1_len != 1) panic("Error in command",command_string,NULL); break; case '~': + case 'x': if(i != 1 || strlen(token[0]) > 1) panic("Error in command",command_string,NULL); break; case 'u': diff --git a/src/buffer.c b/src/buffer.c index 99d0ee6..f7163ba 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -20,7 +20,7 @@ * */ -/* $Id: buffer.c,v 1.36 2006-10-24 16:50:54 timo Exp $ */ +/* $Id: buffer.c,v 1.37 2006-11-02 17:11:36 timo Exp $ */ #include "bbe.h" #include <stdlib.h> diff --git a/src/execute.c b/src/execute.c index 79891cd..826bb25 100644 --- a/src/execute.c +++ b/src/execute.c @@ -438,6 +438,9 @@ execute_commands(struct command_list *c) break; case 'w': break; + case 'x': + put_byte(((*out_buffer.write_pos << 4) & 0xf0) | ((*out_buffer.write_pos >> 4) & 0x0f)); + break; } c = c->next; } |

