Skip to content

Commit

Permalink
Merge branch 'release/v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Harple authored and Doug Harple committed Feb 28, 2017
2 parents 8312466 + bb7621e commit 08cf92e
Show file tree
Hide file tree
Showing 48 changed files with 3,855 additions and 4,559 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,19 @@
*.dSYM/
*.su

# Maintainer files
*.patch
autom4te.cache/
*~

# Dist Clean files
Makefile
config.h
config.log
config.status
detox_path.h

# Clean files
detox
inline-detox

37 changes: 37 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Compilation instructions

Compilation:

./configure
make

Installation:

make install

Installation that overwrites config files and translation tables:

make force-install

# Compilation notes

Ensure that the path to lex/yacc (or an equivalent) is in your $PATH
environmental variable. For instance, under Solaris, you may need to add
/usr/ccs/bin to your path to get detox to compile:

export PATH=${PATH}:/usr/ccs/bin

---

To get detox working with long options on Darwin or Solaris (or any other OS
without getopt_long in its C library), I've included support for libpopt.
Install libpopt and configure with the following:

./configure --with-popt

If you've installed libpopt in a directory other than /usr, which is likely,
you'll want to specify the base path to libpopt. So, if popt.h is in
/usr/local/include, you'll run configure like so:

./configure --with-popt=/usr/local

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# CHANGELOG

## 1.2.1 (In Progress)

- Migrated documents to Markdown for better presentation on github.
- Applied Debian patch 01-make-upstream-makefiles-parallel-build-safe.patch,
written by Patrick Schoenfeld and updated by Joao Eriberto Mota Filho. This
adds additional variables to the Makefile for safe parallel builds and GCC
hardening.
- Applied Debian patch 02-fix-wrong-use-of-hyphens-in-manpage.patch, written by
Patrick Schoenfeld and updated by Joao Eriberto Mota Filho. This fixes an
errant "-" in the manpage, and corrects a spelling mistake.
- Applied Debian patch 03-remove-build-instructions-from-upstream-readme.patch,
written by Patrick Schoenfeld, in spirit. I had already converted the README
to README.md, so it did not apply. I moved the compilation instructions into
a new file, BUILD.md, instead.
- Applied Debian patch 04-change-default-sequence-to-use-utf8-table.patch,
written by Teemu Likonen. This changes the default character set from
ISO 8859-1 to UTF-8.
- Applied Debian patch 05-install-missing-file.patch, written by
Nelson A. de Oliveira. This ensures that the safe.tbl file gets installed
during make install (make install-safe-config).
- Applied Debian patch 06-fix-arguments.patch, written by
Joao Eriberto Mota Filho. This fixes several calls to printf that were
causing -Werror=format-security to fail.
- Removed CVS $Id$ tags and updated copyright.
- Added inline-detox.1, from the Debian package, adapted from detox.1 by
Patrick Schoenfeld.
- Updated configure script from GNU Autoconf 2.61 to 2.69.
- Updated config file parsers; flex goes from 5.33 to 6.0, bison goes from 2.3
to 3.0.4.
- Added a minor work around to stop compiler noise regarding yylex().

## 1.2.0

- Modified the safe filter to use a translation table.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2004-2006, Doug Harple. All rights reserved.
Copyright (c) 2004-2017, Doug Harple. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down
30 changes: 17 additions & 13 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2004-2006, Doug Harple. All rights reserved.
# Copyright (c) 2004-2017, Doug Harple. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -28,8 +28,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id: Makefile.in,v 1.31 2008/04/12 01:02:47 purgedhalo Exp $
#

prefix = @prefix@
exec_prefix = @exec_prefix@
Expand All @@ -48,7 +46,7 @@ YACC = @YACC@
INSTALL = @INSTALL@

.c.o:
${CC} -c ${CFLAGS} $<
${CC} -c ${CFLAGS} ${CPPFLAGS} $<

genericOBJS = clean_string.o table.o parse_table.o \
config_file_l.o config_file_y.o config_file_spoof.o config_file_dump.o
Expand All @@ -70,10 +68,10 @@ all: detox inline-detox
#

detox: ${detoxOBJS}
${CC} -o detox ${detoxOBJS} ${L_OPT}
${CC} -o detox ${LDFLAGS} ${CPPFLAGS} ${detoxOBJS} ${L_OPT}

inline-detox: ${inline-detoxOBJS}
${CC} -o inline-detox ${inline-detoxOBJS} ${L_OPT}
${CC} -o inline-detox ${LDFLAGS} ${CPPFLAGS} ${inline-detoxOBJS} ${L_OPT}

