From 86fd2114ac3940e03a02e99658c8df88aed8a235 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 20 Feb 2011 23:02:43 +0100 Subject: maint: adjust cpp indentation to reflect nesting depth I.e., in a block of code that begins with an unnested "#if", put one space between the "#" in column 1 and following token. For example, -#include +# include Do this only in .c files that are part of a module I maintain. * lib/linkat.c: Filter through cppi. * lib/nanosleep.c: Likewise. * lib/openat.c: Likewise. * lib/openat-die.c: Likewise. * lib/dup3.c: Likewise. * lib/fchownat.c: Likewise. * lib/flock.c: Likewise. * lib/fsync.c: Likewise. * lib/fts.c: Likewise. * lib/getpass.c: Likewise. * lib/gettimeofday.c: Likewise. * lib/userspec.c: Likewise. * Makefile (sc_cpp_indent_check): New rule, to check this. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c3bf4a979d..398b14a10a 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,15 @@ sc_pragma_columns: exit 1; } || :; \ else :; fi +# Verify that certain (for now, only Jim Meyering's) lib/**.c files +# are consistently cpp indented. +sc_cpp_indent_check: + ./gnulib-tool --extract-filelist $$(cd modules; grep -ilr meyering .) \ + | sort -u \ + | grep 'lib/.*\.c$$' \ + | grep -v '/getloadavg\.c$$' \ + | xargs cppi -c + # Regenerate some files that are stored in the repository. regen: MODULES.html -- cgit v1.2.1