summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Savinen <tjsa@iki.fi>2006-10-29 10:10:55 +0000
committerHadrien Dorio <hadrien.dorio@gmail.com>2017-12-16 00:24:06 +0100
commit37db3f05301f54804d7b86b3aa9edaaf0e3e7d23 (patch)
treef9a35dae1a84968325ae8b7faaa53c7ffe669b97
parent8fefc256fbd2aa171423c4b0493e88c2e2390eb6 (diff)
downloadbinary-block-editor-37db3f05301f54804d7b86b3aa9edaaf0e3e7d23.tar.gz
binary-block-editor-37db3f05301f54804d7b86b3aa9edaaf0e3e7d23.zip
0.2.1
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--doc/bbe.html4
-rw-r--r--doc/bbe.info4
-rw-r--r--doc/bbe.texi2
-rw-r--r--src/buffer.c20
7 files changed, 35 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 6de8f9c..3305e07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-29 Timo Savinen <tjsa@iki.fi>
+
+ * Version 0.2.1
+ * More problems with zero size input corrected
+
2006-10-23 Timo Savinen <tjsa@iki.fi>
* Version 0.2.0
diff --git a/configure b/configure
index 49d5d5e..acef5ee 100755
--- a/configure
+++ b/configure
@@ -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.0.
+# Generated by GNU Autoconf 2.60 for bbe 0.2.1.
#
# 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.0'
-PACKAGE_STRING='bbe 0.2.0'
+PACKAGE_VERSION='0.2.1'
+PACKAGE_STRING='bbe 0.2.1'
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.0 to adapt to many kinds of systems.
+\`configure' configures bbe 0.2.1 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.0:";;
+ short | recursive ) echo "Configuration of bbe 0.2.1:";;
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.0
+bbe configure 0.2.1
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.0, which was
+It was created by bbe $as_me 0.2.1, 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.0'
+ VERSION='0.2.1'
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.0, which was
+This file was extended by bbe $as_me 0.2.1, 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.0
+bbe config.status 0.2.1
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 4770978..31d5f3a 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.0, tjsa@iki.fi)
+AC_INIT(bbe, 0.2.1, tjsa@iki.fi)
AC_CONFIG_SRCDIR(src/bbe.c)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
diff --git a/doc/bbe.html b/doc/bbe.html
index b53afba..8543a2d 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.0 of `bbe', a binary block editor.
+This file documents version 0.2.1 of `bbe', a binary block editor.
Copyright (C) 2005 Timo Savinen
@@ -50,7 +50,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">bbe</h2>
-<p>This file documents version 0.2.0 of <samp><span class="command">bbe</span></samp>, a binary block editor.
+<p>This file documents version 0.2.1 of <samp><span class="command">bbe</span></samp>, a binary block editor.
<p>Copyright &copy; 2005 Timo Savinen
diff --git a/doc/bbe.info b/doc/bbe.info
index bc16805..fcbfdf8 100644
--- a/doc/bbe.info
+++ b/doc/bbe.info
@@ -1,6 +1,6 @@
This is bbe.info, produced by makeinfo version 4.8 from bbe.texi.
- This file documents version 0.2.0 of `bbe', a binary block editor.
+ This file documents version 0.2.1 of `bbe', a binary block editor.
Copyright (C) 2005 Timo Savinen
@@ -23,7 +23,7 @@ File: bbe.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
bbe
***
-This file documents version 0.2.0 of `bbe', a binary block editor.
+This file documents version 0.2.1 of `bbe', a binary block editor.
Copyright (C) 2005 Timo Savinen
diff --git a/doc/bbe.texi b/doc/bbe.texi
index 01c4a11..a204650 100644
--- a/doc/bbe.texi
+++ b/doc/bbe.texi
@@ -6,7 +6,7 @@
@finalout
@c %**end of header
-@set VERSION 0.2.0
+@set VERSION 0.2.1
@copying
This file documents version @value{VERSION} of @command{bbe}, a binary block editor.
diff --git a/src/buffer.c b/src/buffer.c
index 3359144..99d0ee6 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -20,7 +20,7 @@
*
*/
-/* $Id: buffer.c,v 1.35 2005/11/14 10:40:47 timo Exp $ */
+/* $Id: buffer.c,v 1.36 2006-10-24 16:50:54 timo Exp $ */
#include "bbe.h"
#include <stdlib.h>
@@ -185,7 +185,7 @@ read_input_stream()
read_count += last_read;
} while (in_stream != NULL && read_count < to_be_read);
- if (read_count < to_be_read) in_buffer.stream_end = buffer_write_pos + read_count - (read_count ? 1 : 0);
+ if (read_count < to_be_read) in_buffer.stream_end = buffer_write_pos + read_count - 1;
return read_count;
}
@@ -217,10 +217,11 @@ block_end_pos()
inline int
get_next_byte()
{
- if(in_buffer.read_pos >= in_buffer.low_pos)
+ if(in_buffer.read_pos >= in_buffer.low_pos)
{
- if(read_input_stream() && in_buffer.block_end == NULL) mark_block_end();
- }
+ read_input_stream();
+ if(in_buffer.block_end == NULL) mark_block_end();
+ }
if(in_buffer.stream_end != NULL)
{
@@ -365,11 +366,18 @@ find_block()
found = 0;
if(end_of_stream() && last_byte()) return 0;
+
+ if(in_buffer.read_pos == NULL) // first read
+ {
+ if(!read_input_stream()) return 0; // zero size input
+ }
+
in_buffer.block_offset = 0;
+
do
{
- if(in_buffer.read_pos >= in_buffer.low_pos || in_buffer.read_pos == NULL) read_input_stream();
+ if(in_buffer.read_pos >= in_buffer.low_pos) read_input_stream();
if(last_byte()) in_buffer.read_pos++;
in_buffer.block_end = NULL;
OpenPOWER on IntegriCloud