diff options
author | Sebastian Pipping <sping@gentoo.org> | 2015-08-13 01:42:34 +0200 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2015-08-13 02:20:45 +0200 |
commit | 9c34dca35ccf59e09deec020d3113a2f1b7b6bbc (patch) | |
tree | 3ab5bdb610b0dca9f771c706390570a70aab737a /dev-scheme/slib/files | |
parent | dev-scheme/slib: Add default checksums (diff) | |
download | gentoo-9c34dca35ccf59e09deec020d3113a2f1b7b6bbc.tar.gz gentoo-9c34dca35ccf59e09deec020d3113a2f1b7b6bbc.tar.bz2 gentoo-9c34dca35ccf59e09deec020d3113a2f1b7b6bbc.zip |
dev-scheme/slib: Fix compilation with >=sys-apps/texinfo-5 (bug #465348)
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Diffstat (limited to 'dev-scheme/slib/files')
-rw-r--r-- | dev-scheme/slib/files/slib-3.2.2-fix-texinfo.awk | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/dev-scheme/slib/files/slib-3.2.2-fix-texinfo.awk b/dev-scheme/slib/files/slib-3.2.2-fix-texinfo.awk new file mode 100644 index 000000000000..6bc3ce8e177b --- /dev/null +++ b/dev-scheme/slib/files/slib-3.2.2-fix-texinfo.awk @@ -0,0 +1,123 @@ +# Fixes Texinfo input to compile with Texinfo 5 or later +# +# Written by Sebastian Pipping <sebastian@pipping.org> +# Licensed under CC0 1.0 Universal Public Domain Dedication +# https://creativecommons.org/publicdomain/zero/1.0/ +# +# Version 0_p20150813_p0418 + +BEGIN { + inside_deffn = 0 + inside_defmac = 0 + inside_defop = 0 + inside_deftp = 0 + inside_defun = 0 +} + +/^@deffn / { + if (inside_deffn) { + print "@end deffn" + } + inside_deffn = 1 +} + +/^@deffnx / { + if (inside_deffn) { + print "@end deffn" + } + sub(/^@deffnx/, "@deffn") + inside_deffn = 1 +} + +/^@defmac / { + if (inside_defmac) { + print "@end defmac" + } + inside_defmac = 1 +} + +/^@defmacx / { + if (inside_defmac) { + print "@end defmac" + } + sub(/^@defmacx/, "@defmac") + inside_defmac = 1 +} + +/^@defop / { + if (inside_defop) { + print "@end defop" + } + inside_defop = 1 +} + +/^@defopx / { + if (inside_defop) { + print "@end defop" + } + sub(/^@defopx/, "@defop") + inside_defop = 1 +} + +/^@deftp / { + if (inside_deftp) { + print "@end deftp" + } + inside_deftp = 1 +} + +/^@deftpx / { + if (inside_deftp) { + print "@end deftp" + } + sub(/^@deftpx/, "@deftp") + inside_deftp = 1 +} + +/^@defun / { + if (inside_defun) { + print "@end defun" + } + inside_defun = 1 +} + +/^@defunx / { + if (inside_defun) { + print "@end defun" + } + sub(/^@defunx/, "@defun") + inside_defun = 1 +} + +/^@end deffn/ { + inside_deffn = 0 +} + +/^@end defmac/ { + inside_defmac = 0 +} + +/^@end defop/ { + inside_defop = 0 +} + +/^@end deftp/ { + inside_deftp = 0 +} + +/^@end defun/ { + inside_defun = 0 +} + +/^@subsubsection/ { + if (inside_deffn) { + print "@end deffn" + print $0 + print "@deffn {Dummy} Dummy" + next + } +} + +{ + print +} |