summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--doc/Makefile.am14
-rw-r--r--doc/Makefile.in49
-rw-r--r--doc/bbe.html2
-rw-r--r--doc/bbe.texi4
-rw-r--r--src/bbe.h3
-rw-r--r--src/execute.c5
9 files changed, 53 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 1792b32..40e4306 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-28 Timo Savinen <tjsa@iki.fi>
+
+ * Version 0.1.6
+ * bug in s-command fixed, endless loop in some cases
+ * bbe.html is now installed to /usr/local/share/doc/bbe
+
2005-10-23 Timo Savinen <tjsa@iki.fi>
* Version 0.1.5
diff --git a/configure b/configure
index 1760271..02de385 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.59 for bbe 0.1.5.
+# Generated by GNU Autoconf 2.59 for bbe 0.1.6.
#
# 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.5'
-PACKAGE_STRING='bbe 0.1.5'
+PACKAGE_VERSION='0.1.6'
+PACKAGE_STRING='bbe 0.1.6'
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.5 to adapt to many kinds of systems.
+\`configure' configures bbe 0.1.6 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.5:";;
+ short | recursive ) echo "Configuration of bbe 0.1.6:";;
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.5
+bbe configure 0.1.6
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.5, which was
+It was created by bbe $as_me 0.1.6, 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.5'
+ VERSION='0.1.6'
cat >>confdefs.h <<_ACEOF
@@ -4660,7 +4660,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by bbe $as_me 0.1.5, which was
+This file was extended by bbe $as_me 0.1.6, 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.5
+bbe config.status 0.1.6
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 5a6cd4c..3e89cf2 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.5, tjsa@iki.fi)
+AC_INIT(bbe, 0.1.6, tjsa@iki.fi)
AC_CONFIG_SRCDIR(src/bbe.c)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3dc473f..7dd658e 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,14 +2,8 @@ man_MANS = bbe.1
info_TEXINFOS = bbe.texi
CLEANFILES = bbe.html
-docdir = $(datadir)/doc
-doc_DATA = bbe.html
-AM_MAKEINFOHTMLFLAGS=--no-split
+htmldir=$(datadir)/doc/$(PACKAGE)
+html_DATA = bbe.html
+AM_MAKEINFOHTMLFLAGS = --no-split
-bbe.html: bbe.texi bbe.info
-
-html: bbe.html
-
-.PHONY: html
-
-EXTRA_DIST = $(man_MANS) $(info_TEXINFOS) $(doc_DATA)
+EXTRA_DIST = $(man_MANS) $(info_TEXINFOS) $(html_DATA)
diff --git a/doc/Makefile.in b/doc/Makefile.in
index d0a0764..77e741a 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -60,7 +60,7 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
DVIPS = dvips
am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(docdir)"
+ "$(DESTDIR)$(htmldir)"
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
@@ -70,8 +70,8 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(doc_DATA)
+htmlDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(html_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
@@ -156,10 +156,10 @@ target_alias = @target_alias@
man_MANS = bbe.1
info_TEXINFOS = bbe.texi
CLEANFILES = bbe.html
-docdir = $(datadir)/doc
-doc_DATA = bbe.html
+htmldir = $(datadir)/doc/$(PACKAGE)
+html_DATA = bbe.html
AM_MAKEINFOHTMLFLAGS = --no-split
-EXTRA_DIST = $(man_MANS) $(info_TEXINFOS) $(doc_DATA)
+EXTRA_DIST = $(man_MANS) $(info_TEXINFOS) $(html_DATA)
all: all-am
.SUFFIXES:
@@ -242,6 +242,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(srcdir)/bbe.info: bbe.texi
bbe.dvi: bbe.texi
bbe.pdf: bbe.texi
+bbe.html: bbe.texi
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
@@ -339,22 +340,22 @@ uninstall-man1:
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
-install-docDATA: $(doc_DATA)
+install-htmlDATA: $(html_DATA)
@$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(doc_DATA)'; for p in $$list; do \
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
- echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
+ echo " $(htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
done
-uninstall-docDATA:
+uninstall-htmlDATA:
@$(NORMAL_UNINSTALL)
- @list='$(doc_DATA)'; for p in $$list; do \
+ @list='$(html_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
+ echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \
+ rm -f "$(DESTDIR)$(htmldir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -397,7 +398,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS) $(MANS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \
+ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -437,13 +438,15 @@ dvi: dvi-am
dvi-am: $(DVIS)
+html: html-am
+
html-am: $(HTMLS)
info: info-am
info-am: $(INFO_DEPS)
-install-data-am: install-docDATA install-info-am install-man
+install-data-am: install-htmlDATA install-info-am install-man
install-exec-am:
@@ -500,27 +503,21 @@ ps: ps-am
ps-am: $(PSS)
-uninstall-am: uninstall-docDATA uninstall-info-am uninstall-man
+uninstall-am: uninstall-htmlDATA uninstall-info-am uninstall-man
uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic dist-info \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-data install-data-am \
- install-docDATA install-exec install-exec-am install-info \
+ install-exec install-exec-am install-htmlDATA install-info \
install-info-am install-man install-man1 install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-docDATA uninstall-info-am \
+ uninstall uninstall-am uninstall-htmlDATA uninstall-info-am \
uninstall-man uninstall-man1
-
-bbe.html: bbe.texi bbe.info
-
-html: bbe.html
-
-.PHONY: html
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/doc/bbe.html b/doc/bbe.html
index 5f266e3..0066ea9 100644
--- a/doc/bbe.html
+++ b/doc/bbe.html
@@ -486,7 +486,7 @@ The start sequence is not printed.<br>
<br><dt><span class="samp">bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf</span><dd>Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences
does not appear in other context than jpg-images).
-Files will be named as <span class="file">pic01.jpg</span>, <span class="file">pic02.jpg</span>, <span class="file">pic03.jpg</span>,...
+Files will be named as <span class="file">pic01.jpg</span>, <span class="file">pic02.jpg</span>, <span class="file">pic03.jpg</span>,<small class="dots">...</small>
</dl>
<div class="node">
diff --git a/doc/bbe.texi b/doc/bbe.texi
index 00f3f74..1224b9a 100644
--- a/doc/bbe.texi
+++ b/doc/bbe.texi
@@ -6,7 +6,7 @@
@finalout
@c %**end of header
-@set VERSION 0.1.5
+@set VERSION 0.1.6
@copying
This file documents the @command{bbe} - binary block editor
@@ -525,7 +525,7 @@ The least significant nybble of bytes after @code{x5f} is cleared.@*
@item bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf
Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences
does not appear in other context than jpg-images).
-Files will be named as @file{pic01.jpg}, @file{pic02.jpg}, @file{pic03.jpg},...
+Files will be named as @file{pic01.jpg}, @file{pic02.jpg}, @file{pic03.jpg},@dots{}
@end table
diff --git a/src/bbe.h b/src/bbe.h
index ef30f75..cf00c6b 100644
--- a/src/bbe.h
+++ b/src/bbe.h
@@ -20,7 +20,7 @@
*
*/
-/* $Id: bbe.h,v 1.26 2005/10/19 18:39:13 timo Exp $ */
+/* $Id: bbe.h,v 1.27 2005/10/27 16:37:14 timo Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -109,6 +109,7 @@ struct command_list {
unsigned char *s2; // replace for s and dest for y
off_t s2_len;
int rpos; // replace position for s,r and y
+ off_t fpos; // found pos for s-command
FILE *fd; // stream for w command
struct command_list *next;
};
diff --git a/src/execute.c b/src/execute.c
index 7980221..008cad0 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -20,7 +20,7 @@
*
*/
-/* $Id: execute.c,v 1.31 2005/10/21 07:53:26 timo Exp $ */
+/* $Id: execute.c,v 1.32 2005/10/27 16:37:14 timo Exp $ */
#include "bbe.h"
#include <stdlib.h>
@@ -204,6 +204,7 @@ execute_commands(struct command_list *c)
break;
}
if(delete_this_byte) break;
+ if(c->fpos == in_buffer.block_offset) break;
p = out_buffer.write_pos;
i = 0;
while(*p == c->s1[i] && i < c->s1_len)
@@ -215,6 +216,7 @@ execute_commands(struct command_list *c)
}
if(i == c->s1_len)
{
+ c->fpos = in_buffer.block_offset;
if(c->s1_len > 1 || c->s2_len > 1) c->rpos = 1;
if(c->s2_len)
{
@@ -562,6 +564,7 @@ reset_rpos(struct command_list *c)
while(c != NULL)
{
c->rpos = 0;
+ c->fpos = -1;
c = c->next;
}
}
OpenPOWER on IntegriCloud