#
# Special Source Compiles
Expand Down Expand Up @@ -101,13 +99,13 @@ detox_path.h: config.status
#

detox-inline.o: detox.c
${CC} -c ${CFLAGS} -DINLINE_MODE $< -o $@
${CC} -c ${CFLAGS} ${CPPFLAGS} -DINLINE_MODE $< -o $@

parse_options_generic-inline.o: parse_options_generic.c
${CC} -c ${CFLAGS} -DINLINE_MODE $< -o $@
${CC} -c ${CFLAGS} ${CPPFLAGS} -DINLINE_MODE $< -o $@

parse_options_@option_parser@-inline.o: parse_options_@option_parser@.c
${CC} -c ${CFLAGS} -DINLINE_MODE $< -o $@
${CC} -c ${CFLAGS} ${CPPFLAGS} -DINLINE_MODE $< -o $@

# This is done by make dep too
detox.o: detox.c detox_path.h
Expand All @@ -128,10 +126,10 @@ install-base: detox inline-detox
${INSTALL} -m 755 -d ${DESTDIR}${datadir}/detox
${INSTALL} -m 755 detox ${DESTDIR}${bindir}
${INSTALL} -m 755 inline-detox ${DESTDIR}${bindir}
${INSTALL} -m 644 detox.1 ${DESTDIR}${mandir}/man1
${INSTALL} -m 644 detox.1 inline-detox.1 ${DESTDIR}${mandir}/man1
${INSTALL} -m 644 detoxrc.5 detox.tbl.5 ${DESTDIR}${mandir}/man5

install-safe-config:
install-safe-config: install-base
@if [ ! -f ${DESTDIR}${sysconfdir}/detoxrc ]; then \
${INSTALL} -m 644 detoxrc ${DESTDIR}${sysconfdir}; \
else \
Expand All @@ -147,13 +145,18 @@ install-safe-config:
else \
echo "${DESTDIR}${datadir}/detox/unicode.tbl exists, skipping"; \
fi
@if [ ! -f ${DESTDIR}${datadir}/detox/safe.tbl ]; then \
${INSTALL} -m 644 safe.tbl ${DESTDIR}${datadir}/detox; \
else \
echo "${DESTDIR}${datadir}/detox/safe.tbl exists, skipping"; \
fi

install-unsafe-config:
install-unsafe-config: install-base
${INSTALL} -m 644 detoxrc ${DESTDIR}${sysconfdir}
${INSTALL} -m 644 iso8859_1.tbl ${DESTDIR}${datadir}/detox
${INSTALL} -m 644 unicode.tbl ${DESTDIR}${datadir}/detox

install-sample-config:
install-sample-config: install-base
${INSTALL} -m 644 detoxrc ${DESTDIR}${sysconfdir}/detoxrc.sample
${INSTALL} -m 644 iso8859_1.tbl ${DESTDIR}${datadir}/detox/iso8859_1.tbl.sample
${INSTALL} -m 644 unicode.tbl ${DESTDIR}${datadir}/detox/unicode.tbl.sample
Expand All @@ -175,6 +178,7 @@ uninstall-base:
rm -f ${DESTDIR}${bindir}/detox
rm -f ${DESTDIR}${bindir}/inline-detox
rm -f ${DESTDIR}${mandir}/man1/detox.1*
rm -f ${DESTDIR}${mandir}/man1/inline-detox.1*
rm -f ${DESTDIR}${mandir}/man5/detoxrc.5*
rm -f ${DESTDIR}${mandir}/man5/detox.tbl.5*
rm -f ${DESTDIR}${sysconfdir}/detoxrc.sample
Expand Down
96 changes: 0 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,6 @@ characters (such as "$") get replaced with "_". ISO 8859-1 (Latin-1)
characters can be replaced as well, as can UTF-8 characters. More details
are contained in the detox.1 man page.

This is a BETA release. Please watch for falling bits.

# Compilation instructions

Compilation:

./configure
make

Installation:

make install

Installation that overwrites config files and translation tables:

make force-install

# Compilation notes

Ensure that the path to lex/yacc (or an equivalent) is in your $PATH
environmental variable. For instance, under Solaris, you may need to add
/usr/ccs/bin to your path to get detox to compile:

export PATH=${PATH}:/usr/ccs/bin

---

To get detox working with long options on Darwin or Solaris (or any other OS
without getopt_long in its C library), I've included support for libpopt.
Install libpopt and configure with the following:

./configure --with-popt

If you've installed libpopt in a directory other than /usr, which is likely,
you'll want to specify the base path to libpopt. So, if popt.h is in
/usr/local/include, you'll run configure like so:

./configure --with-popt=/usr/local

# Runtime Notes

