diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-11-05 11:11:07 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-11-05 11:15:06 +0200 |
commit | 53d0561ca828459d280cbfa5d2b3950e133da81e (patch) | |
tree | 5a489871f4e2c1edf7a5f70496377f36c3df98c6 /src | |
parent | de948955aba8be2c227a5f585891332181a06688 (diff) | |
download | mailfromd-53d0561ca828459d280cbfa5d2b3950e133da81e.tar.gz mailfromd-53d0561ca828459d280cbfa5d2b3950e133da81e.tar.bz2 |
Partially revert "Fix indentation of the generated sources"
GNU indent reformats the sources. As a result, preprocessor #line
directives become misleading.
Diffstat (limited to 'src')
-rw-r--r-- | src/builtin/Makefile.am | 15 | ||||
-rw-r--r-- | src/builtin/indent.pro | 36 | ||||
-rw-r--r-- | src/builtin/snarf.m4 | 2 |
3 files changed, 4 insertions, 49 deletions
diff --git a/src/builtin/Makefile.am b/src/builtin/Makefile.am index bf61f163..7d5db661 100644 --- a/src/builtin/Makefile.am +++ b/src/builtin/Makefile.am | |||
@@ -64,8 +64,7 @@ EXTRA_DIST = \ | |||
64 | builtin.def\ | 64 | builtin.def\ |
65 | builtin.h\ | 65 | builtin.h\ |
66 | init.m4\ | 66 | init.m4\ |
67 | snarf.m4\ | 67 | snarf.m4 |
68 | indent.pro | ||
69 | 68 | ||
70 | BUILT_SOURCES=\ | 69 | BUILT_SOURCES=\ |
71 | $(BI_FILES:.bi=.c)\ | 70 | $(BI_FILES:.bi=.c)\ |
@@ -88,17 +87,9 @@ SUFFIXES = .bi .c .def .h .mfi .mf | |||
88 | 87 | ||
89 | M4=m4 | 88 | M4=m4 |
90 | 89 | ||
91 | if COND_GNU_INDENT | ||
92 | REINDENT = | INDENT_PROFILE=$(srcdir)/indent.pro $(INDENT) | ||
93 | else | ||
94 | REINDENT = | ||
95 | endif | ||
96 | |||
97 | .bi.c: | 90 | .bi.c: |
98 | $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" \ | 91 | $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/src/builtin/snarf.m4 $< > $@ |
99 | $(srcdir)/snarf.m4 $< $(REINDENT) > $@ | ||
100 | 92 | ||
101 | .def.h: | 93 | .def.h: |
102 | $(AM_V_GEN) $(M4) --prefix \ | 94 | $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@ |
103 | $(srcdir)/init.m4 $(BI_FILES) $< $(REINDENT) > $@ | ||
104 | 95 | ||
diff --git a/src/builtin/indent.pro b/src/builtin/indent.pro deleted file mode 100644 index 45ac512e..00000000 --- a/src/builtin/indent.pro +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | // GNU indent options for formatting files generated -*- fundamental -*- | ||
2 | // from MFL .bi sources. | ||
3 | -nbad // don't force blank line after every block of declarations | ||
4 | -bap // force blank line after every procedure body | ||
5 | -nbc // don't force newline after each comma in declaration | ||
6 | -bbo // break long lines before boolean operators | ||
7 | -hnl // honour (original) newlines | ||
8 | -br // retain braces on the same line with the conditional | ||
9 | -brs // retain braces on the same line with struct definitions | ||
10 | -c33 // column number for comments following the code | ||
11 | -cd33 // column number for comments following the declaration | ||
12 | -ncdb // don't place comment delimiters on blank lines | ||
13 | -ce // 'else' remains on the same line with '}' | ||
14 | -ci4 // indent level for subsequent lines of a split statement | ||
15 | -cli0 // case label indent | ||
16 | -d0 // align separate comments with the enclosing code | ||
17 | -di1 // place identifiers in a declaration in a first available position | ||
18 | -nfc1 // don't format comments that begin in column 1 | ||
19 | -i8 // default indentation offset | ||
20 | -ip0 // indentation for old-style parameter declarations | ||
21 | -l80 // line length | ||
22 | -lp // align continuation parameters with the open parenthesis | ||
23 | -npcs // don't place a space between function name and opening quote | ||
24 | -nprs // don't delimit parenteses with spaces | ||
25 | -psl // place type of the function on a separate line | ||
26 | -sai // space between 'if' and '(' | ||
27 | -saf // space between 'for' and '(' | ||
28 | -saw // space between 'while' and '(' | ||
29 | -ncs // don't force a space after a cast | ||
30 | -nsc // don't insert asteriscs into multi-line comments | ||
31 | -sob // swallow optional blank lines | ||
32 | -nfca // don't format comments starting after the 1st column | ||
33 | -cp33 // indentation for comments following a preprocessor directive | ||
34 | -ss // force a newline between 'for (;;)' and ';' | ||
35 | -ts8 // tabspaces are placed at each 8th column | ||
36 | -il1 // offset for labels | ||
diff --git a/src/builtin/snarf.m4 b/src/builtin/snarf.m4 index 7eb7458c..2a32b02a 100644 --- a/src/builtin/snarf.m4 +++ b/src/builtin/snarf.m4 | |||
@@ -950,7 +950,7 @@ m4_undefine([<__MF_PRIV_ID__>])m4_dnl | |||
950 | m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ | 950 | m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ |
951 | >]) | 951 | >]) |
952 | void | 952 | void |
953 | MF_MODULE_NAME()_init_builtin(void) | 953 | MF_MODULE_NAME()_init_builtin() |
954 | { | 954 | { |
955 | m4_ifdef([<__MF_DEBUG>],[<m4_dnl | 955 | m4_ifdef([<__MF_DEBUG>],[<m4_dnl |
956 | debug_handle = mu_debug_register_category("MF_SOURCE_DEBUG_NAME(SOURCE)"); | 956 | debug_handle = mu_debug_register_category("MF_SOURCE_DEBUG_NAME(SOURCE)"); |