sed: more-consistent #include ordering
Be more consistent about including files in this order: - <config.h> - The "foo.h" file in this directory that defines this module’s interface. - Any other of this directory’s include files, in string syntax. - Gnulib-only include files, using angle-bracket syntax. - Include files that are standard on GNU/Linux. In each group, use alphabetical order. This is more likely to catch include-file issues, such as an include file assuming some other include file.
This commit is contained in:
1 parent
c7221b9610
commit
7a1fda23a9
8 files changed
+62
-59
No files matched your search
+9
-7
@@ -17,18 +17,20 @@
|
||||
/* compile.c: translate sed source into internal form */
|
||||
|
||||
#include "sed.h"
|
||||
|
||||
#include <c-ctype.h>
|
||||
#include <progname.h>
|
||||
#include <read-file.h>
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <obstack.h>
|
||||
#include <stdckdint.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <obstack.h>
|
||||
#include "c-ctype.h"
|
||||
#include "read-file.h"
|
||||
#include "progname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#define obstack_chunk_alloc xzalloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
+2
-2
@@ -20,10 +20,10 @@
|
||||
|
||||
#include "sed.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* indentation level when printing the program */
|
||||
|
||||
+14
-14
@@ -19,25 +19,25 @@
|
||||
|
||||
#include "sed.h"
|
||||
|
||||
#include <acl.h>
|
||||
#include <ignore-value.h>
|
||||
#include <minmax.h>
|
||||
#include <progname.h>
|
||||
#include <stat-macros.h>
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <selinux/context.h>
|
||||
#include <selinux/selinux.h>
|
||||
#include <stdckdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include "stat-macros.h"
|
||||
|
||||
#include <selinux/selinux.h>
|
||||
#include <selinux/context.h>
|
||||
#include "acl.h"
|
||||
#include "ignore-value.h"
|
||||
#include "minmax.h"
|
||||
#include "progname.h"
|
||||
#include "xalloc.h"
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* The number of extra bytes that must be allocated/usable, beyond
|
||||
the declared "end" of each line buffer that may be passed to
|
||||
|
||||
+3
-3
@@ -16,14 +16,14 @@
|
||||
|
||||
#include "sed.h"
|
||||
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <stdckdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "xalloc.h"
|
||||
#include <string.h>
|
||||
|
||||
extern bool use_extended_syntax_p;
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
#define SED_INLINE _GL_EXTERN_INLINE
|
||||
#include "sed.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include <binary-io.h>
|
||||
#include <progname.h>
|
||||
#include <version-etc.h>
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <getopt.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
@@ -28,13 +35,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "binary-io.h"
|
||||
#include "progname.h"
|
||||
#include "version.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#include "version-etc.h"
|
||||
|
||||
#define AUTHORS \
|
||||
_("Jay Fenlason"), \
|
||||
_("Tom Lord"), \
|
||||
|
||||
@@ -16,15 +16,16 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "dfa.h"
|
||||
#include "localeinfo.h"
|
||||
#include "mcel.h"
|
||||
#include "regex.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <dfa.h>
|
||||
#include <localeinfo.h>
|
||||
#include <mcel.h>
|
||||
#include <unlocked-io.h>
|
||||
|
||||
#include <regex.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "unlocked-io.h"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include <gettext.h>
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
+17
-17
@@ -18,24 +18,24 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <binary-io.h>
|
||||
#include <fwriting.h>
|
||||
#include <min-eloop-threshold.h>
|
||||
#include <minmax.h>
|
||||
#include <progname.h>
|
||||
#include <quotearg.h>
|
||||
#include <unlocked-io.h>
|
||||
#include <xalloc.h>
|
||||
|
||||
#include "binary-io.h"
|
||||
#include "min-eloop-threshold.h"
|
||||
#include "minmax.h"
|
||||
#include "quotearg.h"
|
||||
#include "unlocked-io.h"
|
||||
#include "progname.h"
|
||||
#include "fwriting.h"
|
||||
#include "xalloc.h"
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gettext.h>
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
+2
-2
@@ -14,9 +14,9 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <idx.h>
|
||||
|
||||
#include "idx.h"
|
||||
#include <stdio.h>
|
||||
|
||||
enum exit_codes {
|
||||
/* EXIT_SUCCESS is already defined as 0 */
|
||||
|
||||
Reference in new issue
Block a user