The most important option to learn is -n, aka --dry-run. This will let you
Expand All @@ -64,63 +25,6 @@ You can also specify recursion (this works best on directories):

detox -r /music/transferred_from_elsewhere/

# Other Notes

This project was initially developed under Linux (RedHat 7.x, 8.x), and is
presently being maintained under the FreeBSD 5.x series. If you run into any
problems with installation or operation please feel free to contact me.

# Bugs

None known at the moment.

# Special Thanks

Many thanks to Miguel Angelo Rozsas for suggesting UTF-8 support and his
valuable input following that suggestion. This change helped introduce
translation tables into detox.

Ciaran McCreesh put together a package for Gentoo (rock!), submitted a patch
to add a prefix onto install paths (for package builds) and helped fix
parallel builds.

Lou Alfonso for suggesting that the safe filter be controlled through a
table so that it can be tuned easily.

Christoph Wegscheider noticed that the install script was installing
everything 755, for pointing out that not everyone has lex or yacc, and for
his input on how umlauts should be converted.

Gerg Thor informed me that characters on the PowerPC platform are unsigned
by default and that the libpopt parser was rolling into an infinite loop as
a result.

Jon Amundsen pointed out that the lowercase converting sequence was only
really working on case-insensitive filesystems.

zero_dogg from sourceforget.net suggested adding the ability to prevent
certain files from being translated.

rsnemmen from sourceforge.net pointed out a bug in the way directories are
handled when passed in from the command line.

# Thanks

Eric S. Raymond for his work on "The Art of UNIX Programming"

http://www.bbsinc.com/iso8859.html for their help in building a complete list
of Latin-1 translations.

SourceForge.net for their generous hosting of this and many other projects.

http://en.wikipedia.org/wiki/UTF-8 for its help with explaining UTF-8.

Data Structures Using C - Tenenbaum, Langsam and Augenstein - for their help
with hashes.

Paul Oakenfold for his unbelievable mixes. Version 1.0.0 was developed with
the help of his Great Wall mix.

# Contact

Doug Harple <detox.dharple@gmail.com>
Expand Down
52 changes: 52 additions & 0 deletions THANKS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Thanks

Special thanks to Patrick Schoenfeld and Joao Eriberto Mota Filho, for
maintaining the Debian version. Release v1.2.1 is almost entirely comprised of
their patches.

Many thanks to Miguel Angelo Rozsas for suggesting UTF-8 support and his
valuable input following that suggestion. This change helped introduce
translation tables into detox.

Ciaran McCreesh put together a package for Gentoo (rock!), submitted a patch
to add a prefix onto install paths (for package builds) and helped fix
parallel builds.

Lou Alfonso for suggesting that the safe filter be controlled through a
table so that it can be tuned easily.

Christoph Wegscheider noticed that the install script was installing
everything 755, for pointing out that not everyone has lex or yacc, and for
his input on how umlauts should be converted.

Gerg Thor informed me that characters on the PowerPC platform are unsigned
by default and that the libpopt parser was rolling into an infinite loop as
a result.

Jon Amundsen pointed out that the lowercase converting sequence was only
really working on case-insensitive filesystems.

zero_dogg from sourceforget.net suggested adding the ability to prevent
certain files from being translated.

rsnemmen from sourceforge.net pointed out a bug in the way directories are
handled when passed in from the command line.

# Additional Thanks

Eric S. Raymond for his work on "The Art of UNIX Programming"

http://www.bbsinc.com/iso8859.html for their help in building a complete list
of Latin-1 translations.

SourceForge.net for their generous hosting of this and many other projects.

http://en.wikipedia.org/wiki/UTF-8 for its help with explaining UTF-8.

Data Structures Using C - Tenenbaum, Langsam and Augenstein - for their help
with hashes.

Paul Oakenfold for his unbelievable mixes. Version 1.0.0 was developed with
the help of his Great Wall mix.


4 changes: 1 addition & 3 deletions clean_string.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2006, Doug Harple. All rights reserved.
* Copyright (c) 2004-2017, Doug Harple. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -28,8 +28,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: clean_string.c,v 1.24 2006/07/03 16:45:54 purgedhalo Exp $
*
*/

#include "config.h"
Expand Down
4 changes: 1 addition & 3 deletions clean_string.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2006, Doug Harple. All rights reserved.
* Copyright (c) 2004-2017, Doug Harple. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -28,8 +28,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: clean_string.h,v 1.17 2006/07/03 16:45:54 purgedhalo Exp $
*
*/

#ifndef __CLEAN_STRING_H
Expand Down
Loading

0 comments on commit 08cf92e

Please sign in to comment.