diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-11-04 10:13:13 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-11-04 10:16:53 +0200 |
commit | de948955aba8be2c227a5f585891332181a06688 (patch) | |
tree | dd95372fd797e8b904bc80b85168458e7263f380 | |
parent | d8b9854a76d69e99bbbddd285a0e0d7727a62e4f (diff) | |
download | mailfromd-de948955aba8be2c227a5f585891332181a06688.tar.gz mailfromd-de948955aba8be2c227a5f585891332181a06688.tar.bz2 |
Fix indentation of the generated sources
* NEWS: Version 8.6.90
* configure.ac: Version 8.6.90
Check for GNU indent
* am/indent.m4: New file.
* src/builtin/Makefile.am (EXTRA_DIST): Add indent.pro
(.bi.c, .def.h): Use GNU indent if available.
* src/builtin/indent.pro: New file.
* src/builtin/snarf.m4: Minor change.
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | am/indent.m4 | 23 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/builtin/Makefile.am | 15 | ||||
-rw-r--r-- | src/builtin/indent.pro | 36 | ||||
-rw-r--r-- | src/builtin/snarf.m4 | 2 |
6 files changed, 83 insertions, 5 deletions
@@ -1,8 +1,16 @@ -Mailfromd NEWS -- history of user-visible changes. 2018-07-24 +Mailfromd NEWS -- history of user-visible changes. 2018-11-03 See the end of file for copying conditions. Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua> +Version 8.6.90 (Git) + +* Bugfixes +** Callout functions return true on checking the null return address (<>) +** Arguments in transaction between mailfromd and calloutd are quoted +** Avoid false failures in testsuite due to libadns warnings +** configure --with-dbm=T accepts any T supported by mailutils + Version 8.6, 2018-07-24 * New configure option --with-dbm diff --git a/am/indent.m4 b/am/indent.m4 new file mode 100644 index 00000000..a9517083 --- /dev/null +++ b/am/indent.m4 @@ -0,0 +1,23 @@ +dnl This file is part of Mailfromd. -*- autoconf -*- +dnl Copyright (C) 2018 Sergey Poznyakoff +dnl +dnl This file is free software; as a special exception the author gives +dnl unlimited permission to copy and/or distribute it, with or without +dnl modifications, as long as this notice is preserved. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +dnl +dnl MF_PROG_INDENT +dnl -------------- +dnl If indent binary available in the PATH, set the substvar INDENT to its +dnl absolute file name. Set Automake conditional COND_GNU_INDENT to true +dnl if the binary found is GNU indent. +AC_DEFUN([MF_PROG_INDENT], + [AC_PATH_PROG([INDENT], [indent]) + AM_CONDITIONAL([COND_GNU_INDENT], + [test -n "$ac_cv_path_INDENT" \ + && $INDENT --version 2>/dev/null \ + | grep '^GNU indent' >/dev/null 2>&1 ])]) + diff --git a/configure.ac b/configure.ac index 4f17fa83..840b0175 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,7 @@ AC_PREREQ(2.63) m4_define([MF_VERSION_MAJOR], 8) m4_define([MF_VERSION_MINOR], 6) +m4_define([MF_VERSION_PATCH], 90) AC_INIT([mailfromd], MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), [bug-mailfromd@gnu.org.ua], @@ -46,6 +47,7 @@ AC_PROG_YACC AC_PROG_LEX AC_PROG_LN_S PKG_PROG_PKG_CONFIG +MF_PROG_INDENT # Debugging mode MU_DEBUG_MODE diff --git a/src/builtin/Makefile.am b/src/builtin/Makefile.am index 7d5db661..bf61f163 100644 --- a/src/builtin/Makefile.am +++ b/src/builtin/Makefile.am @@ -64,7 +64,8 @@ EXTRA_DIST = \ builtin.def\ builtin.h\ init.m4\ - snarf.m4 + snarf.m4\ + indent.pro BUILT_SOURCES=\ $(BI_FILES:.bi=.c)\ @@ -87,9 +88,17 @@ SUFFIXES = .bi .c .def .h .mfi .mf M4=m4 +if COND_GNU_INDENT + REINDENT = | INDENT_PROFILE=$(srcdir)/indent.pro $(INDENT) +else + REINDENT = +endif + .bi.c: - $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/src/builtin/snarf.m4 $< > $@ + $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" \ + $(srcdir)/snarf.m4 $< $(REINDENT) > $@ .def.h: - $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@ + $(AM_V_GEN) $(M4) --prefix \ + $(srcdir)/init.m4 $(BI_FILES) $< $(REINDENT) > $@ diff --git a/src/builtin/indent.pro b/src/builtin/indent.pro new file mode 100644 index 00000000..45ac512e --- /dev/null +++ b/src/builtin/indent.pro @@ -0,0 +1,36 @@ +// GNU indent options for formatting files generated -*- fundamental -*- +// from MFL .bi sources. +-nbad // don't force blank line after every block of declarations +-bap // force blank line after every procedure body +-nbc // don't force newline after each comma in declaration +-bbo // break long lines before boolean operators +-hnl // honour (original) newlines +-br // retain braces on the same line with the conditional +-brs // retain braces on the same line with struct definitions +-c33 // column number for comments following the code +-cd33 // column number for comments following the declaration +-ncdb // don't place comment delimiters on blank lines +-ce // 'else' remains on the same line with '}' +-ci4 // indent level for subsequent lines of a split statement +-cli0 // case label indent +-d0 // align separate comments with the enclosing code +-di1 // place identifiers in a declaration in a first available position +-nfc1 // don't format comments that begin in column 1 +-i8 // default indentation offset +-ip0 // indentation for old-style parameter declarations +-l80 // line length +-lp // align continuation parameters with the open parenthesis +-npcs // don't place a space between function name and opening quote +-nprs // don't delimit parenteses with spaces +-psl // place type of the function on a separate line +-sai // space between 'if' and '(' +-saf // space between 'for' and '(' +-saw // space between 'while' and '(' +-ncs // don't force a space after a cast +-nsc // don't insert asteriscs into multi-line comments +-sob // swallow optional blank lines +-nfca // don't format comments starting after the 1st column +-cp33 // indentation for comments following a preprocessor directive +-ss // force a newline between 'for (;;)' and ';' +-ts8 // tabspaces are placed at each 8th column +-il1 // offset for labels diff --git a/src/builtin/snarf.m4 b/src/builtin/snarf.m4 index 2a32b02a..7eb7458c 100644 --- a/src/builtin/snarf.m4 +++ b/src/builtin/snarf.m4 @@ -950,7 +950,7 @@ m4_undefine([<__MF_PRIV_ID__>])m4_dnl m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ >]) void -MF_MODULE_NAME()_init_builtin() +MF_MODULE_NAME()_init_builtin(void) { m4_ifdef([<__MF_DEBUG>],[<m4_dnl debug_handle = mu_debug_register_category("MF_SOURCE_DEBUG_NAME(SOURCE)"); |